sirnfs / OptionSuite

Option and stock backtester / live trader
MIT License
241 stars 58 forks source link

WARNING:root:No matching PUT was found in the option chain for the strangle. #3

Closed Friedrichz closed 5 years ago

Friedrichz commented 5 years ago

Hey guys, Terrific package, thank you for open-sourcing! I have been trying to make a test run with the AAPL dataset you kindly provided & the preset strangle strategy... When running it logs the following:

WARNING:root:No matching PUT was found in the option chain for the strangle. WARNING:root:No matching CALL was found in the option chain for the strangle. INFO:root:Net liq: 1000000.000000. INFO:root:The AAPL position was closed.

went through the individual modules, but could not discern the problem / haven´t made any changes to the code so far. He seems to be doing only two iterations in total when handling events Any idea what might be the issue?

Thank you!

sirnfs commented 5 years ago

Hi,

The issue is that the sample data provided doesn't the right options chain to run the strangle strategy. You would normally need to buy the data from iVolatility to get the full dataset, but I am attaching a five day sample that you can use to get started.

RawIV_5day_sample.zip

Hope this helps you get going. Let me know if this resolves the issue.

Cheers,

Mike

Friedrichz commented 5 years ago

Hi Mike,

Thanks, this one runs through..but it´s the same format right? So shouldn´t it be enough to simply change the paths in backTester.py & combineCSV.py as well as the parameters in 'underlying' & 'startTime' ? Which parts am I missing?

Still getting acquainted with the package so apologize for the noob Qs. I appreciate it!

sirnfs commented 5 years ago

Hi,

So the script is looking for ~16 delta puts and calls if you haven't changed the default options. I don't believe the sample data I provided originally satisfies these requirements.

Thanks,

Mike

sirnfs commented 5 years ago

Going to go ahead and close this issue, but feel free to create another if there is still an issue. Thanks!