• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawdown and Back Testing

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

    Drawdown and Back Testing

    Hello. I would like to use the drawdown functionality for back testing, however, it seems like the drawdown amount does not reset after each day in back testing. I am trying to get around this by exporting the daily results and then utilizing the DD field to adjust the results of the back test.

    Specifically, I would like to limit the losses or profits for the day if the draw down is -300. So, I am using a formula in the Excel export that states if DD is less than -300 then cuml profit for that day is -300 otherwise use the profit generated from the back test.

    Can someone let me know if this is accurate? I think I will be missing some profits from using the formula because there could be a case where the strategy is up 1000 then goes down to 700 and the formula will show a -300 profit for the day. And, this is fine but I am more concerned if by using this formula I am including profitable days when the actual real time DD filter will result in a lose. I cant seem to think of a scenario this will happen.

    But, I would appreciate some thoughts from more seasoned traders and NT users/admins.

    Thanks,
    Joe

    #2
    Hello,

    You can monitor your trades performance to determine how future trades will be handled. This would save you the trouble of having to export data every session end/begin

    Here is an example script that we have of doing this: http://www.ninjatrader.com/support/f...ead.php?t=4084

    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hello, I am aware of the trade performance functions and am sure they will work if the strategy goes into real time. However, I would like to use the DD on historical testing and when using the DD function in historical testing the DD does not get reset each day. For example, if day 1 there is a DD of -100 and on day 2 there is a DD of -201 then the back testor will stop working all together because the DD filter has been reached (-300) and the DD is not resetted each day.

      I am fine if this isn't available in the back testor. If this is the case, I would like to know if the DD field in the daily results export will fulfill the same functionality and I can adjust the results of the back test in Excel.

      Thanks,
      joe

      Comment


        #4
        In this case I would suggest creating your own tracking variables to store previous days values. If you look at the performance example it shows you how you can use Bars.FirstBarOfSession to store values at the start of the new session. Similarly you could reset values as needed so you can have a new draw down for the new day.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Can you explain the DD field for me in the Periods tab of the back testing? It seem to be based on entry price and not peak to trough as convention.

          Thanks,
          Joe

          Comment


            #6
            The DD field will be the largest drawdown from a profit point. It won't account for unrealized PnL

            For example:
            1 trading day
            5 trades

            1: +100
            2: -200
            3: + 400
            4: -100
            5: +200
            Total: 200
            DD: -200 because this is the largest drawdown that occurred
            LanceNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by BabyWhaler, Today, 05:06 PM
            4 responses
            15 views
            0 likes
            Last Post BabyWhaler  
            Started by bouncetherubble, Today, 05:56 PM
            0 responses
            4 views
            0 likes
            Last Post bouncetherubble  
            Started by claxxical, Today, 05:48 PM
            0 responses
            4 views
            0 likes
            Last Post claxxical  
            Started by 7robert, Today, 03:09 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Jonathan  
            Started by Johnny, Today, 02:54 PM
            0 responses
            10 views
            0 likes
            Last Post Johnny
            by Johnny
             
            Working...
            X