How does the NT optimizer handle rollover dates? - NinjaTrader Programming | futures io social day trading
futures io futures trading


How does the NT optimizer handle rollover dates?
Updated: Views / Replies:1,121 / 5
Created: by mgabriel01 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

How does the NT optimizer handle rollover dates?

  #1 (permalink)
Elite Member
Raleigh, NC
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: Mirus/Zen-Fire
Favorite Futures: ES
 
Posts: 5 since Nov 2009
Thanks: 1 given, 0 received

How does the NT optimizer handle rollover dates?

I'm puzzled by how NT 7 handles rollovers
Lets say I want to optimize my strategy using dates 3/1/2012 through 8/16/2012
This date range spans the ES0612 and ES0912 Contracts

So on June 6,7, 8, 9, 10, 11, 12, 13, and 14 -- Which contract does the strategy analyzer use to calculate results?
ES0612 or ES0912

Thanks in advance for your help

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary



mgabriel01 View Post
I'm puzzled by how NT 7 handles rollovers
Lets say I want to optimize my strategy using dates 3/1/2012 through 8/16/2012
This date range spans the ES0612 and ES0912 Contracts

So on June 6,7, 8, 9, 10, 11, 12, 13, and 14 -- Which contract does the strategy analyzer use to calculate results?
ES0612 or ES0912

Thanks in advance for your help

Rollover dates can falsify a backtest, if you enter a position prior to rollover and exit that trade after rollover. In real life you would have to exit the position which you had entered in the old front month and then reenter the position by entering a similar position in the new front month contract. NinjaTrader will not exit and reenter the position for you during a backtest. The accuracy of the backtest will depend on the data that you use.

Non-merge-backadjusted contracts: These are actually the underlying contracts that you trade. This is not artificially created data but it is all real data from the exchange. If the market is in contango (positive rollover offset), the backtest will show a windfall gain for a long position that you hold during rollover. You will not be able to realize this gain in real trading, as you have to roll your position and enter at a higher price than the price, at which you exited the position.

Merge-backadjusted contracts: The rollover gap is eliminated from the data and your backtest should show the correct result. The only thing the backtest will not take into account is the spread and the slippage that you paid, when rolling your position. Also the spread between the old and the new contract maybe slightly different than the offset (spread at the close prior to rollover day) used for backadjusting your data.

The merge-backadjusted contract is the only contract, which will not falsify backtests. The price that you pay for getting your trades listed correctly, is that the absolute prices shown for the prior contracts are false. For example, if you have an indicator, which uses round levels to identify support and resistance, it is obvious, that it would give you false resulsts on backadjusted data.

My recommendation is that merge-backadjusted data should be used, if you backtest over a period of 1 to 3 years, and if there is no specific reason not to use it. Over longer periods there may be better options.

If you do not like, you can also do your backtest on single month contract data and then manually correct the trades held during rollover. If you do not hold any trades over night, then you do not need any backadjustment either, as only the trades are affected that are active during the rollover of the position.

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
Raleigh, NC
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: Mirus/Zen-Fire
Favorite Futures: ES
 
Posts: 5 since Nov 2009
Thanks: 1 given, 0 received


Fat Tails View Post
Rollover dates can falsify a backtest, if you enter a position prior to rollover and exit that trade after rollover. In real life you would have to exit the position which you had entered in the old front month and then reenter the position by entering a similar position in the new front month contract. NinjaTrader will not exit and reenter the position for you during a backtest. The accuracy of the backtest will depend on the data that you use.

Non-merge-backadjusted contracts: These are actually the underlying contracts that you trade. This is not artificially created data but it is all real data from the exchange. If the market is in contango (positive rollover offset), the backtest will show a windfall gain for a long position that you hold during rollover. You will not be able to realize this gain in real trading, as you have to roll your position and enter at a higher price than the price, at which you exited the position.

Merge-backadjusted contracts: The rollover gap is eliminated from the data and your backtest should show the correct result. The only thing the backtest will not take into account is the spread and the slippage that you paid, when rolling your position. Also the spread between the old and the new contract maybe slightly different than the offset (spread at the close prior to rollover day) used for backadjusting your data.

The merge-backadjusted contract is the only contract, which will not falsify backtests. The price that you pay for getting your trades listed correctly, is that the absolute prices shown for the prior contracts are false. For example, if you have an indicator, which uses round levels to identify support and resistance, it is obvious, that it would give you false resulsts on backadjusted data.

My recommendation is that merge-backadjusted data should be used, if you backtest over a period of 1 to 3 years, and if there is no specific reason not to use it. Over longer periods there may be better options.

If you do not like, you can also do your backtest on single month contract data and then manually correct the trades held during rollover. If you do not hold any trades over night, then you do not need any backadjustment either, as only the trades are affected that are active during the rollover of the position.



Thank you sir. This is the clearest explanation I have see on this topic!

Reply With Quote
 
  #5 (permalink)
Patient Discipline
Bellingham, WA USA
 
Futures Experience: Beginner
Platform: NT
Broker/Data: Mirus (Broker), Continuum (Data), Dorman (Clearing)
Favorite Futures: Futures
 
