Trend-Tracking Trading Strategy Based on Improved RSI : A Case Study of Chinese CSI 300 Stock Index Futures

In European and American developed countries, quantitative trading is gradually replacing artificial transactions to occupy an important position in the market, and their daily turnover in the market is particularly evident. China securities market and derivatives market started late, and have a relatively obvious difference from abroad, especially in Western countries, in the level of quantitative transactions in mature capital markets. With the improvement of China’s market trading varieties, China’s quantization will develop very rapidly. In this paper, according to the characteristics of China’s CSI 300 Index Futures, we improve trend-tracking trading model based on the improved RSI. Firstly, we apply the wavelet transform for denoising of the price series, then improve RSI, and use the improved RSI and the denoised price series to establish an exit strategy and approach strategy. The strategy is excellent in practical application. In 1 minute K-line data back-test of CSI 300 index futures from 2010 to 2012, the return on invest has reached up to 102 million Yuan, and the ROI risk ratio is 2.61.


Introduction
Quantitative trading refers to trading through a computer program model to process market data, issue trading signals, and automatically perform a series of transactions.Characteristics of quantitative trading is as follows: based on historical data and statistical probability analysis, consistent with the objective, quick transaction response, 24-hour real-time monitoring, suitable for multi-market, with a strong stability.Program trading is not for the pursuit of booming profits, but of long-term steady profit.From the development of overseas trading, program trading will occupy more and more share in the market.
Quantitative trading first appeared in 1975.Quantitative trading development in developed countries has been very mature.In contrast, China's quantitative trading start late, especially in the future market in need of extensive use of it.The proportion in the future market is far from enough.But fortunately, domestic quantitative trading can quickly learn from the western developed countries, in addition to a high information degree of the domestic market, as well as to constantly improve the program development platform and application platform.With the introduction of financial derivatives as well as state support for market innovation, we believe in a great development of quantitative trading in the domestic market in the next period of time.
Foreign research started on quantitative trading earlier.Babcock (1989) in the "Advanced Technical Analysis: Principles, Construction and Practice of Trading Systems" explained the principles and the development construction methods of the trading system, etc.In the "Mechanical Trading System", Weisman (2005) describes the development process in a mechanical trading system, as well as traps during the system development process, and how to control risks and improve returns.Tharp, Chabot, and Tharp (2007) in the "Gateway to Financial Freedom" discuss the preparation for establishing a trading system, how to set a program, selection, entering the market, delisting, profit, evaluation and other aspects.In the ten trading systems published on abroad charts, most systems are used to capture the long-term trend (Wang, 2013).For example, the classic Aberration trading system was established and published by Keith and Fitschen.It mainly captures the long-term trend of the market, and can be applied to multi-market varieties.Andromeda is a trading system published by Pertrus development Corp.This system is a non-curve matching system, of which the most important feature is closing based on the time factor.GoldenSX trading system was published in 1995.The system defines a customized technical indicator, which determines the timing of the admission very effectively, thereby improving the success rate of transactions.Domestic program trading started late, the current program trading model is mainly based on technical indicators and forecasts, in which the technical indicator model accounts for a large proportion.Ding (2011) in the "Quantitative Investment: Strategy and Technology" details the various quantitative investment strategies and methods.Guan and Zhao (2005) use Markov chain model for predicting the probability of ups and downs during the day of the Shanghai index trend.Bai (2009) and others use ARIMA model to predict the trend of the Shanghai index, with the error of plus or minus 5%.Zhao, Cheng, Lu, and Wang (2011) use Copula function to quantitatively characterize the nonlinear correlation between financial assets, and establish program trading strategies based on Copula function.Liu, Chen, and Liang (2009) establish arbitrage strategies of a certificate on EIF50 China and Hua Shanghai 180ETF based on high frequency data.Bao, Zheng, and Zhou (2013) use MACD technical analysis indicators to create a model of high-frequency trading.
This article establishes a trend-tracking trading model based on the improved RSI, combined with wavelet transform, so that speculators can take advantage of this strategy to more accurately predict the future trend of selective stock index futures prices, reduce investment risk and increase return on investment.
The trend-tracking trading model has two main difficulties.Firstly, what's the criteria of estimate the stage of the market and the direction of market trend-operation?How to decide when to enter or exit?Secondly, how to effectively reduce losses because of false breakout of the market, and promptly take profit and stop loss?For the first difficulty, the commonly used short-term technical indicators are the Relative Strength Index (RSI), stochastics (KDJ) and William indicators (WR).Wherein, RSI indicator shows the current basic trend of the market, while roughly predicts whether the top and bottom would appear.Therefore, this article selects the RSI and improves it, and then applies it to open positions judgment.For the second difficulty, to stop losses, this paper uses wavelet analysis for raw data to deal with noise, so that the data becomes smooth, to avoid the long liquidation by the market false break resulting in financial losses.For stopping losses, we consider to set limit profit for the single transaction, control the profit to a certain height, and prevent risks.The innovation of this strategy is shown in two aspects.Firstly, improve the traditional RSI indicators and overcome the shortcoming of RSI to excessively emphasize on the change of individual extreme data, and proposed MRSI indicator to pay more attention to the overall market trend.Secondly, use wavelet transform to price series for noise reduction and loss stopping, effectively preventing the trap of market false break.

