Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to create a commission table that can actually being included in a Backtest

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

    How to create a commission table that can actually being included in a Backtest

    Despite I've made several commissions tables and of course, I checked the box of commission for the Strategy Analyzer, this continues to show results without commissions. How can I connect commissions with the simulation account?

    #2
    Nevermind, I find it finally.

    Comment


      #3
      Hello pstrusi,

      Thanks for your post.

      I am happy to hear you were able to resolve your question.

      Here is a help guide page detailing how to apply commission templates to an account: https://ninjatrader.com/support/help...commissi_3.htm

      To have the commission template applied to a backtest in the Strategy Analyzer, you would need to add the commission template to the Sim101 account and ensure the 'Include commission' checkbox is enabled in the Strategy Analyzer parameters when running the backtest.
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        Hi Brandon,

        Despite I've set a commission table and applied to the account sim101, still Optimization or backtest are showing results using the double commission for trade, which makes no sense. So, questions:

        - Is there any account specific to Optimizations/Backtest different than Sim101? Perhaps sim101 is only for real-time simulations.

        Thanks


        Edit: I've checked that there's a great chance that's a bug in the calculation of commissions. After many backtests the result is always the same. For every trade, it should be assigned just 1 simple commission for each unit, but instead, it's applied 2 times the commission for a single trade. Perhaps there's some miscalculation in the code thinking a complete trade it must include the turnaround, so 2 operations for every trade, which is incorrect.

        I might be wrong, but please check it
        Last edited by pstrusi; 11-08-2023, 08:23 AM.

        Comment


          #5
          Hello pstrusi,

          Thanks for your notes.

          No, the Strategy Analyzer does not use a specific account for running optimizations and backtests.

          For the commissions to be included in a backtest, the template must be applied to the Sim101 account.

          See this forum thread for more information: https://forum.ninjatrader.com/forum/...30#post1081030

          When you mention "the results are using the double commission for the trade" what exactly are you referring to?

          What commission template is applied to the Sim101 account on your platform?

          If you look at the 'Commission' column on the Executions Display of the Strategy Analyzer, what is the reported commission for a single execution?
          Last edited by NinjaTrader_BrandonH; 11-08-2023, 09:50 AM.
          Brandon H.NinjaTrader Customer Service

          Comment


            #6
            I created a simple table called "Commission", where I set for MES 1 single dolar for every unit traded, which I assigned to the Sim101 account. After a simple optimization, checking all executed trades in the Strategy Analyzer, I can see in the commission column, just calculated the double commission for every trade, which is wrong. I suggest to you to run a test in your end.

            By the way: in the strategy analyzer, the account for optimizations that is shown, it's called "Backtest", which I don't see in the accounts tab.
            Last edited by pstrusi; 11-08-2023, 08:44 AM.

            Comment


              #7
              Hello pstrusi,

              Thanks for your notes.

              As stated in post # 5, the Strategy Analyzer does not have a specific account tied to it that is used for backtesting and optimizations. Since no specific account is used, there is no account seen in the Accounts tab of the Control Center.

              We are tracking interest in an existing internal feature request ticket for adding a fully functional backtest account to be tied to the Strategy Analyzer. Please let me know if you would like me to add your vote to this feature request.

              I have tested creating a Commission Template and set the MES commission to be $1.00. I applied this commission template to the Sim101 account, and ran a backtest on the SampleMACrossover strategy that comes default with NinjaTrader.

              When viewing the 'Commission' column of the Executions Display in the Strategy Analyzer, I am seeing the correct commission ($1.00) being reported for each buy and sell execution placed as expected.

              See this demonstration video: https://brandonh-ninjatrader.tinytak...Nl8yMjM3MTEwNg
              Brandon H.NinjaTrader Customer Service

              Comment


                #8
                Hi Brandon,

                - Yes, add my vote.

                - Thanks for the video. I realize that you've checked "execution" and I was looking "trades", which obviously has 2 executions. My confusion was I had the same configuration in NinjaTrade-7 and Trades were shown with less commission than NT8. I've found out that I had a special configuration for the instrument far from the commission template.

                Anyway, thanks for your help. Useful.
                Last edited by pstrusi; 11-08-2023, 10:17 AM.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                49 responses
                1,769 views
                0 likes
                Last Post NinjaTrader_RyanS  
                Started by Vietanhnguyen2hotmailcom, Today, 10:29 AM
                3 responses
                9 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by milfocs, Yesterday, 07:23 PM
                3 responses
                13 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by kenz987, Today, 10:20 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by PaulMohn, 04-24-2024, 03:49 AM
                2 responses
                32 views
                0 likes
                Last Post PaulMohn  
                Working...
                X