50 lines
1.8 KiB
Markdown
50 lines
1.8 KiB
Markdown
# 2-Period RSI
|
|
|
|
This strategy was taken from chapter 9 of *[Short Term Trading Strategies That Work](https://moshferatu.dev/moshferatu/short-term-trading-strategies-that-work)* (2008) by Larry Connors.
|
|
|
|
## Rules
|
|
|
|
The original long-only rules from the book:
|
|
|
|
1. The asset (e.g., SPY) is above its 200-day moving average.
|
|
2. The 2-period RSI closes below 5.
|
|
3. Enter a long position at the close (or the following open in this case).
|
|
4. Exit the position when the asset closes above its 5-period moving average.
|
|
|
|
For taking short positions, invert the above conditions and use a 2-period RSI reading of > 95 as the entry threshold.
|
|
|
|
## Parameters
|
|
|
|
**RSI Period**: The period to use in the RSI calculation. (Default: 2)
|
|
|
|
**RSI Smoothing**: The smoothing period to use in the RSI calculation (Default: 1)
|
|
|
|
**Long Entry Threshold**: The RSI value below which to allow entering a long position. (Default: 5)
|
|
|
|
**Short Entry Threshold**: The RSI value above which to allow entering a short position. (Default: 95)
|
|
|
|
**Long Term Trend Period**: The period to use for the simple moving average used to define the long term trend. (Default: 200)
|
|
|
|
**Short Term Trend Period**: The period to use for the simple moving average used to define the short term trend. (Default: 5)
|
|
|
|
**Use Fixed Position Sizing**: Whether to use the same position size for every trade in order to neutralize the effect of lower historical prices. (Default: false)
|
|
|
|
**Fixed Position Size**: The size of the position when using fixed position sizing. (Default: 10000)
|
|
|
|
**Long Only**: Whether to only allow long trades as in the original strategy definition. (Default: false)
|
|
|
|
## Backtest Results
|
|
|
|
### SPY
|
|
|
|
![SPY Analysis](./backtest-results/spy_analysis.png)
|
|
|
|
![SPY Summary](./backtest-results/spy_summary.png)
|
|
|
|
### QQQ
|
|
|
|
![QQQ Analysis](./backtest-results/qqq_analysis.png)
|
|
|
|
![QQQ Summary](./backtest-results/qqq_summary.png)
|
|
|
|
--- |