Time Zone of Zorro Historical Data

Posted By: boatman

Time Zone of Zorro Historical Data - 12/06/15 10:39

What is the time zone of the historical data available on the Zorro website? I had assumed that it is UCT, however it appears to be aligned to data that I use from another source (histdata.com) which is time stamped with EST times. Or does Zorro align all data to UCT, regardless of source? If so, how does it accomplish this?
Posted By: jcl

Re: Time Zone of Zorro Historical Data - 12/07/15 09:49

The time zone is UTC. All data was downloaded from FXCM, and they send it with UTC time by default, so there was no alignment necessary. Are you sure with the EST from Histdata? For most assets you can find out the time zone with a volatility check, using the plotDay or plotWeek functions.
Posted By: boatman

Re: Time Zone of Zorro Historical Data - 12/07/15 20:29

Thanks for the tip, I'll investigate further.
Posted By: Sphin

Re: Time Zone of Zorro Historical Data - 01/16/16 19:53

From the FAQ of Histdata they describe their M1 bars time stamped EST without Day Light Savings adjustments and as bid prices.

1. Does convert.c convert the time (with DATE ConvertTime(...)) to UTC or do I have to change the code to do it?

2. According to the manual bid prices have to be converted to ask prices by adding the broker's spread. Is this already considered in convert.c (I can't find it in the #ifdef HISTDATA, but maybe this is only my problem) or do I have to add the spread from AssetFix.csv by code, or is this covered by "Using ask or bid price history has however normally no effect on backtest results"?

Thanks, Sphin
Posted By: jcl

Re: Time Zone of Zorro Historical Data - 01/18/16 10:29

You have to change that. If the price history is EST, then you need to add 5 hours, i.e. 5./24., to the time value returned by ConvertTime. Converting bid to ask prices however is normally not necessary, since it should make no noticeable difference in the backtest.
Posted By: nanotir

Re: Time Zone of Zorro Historical Data - 01/18/16 22:03

Where should it be changed? In the convert script or in the cvs files?
Posted By: Sphin

Re: Time Zone of Zorro Historical Data - 01/18/16 22:44

I'm not sure but isn't it more effort? Adding 5 hours results in times from 24:00 to 28:00 so I think these hours must be merged anyway into next day and then into next month and at the end of a year you have 5 hours left for the next YYYY.bar. Therefore at the beginning of a year you must borrow 5 hours from the year before. Maybe there is a library for adding hours to a datetime, this would make it surely a bit easier.
Posted By: jcl

Re: Time Zone of Zorro Historical Data - 01/19/16 12:34

You're thinking too complicated. The time is just a straight var on which you can add hours or minutes without borrowing from the next day or year.

DATE ConvertTime(...)
{
...
SystemTimeToVariantTime(&Time,&vTime);
#ifdef HISTDATA
vTime += 5./24.; // add 5 hours for converting EST to UTC
#endif
return vTime;
}

I have not tried it, but it should work.
Posted By: Sphin

Re: Time Zone of Zorro Historical Data - 01/19/16 21:11

Thanks, this works - at least there are no errors.
© 2024 lite-C Forums