Predictive-Model Based Trading System

1.
자동매매! 한동안 붙들었던 화두입니다. ZeroAOS는 자동매매를 위한 플랫폼으로 설계 및 구현하였습니다. 몇 년의 시간이 흐르고 HFT의 열풍이 잦아진 지금 자동매매를 다시금 생각해봅니다. 자동이란 기계에 의한 매매입니다. 그런데 트레이딩에 대한 이해가 부족했기 때문에 너무 좁게 이해했다는 생각이 듭니다. CFTC 위원장이 FIA Expo에서 한 연설중 이런 말이 있습니다.

“a fundamental shift in markets from human-based trading to highly automated trading.”

근본적(Fundamental)인 변화라는 표현을 사용합니다. 무엇이 근본적일까요? 사람이 기계로 바뀌면서 어떤 변화가 일어났을까요? 사람마다 변화의 폭과 깊이를 이해하는 정도는 다를 듯 합니다. 저처럼 매매시그날 정도만을 기계화하는 수준으로 이해할 사람도 있을 듯 합니다.

요즘 관심을 갖는 부분이 전략과 모델입니다. 수학적인 능력도 없고 학습할 생각도 없지만 이해할 수 있는 수준까지 관심을 가져보려고 합니다. 관심을 갖는 이유는 하나입니다. 현재 ZeroAOS에서 어떤 부분을 보완해나갈지를 판단하기 위함입니다.

2.
Trading Show Chicago를 주최하는 곳에서 메일이 옵니다. 이런저런 트레이딩회사들이 제공하는 전략들입니다. 몇 일전 받은 메일에 담긴 자료입니다.

David Aronson of Hood River Research on statistically sound machine learning for algorithmic trading

Hood River Research 대표인 David Aroson이 쓴 ‘Statistically Sound Machine Learning for Algorithmic Trading of Financial Instruments: Developing Predictive-Model-Based Trading Systems Using TSSB’의 요약입니다. 여기서 TSSB는 Trading System Synthesis & Boosting의 약자로 ‘FREE software platform for rapid R&D of statistically sound predictive model based trading systems via machine learning’입니다. 앞서 책은 TSSB의 이론적 배경을 설명하는 책자라고 할 수 있습니다.

  • How to estimate future performance with rigorous algorithms
  • How to evaluate the influence of good luck in backtests
  • How to detect overfitting before deploying your system
  • How to estimate performance bias due to model fitting and selection of seemingly superior systems
  • How to use state-of-the-art ensembles of models to form consensus trade decisions
  • How to build optimal portfolios of trading systems and rigorously test their expected performance
  • How to search thousands of markets to find subsets that are especially predictable
  • How to create trading systems that specialize in specific market regimes such as trending/flat or high/low volatility

Terrapin은 20쪽 분량의 PDF를 다운 받을 수 있도록 하지만 Systemtradesuccess에서는 요약자료를 제공합니다. 어느 것을 이용해도 무방합니다.

Predictive-Model Based Trading Systems, Part 1
Predictive-Model Based Trading Systems, Part I1

저자는 트레이딩을 시스템을 크게 두가지 유형으로 구분합니다. 규칙기반이거나 예측모델기반인 시스템입니다. Tradestation과 같은 시스템은 규칙기반으로 분류합니다.

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.

David Aroson은 Predictive Modeling를 구현하려면 틱데이티가 아닌 새로운 유형의 데이타를 만들어야 한다고 주장합니다. Indicators와 Targets입니다.

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.

3.
위에서 소개한 책을 보면 Indicator와 Variable에 대한 소개를 하고 있습니다. 예를 들어 Variable로 소개한 것중 ‘NEXT DAY LOG RATIO’, ‘NEXT DAY ATR RETURN Distance’ 등이 있습니다. 당장은 아니더라도 ZeroAOS의 트레이딩 라이브러이를 확장할 때 읽어보려고 합니다.

Leave a Comment

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.