This system, our first of 2022, is based on a John Ehlers’ creation, the RSI with Hann windowing, or RSIH as I will be referring to it here. I will not pretend to understand window functions, but to me it is just another form of smoothing. When RSI is calculated using Wilder’s original calculations, it is choppy. Ehlers has spent decades smoothing, reducing lag, and calculating cycles. The Hann function is interesting, as it was designed by a meteorologist. I love seeing how mathematical functions can be applied over multiple disciplines.
This is what a 13-period RSIH looks like when compared to the regular RSI:
The smoothing feature is very appealing. I find the idea interesting, but I have had little success building systems based on John Ehlers’ works. In this case, I am trying something a little different:
- When the RSIH changes direction by a certain amount, e.g. .10 points, then enter in that direction;
- Reverse position when the RSIH changes direction again
One thing that I would like to mention about a difference between RSI and RSIH. Ehlers, like with many of his oscillators, uses 0 as the midpoint, whereas RSI has 50 (or .50, depending on your implementation), -1 as the extreme oversold point (0 for normal RSI), and 1 as the extreme overbought, the same as regular RSI, unless using the 0-100 scale. If I ever meet him, I will ask him why he calculates in this manner.
That is about it for this idea. It is an ‘always in’ system, which is not my favorite type to run due to the capital requirements. I am hoping to catch the occasional fat-tail in the various instruments I select. Let’s see if I can get this work.
Phase 1: Plan & Design
1. Trading Idea
The big idea is to use the RSIH to identify trend direction:
- 13-period RSIH for direction
- Long and short entries
- Weekly timeframe
Here are the entries:
Long:
- If the RSIH has moved up from the lowest point by .10 or more, then go long next bar at market.
Short:
- If the RSIH has moved up from the lowest point by .10 or more, then go short next bar at market.
Reverse positions:
- This is an always-in system, so a short signal will exit a long position, and vice versa.
2. System Definition
Indicator:
RSIH, 13-period
Input Parameters:
Input(Default) | Data Type | Optimizable? | Comments |
Risk_Capital(2500) | Integer | Yes | Risk_Capital |
Leverage(4) | Integer | Yes | Multiplier for risk capital |
I have considered optimizing for the RSIH Period or the amount the RSIH value must move to trigger a buy or sell signal, but I will keep them as-is. I can consider optimization for future systems.
Variables:
Variable | Data Type | Default | Calculation |
RSIH | Double | 0 | RSI with Hann windowing, as described by John Ehlers (see References at the end of this article) |
RSIH_High | Double | 0 | Most recent highest RSIH |
RSIH_Low | Double | 0 | Most recent lowest RSIH |
NumShares | Integer | 1 | Number of shares to buy or sell |
Initial Capital:
- $20,000
Leverage:
- 4:1
Position Sizing:
- Risk_Capital = $2,500 per symbol (purchasing power = $10,000)
- Number of shares = Risk_Capital / Latest Close Price * Leverage (rounded down)
Entry:
- Long:
- RSIH >= Lowest RSIH + .1
- Short:
- RSIH <= Highest RSIH + .1
Stop:
No stops, only reversals
Exit(s):
- Exit long position after 1 bar
Profit Target:
- None
Challenges: None
3. Performance Objectives
The system will meet the following objectives:
Objective | Goal |
System Type (trend, mean-reversion, day, swing, etc.) | Trend |
Risk of Ruin | 0% |
Profit Factor | > 1.5 |
Win Percent | > 30% |
Max Drawdown % | < 35% |
Profit/Drawdown Ratio | > 2.0 |
Ready Date | 2022/01/15 |
The system type was difficult to identify. I think of this as a cross between a swing and trend following system. Our entry is on the swing, but we try to hold as long as possible.
This idea is S.M.A.R.T.: Specific, Measurable, Achievable, Realistic, Time-bound
4. Market Selection
Markets:
Energies | Currencies | Fixed Income | Agriculture | Metals | Softs | Indexes | Equities |
---|---|---|---|---|---|---|---|
X |
Instruments:
Market Sector | Instrument | Symbol | Comments |
Equities | 9 select ETF’s 9 select equities | AAPL, GE, GLW, MTZ, PBR, PG, PPG, T, XRX, FEX, IEV, IJR, ITOT, IVV, NOW, QQEW, SPY, XLE | I will use a set of 9 ETF’s and 9 stockes that I have utilized in other testing. They all have at least 10 years of data and significant volume over those 10 years to justify their usage here. |
Chart Type, Timeframe, Session, Time Zone:
Attribute | Value | Comments |
Chart Type | Regular Candlestick | Charting is only useful for validating entry and exit signals |
Timeframe / Interval(s) | Weekly | |
Session | Regular | |
Time Zone | Exchange |
Phase 2: Build
5. Manual Test
Pass. The instruments I selected seemed to work just fine.
6. Build
Process Diagram
Comments:
This is easy. The only challenging part is holding the highest and lowest RSIH and making sure I manage that variable in the code.
The diagram above is over-simplified, as there is some code that I use to manage the internal variables. Adding these additional processes does not add anything valuable and will just muddle and confuse.
7. Unit Test
I ran into a few bugs during testing. One of the oddities of trading system development is that sometimes your system will appear to work better with the bugs than without. In this case, the system performed better during unit testing with the bug, than it did after fixing it. We should not put too much meaning into this, as it just one instrument and only a unit test.
Complete?
Phase 3: Test
8. Optimization
We are not optimizing any parameters for this system.
9. Walk-Forward Analysis
Rather than build a portfolio, I just tested the instruments one-by-one. Nothing passed, using Profit Factor as my fitness function:
Instrument | Type | Profit Factor |
AAPL | Equity | 1.31 |
GE | Equity | (0.99) |
GLW | Equity | 1.03 |
MTZ | Equity | (0.90) |
PBR | Equity | 1.40 |
PG | Equity | (0.84) |
PPG | Equity | 1.09 |
T | Equity | 1.14 |
XRX | Equity | (0.64) |
FEX | ETF | (0.82) |
IEV | ETF | (0.73) |
IJR | ETF | 1.26 |
ITOT | ETF | (0.86) |
IVV | ETF | (0.78) |
NOW | ETF | 1.17 |
QQEW | ETF | 1.14 |
SPY | ETF | (0.82) |
XLE | ETF | 1.13 |
The only thing I can say is that there are too many entries with this system. At this point, the system fails, so we will move to our notes and commentary.
10. Monte Carlo Simulation
We did not make it this far.
11. Incubation
We did not make it this far.
Phase 4: Deploy
12. Production / Portfolio Assignment
We did not make it this far.
Trading System Result: FAIL
Notes and Commentary
The system failed, but there were some things that I liked. The entries looked okay, even with the lag. I think having any system as an always-in type is that there are times when we should just stay in the market and times to sit and wait for the next opportunity. There were some fat tails (big wins), but there were too many losses along the way the nibbled away at the fat tail profit that nullified the advantage.
I believe that the RSIH has as much utility as any other RSI. The RSIH has the smoothing, which simplifies analysis at the cost of lag.
Continuous Improvement Department:
Overall, this system idea is okay, but not worth it. Here are some thoughts about what I can do with what I learned:
- Step away from the quick exit and try longer holding periods
- Filter for symbols with only a positive earnings-per-share (EPS)
Next Trading System Idea: RSIH with Fractals
I really enjoyed working with this indicator, despite the failure. I tried using some additional filters to improve the exit signals. Next time, I will add Bill Williams Fractals for exits (or pivots, if you prefer), to see if this improves the exits, profitability, and drawdowns. Until then, thank you for reading and trade well!
Do you have a trading idea that you want me to put through our process to see if it would make a valid trading system? Leave a comment below and we can discuss.
Sources/References
- (Yet Another) Improved RSI, John Ehlers, Technical Analysis of Stocks & Commodities, January 2022
- Relative Strength Index – Wikipedia
Did you like what you read? Do you want to see more? Subscribe now and receive our email twice per month, with the Trading System Idea of the Week and other fun stuff.
Don’t worry, we will never, ever, ever sell, overuse, or donate your email address. Promise.
Did you like what you read? Do you want to see more? Subscribe now and receive our email twice per month, with the Trading System Idea of the Week and other fun stuff.
Don’t worry, we will never, ever, ever sell, overuse, or donate your email address. Promise.