Predictive-Model Based Trading Systems, Part 1

Trading financial instruments in an objective systematic fashion has numerous advantages over subjective approaches:

  • Intelligently designed automated trading systems can and often do outperform human driven trading due to various cognitive biases and emotionalism.
  • An effective data-mining program can discover subtle patterns in market behavior that most humans would not have a chance of seeing.
  • An automated system is absolutely repeatable, while a human-driven system is subject to human whims. Consistency of decision-making is vital long-term profitability. Repeatability is also valuable because it allows examination of trades in order to study operation and perhaps improve performance via signal filtering.
  • Most properly designed automated trading systems are amenable to rigorous statistical analysis that can assess performance measures such as expected future performance and the probability that the system could have come into existence due to good luck rather than true power.
  • Unattended operation is possible.

Automated trading systems are usually used for one or both of two applications. TSSB (Trading System Synthesis and Boosting)  is a state-of-the-art program that is able to generate both applications: (1) a complete, stand-alone trading system which makes all trading decisions and (2) a model which may be used to filter the trades of an existing trading system in order to improve performance. We refer to this as “boosting”. It is often the case that by intelligently selecting a subset of the signals generated by an existing trading system, and rejecting the others, we can improve the risk/reward ratio.

Two Approaches to Automated Trading

Whether the user’s goal is development of a stand-alone trading system or a filtering system to boost the performance of an existing trading system, there are two common approaches to its development and implementation: (1) rules-based (IF/THEN rules proposed by a human) and predictive modeling.

A rules-based trading system requires that the user specify the exact rules that make trade decisions, although one or more parameters associated with these rules may be optimized by the development software. Here is a simple example of an algorithm-based trading system:

IF the short-term moving average of prices exceeds the long-term moving average of prices, THEN hold a long position during the next bar.

The above algorithm explicitly states the rule that decides positions bar-by-bar, although the exact definition of ‘short-term’ and ‘long-term’ is left open. The developer might use software to find moving-average lookback distances that maximize some measure of performance. Programs such as TradeStation® include a proprietary language (EasyLanguage® in this case) by which the developer can specify trading rules.

With the widespread availability of high-speed desktop computers, an alternative approach to trading system development has become feasible. Predictive modeling employs mathematically sophisticated software to examine indicators derived from historical data such as price, volume, and open interest, with the goal of discovering repeatable patterns that have predictive power. A predictive model is essentially a mathematical or logical formulate that relates these patterns to a forward-looking variable called a target or dependent variable, such as the market’s return over the next week. This is the approach used by TSSBand it has several advantages over algorithm-based system development:

  • Intelligent modeling software utilizing machine learning can discover patterns that are so complex or buried under random noise that no human could ever see them.
  • Once a predictive model trading system is developed, it is usually easy to tweak its operation to adjust the risk/reward ratio to suit applications ranging across a wide spectrum. It can obtain a desired trade off between numerous signals with a lower probability of success and fewer signals with a higher probability of success. This is accomplished by adjusting a threshold that converts model predictions into discrete buy and sell signals.
  • Well designed software allows the developer to adjust the degree of automation employed in the discovery of trading systems. Experienced developers can maintain great control over the process and put their knowledge to work creating systems having certain desired properties, while inexperienced developers can take advantage of massive automation, letting the software have majority control.
  • In general, predictive modeling is more amenable to advanced statistical analysis than rules-based system development. Sophisticated analysis algorithms to test the statistical soundness of its discoveries can be incorporated into the model-generating process more easily than they can be incorporated into systems based on human-specified rules.
  • Predictive modeling a well developed mathematical discipline for extracting maximum information from a data set that compliment human intuition. Intuition is able to propose data series and ways of transforming them into a large list of candidate indicators.  Predictive modeling, even its simplest form, linear regression is superior to human intuition in selecting the best candidates and combining them into a prediction. There have been over academics 150 studies comparing human experts to statistical models attesting to this fact.

Predictive Modeling

The predictive modeling approach to trading system development relies on a basic property of market price movement: all markets contain patterns that tend to repeat throughout history, and hence can often be used to predict future activity. For example, under some conditions a trend can be expected to continue until the move is exhausted. Under other conditions, a different pattern manifests: a trend is more likely to be followed by a retracement toward the recent mean price. A predictive model studies historical market data and attempts to discover the features that discriminate these two patterns.

The goal of predictive modeling then is finding patterns that repeat often enough to be profitable. Once discovered, the model will be on the lookout for the pattern to reoccur. Based on historical observations, the model will then be able to predict whether the market will soon rise, fall, or remain about the same. These predictions can be translated into buy/sell decisions by applying thresholds to the model’s predictions.

Indicators and Targets

Predictive models do not normally work with raw market data. Rather, the market prices and other series, such as volume, are usually transformed into two classes of variables called indicators and targets. This is the data used by the model during its training, testing, and ultimate real time use. It is in the definition of these variables that the developer exerts his or her own influence on the trading system.

Indicators are variables that look strictly backwards in time. When trading in real time, as of any given bar an indicator will be computable, assuming that we are in possession of sufficient historical price data to satisfy the definition of the indicator. For example, someone may define an indicator called trend as the percent change of market price from the close of a bar five bars ago to the close of this bar. As long as we know these two prices, we can compute this trend indicator. TSSB can compute over a hundred types of indicators that quantify numerous features of market behavior.

Targets are variables that look strictly forward in time. (In classical regression modeling, the target is often referred to as the dependent variable.) Targets reveal the future behavior of the market. We can compute targets for historical data as long as we have a sufficient number of future bars to satisfy the definition of the target. Obviously, though, when we are actually trading the system we cannot know the targets unless we have a phenomenal crystal ball. For example, we may define an indicator called day_return as the percent market change from the open of the next day to the open of the day after the next. If we have a historical record of prices, we can compute this target for every bar except the last two in the dataset. TSSB can compute a variety of target variable types.

In summary, the fundamental idea behind predictive modeling is that indicators may contain information that can be used to predict targets. The task of predictive model is to find and exploit any such information.

Get The Book

Screen Shot 2014-10-19 at 6.36.03 PM

— By David Aronson

Part 2 of this series can be found here, Predictive-Model Based Trading Systems Part II

David Aronson is a pioneer in machine learning and nonlinear trading system development and signal boosting/filtering. Aronson is Co-designer of TSSB (Trading System Synthesis and Boosting) a software platform for the automated development of statistically sound predictive model based trading systems. He has worked in this field since 1979 and has been a Chartered Market Technician certified by The Market Technicians Association since 1992. He was an adjunct professor of finance, and regularly taught to MBA and financial engineering students a graduate-level course in technical analysis, data mining and predictive analytics. His recently released book, Statistically Sound Machine Learning for Algorithmic Trading of Financial Instruments, is a in-depth look at developing predictive-model-based trading systems using TSSB.

 

About the Author System Trader Success Contributor

Contributing authors are active participants in the financial markets and fully engrossed in technical or quantitative analysis. They desire to share their stories, insights and discovers on System Trader Success and hope to make you a better system trader. Contact us if you would like to be a contributing author and share your message with the world.

>