Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest and sorting symbols by (any) score

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

    Backtest and sorting symbols by (any) score

    Hello all,
    let's assume I have an automated strategy that invests by a kind of momentum score. I want to apply it on DOW30 single-stock instruments. The strategy calculates this score
    every week and rebalances the instruments by buying the highest 5 momentum stocks. How to backtest this scenario in NT8? Do I need to load the symbol data of all 30 stocks into the strategy?
    If yes can I load/add all the data of these instruments in a for{} loop and out of a cvs file, or do I need to hard code it? WHat would be the best concept? Any suggestions?
    All the best

    #2
    Hello fernlicht,

    Thank you for the post.

    Do I need to load the symbol data of all 30 stocks into the strategy?
    This depends on the goal. If the single strategy needs information about the 30 stocks to place trades on 1 or more instruments then yes you would need to add all 30 instruments using AddDataSeries: https://ninjatrader.com/support/help...=AddDataSeries

    If the goal is to find how the strategy does on each individual instrument and get individual results then you could run a basket test on an instrument list. There are some combined results for the basket as well, you can find details about that here: https://ninjatrader.com/support/help...asket_test.htm


    If yes can I load/add all the data of these instruments in a for{} loop and out of a cvs file, or do I need to hard code it? WHat would be the best concept?
    For strategies that need secondary data at this time it is not supported to use for loops/variables or logic to control AddDataSeries. While you technically could use a loop and variables it may not work in all areas which a strategy can be applied or may work incorrectly in some tools. Currently its best to just hard code the instruments and bar series for AddDataSeries.



    I look forward to being of further assistance.

    Comment


      #3
      Ok thanks, hardcoding is not really an option. Just thinking if I had to do this on the Russel 2000
      But this means ranking symbols in any form can feasibly run only on live data.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      50 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      69 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X