Gamestudio Links
Zorro Links
Newest Posts
Help with Data import to T1
by AndrewAMD
45 minutes 48 seconds ago
Using ":L" & ":S" causes 2 possible bug(s) or is it bad coding?
by AndrewAMD
Today at 03:54
Correlation -1.#IND00
by AndrewAMD
01/21/19 17:37
Basic thread safety question
by Superku
01/20/19 18:15
Blog Post: Get Historical Data from Darwinex REST API w/ Zorro
by AndrewAMD
01/19/19 22:19
Reseting a static variable - the next day
by OptimusPrime
01/19/19 19:48
Train algorithms separatery
by 3dgamelight
01/18/19 10:37
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
12 registered (Iglarion, AndrewAMD, Michael_Schwarz, ags, chsmac85, kvm, ibne, alibaba, 3 invisible), 431 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
laz, ramonne, SibJac, Evael, NRW
18156 Registered Users
Topic Options
Rate This Topic
#473093 - 06/13/18 00:24 iVolatility options csv file to .t8 Zorro file
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 54
So, I decided to buy some real options data from iVolatility for my options backtesting.

However, there's no Zorro script for converting CSV to .t8 file. Anyone care to share a few lines of code on how I might do this?

CSVtoHistory only produces .t6 files.

Thanks.

Top
#473094 - 06/13/18 02:32 Re: iVolatility options csv file to .t8 Zorro file [Re: SBGuy]
AndrewAMD Online
User

Registered: 02/21/17
Posts: 542
Loc: Chicago
The manual is your friend! laugh

You can parse CSV to t8:
http://zorro-project.com/manual/en/data.htm

CSVtoHistory is a great template. So modify it to suit your needs.

Other resources:
http://zorro-project.com/manual/en/file_.htm
http://zorro-project.com/manual/en/str_.htm

Top
#473106 - 06/14/18 01:05 Re: iVolatility options csv file to .t8 Zorro file [Re: AndrewAMD]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 54
Well, I have been going to my friendly manual before posting for help. However, it is not being cooperative, or I'm still very rusty with coding.

Anyhow, I successfully made a T8 file, verified with History.c, but only after manually changing the format of the Expiration Date field in the CSV file using Excel. Trying to be less of a hacker, I would like to massage that field in my Zorro script.

The problem is that the Expiration Date string appears as 3/24/2017, where the month and day is sometimes 1 or 2 chars. I need to transpose this into an 8 digit long - YYYYMMDD, which is what the t8 file format requires.

I'm been hacking with strdate, wdatef, ymd, strf, etc. all day and can't seem to get to YYYYMMDD.

How would you do this Master Andrew? I'm sure you probably have a 1 liner for this problem :-)

Many thanks!



Edited by SBGuy (06/14/18 01:06)

Top
#473108 - 06/14/18 01:27 Re: iVolatility options csv file to .t8 Zorro file [Re: SBGuy]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 54
Wait.... Here is the solution!

ymd(wdatef("%m/%d/%Y",MyDate)

I'm going to post the full script when I'm done. No one should have to spend this much time writing a damn CSV import script, when whe should be spending time making money! :-)

Top
#473109 - 06/14/18 01:31 Re: iVolatility options csv file to .t8 Zorro file [Re: SBGuy]
AndrewAMD Online
User

Registered: 02/21/17
Posts: 542
Loc: Chicago
Yay! laugh

Top
#473131 - 06/15/18 18:07 Re: iVolatility options csv file to .t8 Zorro file [Re: AndrewAMD]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 54
I had some help from the guys at oP and they will post the final script on the manual. There were a lot of nuances that were not well documented when it comes to .t8 files.

Top



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

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