NexusFi: Find Your Edge


Home Menu

 





continuous contract in NT7 /merge policy / rollover


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 24 posts (68 thanks)
    2. looks_two josh with 14 posts (3 thanks)
    3. looks_3 monolisa with 4 posts (0 thanks)
    4. looks_4 monpere with 3 posts (4 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.8 thanks per post
    2. looks_two KahunaDog with 1.5 thanks per post
    3. looks_3 monpere with 1.3 thanks per post
    4. looks_4 josh with 0.2 thanks per post
    1. trending_up 36,634 views
    2. thumb_up 79 thanks given
    3. group 18 followers
    1. forum 65 posts
    2. attach_file 16 attachments




 
Search this Thread

continuous contract in NT7 /merge policy / rollover

  #11 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,216 since Jan 2011
Thanks Given: 6,752
Thanks Received: 18,136


Fat Tails View Post
For most commodities it is more work, as you will have to determine rollover buy using a rule such as volume crossover or open interest crossover and then enter the rollover date manually.

@Fat Tails, on oil, I have switched to the new contract when the volume moves to the new contract, which is often a day or two prior to the official rollover date--but I can't remember how this works with merging. If I recall, I had an issue where it didn't back-adjust until the actual rollover date. But I think that the offset value is not calculated until the rollover date, so there will be a gap if I change the rollover date manually ... with this in mind, the whole point is, what should I do to get the data merged and back-adjusted if I roll over before the official rollover date?

EDIT: Also, with Kinetick or IQFeed real-time feeds, if I'm doing the method of merging back-adjusted non-continuous contracts, does it matter whether I specify that the feed is to "use back-adjusted data" in the account connection options? I'd like to also be able to look at the continuous contract I suppose, but I don't plan on using it much. I noticed that if I tell it to use back-adjusted data that the continuous contract (##-##) becomes almost identical to the merged, back-adjusted current month contract. But will this setting affect anything other than the continuous contract?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #12 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


josh View Post
@ Fat Tails, on oil, I have switched to the new contract when the volume moves to the new contract, which is often a day or two prior to the official rollover date--but I can't remember how this works with merging.

There is no official rollover date for oil. The default rollover date shown by NinjaTrader is not an official rollover date.


josh View Post
If I recall, I had an issue where it didn't back-adjust until the actual rollover date.

Not, if you have entered the rollover date correctly.


josh View Post
But I think that the offset value is not calculated until the rollover date, so there will be a gap if I change the rollover date manually ... with this in mind, the whole point is, what should I do to get the data merged and back-adjusted if I roll over before the official rollover date?

The offset is calculated by NinjaTrader from daily data as the difference between the closing (settlement) prices of the old and new front month contract on the day prior to rollover date.If you change the rollover date under instrument settings, you should also make sure to delete the offset, if it has already been entered or calculated. NinjaTrader will then calculate the offset correctly.

The merge-backajdusted contract is generated from different contract months by using the offsets and there will be no gaps at the start of the rollover day session.


josh View Post
EDIT: Also, with Kinetick or IQFeed real-time feeds, if I'm doing the method of merging back-adjusted non-continuous contracts, does it matter whether I specify that the feed is to "use back-adjusted data" in the account connection options?

Continuous contracts cannot be merged. The only type of contract that can be merged are single month contracts. If you want to use backadjusted data, this has nothing to do with account connection. NinjaTrader always loads the single month contracts from Kinetick. If you have selected 'MergeBackAdjusted' under Tools -> Options -> Data, NinjaTrader will display mergebackadjusted contracts for all instruments with MergePolicy 'UseGlobalSettings'. The merge policy selected under instrument settings overrides the global merge policy selected under Tools -> Options -> Data.


josh View Post
I'd like to also be able to look at the continuous contract I suppose, but I don't plan on using it much. I noticed that if I tell it to use back-adjusted data that the continuous contract (##-##) becomes almost identical to the merged, back-adjusted current month contract. But will this setting affect anything other than the continuous contract?

Continuous contracts are built from single months contracts as mergebackadjusted contracts are. There main differences are:

-> Continuous contract: It is built from several single months contracts by gradually increasing the weight of the new front month contract. This is done by Kinetick, so NinjaTrader just downloads the data and the data is displayed as it is. There are many different ways to build continuous contracts, for more details you need to contact your data provider. Continous contracts will show approixately correct price levels over longer periods, but the size of the swings is distorted and they cannot be used for backtesting. The merge policy has will have no impact on continuous contracts, as there is nothing to merge.

-> MergeBackAdjusted contract: This is built from several single month contracts as well by switching contracts on selected rollover dates and by applying offsets to compensate the gaps between the old and new front month contracts. NinjaTrader downloads the single month contract and builds the mergebackajdusted contract from that data. The mergebackadjusted contract is the correct contract to use for backtesting, as the applied offset reflects your gain/loss, when rolling a position into the new front month contract.

Reply With Quote
Thanked by:
  #13 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,216 since Jan 2011
Thanks Given: 6,752
Thanks Received: 18,136


Great post and thanks for the good information!


Fat Tails View Post
There is no official rollover date for oil. The default rollover date shown by NinjaTrader is not an official rollover date.

Ok, I thought it was the "last trade" shown here:
Light Sweet Crude Oil (WTI)


Fat Tails View Post
The offset is calculated by NinjaTrader from daily data as the difference between the closing (settlement) prices of the old and new front month contract on the day prior to rollover date.If you change the rollover date under instrument settings, you should also make sure to delete the offset, if it has already been entered or calculated. NinjaTrader will then calculate the offset correctly.

This finally makes more sense to me--a big "duh" I'm sure, but the offsets are used only for back-adjusting data when merging contracts. Makes perfect sense. Let me be sure I get the procedure though, with the following scenario:

So if it's Tuesday the 20th of the month at 5:30pm ET, and the next month contract has almost the same volume, and I decide I want to roll over to the new contract beginning with the opening of the globex session at 6pm, then I would set the rollover date in the new month contract to the 21st, and be sure there is no offset, as NT will calculate it. Of course, I need to make sure the daily bar for the current day has updated to the correct settlement price. Does that sound about right?

Based on your explanation it seems that people could have slightly different charts based back-adjusted, merged contracts, if the rollover date was one or two days off. Not much of course, but just a bit. Is that correct?


Fat Tails View Post
Continuous contracts cannot be merged. The only type of contract that can be merged are single month contracts. If you want to use backadjusted data, this has nothing to do with account connection.
...
-> Continuous contract: It is built from several single months contracts by gradually increasing the weight of the new front month contract. This is done by Kinetick, so NinjaTrader just downloads the data and the data is displayed as it is.

NT has a setting under the account connections for IQFeed and Kinetick called "Use back adjusted data." If this is checked, then the continuous (##-##) contract is displayed as almost identical to a back-adjusted merged single-month contract. However, if it is not checked, the contract is displayed as-is and the contracts differ as you explain in post #3 in this thread. I don't know if NT is doing the back-adjusting, or if it's a server-side setting with IQFeed, but the continuous contract is displayed quite differently depending on this option, which is set in the account connection and apparently has nothing to do with the global merge policy.

Reply With Quote
  #14 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


josh View Post
Ok, I thought it was the "last trade" shown here:
Light Sweet Crude Oil (WTI)

That is the expiry date. Some contracts, in particular index and currency futures have official rollover dates, when they should be rolled. These are different from the expiry date. Some exmaples here:

https://www.cmegroup.com/trading/equity-index/files/Rollover_Dates.pdf
FX Quarterly Roll Dates

There is no "official" rollover date for CL.


josh View Post
So if it's Tuesday the 20th of the month at 5:30pm ET, and the next month contract has almost the same volume, and I decide I want to roll over to the new contract beginning with the opening of the globex session at 6pm, then I would set the rollover date in the new month contract to the 21st, and be sure there is no offset, as NT will calculate it. Of course, I need to make sure the daily bar for the current day has updated to the correct settlement price. Does that sound about right?

Based on your explanation it seems that people could have slightly different charts based back-adjusted, merged contracts, if the rollover date was one or two days off. Not much of course, but just a bit. Is that correct?

Correct.


josh View Post
NT has a setting under the account connections for IQFeed and Kinetick called "Use back adjusted data.

I was not aware of this setting. It will probably autobackadjust the single month contracts.

Reply With Quote
Thanked by:
  #15 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,216 since Jan 2011
Thanks Given: 6,752
Thanks Received: 18,136


Fat Tails View Post
That is the expiry date. Some contracts, in particular index and currency futures have official rollover dates, when they should be rolled. These are different from the expiry date. Some exmaples here:

https://www.cmegroup.com/trading/equity-index/files/Rollover_Dates.pdf
FX Quarterly Roll Dates

There is no "official" rollover date for CL.

Thanks!



Fat Tails View Post
I was not aware of this setting. It will probably autobackadjust the single month contracts.

From the limited testing I just did, it seems to only affect the continuous contract. With this option checked, a single month contract displays as expected, with sparse activity many months back, so it does not look adjusted at all.

Reply With Quote
Thanked by:
  #16 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,216 since Jan 2011
Thanks Given: 6,752
Thanks Received: 18,136


Fat Tails View Post
That is the expiry date. Some contracts, in particular index and currency futures have official rollover dates, when they should be rolled. These are different from the expiry date. Some exmaples here:

https://www.cmegroup.com/trading/equity-index/files/Rollover_Dates.pdf
FX Quarterly Roll Dates

I just noticed in the first PDF document you reference above this text:


Quoting 
For example, if the rollover date is Thursday, June 9, 2011, for the S&P 500 futures contract, the
CME Globex session beginning that evening (at 3:30 p.m. Chicago time /CT) will list the Sep
2011 contract for trading and the Jun 2011 contract would no longer be available to trade on CME
Globex.

Yet the globex session for the equity products, to my knowledge, begins at 5pm CT / 6pm ET:
E-mini Dow ($5)

What is the deal here, anyone know?

Finally this: I had to change the rollover date in NinjaTrader for YM (and I suspect ES, NQ, and so on) to 6/10/2011, though the default in NT was 6/9/2011. It seems NT says that the "rollover date" is the first day of the new contract, whereas the CME's definition of rollover date (as mentioned in the same document referenced above) is the last day of the old contract.

When the rollover date was 6/9 in NT, the data on 6/9 was coming from the new contract, whereas it should have been from the old contract. When I switched it to 6/10, then the 6/9 data correctly displayed data from the old contract, and the 6/10 showed the data from the new contract.

Reply With Quote
  #17 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


josh View Post
Yet the globex session for the equity products, to my knowledge, begins at 5pm CT / 6pm ET:
E-mini Dow ($5)
What is the deal here, anyone know?

Your knowledge can be improved. The Globex session for equity products starts at 3:30 PM Central Time. Only exception is Sunday evening, when the Globex session starts at 5:00 PM Central Time. You can check the contract specifications here:

E-mini Dow ($5)


josh View Post
Finally this: I had to change the rollover date in NinjaTrader for YM (and I suspect ES, NQ, and so on) to 6/10/2011, though the default in NT was 6/9/2011. It seems NT says that the "rollover date" is the first day of the new contract, whereas the CME's definition of rollover date (as mentioned in the same document referenced above) is the last day of the old contract.

When the rollover date was 6/9 in NT, the data on 6/9 was coming from the new contract, whereas it should have been from the old contract. When I switched it to 6/10, then the 6/9 data correctly displayed data from the old contract, and the 6/10 showed the data from the new contract.

No you do not need to change the rollover date. The correct rollover date for index futures is June 9, 2010 (Thursday). And no, on rollover date the volume has already shifted to the new contract, so you definitely want to display the new contract on rollover date. The best point to roll is at the end of the session prior to rollover date or at the beginning - or prior to the beginning - of the RTH session on rollover date.

NinjaTrader requires that you enter the correct rollover date, which is June 9 to calculate the correct offsets. The offset is calculated as the difference from the closing prices of the new and old front month contracts. NinjaTrader uses daily data to calculate the offsets, in case you use Kinetick EOD the offset is calculated from the settlement prices.

If you have a look at the CME website you will find the following data for Wednesday, June 8 (day prior to rollover day)

settlement YM 06-11 -> 12030
settlement YM 09-11 -> 11962

For the merge-backadjusted contract you would therefore want to apply a negative offset of 68 points to the old front month contract - just to move that DataSeries down at the level of YM 09-11 - , which closes the gap.

If you select the correct rollover day (you need to delete your false offset to allow for automatic recalculation), NinjaTrader will display an Offset of -68 for YM.

Attached Thumbnails
Click image for larger version

Name:	Offset YM.JPG
Views:	282
Size:	28.5 KB
ID:	40800  
Reply With Quote
Thanked by:
  #18 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,216 since Jan 2011
Thanks Given: 6,752
Thanks Received: 18,136


Fat Tails View Post
The Globex session for equity products starts at 3:30 PM Central Time. Only exception is Sunday evening, when the Globex session starts at 5:00 PM Central Time.

Thanks for the info-- I was confusing the CL globex start time of 5:00pm central with the equity indexes.


Fat Tails View Post
No you do not need to change the rollover date. The correct rollover date for index futures is June 9, 2010 (Thursday).

Thanks, I have that information, yet here is my problem in understanding. The attached screen shot shows my contract with the rollover date set to 6/9, the "correct" date. The volume is only 39K, as it's with the 06-11 contract. However, on that day, Thursday, the 09-11 contract had much more volume. It seems that from the standpoint of a volume analysis, the new contract is receiving more volume on Thursday, and hence it is really the "new contract." Are you saying that that doesn't matter at all for YM/ES/etc.?

Attached Thumbnails
Click image for larger version

Name:	ymlowvol.PNG
Views:	245
Size:	52.5 KB
ID:	40806   Click image for larger version

Name:	ymthurs.PNG
Views:	242
Size:	25.8 KB
ID:	40807   Click image for larger version

Name:	ymfri.PNG
Views:	247
Size:	25.6 KB
ID:	40808  
Reply With Quote
  #19 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


josh View Post
Thanks, I have that information, yet here is my problem in understanding. The attached screen shot shows my contract with the rollover date set to 6/9, the "correct" date. The volume is only 39K, as it's with the 06-11 contract. However, on that day, Thursday, the 09-11 contract had much more volume. It seems that from the standpoint of a volume analysis, the new contract is receiving more volume on Thursday, and hence it is really the "new contract." Are you saying that that doesn't matter at all for YM/ES/etc.?

Yes, volume only shifted to the new contract on Friday. Now, rollover date means that investors shift their positions from the old front month to the new front month contract. At what stage you want to shift your contract depends on different criteria.

-> Liquidity: liquidity is still better for the old contract on rollover day, so as a day trader you might prefer the old contract
-> Data consistency: The question is whether you get different offsets and thus different indicator results, if you do not roll on Thursday but on Friday. Let us have a look at the offsets calculated from the settlement prices of Wednesday and Thursday

ES: -5.50 for rollover on Thursday, -5.50 for rollover on Friday
YM: -68 for rollover on Thursday, -69 for rollover on Friday
NQ: -3.75 for rollover on Thursday, -3.50 for rollover on Friday
TF: -3.60 for rollover on Thursday, -3.30 for rollover on Friday

The difference is not really big. In the end it depends on what the others are using.

Reply With Quote
Thanked by:
  #20 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371



josh View Post
Thanks for the info-- I was confusing the CL globex start time of 5:00pm central with the equity indexes.

Thanks, I have that information, yet here is my problem in understanding. The attached screen shot shows my contract with the rollover date set to 6/9, the "correct" date. The volume is only 39K, as it's with the 06-11 contract. However, on that day, Thursday, the 09-11 contract had much more volume. It seems that from the standpoint of a volume analysis, the new contract is receiving more volume on Thursday, and hence it is really the "new contract." Are you saying that that doesn't matter at all for YM/ES/etc.?

I want to trade the contract with the greatest volume. I use this RolloverVolume indicator to identify which contract had the greatest volume for the day before. I have it on one of my charts, and around roll over dates, I check in the morning before I start trading to see which contract I should be trading for that day.


Reply With Quote
Thanked by:




Last Updated on September 16, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts