Simple systems stand the best chances of succeeding by not becoming overly curve-fit. しかし, adding a simple filter to a robust system can be a great way to improve its profitability, provided you also analyze how it may alter any risks or biases built into the system. The Moving Average Crossover System with RSI Filter is an excellent example of this.
システムについて
This system uses the 30 unit SMA for the fast average and the 100 unit SMA for the slow average. Because its fast moving average is a good bit slower than the スパイ 10/100 Long Only Moving Average Crossover System, it should generate less total trade signals. It will be interesting to see if this leads to a higher win rate.
The system also uses the RSI indicator as a filter. This is designed to keep the system out of trades in markets that are not trending, which should also lead to a higher win rate.
The system enters a long position when the 30 unit SMA crosses above the 100 unit SMA if the RSI is above 50. It enters a short position when the 30 unit SMA crosses below the 100 unit SMA if the RSI is below 50.
The system exits a long position if the 30 unit SMA crosses back below the 100 ユニット SMA, or if the RSI drops below 30. It exits a short position if the 30 unit SMA crosses back above the 100 ユニット SMA, or if the RSI rises above 70. It also implements a trailing stop that is based on the volatility of the market and sets an initial stop at the most recent low for a long position or the most recent high for a short position.
取引のルール
行く長いとき:
- 30 unit SMA crosses above 100 ユニット SMA
- RSI > 50
ときに急に行く:
- 30 unit SMA crosses below 100 ユニット SMA
- RSI < 50
長いときを終了します。:
- 30 unit SMA crosses below 100 ユニット SMA, または
- RSI drops below 30, または
- Trailing Stop is hit, または
- Initial Stop is hit
短いときを終了します。:
- 30 unit SMA crosses above the 100 ユニット SMA, または
- RSI rises above 70, または
- Trailing Stop is hit, または
- Initial Stop is hit
バックテスト結果
The backtesting results I found for this system were from the Euro vs US Dollar market from 2004 を通じて 2011 using a daily time period. During those seven years, the system only made 14 取引, so it definitely filtered out a large portion of the action. The question is whether or not it filtered out the good trades or the bad ones.
Of those 14 取引, eight were winners and six were losers. That gives the system a 57% 率を獲得します。, which we know can be traded very successfully provided the profit rate is also strong.
Backtesting reports for forex systems use a stat called profit factor. This number is calculated by dividing the gross profit by the gross loss. This gives us the average profit we can expect per unit of risk. The results for this backtesting report gave this system a profit factor of 3.61. This means that over the long run, this system will provide positive returns.
For a comparison point, 、 Triple Moving Average Crossover System only had a profit factor of 1.10, so the Moving Average Crossover System with RSI is likely to be three times more profitable. This means that using a larger number for the fast moving average and adding the RSI filter must be filtering out some of the less productive trades.
These numbers are further supported by the fact that the average profit was just over twice as large as the average loss. しかし, despite these positive ratios, the system did suffer a maximal drawdown of almost 40%.
Sample Size
The fact that this system gives so few signals is both its biggest strength and its biggest weakness. Placing fewer trades and holding them for longer periods of time will keep transaction costs from becoming a factor. しかし, analyzing 14 trades that occurred over seven years could lead the results to be skewed because of サンプルサイズが小さいです.
I am curious how this system would have performed if it was traded across a dozen different currency pairs over the same time period. Furthermore, how would it have performed if the backtest went back 50 years or tested the system on stock indexes or commodities. There is clearly positive stats to warrant further exploration of this system, but it would be foolish to trade real money based on the results of 14 取引.
Trading Example
An example of this system at work can be seen on the current chart of the FXI. Around March 18 of this year, 、 30 day SMA crossed below the 100 日 SMA. At that time, the RSI was also below 50. This would have triggered a short position somewhere just below 36. The initial stop would probably have been placed above the recent high at 38.
By mid-April, the price had dropped to 34 and we would have been sitting on a nice profit. The price then rebounded to almost trigger our initial stop at 38 in early May before crashing almost all the way down to 30 at the end of June. It has since bounced back to the 34 範囲.
At no point during any of this action did the 30 day SMA cross back above the 100 日 SMA, and the RSI remained below 70. したがって, neither of those would have triggered an exit. While the price came close to our initial stop, it did not quite get there, so that would have kept us in the trade as well.
The only thing that could have caused an exit would have been the trailing stop, which would have depended on how much volatility we set it to allow for. It is still to early to say whether we would want to have been stopped out or not.
About the RSI Indicator
The RSI indicator was developed by J. Welles Wilder and was featured in his 1978 本, New Concepts in Technical Trading Systems. It is a momentum indicator that oscillates between zero and 100, indicating the speed and change in price. Many momentum traders use RSI as an overbought/oversold indicator.
RSI is calculated by first calculating RS, which is the average gain of the last n periods divided by the average loss of the last n periods. The value for n is generally 14 日.
RS = (Average Gain) / (Average Loss)
Once RS is calculated, the following equation is used to make that value into an oscillating indicator:
RSI = 100 – [ 100 / (1 + RS) ]
This will give us a value between zero and 100. Any value above 70 is generally considered overbought, and any value below 30 is considered oversold. しかし, since this system is a trend following system, overbought and oversold do not have their usual negative connotations.
jorge rolando medellin alvarez 言う
when using a m.a. strategy do you take in consideration the interest rate of the currency? also..do you use the dollar as your base currency?
I have traded stocks before but never forex,and I am trying to build something with python,a forex using an 8>20 長い;8<20 短い,but am still wondering if I need to incorporate the interest rate of each currency in the analysis for the p&l.
thank you for your time.
Jorge Medellin
jormoria@gmail.com
PS. I know that the jokey is as important as the horse,so in this case I AM MEANING FOREX as currencies as opposed to futures or forwards contracts.
ショーンオバートン 言う
Hi Jorge,
Thanks for your note. The raw interest rate itself isn’t the important bit. We are, 結局その程度です, pairs trading. The strong currency will be the one with the highest expectation for rising interest rates.
I wouldn’t pay attention to interest rates very much, at least not at the moment. Traders care far more about quantitative easing than the interest rate at the moment. QE is far more important and dangerous.
Steve 言う
What is the UNIT of SMA? 30 ユニット SMA 100 ユニット SMA?
Do you meant that is Period of Simple Moving Average?
Any others?
ショーンオバートン 言う
[はい], it’s the SMA Period.
The first period SMA is 10. The second period SMA is 100. When they cross, you get an signal if the RSI is above 50.
Omar 言う
こんにちはショーン,
I would like to begin by thanking you for your very informative blog and articles. I hope I will be able to help other traders in the future as you do.
I have constructed and used a filtered momentum indicator as a filter in other strategies on a demo account. I did not consider using the RSI since I do not like using indicators that basically show the same thing (most indicators reflect he momentum in one way or other while others do not have any rational explanation). しかし, after reading your article above, I replaced my momentum indicator with the RSI. The results are truly promising with much less whipsaw in comparison. i will try to find the time to write an EA and backtest the strategy.
Why do you think there was such a huge drawdown? Is it inherent in the MA crossover strategy? Or is it caused by the RSI?
ショーンオバートン 言う
More than likely it’s both. I personally dislike the RSI. I’ll make sure to do a moving average comparison for you in the Quantilator, あまりにも. It’s the easiest and most objective way to pick apart strategies.
Niyaz Ahmed Sayyed 言う
First of all i would like to thank you for posting article, i am new in Trade it helped me to understand how to take a position based on technical chart apart from Company fundamentals and accounts.
Much Appreciated!
ショーンオバートン 言う
Keep reading this blog. It’s the best way to learn.