Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Portfolio Back-testing Daily Portfolio Size

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

    Portfolio Back-testing Daily Portfolio Size

    Hi Ninja Traders,

    I was hoping you could help me with a position sizing question. I am back-testing a strategy and want to use a trade size that is a percent of the strategy portfolio value at the time of trade (Capital + cumulative PnL). I am running the strategy over multiple instruments.

    It is my understanding that running a strategy on an instrument list results in the instrument being simulated sequentially and not in parallel, meaning first Initialize and all OnBarUpdate calls are made for one instrument, before moving on and starting the next instrument with Initialize.

    This means I cannot get a daily strategy portfolio size across all the instruments to work out the trade sizing for the next trade.

    Is my thinking correct or has this been implemented in NT8 (some older posts indicated this was on the development list)? If it has not been developed is there possibly a work around someone has implemented?

    Thank you
    Robbo

    #2
    Hello Robbocj,

    Thanks for your question.

    The Strategy Analyzer is not portfolio based. so there is not an actual account associated where you can specify funds to start. When running an optimization or a basket test on multiple instruments, separate strategy instances are backtested and then results can be combined in the Results grid.

    This prevents us from having the strategies use the same account funds and prevents sharing funds between separate strategy instances. You could consider making a single Multi Time Frame strategy that runs on all of your instruments and adds/subtracts the Realized PnL of each trade to/from an account funds variable to provide that functionality in a workaround.

    Multi Time Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm

    An example which references SystemPerformance to check strategy PnL can be found here - https://ninjatrader.com/support/help...nce_statis.htm

    We also have a feature request tracking interest behind supporting portfolio based backtests and I have added a vote on your behalf. The ticket ID is SFT-137. This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.

    Feature Request Disclaimer.

    We receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing.

    When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number will be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm


    We look forward to assisting.

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      We also have a feature request tracking interest behind supporting portfolio based backtests and I have added a vote on your behalf. The ticket ID is SFT-137. This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.
      Please add my vote for a portfolio backtesting feature.

      Comment


        #4
        Thanks for your feedback wadams,

        Your vote has been added.

        Comment


          #5
          Hi Jim
          Please add my vote as well for portfolio backtesting.

          Comment


            #6
            Welcome to the forums abeyusuf!

            We have added your vote.

            Comment


              #7
              Please add my vote for feature request SFT-137 (Portfolio Based Backtesting). Thanks!

              Comment


                #8
                Thanks for your first post bengh!

                Your vote has been added.

                Comment


                  #9
                  Please add my vote for SFT-137.

                  Comment


                    #10
                    Hello robbersdog,

                    Your vote has been added.

                    Comment


                      #11
                      Please add my vote for SFT-137. Thanks!

                      Comment


                        #12
                        Thanks for your post k-724634337,

                        Your vote has been added.

                        For others wishing to share interest, I will continue to track additional votes, but I will no longer be replying to this thread.

                        Comment


                          #13
                          Please add my vote for this feature.

                          Adding a portfolio simulation feature similar to the ones in Multicharts or Tradestation would make me switch to Ninjatrader.

                          Comment


                            #14
                            My VOTE, very important feature, today I'm using an Excel to combine all strategies into a portfolio.

                            Comment


                              #15
                              Hello axelbaws and Rudmax,

                              Thanks for your notes.

                              Your votes have been added.

                              Let us know if we may assist further.
                              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NullPointStrategies, Yesterday, 05:17 AM
                              0 responses
                              70 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              143 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              76 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              47 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              51 views
                              0 likes
                              Last Post TheRealMorford  
                              Working...
                              X