contract() - range of timestamps in [Test] mode

Posted By: AndrewAMD

contract() - range of timestamps in [Test] mode - 01/07/21 18:35

jcl,

In [Test] mode, suppose you have an intraday t8 file, and there are four actively traded and unexpired futures contracts, say, for ES (E-Mini).

Every minute, some contracts will have a tick, and some will not. There is a varying number every time.

So when using BarPeriod=1, you call contractUpdate(). It only loads as many contracts as exist at the given timestamp rather than all actively traded contracts.

Why not allow the user to select a date range of ticks? Now I understand there can be duplicate contracts in a given date range, so maybe have it output an array of CONTRACT pointers, so that only the most recent unique contract can be selected in the set.

In other words, the most recent March 2021 ES tick would be picked up and not any prior one. Same for the most recent June 2021 ES tick.

The attached snapshot helps to illustrate the problem.

I do realize that one workaround is to fill the t8 file with many zero-volume ticks for all contracts, but that would make the t8 files larger.

[Linked Image]

Attached File
Snap.PNG  (155 downloads)
Posted By: jcl

Re: contract() - range of timestamps in [Test] mode - 01/08/21 11:38

A solution could be a contractUpdate mode that does not discard the old contracts, but just updates their prices. I'll put it on our list.
Posted By: AndrewAMD

Re: contract() - range of timestamps in [Test] mode - 01/08/21 14:12

Yes, that should work. Thanks!
© 2024 lite-C Forums