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 Segwin, 05-07-2018, 02:15 PM
        14 responses
        1,789 views
        0 likes
        Last Post aligator  
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        837 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,293 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        13 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        63 views
        0 likes
        Last Post halgo_boulder  
        Working...
        X