Announcement

Collapse
No announcement yet.

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?

    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)



        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        64 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X