RSI Indicator
The Relative Strength Index (RSI) (Liu, 2008) proposed by J. W. Wilder, the well-known figure of the future market, is the most famous swing index of the future market and the stock market.RSI indicator analyzes the intensity of the trading of both the long interest and the short interest in the market by counting the differences in changes of the price or price index within a certain period, in order to determine the future direction of prices.The calculation method is as below: where the Increase Average refers to the average value of the amount of increase within the specified period, while the Decline Average refers to the average value of the amount of decline within the same specified period.
In general, RSI at the value of 50 is the dividing line between strong and weak market.When RSI value ranges from 50 to 80, it belongs to the strong area, indicating that the short interest is stronger than the long interest in the market, and it is suitable to go long.When RSI value is between 20 ~ 50, it belongs to the weak area, indicating that the long interest is stronger than the short interest in the market, and it is suitable to go short.When RSI value range from 0 to 20 and from 80 to 100, the market is in overbought and oversold condition, indicating that the current decline or increase has gone beyond the bounds of reason, and the market is highly likely to be reversal.

Improved RSI
After trying a variety of commonly used short-term technical indicators, such as KDJ and William value, to predict the trend of stock index futures, we found that the result is not ideal.Then we tested the RSI and improved it.The improved RSI is named MRSI, of which the specific formula is: (2) where the number of increasing minutes refers to the number of minutes showing the increases within the specified period, while the number of declining minutes refers to the number of minutes showing the declines within the same specified period N.For example, during the ten minutes from the 10th minute to 19th minute, if there are only the 10th minute and the 13th minute increasing, while the other eight minutes are declining, then MRSI of the 19th minute is (100-100)/(2+1/8)=20.
By drawing the RSI histogram (Figure 1) of a three-year stock index futures 1 minute K-line data and the MRSI histogram (Figure 2), we know that the overall RSI and MRSI present normal distribution, and the mean value of both is about 50, but the variance of MRSI is significantly less than that of RSI.The values of MRSI are more concentrated around the mean value, and the data is rarely too high or too low.Using the MRSI indicator can make the data more prominent in the special value, thus reducing the misjudgment of open positions.
In addition, MRSI pays more attention to the overall market trend, reducing the impact of individual extreme data.For example, during the ten minutes from the 10th minute to 19th minute, if there are only the first two minutes increasing, and the average increase is relatively high at 20%, while the other eight minutes are declining and the average decline is relatively low at 10%, then the MRSI of 19th minute is (100-100)/(1+2/8)=20.At this point, the market shows a downward trend, and it should go short.But if RSI=66.7, the market is rising, and it should go long.In fact, assuming that the closing price of the 10th minute is 1000, after two increases of the amount of 20%, and eight declines of 10%, the closing price of the 19th minute is 619.87, and it should go short.Thus, MRSI describes the overall trend better than RSI.

