Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back Test not matching live trades

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Back Test not matching live trades

    I have a strategy using renko bars.

    I originally developed and back tested the strategy using the order fill high resolution (1 tick) in the strategy analyzer.

    I ran the strategy yesterday 9-4-20 live in sim mode.

    I then back tested the same date with all the same parameters on the same machine and the results were very different.

    Running in sim mode during market hours returned 30 trades with a profit of $2005. The back test results returned 26 trades with a -$360 loss.
    There was a time span of 8 minutes where the sim took 4 trades and these trades do not appear in the back test which would resolve a large part of the discrepancy.

    I also tested the rest of the week and the results didn't match on any day but the correlation appeared to be much worse on the volatile days.

    What is the best way / settings to get the back testing more accurate.

    Thank you

    #2
    Renko has always had problems producing reliable backtest results.

    Comment


      #3
      Originally posted by sdauteuil View Post
      I have a strategy using renko bars.
      Great, but Renko requires you accept certain limitations.

      Originally posted by sdauteuil View Post
      Running in sim mode during market hours
      Excellent! This is the best testing you could possibly do.

      Originally posted by sdauteuil View Post
      What is the best way / settings to get the back testing more accurate.
      Forget back-testing.

      When using Renko based strategies,
      there are 3 general rules for success:

      1. Test with Real-time data using Sim101.
      2. Test with Replay data using Playback Connection.
      3. Test with Strategy Analyzer for functional correctness only, ignore all results.

      More advice:

      When running Renko based strategies, you should forget about back-testing.
      Renko imposes the requirement of
      forward-test only.
      Forward-testing is sim testing with Real-time data or Replay data.
      Continue doing market hours Sim101 testing.
      Ignore results from Strategy Analyzer.
      Become expert with Market Replay.
      Compare sim mode testing results of Real-time data vs Replay data.
      Do the forward testing results match?
      Use fast-forward in Playback Connection gently, do results continue to match?
      Increase fast-forward speed, do results continue to match?
      Rinse & repeat.
      Last edited by bltdavid; 09-05-2020, 02:05 PM.

      Comment


        #4
        Do regular range bars have a better track record with back testing?

        Comment


          #5
          Originally posted by sdauteuil View Post
          Do regular range bars have a better track record with back testing?
          Compared to Renko bars, I'd say yes.
          Compared to Minute bars, I'd say no.

          Comment


            #6
            Hello sdauteuil,

            I just wanted to add, the issue is that renko bars reset the open depending on how the bar broke. Because of this, the historical data, comprised of an open, high, low, and close, are not built the same way in historical data.

            Below are a few links that detail.
            https://ninjatrader.com/support/foru...52#post1100852
            https://ninjatrader.com/support/foru...636#post839636
            https://ninjatrader.com/support/foru...910#post830910


            When it comes to backtesting, 1-tick granularity can improve the fill results.

            Citizens of the NinjaTrader Community, A common question we hear from clients is 'why are results from backtest different from real-time or from market replay?'. Live orders are filled on an exchange with a trading partner on an agreed upon price based on market dynamics. Backtest orders are not using these market dynamics.
            Last edited by NinjaTrader_ChelseaB; 09-07-2020, 12:54 AM.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            58 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            133 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            50 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X