OptionsSimulate.c produces different .t8 than archive download

Posted By: SBGuy

OptionsSimulate.c produces different .t8 than archive download - 06/08/18 17:14

I'm making good progress with an options trading algo based on the Financial Hacker scripts.

However, my results are very different between the downloaded SPYa.t8 file and the SPY_SimOptions.t8 file that was generated by the OptionsSimulate.c script. I thought the downloaded file was also generated by the same script.

Any thoughts? jcl?

Thanks.
Posted By: Spirit

Re: OptionsSimulate.c produces different .t8 than archive download - 06/09/18 09:12

Are both files from the same years?
Posted By: SBGuy

Re: OptionsSimulate.c produces different .t8 than archive download - 06/10/18 03:58

Thanks for the response.

The download description on: http://zorro-trader.com/download.php, says this.

"D1 SPY Options 2011..2017 - Artificial option chain history (.t8 format, 30 MB)"

So, I assume it contains options data from 2011-2017, inclusive. Based on simulations results, it appears there are options chain data when requested by contractUpdate().

The OptionsSimulate.c script has these variables:
StartDate = 2011;
EndDate = 2017;

So, I assume it will generate options data from 2011-2017, as described in the Financial Hacker blog. The only difference as I understand it is that jcl provided a SPY.t8 download as an alternative to generating the .t8 using the script, which is time consuming.

http://www.financial-hacker.com/algorithmic-options-trading/#more-2198
Posted By: jcl

Re: OptionsSimulate.c produces different .t8 than archive download - 06/11/18 08:14

You can use the History.c script for comparing the files and checking the date range. The article was from a year ago, so the SPYa end date is certainly different to your data.
Posted By: SBGuy

Re: OptionsSimulate.c produces different .t8 than archive download - 06/11/18 18:18

Thanks for jumping in, jcl.

Where do I get History.c? it's not in my Zorro/Strategy folder, or any of the script archives at FH.

I just changed the StartDate and EndDate to [2012-2015] in the Zorro OptionsSimple.c script and the results were different between the downloaded SPYa and the newly generated SPY_SimOptions. The [2012-2015] is in the middle of the time range, so the date should be the same - right? Unless the SPY.t6 that was downloaded now is some how different than when you created SPYa last year?

Or, could it be that I'm using a newer version of R (3.4.3) than when you generated SPYa a year ago?

Thanks!
Posted By: AndrewAMD

Re: OptionsSimulate.c produces different .t8 than archive download - 06/11/18 19:33

Without digging in, I will point out that dividend-adjusted history changes for every time that there is a dividend payout.

Check this out:
https://www.nasdaq.com/symbol/spy/dividend-history

Your dividend-adjusted history will be completely different every three months!

Assuming the original script used dividend adjusted data, it should be a bit tricky to recreate the synthetic data exactly.

Finally, it is not impossible for different data vendors to have different formulas for calculating dividend-adjusted history.
Posted By: SBGuy

Re: OptionsSimulate.c produces different .t8 than archive download - 06/11/18 20:02

assetHistory is called with the UNADJUSTED flag, as pointed by the FH blog, when playing with options.
Posted By: AndrewAMD

Re: OptionsSimulate.c produces different .t8 than archive download - 06/11/18 20:19

Aha, it is unadjusted.

So which service provider is your data source for unadjusted data? And is this data identical to the Yahoo data that is no longer available? Do we even have a way to confirm this? tongue

By the way, the history script is under:
Strategy/History.c

It's available in the latest beta.

Finally, check out the Z history editor, which lets you investigate t6 files. (Last time I checked, not t8.) Get it here:
http://zorro-project.com/download.php
Posted By: SBGuy

Re: OptionsSimulate.c produces different .t8 than archive download - 06/11/18 22:44

I heard Yahoo data was shutdown,so I changed the script to use STOOQ;

assetHistory("SPY.US",FROM_STOOQ|UNADJUSTED);

I used CVStoHistory.c on the 2 .t6 files, copy and pasted in Excel, aligned date rows and saw that the datasets were pretty much the same - off by 0.01 here and there.

Wish there was a way to inspect the .t8 files.
© 2024 lite-C Forums