Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy Back testing Optimization?

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

    Strategy Back testing Optimization?

    Hi,
    I have a day trading strategy using minute level VIX, AAPL, MSFT, TSLA, and SPY data.
    What are the things I can do to optimize the back testing?

    I am using the Genetic optimizer.

    Thanks,
    Erik
    Last edited by ErikHR1969; 03-30-2023, 10:13 AM.

    #2
    Hello ErikHR1969,

    In what way are you asking to optimize the strategy? Are you asking how to make the code more efficient or are you asking for settings to use in the backtest? Can you provide more specific detail here on what you are looking to do or change?

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      The strategy runs against the SPY minute bars for the last 10 years and adds VIX, MSFT, AAPL, TSLA, and AMZN minute bars in the OnStateChange() --> State == State.Configure section.
      Is there any optimization that I can do around loading data for the strategy to run. I am running the strategy ~50,0000 times to optimize it.

      Thanks,
      Erik

      Comment


        #4
        Hello ErikHR1969,

        Not necessarily, you would need to reduce the amount of data being used in the test if you wanted to further optimize loading data. If you need 10 years of data for each of the instruments that's going to take some time to process due to the amount of data being loaded.

        If you dont need the same amount of data for the added series you can specify a number of bars to load with one of the AddDataSeries statements:

        AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)



        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ageeholdings, Today, 07:43 AM
        0 responses
        6 views
        0 likes
        Last Post ageeholdings  
        Started by pibrew, Today, 06:37 AM
        0 responses
        4 views
        0 likes
        Last Post pibrew
        by pibrew
         
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        12 views
        0 likes
        Last Post burtoninlondon  
        Working...
        X