Hi everyone,
So I come here to see if someone can share some light with me on something.
I am trying to run al Algorithm that buys and sells put options on SPY based on some signals on the stock itself.
I have a csv file with the time series containing price, strike price, date and expiry for all available put options on SPY between 2012 - 2013.
I am calling this file to the algo with the Fetcher, however each option has an ID, which cannot be mapped as a sid(), and therefore they are not recognised as tradable securities.
I have read some entries in the forum with different solutions, but I haven't found a way to make Quantopian to recognise the put options as individual securities without mapping them into sid(). All I have found in the Fetcher help is to upload the file either with a symbol column, which again will be mapped to valid securities (Sid), or to upload the file as a signal to trigger transactions on stocks. But as you can tell, the file is none of the above.
Another way I found is to define the universe by fetching another CSV with the option data. This however works in the same way, by mapping the security into a sid(). So it did not work either. I've been reading about it but I am kind of stuck. Do you maybe have an advice on how to approach this issue, namely, how to set the Option ID into a tradable security that I can programme to buy and sell according to pre-defined signals?
The URL for the file I am currently using is:
https://dl.dropboxusercontent.com/s/ukulrncgnhif3ue/SPY.csv?dl=0
I attach the algorithm as well, which is not yet finished as I am currently trying to set the options as tradable securities.
Thank you all in advance.
Cheers
Seb