Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (sleakz, AndrewAMD), 684 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
OptionsSimulate.c produces different .t8 than archive download #473014
06/08/18 17:14
06/08/18 17:14
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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.

Re: OptionsSimulate.c produces different .t8 than archive download [Re: SBGuy] #473023
06/09/18 09:12
06/09/18 09:12
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Are both files from the same years?

Re: OptionsSimulate.c produces different .t8 than archive download [Re: Spirit] #473028
06/10/18 03:58
06/10/18 03:58
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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

Re: OptionsSimulate.c produces different .t8 than archive download [Re: SBGuy] #473045
06/11/18 08:14
06/11/18 08:14
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: OptionsSimulate.c produces different .t8 than archive download [Re: jcl] #473056
06/11/18 18:18
06/11/18 18:18
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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!

Re: OptionsSimulate.c produces different .t8 than archive download [Re: SBGuy] #473063
06/11/18 19:33
06/11/18 19:33
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
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.

Re: OptionsSimulate.c produces different .t8 than archive download [Re: AndrewAMD] #473064
06/11/18 20:02
06/11/18 20:02
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
assetHistory is called with the UNADJUSTED flag, as pointed by the FH blog, when playing with options.

Re: OptionsSimulate.c produces different .t8 than archive download [Re: SBGuy] #473065
06/11/18 20:19
06/11/18 20:19
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
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

Re: OptionsSimulate.c produces different .t8 than archive download [Re: AndrewAMD] #473067
06/11/18 22:44
06/11/18 22:44
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1