Skip to main content
No. of Recommendations: 3

I have been using Ameritrade's API to scrape options data in terms of current bid/ask, and the other parameters I need.

I use a spreadsheet for the input data, and have the data put back into the spreadsheet for further manipulation. This is all done in python.

For example, I have a spreadsheet and python scripts to generate the Cohen Hedged-Cash Secured PUTS on the T15_ROE_CashLtDebt screen that Mungo suggested. The python script reads the spreadsheet, pulls the options data from TDAmeritrade, and then puts the data back in the spreadsheet where further calculations are done.

For example, looking at the Mar-18-2022 options, and using a list of the top 39 companies by Cash-LTDebt, the one with the richest premium is ZM. From the script, I get:


ZM 200.4204 ZM Mar 18 2022 185 Put 185 16 16.3 7.694027155 16.09 8.697297297 14.21700013
ZM 200.4204 ZM Mar 18 2022 190 Put 190 18.1 18.6 5.199271132 18.25 9.605263158 12.4032185
ZM 200.4204 ZM Mar 18 2022 195 Put 195 20.5 20.9 2.704515109 20.62 10.57435897 10.63528434

and the spreasheet tells me that if I were doing this with $500K over 6 positions, I would need to sell 5 contracts of ZM 195's for a revenue of $10310 which I would need to back up with $87190 for an 11.82% premium. There would be 6 of these, and then the SP500 PUTS to buy to offset the whole thing, so theoretically the entire 6 positions would net 10.17% premium, be 3.85% OTM, and have a hedge cost of 19.5% for a net of 8.19% if all worked out well.


PS: Happy to share if anyone is interested. So far I haven't put any real money behind this.
Print the post  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.