Gamestudio Links
Zorro Links
Newest Posts
Access string content through another string
by ChrstphFr
47 minutes 19 seconds ago
How to return a vector from a function
by jumpman
Today at 01:24
Vector Displacement, realtime Blendshapes
by jumpman
Yesterday at 23:46
Code Repository
by OptimusPrime
Yesterday at 13:25
Votes for future features
by OptimusPrime
Yesterday at 07:18
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14
08/13/18 22:44
Getting Maximum and Minimun Values from Array
by Tavasy
08/13/18 20:38
AUM Magazine
Latest Screens
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
Who's Online
11 registered (Ulenspegel, jyd, ChrstphFr, OptimusPrime, HamSelv, jumpman, AndrewAMD, wdlmaster, 3 invisible), 489 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
toto, FloMi, behr065, OptimusPrime, bailemad
18026 Registered Users
Topic Options
Rate This Topic
#473093 - 06/13/18 00:24 iVolatility options csv file to .t8 Zorro file
SBGuy Offline
Newbie

Registered: 05/27/18
Posts: 40
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
Senior Member

Registered: 02/21/17
Posts: 335
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
Newbie

Registered: 05/27/18
Posts: 40
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
Newbie

Registered: 05/27/18
Posts: 40
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
Senior Member

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

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

Registered: 05/27/18
Posts: 40
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