E-RSI: Enhanced Relative Strength Index System
▼
E-RSI (Enhanced RSI) is an experimental modification of Wilder's 1978
Relative Strength Index. The standard RSI uses fixed 30/70 thresholds to identify
overbought/oversold conditions. E-RSI tests the hypothesis that these thresholds
should vary based on macroeconomic conditions—specifically monetary liquidity (M2)
and market sentiment. Whether this adds predictive value or just complexity remains
an empirical question that this system attempts to answer through rigorous backtesting.
Modifications to Standard RSI:
• RSI Calculation: Uses Wilder's original exponential smoothing formula.
The base RSI remains unchanged—only the interpretation thresholds are modified.
• M2 Money Supply Factor: Incorporates GDP-weighted M2 data from
5 economies (US 35%, EU 22%, China 25%, Japan 10%, UK 8%). The hypothesis: during
monetary expansion, "overbought" may occur at higher RSI levels.
• M2 Nowcasting: FRED M2 data has a 2-4 week lag. We use proxy data
(Fed Balance Sheet, Treasury accounts) to estimate current M2. This introduces
model uncertainty.
• Sentiment Factor: News sentiment via VADER with exponential decay
(λ=0.1). Limited to ~30 days of history due to API constraints, making historical
backtests effectively M2-only tests.
• Dynamic Thresholds: Overbought/oversold levels adjust based on
M2 regime, sentiment, and volatility percentile. More parameters = more overfitting risk.
Classification System:
• M2 Regimes: Expansion, Above Average, Below Average, Contraction
(percentile-based classification of YoY M2 growth).
• Sentiment Regimes: Very Positive, Positive, Negative, Very Negative
(based on aggregated news sentiment scores).
• Multi-Asset Parameters: Different default parameters for Equities,
Crypto, Commodities, FX, Fixed Income. These are starting points, not optimized values.
Signal Definitions:
Signals combine RSI level with Z-score (standard deviations from rolling mean):
• STRONGLY_OVERSOLD: RSI < oversold AND Z < -2
• MODERATELY_OVERSOLD: RSI < oversold AND -2 ≤ Z < -1
• OVERSOLD: RSI < oversold threshold
• NEUTRAL: oversold ≤ RSI ≤ overbought
• OVERBOUGHT: RSI > overbought threshold
• MODERATELY_OVERBOUGHT: RSI > overbought AND 1 < Z ≤ 2
• STRONGLY_OVERBOUGHT: RSI > overbought AND Z > 2
Important: This is research software for testing a hypothesis, not a validated trading system. Backtesting results are subject to overfitting, survivorship bias, and other well-known pitfalls. The validation framework includes walk-forward testing and statistical significance tests—use them before drawing conclusions.
Disclaimer: This is a prototype implementation of the paper titled "Enhancing the Relative Strength Index with Global M2 Money Supply and News Sentiment: A Context-Aware Technical Indicator." Please note that this is not financial advice—it serves solely as a demonstration of AI capabilities.
━━━ ANALYSIS RESULTS ━━━
PRICE DATA
RSI VALUES
ENHANCEMENT FACTORS
THRESHOLDS
CALCULATION EXPLANATIONS
▶RSI VALUES
Relative Strength Index - measures momentum by
comparing recent gains vs losses over 14
periods.
• >70 = Potentially overbought (sell
signal)
• <30 = Potentially oversold (buy
signal)
Standard RSI adjusted by market sentiment and
monetary conditions.
Formula: Standard RSI × (M2 Factor ×
Sentiment Factor)
More responsive to
current market environment.
ENHANCEMENT FACTORS
Money supply growth adjustment (±10% max).
• >1.0 = Higher money supply growth
(bullish)
• <1.0 = Lower money supply
growth (bearish)
• =1.0 = Normal growth
(~7% annually)
News sentiment analysis adjustment (±5% max).
• >1.0 = Positive news sentiment
•
<1.0 = Negative news sentiment
• =1.0 =
Neutral sentiment
Dynamic threshold adjustment based on price
volatility.
Higher volatility = Wider
overbought/oversold zones
Applied to
thresholds, not RSI values directly.
THRESHOLDS
Base: 70 + Volatility Adjustment
When E-RSI exceeds this level,
consider selling.
Base: 30 - Volatility Adjustment
When E-RSI falls below this level,
consider buying.
HOW TO USE
1. Compare both signals: E-RSI
provides more context-aware analysis
2.
Watch for divergence: When Enhanced and
Standard RSI disagree, market conditions are unusual
3. Consider thresholds: Dynamic
thresholds adapt to current volatility
4.
Combine with other analysis: Use as
part of broader trading strategy
━━━ MARKET CONTEXT ━━━
M2 MONEY SUPPLY
NEWS SENTIMENT
MARKET CONTEXT EXPLANATIONS
▶M2 MONEY SUPPLY
M2 includes cash, checking deposits, savings deposits, and small time deposits. It represents the money supply available for spending and investment.
• YOY Growth: Year-over-year
percentage change
•
MOM Growth: Month-over-month
percentage change
•
Historical Average: ~7%
annually
• High Growth (>7%): More
liquidity → Bullish for stocks
•
Normal Growth (≈7%): Balanced
conditions
•
Low Growth (<7%): Less
liquidity → Bearish for stocks
Factor = 1 + 0.1 × (Growth - 7%) / 7%
Applied to E-RSI to reflect
monetary conditions
NEWS SENTIMENT
AI analyzes recent news headlines and descriptions using VADER sentiment analysis. Processes 3-5 most recent articles about the stock.
• Range: -1.0 (most negative)
to +1.0 (most positive)
•
Neutral: Around 0.0
•
Compound Score: Combines
positive, negative, and neutral
• Positive News: Factor >1.0 →
Increases E-RSI
•
Negative News: Factor <1.0 →
Decreases E-RSI
•
Neutral News: Factor ≈1.0 → No
significant change
Factor = 1 + 0.05 × Sentiment Score
Maximum ±5% adjustment to E-RSI
DATA SOURCES
• Primary: Federal Reserve
Economic Data (FRED)
•
Fallback: Simulated based on
current economic conditions
•
Update Frequency: Monthly
(cached for 1 week)
• Primary: NewsAPI + Yahoo
Finance
• Analysis: VADER
Sentiment Intensity Analyzer
•
Update Frequency: Real-time
(cached for 1 hour)
INTERPRETATION NOTES
• Combine Both Factors: M2 provides
macroeconomic context, sentiment adds stock-specific
news
• Time Sensitivity:
Sentiment is more volatile, M2 changes slowly over time
• Market Conditions: Factors may
have different impacts during bull vs bear markets
• Use as Context: These are
supplementary indicators, not standalone trading signals
━━━ SIGNAL INTERPRETATION ━━━
━━━ HISTORICAL ANALYSIS ━━━
Processing E-RSI for each historical date...
RSI COMPARISON - LAST 365 DAYS
ENHANCEMENT WEIGHT FACTORS
Weight factors multiply the original enhancement factors. 1.0 = default strength, 0.0 = disabled, 5.0 = maximum strength