Gamestudio Links
Zorro Links
Newest Posts
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (VoroneTZ), 9,291 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Issue when mixing intraday-daily data #484771
12/08/21 19:15
12/08/21 19:15
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
I am experimenting with using different indices as filters for an SPX trading system.

The SPX data are M1 ticks, index - VIX - data are D1 downloaded from IB with Download.c.

With BarZone=ET, if BarPeriod=1440, Zorro correctly automatically adjusts VIX timestamps - so that 2021-11-10 :00:00:00 is correctly interpreted as end-of-bar for 2021-11-10 - and the data are aligned. Great!

However, when BarPeriod is less than Daily, such adjustment of VIX timestamps does not occur - so VIX data are from the future and change at 00:00 UTC (despite BarZone=ET).
I tried HistoryZone = - ET when loading VIX data, but that did not solve the problem.

Re: Issue when mixing intraday-daily data [Re: Zheka] #484783
12/09/21 11:01
12/09/21 11:01
Joined: Jul 2000
Posts: 28,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
Frankfurt
It changes at 00:00 UTC because BarZone is the zone of the bars, not of the historical data. Historical data is expected in UTC with no mixed time zones or resolutions. Only for daily data with daily bars the time zone is not relevant.

You could try HistoryZone = EST before loading the VIX data. It is then converted to UTC and changes at EST midnight. I don't know it this solves the problem, but try it. Otherwise you need VIX data either with UTC market close timestamps, or with the same time zone and resolution as the SPX data.

Re: Issue when mixing intraday-daily data [Re: Zheka] #484785
12/09/21 12:04
12/09/21 12:04
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
00:00 UTC = 19:00/20:00 ET, which is closer to reality than 00:00 EST if HistoryZone=EST - it moves timestamps opposite to the desired direction. That's why I tried HistoryZone= - EST, but that does not apply dst correctly.

To adjust timestamps at data loading there has to be a timezone setting in assetHistory(); it is impractical/cumbersome to adjust timestamps 'manually' in a temporary dataset in Live.

So, the suggestion is to make Zorro apply the same 1 Day correction logic it already does for timestamps that only have 'date' without 'time'...

That's how it is supposed to work according to the manual:
Quote
For daily (D1) price history with timestamps containing the date only - i.e. no time of day - a bar time offset is automatically added.
Then - even if the exact end-of-day will be different by a couple of hours - there would be no peeking into the future and would be practically manageable in live.


..I tried TickFix - but it does not work with 'date-only' resolutions...(what's the benefit of restricting it only to daily resolutions?)

Last edited by Zheka; 12/09/21 12:27.
Re: Issue when mixing intraday-daily data [Re: Zheka] #484808
12/11/21 10:50
12/11/21 10:50
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
HistoryZone of course moves timestamps in opposite direction. You want to convert local time to UTC, not the other way around.

Zorro also does not adjust timestamps, it only uses a default bar time offset 15:40 for daily bars. The timestamps in D1 historical data are only changed with HistoryZone.

Re: Issue when mixing intraday-daily data [Re: Zheka] #484825
12/13/21 14:54
12/13/21 14:54
Joined: Jul 2017
Posts: 787
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 787
Ok, clear.


Moderated by  Petra 

Gamestudio download | 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