Improved trading strategies using the coupled hidden Markov model

Ask anyone on Wall Street, "How the current market situation?" You're likely to get one of three answers: bull market, bear market or correction. General traders, these terms are vague description of the state of the market. But for a mathematical concept, these terms are described accurately price trends.

The concept is a hidden Markov model (HMM). It is composed of Harvard University, Dr. Leonard E. Baum mathematician and his colleagues put forward. Assumptions of the model is that the market is in one of five states - a super bear market, bear market, consolidation, bull or a super bull market - at any given time, transitions between states are subject to Markov properties. That is, the conversion only with a state before the relevant market, irrespective of the earlier state. Transition probability indicates that the market is how between the five state transitions.

Assuming that market subject to the Markov property, it is sometimes considered to be a good assumption, because it eliminates the lag problems. When calculated based on the price action in the past for a long time, and thus to the conclusion there is not much value. The longer the time back, the lower the effectiveness of the current price action trading decisions.

As we know the difference between a bear and bull market performance, each state will also show a different probability distributions based on observed variables. We observed variables can be any form of physical quantities on the market, such as price and indicators. They have a dual purpose, first, if we know the market in a certain state, it can be inferred by the state under a possible state distribution market; second, to observe the sequence can be used to describe the state of the market. HMMs assumption is that the market is always in one of five states, and the probability of transition to another state depends on the current status: When the market is in a bull market state (wb), it has a probability of 0.15 translates into a bear market state (wu) the probability of transition to 0.3 consolidation state (r).

In the past decade, Hidden Markov Models (HMMs) has crept into hedge funds arsenal. Due to their logical and rational modeling of Markov precise nature of the application, quants has been able to Hidden Markov Models (HMMs) used to generate profitable trading signals.

However, when the transaction in conjunction with the next wave of technology, Hidden Markov Models (HMMs) showed its limitations. Hedge funds come to realize that, you want to win in this market, using only one-dimensional data is not enough. Multi-cycle transaction technology, pairs trading and market interactive analysis and so get in-depth study. But the earlier Hidden Markov Models (HMMs) can not integrate these new ideas, and therefore needs to be extended in order to meet such a possibility. Thus, the coupling hidden Markov model (CHMM) appeared.

Baum is different from the original HMM has a standard mathematical formula, CHMM is a new research, probably began in the first decade of this century the medium term, there is not a standard formula. CHMMs formula although researchers from different universities presented are not the same, but they have a common underlying theme: the use of two HMMs, and coupled through their transition probabilities.

Let us first of all to the two HMMs a name. HMM1 modeling will be based on the foreign exchange market, commodity markets and HMM2 based modeling. HMM1 and HMM2 together constitute our CHMM. As I said before, as time progresses, the status of each market will be a certain probability of conversion to another state. It not like before, this probability is now at the same time depends on the current state of the two markets. This is the coupling between the two markets

In our model mentioned in the two markets, then we need to track two observation variable data, that is, the foreign exchange market and commodity market prices or indices. We entered our two observation sequences CHMM, so that they are automatically reconfigured to best represent the various markets.

The result is a model has predictive ability, the model can predict the next observation value of foreign exchange and commodity markets. Throughout the course of the coupling of two HMMs, Markov state transition still meet properties. HMMs advantage preserved, and the hysteresis problem is processing data added another dimension is achieved. Quants quickly began to explore the use of assets for the establishment CHMM.

For us, in order to take advantage of the predictive ability of CHMM, we'd better take advantage of two highly relevant or highly uncorrelated asset modeling.

The relationship between gold and the Swiss franc we chose these two markets. First, it was believed that during the economic turmoil, investors tend to throw away the dollar in favor of holding gold, because gold has a store of value, which means that there is a negative correlation between these properties. Second, the gold sales program, the Swiss National Bank holds 1290 tons of gold reserves, which is equivalent to 20% of assets in Switzerland, therefore, the price of gold and the Swiss franc should be movement toward a different direction. Both relationships have us believe is a negative correlation between the USD / CHF and gold; a decline in the price rise means another price

