• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I speed up Playback backtesting of strategy?

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

    How can I speed up Playback backtesting of strategy?

    How can I speed up Playback backtesting of strategy?
    It takes forever to run my strategy for 1 year and I need at least multiple years at least.

    On Set up, I'm using "On bar close" over "On each tick" and "On Price Change".
    Historical fill processing: Standard (Fastest)

    What else can I do?

    Is the anything else I could do to speed up the process and run playback at its fastest?
    I am willing to sacrifice accuracy.

    #2
    How slow is it? What replay speed ate you using?

    depending on strategy, I can replay 4 years of ES data in 11 to 13 hours c then it slows down and ends up using 1 thread too heavily and no other cpu.

    Comment


      #3
      At max speed.

      Comment


        #4
        Hello johnnybegoode,

        Thanks for your post.

        Setting Calculate.OnBarClose would be the only setting that would be used to throttle performance in Playback unless the strategy offers some of its own settings to control its performance. Historical Fill Processing will not matter in this situation because the order fills are being simulated from the streamed "realtime" data that comes from the Playback Connection.

        You could enable the strategy from the Control Center to test in a leaner environment which could yield faster results since the only thing that would be processed is the strategy. Anything else would depend upon how efficient the strategy code is written and how complex it is.

        Strategies are also run against a single instrument thread when in realtime mode, so we cannot expect the same multi-threading benefits as seen from Historical Processing (from a thread pool.)

        I've included some Best Practice tips for NinjaScripts which could help to speed up the script further.

        Best Practices (Performance Tips) - https://ninjatrader.com/support/help...tm#Performance

        Using the Strategy Analyzer to backtest will be significantly faster than using the Playback Connection and can better utilize multiple cores of your CPU. This will come at a cost for fill accuracy considering the differences between Realimte simulations and Historical simulations.

        Discrepancies between Realtime and backtest - https://ninjatrader.com/support/help...ime_vs_bac.htm

        Help guide information is publicly available.

        I look forward to being of further assistance.
        JimNinjaTrader Customer Service

        Comment


          #5
          Originally posted by johnnybegoode View Post
          At max speed.
          How much data is processing at max speed?

          is it slower than nt7? How much cpu is being used?

          how many charts are open?

          how many strategies running?

          how many workspaces are open? You have to close everyone one except the one your running.

          Comment


            #6
            How to make the strategy offers some of its own settings to control its performance?

            By control center, do you mean no chart involved? If that's the case, I'm already doing that.

            How do I multithread from historical processing from a thread pool?

            Strategy analyzer does not support multi instruments, right?

            I'm using Historical data, not Market Replay.
            ____

            My strategy has 2 instruments and 2 indicators and is testing in 1 second timeframe.

            How to find out how much data is processing at max speed?

            How to find out how much CPU and core it is using?

            I have 4 cores and is running NT8 64 bit

            I don't use NT7.

            I don't use charts and there is no plotting on my strategy.

            Just one workspace.
            Last edited by johnnybegoode; 01-09-2019, 06:59 PM.

            Comment


              #7
              NinjaTrader_Jim has offered the best explanation [01-09-2019, 07:22 AM] I've seen thus far re: CPU Power/performance expectations one should have on PlayBack and how in actuality any performance benefit would be seen instead by using Strategy Analyzer. In essence, I've been seeking improved performance on PLAYBACK and as explained, it seems that more CPU's and threads will not do it. Only improved CPU GHz will do it (and that includes any overclocking) if so available. Thank you.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by aslane, Today, 02:27 PM
              0 responses
              3 views
              0 likes
              Last Post aslane
              by aslane
               
              Started by dadarara, Yesterday, 06:38 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by jvanelli, Today, 01:19 PM
              1 response
              2 views
              0 likes
              Last Post jvanelli  
              Started by TrendFollowingCapital, Today, 05:45 AM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Atilla, Today, 04:26 AM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X