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

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.
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        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.
            JimNinjaTrader Customer Service

            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.

                JimNinjaTrader Customer Service

                Comment


                  #9
                  Please add my vote for SFT-137.

                  Comment


                    #10
                    Hello robbersdog,

                    Your vote has been added.
                    JimNinjaTrader Customer Service

                    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.
                        JimNinjaTrader Customer Service

                        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.
                              Brandon H.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bortz, 11-06-2023, 08:04 AM
                              47 responses
                              1,604 views
                              0 likes
                              Last Post aligator  
                              Started by jaybedreamin, Today, 05:56 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post jaybedreamin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              6 responses
                              18 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              13 views
                              0 likes
                              Last Post Javierw.ok  
                              Working...
                              X