The Basic Theory of Wavelet Transform
The concept of wavelet transform was first proposed in 1974 by the French engineer J. Morlet engaged in petroleum signal processing (Li, 2011).In fact, it is a mathematical method to perform space-time sequence analysis with the use of localized transform thought of Fourier.But compared with the Fourier transform and the window Fourier transform (Gabor transform), the wavelet transform does not apply the time-frequency domain, but the time-scale domain.It can effectively extract specific information from the signal, and gradually develop multi-scale detailed analysis on signal through the telescopic translation operation, which can be focused to minute details of the signal.
( ) dt 0 t As the () t  on the whole real line R is integrable, and therefore there must be ( ) 0 t   when t   .At the same time, it can be seen from the integral geometric meaning and formula (3) that the upper half plane area created between curve () t  and x axis is equal to the lower half plane area.
, and meet the permit condition Then () t  is a basic wavelet.

3) Daubechies Wavelet
Daubechies wavelet (Daubechies, 1992)  2) , jk  does not have a symmetry, and the asymmetry is very obvious for some wavelet functions; 3) Regularity increases as p increases; 4) Function system has orthogonality.
This paper selects Daubechies wavelet to develop noise reduction to time sequence.Daubechies wavelet is generally abbreviated as dbN, where N represents the order, and this paper uses db1 wavelet, of which the analytic form is as follows: Its scaling function is: Haar wavelet is a simple step-type function, of which the length of the support is 1, and the filter length of is 2, and they are orthogonal as well as symmetrical.

Donoho Soft Threshold Denoising Method
Set the testing signal as f.The observed sequence of Gaussian white noise pollution is () where i = 0,1, ..., n-1; ; Z i is an element of Gaussian noise Z (0,1); the noise intensity σ is the mean variance of the white noise.
The wavelet threshold denoising method proposed by Donoho and others (Ke & Gu, 2010) is to select the threshold  .The wavelet coefficients <  are mainly caused by noise, and set them as 0; the wavelet coefficients >  are caused by signal, and shrink these coefficients to zero according to a fixed amount (soft threshold method), then develop wavelet reconstruction using scaling coefficients and wavelet coefficients after processing to obtain a signal denoised.Denoising process can be realized in three steps: 1) choose an orthogonal wavelet base and a decomposition level to operate orthogonal wavelet transform of d i , and get the wavelet coefficient w j,k ; 2) according to rules, select a threshold value  , operate soft threshold process on w j,k , and the wavelet coefficient after processing is named 3) operate wavelet reconstruction on the scaling coefficient and wavelet coefficients after processing to obtain a denoised signal f .
In order not to use future information and improve the operating speed of the program, this paper uses window moves, select the wavelet transform time window T. For the i-th minute, if <T, then use the data during (0,i) time period to develop wavelet transform; if i> T, then use the data during (i-T+1, i) time period.

Model Parameters
Parameters of the quantitative investment model are important.The association and match between parameters, a reasonable range, parameter optimization and over-optimization are important to explore.Therefore, we take a separate chapter to explain.Here are all the parameters referred to herein.

T is the wavelet transform time window;
N is the MRSI compute period; n: period of validity of signal for going short; m: period of calculating simple moving average value with MRSI value.
a: signal for going long when MRSI value is greater than a; b: go long when the moving average value of MRSI is greater than b; c: signal for going short when MRSI value is less than c; d: go long when the moving average value of MRSI is less than d; f: when the MRSI value is less than f, sell out; g: when the MRSI value is greater than f, buy in; P A : at the point of going long, sell out, if the difference of the closing price when buying in minus the current closing price is less than P A ; P B : at the point of going short, buy in, if the difference of the closing price when buying in minus the current closing price is greater than P B ; P C : sell out, if the difference of the current closing price after wavelet transform minus the former value is greater than P C ; P D : buy in, if the difference of the current closing price after wavelet transform minus the former value is less than P D .

