brandongalbraith / thetagang-1

Tools for thetagang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSPFinder

CSPFinder is a tool to compare ROI of selling Cash Secure Put options between different tickers for different expiry dates. It is intended to help open new cash secured put positions.

Commands

currently it just takes in path to a configuration file

./cspfinder -config ./config.json
*---------------------*---------*-------*----------------------*---------------*-----------------------*-------------------*---------*
|       SYMBOL        | STRIKE  |  BID  | TOTAL PREMIUM EARNED | EXPIRY DATE:  | TOTAL NO OF CONTRACTS | PERCENTAGE RETURN |  200MA  |
*---------------------*---------*-------*----------------------*---------------*-----------------------*-------------------*---------*
| AMD210924P00100000  | 100.00  | 0.75  | 2550.00              | 2021-09-24    | 34.00                 | 0.75              | 88.85   |
| PLTR210924P00022000 | 22.00   | 0.01  | 154.00               | 2021-09-24    | 154.00                | 0.05              | 23.63   |
| AMZN210924P03400000 | 3400.00 | 17.20 | 1720.00              | 2021-09-24    | 1.00                  | 0.51              | 3338.55 |
| TSLA210924P00650000 | 650.00  | 1.00  | 500.00               | 2021-09-24    | 5.00                  | 0.15              | 669.52  |
| GOOG210924P02700000 | 2700.00 | 8.00  | 800.00               | 2021-09-24    | 1.00                  | 0.24              | 2478.20 |
| AAPL210924P00145000 | 145.00  | 1.42  | 3266.00              | 2021-09-24    | 23.00                 | 0.96              | 135.45  |
*---------------------*---------*-------*----------------------*---------------*-----------------------*-------------------*---------*
*---------------------*---------*-------*----------------------*---------------*-----------------------*-------------------*---------*
|       SYMBOL        | STRIKE  |  BID  | TOTAL PREMIUM EARNED | EXPIRY DATE:  | TOTAL NO OF CONTRACTS | PERCENTAGE RETURN |  200MA  |
*---------------------*---------*-------*----------------------*---------------*-----------------------*-------------------*---------*
| AMD211001P00100000  | 100.00  | 1.39  | 4726.00              | 2021-10-01    | 34.00                 | 1.39              | 88.85   |
| PLTR211001P00022000 | 22.00   | 0.04  | 616.00               | 2021-10-01    | 154.00                | 0.18              | 23.63   |
| AMZN211001P03400000 | 3400.00 | 30.25 | 3025.00              | 2021-10-01    | 1.00                  | 0.89              | 3338.55 |
| TSLA211001P00650000 | 650.00  | 2.42  | 1210.00              | 2021-10-01    | 5.00                  | 0.36              | 669.52  |
| GOOG211001P02700000 | 2700.00 | 14.20 | 1420.00              | 2021-10-01    | 1.00                  | 0.42              | 2478.20 |
| AAPL211001P00145000 | 145.00  | 2.15  | 4945.00              | 2021-10-01    | 23.00                 | 1.45              | 135.45  |
*---------------------*---------*-------*----------------------*---------------*-----------------------*-------------------*---------*
*---------------------*--------*-------*----------------------*---------------*-----------------------*-------------------*--------*
|       SYMBOL        | STRIKE |  BID  | TOTAL PREMIUM EARNED | EXPIRY DATE:  | TOTAL NO OF CONTRACTS | PERCENTAGE RETURN | 200MA  |
*---------------------*--------*-------*----------------------*---------------*-----------------------*-------------------*--------*
| TSLA210924P00650000 | 650.00 | 1.00  | 500.00               | 2021-09-24    | 5.00                  | 0.15              | 669.52 |
| TSLA211001P00650000 | 650.00 | 2.42  | 1210.00              | 2021-10-01    | 5.00                  | 0.36              | 669.52 |
| TSLA211008P00650000 | 650.00 | 6.25  | 3125.00              | 2021-10-08    | 5.00                  | 0.92              | 669.52 |
| TSLA211015P00650000 | 650.00 | 8.15  | 4075.00              | 2021-10-15    | 5.00                  | 1.20              | 669.52 |
| TSLA211022P00650000 | 650.00 | 10.30 | 5150.00              | 2021-10-22    | 5.00                  | 1.51              | 669.52 |
| TSLA211119P00650000 | 650.00 | 20.90 | 10450.00             | 2021-11-19    | 5.00                  | 3.07              | 669.52 |
| TSLA211217P00650000 | 650.00 | 27.80 | 13900.00             | 2021-12-17    | 5.00                  | 4.09              | 669.52 |
| TSLA220121P00650000 | 650.00 | 37.20 | 18600.00             | 2022-01-21    | 5.00                  | 5.47              | 669.52 |
| TSLA220318P00650000 | 650.00 | 50.05 | 25025.00             | 2022-03-18    | 5.00                  | 7.36              | 669.52 |
*---------------------*--------*-------*----------------------*---------------*-----------------------*-------------------*--------*

Config.json

Configuration file to accept inputs for CSPFinder

  • symbolpricemap: a map of ticker symbol and the strike price to compare csp options. Ideally, this is the price you are comfortable getting assigned at, depending on your risk tolerance
  • totalcapital: total buying power in USD
  • outputformat:
    • groupbydate: groups options by expiry date
    • groupbysymbol: groups options by their symbol/ticker

About

Tools for thetagang


Languages

Language:Go 100.0%