Milktrader

Iterating Until Convergence

Monday, June 29, 2009

Expected Drawdown on 50/200 Cross

After running a single backtest on the 50/200 cross for ES futures going back 25 years, we found that the maximum drawdown for the system was $81,425. This is an intraday drawdown that the historical simulation experienced. But what if by some wild chance, history does not repeat itself and the trade sequence in the future does not mimic the past?

In our historical simulation, there were 17 losing trades and 10 winning trades. The first ten trades ran in the following order: winner, loser, loser, winner, loser, loser, loser, winner, loser, loser. I can type out the order for the entire 27 trades in the system, but you get the idea.

What's to say the order of wins and losses will be exactly the same in the future? Answer: nothing. In fact, we'd be very surprised if the next 27 trades followed the same order as the first 27 trades. The fact that the first 27 trades fell as they did is completely the result of luck. And the equity curve derived from this order is also the result of luck. If we are to derive a reasonable expectation of what our drawdown could be going forward, we need to take out the element of luck. How do we do that? We randomize the trade order. Enter Monte Carlo simulation.

Think of this as shuffling cards, and taking a snapshot after each shuffle. All black cards are winners and all red cards are losers. We have the deck stacked with 17 red cards and 10 black cards. For those with statistical savvy, you'll recognize there is not even a valid sample size of 30 to draw statistical inference from in our exercise. At this point, we're just going through the process, and make no claims about the validity of the 50/200 cross as a tradeable system.

Since I use TradersStudio, the following is Monte Carlo data derived from the software. I'm also using a Monte Carlo Test macro designed by Rich Denning, who was kind to contribute the macro in a recent issue of TASC.

First, let's take a look at the original equity curve for the system:






After running the Denning Monte Carlo macro, we have the following distribution chart. The Y axis is the total number of trades sequences that have fallen into the X axis bin. The X axis is the level of drawdown. You will notice that most of the trade sequences (about 108) had a drawdown of $99,760. The total number of trade sequences run were 1,000.







Finally, here is a terminal report that shows what the drawdown expectation is given different confidence levels:




Since our distribution is not normal, we have limited utility for standard deviation in determining confidence levels. Instead, we take the percent of simulations to find the interval. This takes into account the kurtosis natured skew of our distribution.

What's interesting is that our historic simulation's max drawdown of $81,000 is quite a bit below the average of $104,000 and the median of $128,000. In fact, we really shouldn't get too excited about the drawdown on this system until it exceeds the 95% level, which is $149,000.

As stated earlier, these statistics are more or less a practice run of the process and a definition of best practices in systems development. It's clearly almost ridiculous to draw any statistical conclusions from a system that averages about one trade per year.

3 comments:

  1. Good stuff Milk. For fun, sometime this week I will run the MC over my Golden Cross data, which includes a tad more data points than yours.
    ReplyDelete
  2. Give me the pseudocode for your Golden Cross and I'll whip up the program. It's good practice for my list of projects that include my current MA crossover system with Bollinger Band (Bumblebee), Keltner breakout (Ladybug), Iron Condor (Earthworm), SPX/VIX correlation (Firefly), synthetic market profile(yet to be named insect).
    ReplyDelete
  3. Dear Milk Trader

    I have a question about drawdown simulation and hope that you or readers of this blog can shed some lights on the topic.

    thanks
    Palm

    Drawdown simulation and trading systems selection

    Method
    Suppose i have a trading system A which has historical 100 trades data. I ran simulation 10,000 trials and look at the worst drawdown that this system A could have produced by chance alone. Let's say that

    System A has max simulated Drawdown (DD) at -40%. Now if I set my maximum drawdown of my portfolio at -20%, i will be trading system A by only half of my portfolio to ensure that when the worst comes, i

    won't be down more than -20%. By the same token, if system B has max simulated DD of -10%, i will be trading 200% of my portfolio on system B.

    Questions:
    Currently I set every system that i have equally at -20% max portfolio DD. Here's what i mean

    System Max Simulated DD Portfolio Max allowable DD Market exposure adjustment % Annual Expected Returns (100% market exposure)
    A -30% -20% 70% 36%
    B -63% -20% 33% 24%

    For example, if i have $100,000 portfolio, i will trade system A at 70,000 market exposue in a given trade. And i will trade only $33,000 worth of market exposure on system B. This also mean that my expected

    returns will be geared down accordingly. So system A will now have expected returns to my portfolio of (36%*70%) = 25.2%. And system B will give me 7.9% returns to my portfolio.

    Now here's my question, by setting each system max DD to -20% of the total portfolio, i am willingly allow each system an equal chance of damaging my portfolio. You would ask, why should i allow system B

    which can generate only 7.9% returns to my total portfolio to have the same damaging effect on my portfolio. In other words, should i set B at -15% instead of -20%? How about setting A at -25%? What should

    be my method in setting this Portfolio Maximum Allowable DD when i take into consideration the expected returns of each system?

    Any comment is welcome.

    Thank you
    ReplyDelete