Strategy Idea
The basic idea of this trading strategy is tracking the trend.When there is a valid breakthrough in the market, enter the market and track the development.Strategies can be split into entry strategy and exit strategy.In this / i t i n  paper, according to the characteristics of the Chinese CSI 300 stock index futures, we select the RSI indicator to improve, develop rules for opening a position and offset, perform denoising process on time sequence using wavelet transform, and then determine whether to stop loss.Finally, we determine the loss limits and profit limits.
Entry and exit strategy is a set of quantization rules based on trading ideas and transaction types, which can be recognized by computers.The rules must clearly determine the cases of entry and exit, as well as the corresponding position, that is, the rules of opening a position and offset.Wherein the exit strategy also includes a stop-loss strategy and a take-profit strategy.They can protect the capital from excessive losses when the market is fluctuating greatly, or control a reasonable position, withstand the acceptable capital withdrawal within the expectation, and keep the profits.

1) Going Long
When the MRSI value of a certain minute is greater than a, within n minutes after the signal released, if the simple moving average value of m minutes of the MRSI value during the n minutes is greater than b, just go long.
Here is an example to illustrate more clearly.Set X i as the MRSI value of i-th minute, and Y i as the simple moving average of m minutes of the MRSI value of i-th minute.Suppose X 80 > A, release the signal for going long, and calculate the simple moving average of m minutes of X 81 , that is Y 81 .The formula is: If Y 81 <b, perform no operation and keep the signal for going long, then continue to count Y 82 .If Y 82 > B, then go long and cancel the signal for going long.
As used herein, the moving average method can avoid misjudgment caused by false breakouts.The reason why the signal is set to go long is in order to reduce the losses arising from the market false breakout.After the observation, we find that the probability of the market for the first time fails to break the classic position is relatively high, and the probability of success for the second or third breakthrough is relatively high, which finds that in the index model the MRSI repeatedly makes breakthrough to limit values.The statistical data can also confirm this view.After releasing the signal, use a simple moving average value of MRSI to represent breakthroughs of index, thus reducing losses.
2) Going Short Similar to going long, when the MRSI value of a certain minute is less than c, within n minutes after the signal released, if the simple moving average value of m minutes of the MRSI value during the n minutes is less than d, just go short.

1) Exit Strategy Based on MRSI
When the reversal changes occur in the market, liquidate in a timely manner to keep profits.The exit strategy of such trading strategy is as follows: In the case of holding long positions, if the MRSI value of one minute is less than f, stock index futures reverse down in the high position, and investors should promptly sell out.
In the case of holding short positions, if the MRSI value of one minute is greater than g, stock index futures reverse up in the low position, and investors should promptly buy in.

2) Stop-Profit Strategy
In this strategy, since the profits are actually received, so we don't need to perform wavelet transform on the closing price data to smooth it, and the actual profits should be used to calculate the real value.
The strategy is to keep the profits obtained to prevent sudden sharp changes in the market resulting in financial losses.Set C i as the i-th minute closing price, C b as when the closing price when opening long positions, s C as the closing price when opening short positions.When holding long, if b i A C C P  (P A as a parameter), in order to keep the profits, sell out timely; when holding short, if s i B C C P  (P B as a parameter), buy in timely.Stock index futures, for example, when a single transaction profit reaches up to 18,000 yuan, start the strategy to keep the profits.

3) Stop-Loss Strategy
In the stop-loss strategy, in order to prevent the market advance liquidation caused by a false breakout, we use wavelet transform method for noise reduction on the closing price data, then use the data to judge whether or not to stop loss after the noise reduction.The effect of using db1 wavelet closing price for noise reduction is shown in Figure 3.As can be seen from Figure 4, this trading strategy can accurately determine the three markets downtrend of AB segment, CD segment and EF segment.

