June 2015 Newsletter – Average Rules to Protect Against Volatility

June 8, 2015

Average Rules to Protect Against Volatilityaverage
by Marge Sherald, President

There are times when a short spike in volatility can work against a reliable trading system.  For example, if you have a Long Entry rule of MOMENTUM > 0, your trading system might be cranking out profit most of the time in a trending market, but a one or two bar downturn caused by someone selling a large amount of stock to pay for his/her new yacht might cause you to exit a trade when there is still an overall uptrend in place.

You can prevent this by adding more rules using the Boolean AND conditions below to your original Long Entry rule:

Momentum (close, 5 periods) > 0

AND Momentum (1 period lag of close, 5 periods) > 0

AND Momentum (2 period lag of close, 5 periods) > 0

etc.
For a simple rule like our momentum rule, that is not such a burden.  However, if you original rule is based on several different conditions, it can become tedious to build the lagged versions of the rule and to determine how many lags to include.

A technique you can use to get around this problem and to save time is to create a simple moving average of the entire rule.  Since the output of a rule such as Momentum > 0 is either a 1 for true or a 0 for false, the average of three rules that produce a 1 is the value 1.  If only one of the three rules is true, the output is 0.33.  You can either select a threshold value or let the optimizer find it.

By using a three period simple moving average, you are essentially creating the Boolean AND conditions stated above.  Of course you can add more conditions by increasing the size of the moving average.

In the Long Entry tab below, we also added a separate rule for the original condition to insure that the condition remains true on the current bar when a buy decision is being considered.

This set of Long Entry conditions uses a moving average of a momentum rule to capture whether the condition was also true on the most recent bars.  The original rule is also included to insure that the condition is true on the current bar.

We created a chart that uses this technique and the results are shown below.  For the Long Exit rule we used the condition of the number of periods since entry activated and we added a reverse of the original momentum rule.  We let the optimizer decide whether to use either rule or a combination of the two.

In addition to optimizing the number of periods to average the rule (thus adding lags to your logic), you can optimize the threshold value for the buy decision.  The higher the value of the threshold, the stronger in agreement are the trading rules for the current period and any number of lagged copies of the rules found by the optimizer.

If the trading systems you develop are not trading often enough, you can switch to a smaller bar size or a different type of bars such as range bars.

You can download a copy of this chart by clicking here .

Was this article helpful?

Related Articles