aventeren's Avatar
 
Posts: 202 since Mar 2013
Thanks: 426 given, 191 received


Fat Tails View Post
Rollover dates can falsify a backtest, if you enter a position prior to rollover and exit that trade after rollover. In real life you would have to exit the position which you had entered in the old front month and then reenter the position by entering a similar position in the new front month contract. NinjaTrader will not exit and reenter the position for you during a backtest. The accuracy of the backtest will depend on the data that you use.

Non-merge-backadjusted contracts: These are actually the underlying contracts that you trade. This is not artificially created data but it is all real data from the exchange. If the market is in contango (positive rollover offset), the backtest will show a windfall gain for a long position that you hold during rollover. You will not be able to realize this gain in real trading, as you have to roll your position and enter at a higher price than the price, at which you exited the position.

Merge-backadjusted contracts: The rollover gap is eliminated from the data and your backtest should show the correct result. The only thing the backtest will not take into account is the spread and the slippage that you paid, when rolling your position. Also the spread between the old and the new contract maybe slightly different than the offset (spread at the close prior to rollover day) used for backadjusting your data.

The merge-backadjusted contract is the only contract, which will not falsify backtests. The price that you pay for getting your trades listed correctly, is that the absolute prices shown for the prior contracts are false. For example, if you have an indicator, which uses round levels to identify support and resistance, it is obvious, that it would give you false resulsts on backadjusted data.

My recommendation is that merge-backadjusted data should be used, if you backtest over a period of 1 to 3 years, and if there is no specific reason not to use it. Over longer periods there may be better options.

If you do not like, you can also do your backtest on single month contract data and then manually correct the trades held during rollover. If you do not hold any trades over night, then you do not need any backadjustment either, as only the trades are affected that are active during the rollover of the position.

Fat Tails--

I have a question about how to backtest a continuous contract. I'm going to use the ES ##-## contract as an example.

Please assume that I have downloaded all of the available ES XX-XX specific contract data, and that I have imported the ES XX-XX contract into NT7 (i.e., ES 03-07), and I have also imported the ES XX-XX data into the ES ##-## contract by renaming the ES XX-XX contract file name to ES ##-##.txt and then importing into NT7 (i.e., changed ES 03-07.txt to ES ##-##.txt)--and after finishing the ES ##-## import changed the file name back to ES XX-XX (i.e., ES ##-##.txt to ES 03-07.txt). From my understanding, this is the recommended approach to creating a continuous contract (which I am open to critique!).

If one wanted to then run an optimized test period for purposes of then running a walk forward analysis after the initial test, do you know how does NT7's Strategy Analyzer's Optimizer treat this continuous contract data during rollover? How can we know that the optimized results are an accurate backtest?

Thanks for your help! I really appreciate it.

All best,

Aventeren

Reply With Quote
 
  #6 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,599 received
Forum Reputation: Legendary


aventeren View Post
Fat Tails--

I have a question about how to backtest a continuous contract. I'm going to use the ES ##-## contract as an example.

Please assume that I have downloaded all of the available ES XX-XX specific contract data, and that I have imported the ES XX-XX contract into NT7 (i.e., ES 03-07), and I have also imported the ES XX-XX data into the ES ##-## contract by renaming the ES XX-XX contract file name to ES ##-##.txt and then importing into NT7 (i.e., changed ES 03-07.txt to ES ##-##.txt)--and after finishing the ES ##-## import changed the file name back to ES XX-XX (i.e., ES ##-##.txt to ES 03-07.txt). From my understanding, this is the recommended approach to creating a continuous contract (which I am open to critique!).

If one wanted to then run an optimized test period for purposes of then running a walk forward analysis after the initial test, do you know how does NT7's Strategy Analyzer's Optimizer treat this continuous contract data during rollover? How can we know that the optimized results are an accurate backtest?

Thanks for your help! I really appreciate it.

All best,

Aventeren

ES ##-## is a continuous contract as supplied by your data provider. You have to contact your data provider to find out how it has been put together. I do not know whether it can be backtested.

I do not understand all that complicated stuff about renaming contracts from XX to ##. This does not make sense. There is nothing that should be renamed or tweaked.

If you want to do a backtest, please use single-month contracts and select the merge policy "MergeBackAdjusted". NinjaTrader will then build the data series from backadjusted contracts as needed for a backtest.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:

Reply



futures io > > > > > How does the NT optimizer handle rollover dates?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing rollover dates for CL DarrenH Reviews of Brokers and Data Feeds 57 February 4th, 2015 01:30 PM
NT Optimizer crashes Baseheadz NinjaTrader Programming 2 August 22nd, 2011 03:47 AM
NT 7.0.0.21 : No data for FDAX on rollover day! Fat Tails NinjaTrader 9 July 10th, 2011 10:21 AM
MATLAB Dates on the x - axis jakfourie Matlab, R project and Python 11 June 27th, 2011 03:55 AM
NT optimizer not working as expected mmather Traders Hideout 2 March 24th, 2010 08:45 PM


All times are GMT -4. The time now is 01:23 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-11 in 0.15 seconds with 19 queries on phoenix via your IP 54.145.16.43