Regularization
Regularization
TRADING TECHNIQUES
Regularization
In the lexicon of technical analysis, terms such as
moving averages and least-squares regressions
are commonly understood. But what about regu-
larization? Despite their potential, regularization
techniques are poorly understood and little used.
FIGURE 1: REGULARIZED
EXPONENTIAL PRICE
MOVING AVERAGES. You
can apply a time perspec-
tive of market turning points
to an arbitrary trading style.
Price
Indicator
Volume
FIGURE 2: COMPARING
REGULARIZED MOMEN-
TUM AND MACD. Regular-
ized momentum can give you
an idea of the direction of the
market. Although regularized
momentum and MACD give
similar signals, combining the
two shows that regularized
Price
Indicator
momentum often provides an
earlier signal.
Volume
function value Gn+1), the formula gives the current (n+1) legacy of common trading logic (crossovers, threshold pen-
value of a regularized exponential moving average, Fn+1. This etrations, and so on) that for the most part ignore gradients.
is the key formula that converts an exponential moving Our expectations on how to use indicators tend to get in the
average (equation 1) into one that contains a curvature- way of appreciating that many trading decisions can be
smoothed regularization term (equation 5). Starting values reduced to whether a price gradient is positive or negative.
for F1 and F2 need to be estimated to begin the calculation. That is what regularization can do quite well. In Figure 1, the
Typically, F1 and F2 are obtained from moving averages. blue line has just four turning points in the space of a month.
Regularized EMAs are just like conventional ones in that the With less regularization this could be a shorter-term view,
time needed for values to stabilize depends on how good the and with more, a longer-term view. Through judicious choices
initial estimates are for F1 and F2. of α and λ, an arbitrary time perspective for market turning
Similar logic can be applied to find regularization formulas points, applicable to arbitrary trading styles, becomes pos-
for similar moving averages and other common mathematical sible. If Fn and Fn+1 are defined as the penultimate and final
techniques of technical analysis. I also developed formulas for values of regularized EMAs based on closing prices, then a
much of this peer group, but equation 5 remains my favorite, trading logic based on gradients can be built on regularized
since it can usually be made to perform effectively. momentum, defined as:
The combination of the two indicators has the potential to offer ing, where smoothing a wiggly output has been achieved to
more useful trading strategies than either used alone. some degree. Regularization has allowed data modelers to
make certain assumptions about the form of possible data
POTENTIAL models, find an overly complex, least-squares model, and
I do not want to make extravagant claims for regularization then regularize (that is, get the model to produce a smoother
simply because it looks useful relative to MACD. I do, output) to maximize the probability of the regularized model
however, want to alert technicians to its potential. These being correct.
results provide an appetizer to what could be achieved if the Details of these concepts go deep into Bayesian statistics†
technique were seriously exploited. and lie outside the more practical spirit of this article, but the
For trading logic based on crossovers or thresholds, con- messages are clear. Regularization has a well-established
ventional averaging is likely to be superior, but for trading pedigree, there is more in it for those who care to pursue it at
logics based on gradients, regularization appears to have the an advanced level, and regularization is a potent tool that
edge. Such trading logic can be built around the idea of regular- deserves a place in our lexicon of technical analysis methods.
ized momentum (equation 6 and Figure 2), suggesting that
regularization can help resolve the dilemma of wiggle and lag. Chris Satchwell is a technology developer and the chief
Another attraction of regularization is that it offers a much scientist of Recognia, Inc. (of Ottawa, Canada). He is also
more direct link to the logic needed for trading. Instead of founder and director of UK-based Technical Forecasts Limited.
requiring crossovers, filters, or thresholds, regularization
offers a simple answer to the question of whether prices are RELATED READING
going up or down. Appel, Gerald [1985]. The Moving Average Convergence-
Divergence Trading Method, Advanced Version, Scien-
CONCLUSIONS tific Investment Systems.
Regularization is a well-established technique in data model- †See Traders’ Glossary for definition S&C