Properties of Parameters in the Model and Interrelatedness
The larger the parameter T is, the more consideration about neighbor prices should be taken to smooth the price, which tends to reflect longer-term price, and it is conducive to seize the longer-term trend.In addition, the greater the parameter T is, the more evident the hysteresis phenomenon of the smoothing sequence is.
The setting of parameter n and m can refer to the parameter T, all of which apply the idea of moving average.The setting of parameter m has a certain practical sense, and the value shouldn't be too small, since two or three minutes' simple moving average is prone to be optimized.
The smaller the parameter a is, the greater the parameter c (c <a) is, and the easier we can seize every slight fluctuation.The greater the parameter a is, the smaller the parameter c (c <a) is, and the easier we tend to seize prominent fluctuations and ignore slight ones.So when trying to seize small fluctuations, choose a smaller parameter a and a larger parameter c, while accompanying with a smaller parameter m and n, reducing the hysteresis of smooth data.When trying to catch the great trend, choose a larger parameter a and a smaller parameter c, while accompanying with a larger parameter m and n, increasing the smoothness of the data.
The smaller the parameter b is, the greater the parameter d (d <b) is, and the more often it opens a position.Therefore, the parameter b and d need to develop based on the preferences of income and risk-benefit of users.
If parameter f is too small, it cannot sell out timely in the downstream market, causing heavy financial losses; if it is too large, it will sell out early at the point of a false breakout, losing the opportunity to make a profit.
If parameter g is too large, it cannot buy in timely in the upstream market and lose money; if it is too small, it will buy in early at the point of a false breakout, losing the opportunity to make a profit.
If parameter P A is too large, it will sell out early before earning enough profit, missing profit opportunities; if it is too small, suppose a great decline will occur the next moment, it would suffer severe loss.
If parameter P B is too large, it cannot sell out once the loss occurs; if it is too small, it may miss the profits formed by a sudden decline in the market the next moment.
If parameter P C and parameters P D are too small, the times of stopping loss are too many, and costs increase, resulting in losses; if parameter P C and parameter P D are too large, the times of stopping loss are few, and it cannot achieve the purpose of stopping loss.

Model Implementation and Testing
Develop a back test on the 1 minute K-line data of China's CSI 300 stock index futures from 2010 to 2012, and the test results are shown in Table 1.Draw the back-test equity curve as shown in Figure 5.

Conclusions
This paper establishes a trend-tracking trading model based on improved RSI, combined with wavelet transform, so that speculators can take advantage of this time-selective market strategy to predict more accurately the future trend of stock index futures prices, reduce investment risk and increase the return on investment.In this paper, we apply wavelet analysis to perform de-noise processing on raw data, and the data is smoothed to avoid false breakouts in the market which may cause the long liquidation resulting in financial losses.At the same time, we consider to set profit limit to the single transaction, and control the profit at a certain height to prevent risks.
As can be seen from the back-test result, this model strategy seizes the trend rather accurately, though there is still some room for improvement.It can be seen from the cumulative yield curve that the capital curve from 2010 to 2012 grows rapidly, which is because it has a more obvious trend from 2010 to 2012, while model performs poorly from 2012 to 2013, and ordinarily from 2013 to 2014.Since the majority of the market during this period is of consolidation, it is not conducive for the trend-tracking strategy to make profits.
Since the profitable method of this strategy is to track the trend, so during the consolidation period, due to severe fluctuations, it is not effective for tracking trends, which will weaken the profitability of this model and even cause a loss.Compared with RSI, although MRSI can better reflect the overall trend and historical data, but it totally ignores the characteristics of individual data, and the use of data is inadequate.Although the wavelet transform can effectively reduce noise of raw data and retain its characteristics, but in the actual operation of the algorithm, there are some drawbacks, such as the inability to take advantage of future information and problems in processing the current time data, which may bring about influences on the judging of the accuracy of stopping loss.There is no perfect model.We must take advantage of its strengths and also accept its shortcomings.In general, this strategy grasps the trend relatively accurately and meets with the expectation.

Figure
Figure 1.RSI Histogram 1 is wavelet function constructed by Inrid Daubechies, a world-famous Belgian scholar of wavelet analysis.Except db1 (i.e.Haar wavelet), other wavelets have no clear expression.

Figure 3 .
Figure 3. Closing price curve before and after wavelet transform

Figure 4 .
Figure 4. Schematic diagram of trading strategy 3 As can be seen from Figure 4, this trading strategy can accurately determine the three markets downtrend of AB segment, CD segment and EF segment.

Table 1 .
Model test results