Anton,
I sent a detailed spec to Sergey on Thurs AM but never heard anything so I wasn't sure if anyone at OQ was looking at my issue. However, thank you for getting back to me and I apologize for any confusion.
I don't think switching in between contracts as you've mentioned will help me in this case.
Herein is a detailed description of the problem and a possible simple solution using DataManager in OQ:
I. Description of problem:
My strategy includes an algorithm with a historical volatility parameter. This parameter requires approximately eight weeks of tick data on the front-month contract.
This means that for the first eight weeks of trading for the new front-month contract my strategy must be able to call a bar series consisting of the new front-month contract AND the most recently expired contract.
Specifically, this must be a bar series using a constant back-adjustment method; i.e., where the difference between the front month and expired contract is added to the expired contract. Ideally, I'd like to be able to select the rollover date but using the expiration date should suffice.
So, as you see, this is not just a matter of switching in between contracts. The algs in my strategy require a continuous contract with a constant back-adjustment for use in real-time trading. Otherwise, I can't even run the strategy until the front-month contract has eight weeks of historical data.
II. A possible simple but messy solution using Data Manager in OQ:
Iâm thinking that the custom back-adjustment mentioned above does not necessarily need to be done from within OQ. If I could append the data series files in the DataManager such that I could take a current contract and append the file with a back-adjusted version of the 1st nearest expired contract then this would accomplish the same thing.
I could perform the back-adjustment externally as long as I could use the OQ bar series for real-time trading. [I know that OQ allows the user to insert one price at a time but Iâd need to insert hundreds or even thousands of prices.]
III. How TradeStation (TS) allows users to define custom continuous futures contracts for real-time trading or backtesting:
In TS, to trade or chart the Jun 08 Euro FX contract (ECM08) using a custom continuous contract I would use the following symbology:
@ECM08=102XC
The =102XC suffix can be explained as follows:
--The 1st digit (1, in this instance) tells us to use the 1st nearest contract for our back-adjustment
--The 2nd and 3rd digits are the number of days (02 days in this instance)
--The 4th digit, X, tells us to consider the 02 days above to be = trading days prior to expiration
--The 5th digit, C, tells us to use a constant back adjustment (i.e., not a ratio)
So, all together, weâve customized the back-adjustment for both rollover day and method (constant, not ratio) by specifying that we want the back-adjustment to reference the 1st nearest contract, starting from 2 trading days prior to expiry, using a constant back-adjustment method.
BTW, NinjaTrader and others offer a back-adjustment feature similar to TS. But, TS's is the most flexible among the retail offerings.