Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug: RC1 - Apply commission to PnL setting does not disable commissions

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

    Bug: RC1 - Apply commission to PnL setting does not disable commissions

    Tools -> Options -> General
    * Apply commission to PnL calculations

    This setting when enabled (and subsequent Commission values set under Commission tab) work great for seeing commisisons in your backtest.

    However, simply unchecking this "Apply commission to PnL calculations" does NOT properly disable commissions in backtest reports (at least on my machine) when still leaving the commission values per datafeed and/or per symbol set.

    This is a bug as one expects this setting to GLOBALLY turn on/off commissions across the board despite commission values set per datafeed and/or per symbol. One would not expect to have to manually alter commission values per feed and/or per symbol just to quickly backtest without commissions would they?! I want to set per datafeed and/or per symbol just once...and then have ability to quickly see effect of commissions or not with this flag.

    #2
    Note, it seems that a restart of NinjaTrader is required before this flag is respected as I wanted. Still, I stand by that its a bug - its a caching bug. Why not re-read this value upon a backtest and/or optimization request. Why do we have to restart NT just for this setting to have its effect? That would be the better user experience thing to do IMO.

    Or better yet...upon alteration of this flag value, update your cache value - then have best of both worlds, no restarts necessary nor need to read this value upon every backtest/optimization request
    Last edited by jdfagan; 11-22-2010, 03:14 PM.

    Comment


      #3
      Hello,

      Thanks for posting.

      The reason this occurs is that this option does not actually apply to backtesting in any reguard.

      What pertains if the parameter listed when you start a backtest called Include Commissions which is set to True by default in the parameter list before you run any strategy or backtest.

      If you want this set to False by default then set this to False then right click and set it as the default for this strategy.

      Let me know if I can be of further assistance.

      Comment


        #4
        You are right with regard to Strategy Analyzer. But its not true for running strategy in a chart and then doing this:

        Control Center -> Strategies -> Right Click strat -> Strategy Performance -> Historical and Realtime

        Perhaps what you need is a "Include Commissions" flag when setting a strat on a chart so it can control the Historical and Realtime queries that are possible via Control Center Strategies tab?

        Because that "Include Commissions" flag seems only setteable from Strategy Analyzer but one can also do backtests outside of SA via Control Center Strategies tab as I pointed out above..

        Comment


          #5
          Hello jdfagan,

          When I test a strategy running in a chart on my end, I do not see commissions at 'Historical and Realtime' when 'Apply commission to PnL calculations' is disabled.

          I tested the SampleMACrossover strategy and let it perform one live trade. I have commissions setup as per the instrument and data feed I tested, however no commissions were reflected at 'Historical and Realtime'.

          Are you able to reproduce this behavior?
          JasonNinjaTrader Customer Service

          Comment


            #6
            Your test description was incomplete. You failed to mention what the value of 'Apply commission to PnL calculations' was at startup of your NT app. Try this test instead to see the caching bug:

            1. Start NT7
            2. Note the current value of value of 'Apply commission to PnL calculations'
            3. Pull up sample strat of your choice
            4. Run 'Historical and Realtime' and see that commissions is in line with setting in step 2 [correct]
            5. Change value of 'Apply commission to PnL calculations' to be opposite value in step 2
            6. Run 'Historical and Realtime' and see that commissions is NOT in line with setting in step 5 (its in line with the old 'cached' value in step 2) [incorrect]

            Now, if you simply restart NT7 and re-run the above steps, you'll see the change we made in step 5 above have its impact. Thus my belief this is a caching bug.

            JD

            Comment


              #7
              Hello,

              This would be correct.

              To allow the new setting to take effect you would need to add in a step.

              You would need to remove or disable the strategy that was added with the commission setting in place and then re add/re-enable it back in after you have changed the Commission setting. As this will clear the "Cache" and what it actually does is rerun the strategy to polulate the performance objects which needs to be done for the new setting to take place, if the strategy is not rerun after changing this setting there will be no new results.

              Let me know if I can be of further assistance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by naanku, Today, 07:25 PM
              0 responses
              7 views
              0 likes
              Last Post naanku
              by naanku
               
              Started by milfocs, Today, 07:23 PM
              0 responses
              5 views
              0 likes
              Last Post milfocs
              by milfocs
               
              Started by PaulMohn, Today, 06:59 PM
              0 responses
              7 views
              0 likes
              Last Post PaulMohn  
              Started by bortz, 11-06-2023, 08:04 AM
              48 responses
              1,756 views
              0 likes
              Last Post carnitron  
              Started by Jonker, 04-27-2024, 01:19 PM
              3 responses
              24 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X