Now, with USD / CHF and gold coupled with a CHMM design a trading strategy. First, we define observables. The rule is for physical assets to generate trading signals. If we trade a tail of the distribution, it will be the CCI. If we follow the trend, it will be the ADX indicator. Consistent with our strategy, we have put considerable measure defined as the RSI indicator, so, USD / CHF and the relative strength of gold can be used to characterize the RSIs.

Second, we need to build our strategy. Since our goal is to characterize CHMM, we will use a simple cycle of 10 minutes 4 RSI, when it is made up through 20% (oversold) long, short, when it down through 80% (overbought) .

Rather than the real value of RSI RSI We will use CHMM forecast USD / CHF is. When the RSI of gold into account, although it looks like we need to set a filter, but actually do not. US CHMM theory behind it is that the state transition contains this relationship: Coupling USD / CHF and gold. When the fourth period RSI value USD / CHF and gold are regularly loaded into CHMM, it will be reconfigured when every time you load, the relationship between the calculated most meaningful USD / CHF and CHMM. Any of the USD / CHF forecast will join the consideration of the relative strength of the relationship between USD / CHF and gold.

Finally, we set a 3: 1 ratio of profit and loss, respectively with 2 stop period ATR 12, ATR proceeds. 6 times 12 cycles take profit. In addition, we run our first strategy fixed position, and then multiplied by the use of dynamic fixed positions to run the policy positions obtained by the conversion probability CHMM states. Basically, our confidence and model of each transaction predict the next state of confidence is consistent

CHMM assess the success of the policy, which is based on comparing the predicted RSI values ​​CHMM of whether the transaction value is more profitable than the actual RSI. Which will later be compared.

To test the robustness of the model to predict the value of CHMM, we will use the model to be traded on another indicator CCI. For reasons of space, we will not detail CCI strategy, but it has been used to optimize the value of the actual CCI during the period of the test and achieved a good performance. Then, our goal is to use the predictive value of CCI to further improve profits on the same strategy has been profitable.

We compared with standard RSI and CCI systems using these different versions of CHMM (predicted by the Viterbi algorithm and non-Viterbi algorithm, respectively, and fixed positions and dynamic positions) system performance. Test period of 10 minutes four months of 2013 price data.

CHMM performance of RSI and CCI predicted value based on transaction made over standard trading system. Performance differences in performance, application CHMM of RSI will be a loss of 4.55% of the original performance becomes a 5.5% profit. In the first month, performance comparison of the performance of the two systems are similar, but after using the system for consistent profits CHMM while the standard model RSI has begun a new loss. In all four cases, the Sharpe ratio was increased to 1.690-1.923.

When CCI strategy were compared, we found that in all four versions, performance has improved. CCI's standard return policy rate to 0.35%. CHMM use versions to yield 0.36% -0.49%. Further comparison CHMM version of the Sharpe ratio and fixed positions in a dynamic position, we can see that the RSI strategy to improve the Sharpe ratio 0.2, 0.03 increase in the CCI strategy. These tell us that when predicting the next state, the confidence level of the model is also valuable.

In witnessed by coupling USD / CHF and gold, CHMM can improve the profitability of trading strategies, we can not help but want to know what assets can be coupled in order to monetize CHMM.

If we adhere to a principle that is either highly correlated or uncorrelated assets between the couple, then CHMM able to maintain its profitability. CHMM principle behind the HMM and robust enough to decode the relationship between the two kinds of assets, as well as infer transition probabilities of a market affect other markets. Whether the same plate stock, index and interest rates, the yen cross rates, foreign exchange and commodities, bonds and economic indicators, or even the macro and micro price changes are likely. It comes down to asset selection and definition of observed variables. Whether CHMM can put together three kinds of assets? This of course.

----------------------------------------------

Recommended reading:

1. a quantitative strategist Confessions (Good text strongly recommended)

2. Stock Futures classic quantitative trading strategies are here! (Source)

3. futures / stock data Daquan query (History / real-time / Tick / finance, etc.)

4. lying really make money? Ten problems of quantitative trading

5. From the high-frequency trading to quantify, can not read five books

6. How to effectively avoid slippage quantify transaction?

Published an original article · won praise 6 · views 4941

Guess you like

Origin blog.csdn.net/zk168_net/article/details/104691246