Saturday, October 13, 2012

Meta-Trader - Equity Account Protection

Welcome back Meta-Traders.

What is single most important job of any Trader or Investor?   Protecting your capital of course!

So many new traders come to the markets under capitalized and with high expectations. Their high expectations are soon dashed when, due to poor loss control, their accounts are decimated.

And it doesn't matter how good a trader or investor you are, or how good your system is, because once your account sustains a 50% loss, its takes a 100% gain just to get back to even!

Admittedly, we have been doing a poor job of loss control with our Forex accounts. Asirikuy doesn't offer much help in this regard (as I understand it) because the overall recommendation is to stop trading a system when its draw down from an equity peak exceeds the Monte Carlo worst case scenario which is in excess of 50% for many portfolios.  In addition, it does not cover the issue of when to start trading systems again once they reach the worst case scenario.  After all, if a system has lost 60% or more of your funds, why would you want to trade it again?  So we end up with a scrap heap of discarded systems and no way forward in the world of Automated Forex Trading.

My initial approach to this challenge was to vary the lot sizes according to performance such that lot sizes are  decreased as equity falls and increased as equity rises.  This way we could trade a variety of systems and they could either succeed or fail based on their own merits. I haven't given up on this approach entirely but initial tests were not favorable since, once the system went into draw down, the lot sizes were reduced.  This reduced the system's ability to climb out of draw down, and thus increased the rate of both failure and success.  We ended up with a situation where draw down was reduced, but profits were also reduced such that we could achieve a more favorable outcome by just reducing risk.

After further consideration, I came up with a few simple equity-based account trading rules as follows:
  • Stop trading a system once Account Equity falls below -10% for the year
  • Stop trading a system once Account Equity falls -10% from the highest equity high experienced in that calendar year
  • Once a system is stopped, restart it on the first of the following calendar year
To see how this works in practice, let's take a look at a system I whipped up recently called FxMaCluster which takes a position once we get a price bar which straddles both the 8, 21 and 50 period moving averages.  For a more complete explanation, take a look at this post: Moving Average Clusters.

This chart shows a 12-year back test without the equity stops applied.

We had some great years, but we also had some terrible years including draw downs exceeding 30% in 5 out of the 12 years in the test.  For example, if we started trading this system at the beginning of 2007 and stuck to the end of the year, we would have experienced a 32% loss of our equity which would require a 60% gain the following year just to get back to even!

To implement the 10% stop loss rule, we added this code to our system:


// Equity calculations here
if (dStartingEquity == 0.0)
{
   dStartingEquity = AccountEquity();
}

// Current Equity
dCurrentEquity = AccountEquity();

// Equity cutoff
dEquityGain = dCurrentEquity - dStartingEquity;

// Calculate the loss as a percent of starting equity
dEquityPct = dEquityGain/dStartingEquity;

// Check for equity stop out
if (dEquityPct < -0.10)
{
   Print("Stopped due to breakdown from open", dEquityPct);
   return(0);
}


We added similar logic to stop out once we exceed a 10% loss from the equity high.  After these adjustments, we arrived at the following 12-year back test results.

First observation is that draw down never exceeds about about 12% in any given year.

Second observation is that average profit is almost cut in half, but draw down is reduced to an even higher extent.

Third observation is that in every single year, we hit the 10% loss from either the starting value or from the equity high of the system. Notice however, that we hit the 10% stop from starting equity only one of the 12 years. In the other years, we went to some level of profitability  but ended up stopping out once we fell down 10% from that equity high.

While overall profitability is reduced, overall survive ability is increased since our odds of surviving a devastating loss of equity are improved.  Granted, this is just one system, and one stop loss value and with a different set of systems, and different stop loss values, we could have a complete different result.  But the system does introduce a stop loss discipline into forex system trading which is a much needed addition.

One final point that I would like to make is as follows. Previous research on the topic has shown that the early part of the year, particularly the first few weeks of the year show high levels of trend behavior in Forex markets.  As a result, Forex trading systems have a higher propensity to produce profits in the first few weeks of the year than in any other time of the year generally speaking.  Therefore, if our system has a chance of making a profit, is has a higher chance to do so in the first few weeks of the year. Once a system has moved into profit, we have a higher change of surviving a draw down and being able to hang on for a much larger gain as we saw in 2004.

One final point is the following.  For the past few years, I have been in search of the Holy Grail system which will produce regular profits much higher than draw downs.  What I have found, is that despite what back tests show, such a system does not exist and we must be prepared for the worst case scenario at all times if we wish to survive in this business.

Final realization is that Forex is no a road to riches, its just another asset class to be considered along with Stocks, Bonds, Commodities, Real Estate, etc, etc.  Granted we have a better degree of loss control in Forex versus other asset classes, but only if we choose to exercise that loss control.

Next step is to implement the stop loss discipline inside the scrap heap of systems I have tested and discarded to see if it makes them worth trading.  Also worth a try is to see if implement this stop loss discipline inside the Asirikuy systems reveals any interesting conclusions in term of whether they are worth trading when equity stops are enforced.

Have a great week.

2 comments:

  1. If you're seeking to profit from an extra 100-200 pips per day then I recommend that you try Fast FX Profit.

    ReplyDelete
  2. Thanks for sharing superb information’s. Your web-site is very cool. I am impressed by the details that you have on this blog.

    Currency Exchange In San Francisco

    ReplyDelete