Technical Indicators
30 essential technical indicators for algorithmic trading and ML4T
What You'll Learn
Master technical analysis with 30 comprehensive flashcards covering SMA, EMA, Bollinger Bands, RSI, MACD, momentum indicators, and ML4T Project 6 concepts. Learn indicator interpretation, standardization, and trading signal generation.
Key Topics
- Moving averages: SMA, EMA, Golden/Death Cross signals
- Bollinger Bands: construction, %B indicator, volatility measurement
- Momentum oscillators: RSI, MACD, Stochastic, CCI
- Indicator standardization with z-scores for ML applications
- Signal generation and combination strategies
- Common pitfalls: whipsaw, over-optimization, false signals
Looking for more finance resources? Visit the Explore page to browse related decks or use the Create Your Own Deck flow to customize this set.
How to study this deck
Start with a quick skim of the questions, then launch study mode to flip cards until you can answer each prompt without hesitation. Revisit tricky cards using shuffle or reverse order, and schedule a follow-up review within 48 hours to reinforce retention.
Preview: Technical Indicators
Question
What is a Simple Moving Average (SMA)?
Answer
SMA is the average price over a lookback window of N periods. SMA[t] = (price[t] + price[t-1] + ... + price[t-N+1]) / N. Smooths price data to identify trends. Lags behind current price. Common periods: 20, 50, 200 days.
Question
What are Golden Cross and Death Cross?
Answer
Golden Cross: Short-term SMA (e.g., 50-day) crosses above long-term SMA (e.g., 200-day). Bullish signal. Death Cross: Short-term SMA crosses below long-term SMA. Bearish signal. These are momentum-based trend-following signals.
Question
What is an Exponential Moving Average (EMA)?
Answer
EMA is a weighted average giving more weight to recent prices. EMA[t] = α × price[t] + (1-α) × EMA[t-1], where α = 2/(N+1). More responsive to recent changes than SMA. Used in MACD calculation.
Question
What are Bollinger Bands?
Answer
Bollinger Bands consist of three lines: Middle band = SMA(N), Upper band = SMA(N) + k × σ, Lower band = SMA(N) - k × σ. Where σ is standard deviation over N periods. Typically N=20, k=2. Measures volatility and relative price levels.
Question
What is Bollinger Band %B indicator?
Answer
%B = (price - lower_band) / (upper_band - lower_band). Normalizes price position within bands. %B > 1: above upper band (overbought). %B < 0: below lower band (oversold). %B = 0.5: at middle band. Used to generate buy/sell signals.
Question
How do Bollinger Bands measure volatility?
Answer
Band width reflects volatility. Wide bands = high volatility (large standard deviation). Narrow bands = low volatility (small standard deviation). Bollinger Band Squeeze: bands narrow (low volatility) often precedes significant price movement.
Question
What is the Relative Strength Index (RSI)?
Answer
RSI is a momentum oscillator ranging from 0-100. RSI = 100 - [100 / (1 + RS)], where RS = average gain / average loss over N periods (typically 14). Measures speed and magnitude of price changes.
Question
How do you interpret RSI values?
Answer
RSI > 70: Overbought condition, potential sell signal (price may reverse down). RSI < 30: Oversold condition, potential buy signal (price may reverse up). RSI around 50: neutral. Can also identify divergence between price and RSI for reversal signals.
Question
What is Momentum indicator?
Answer
Momentum measures rate of price change. momentum[t] = (price[t] / price[t-N]) - 1, or momentum[t] = price[t] - price[t-N]. Positive momentum: upward price velocity. Negative momentum: downward velocity. Lookback N typically 10-20 days.
Question
What is MACD (Moving Average Convergence Divergence)?
Answer
MACD line = EMA(12) - EMA(26). Signal line = EMA(9) of MACD line. MACD histogram = MACD - Signal. When MACD crosses above Signal: bullish. MACD crosses below Signal: bearish. Histogram shows momentum strength.
Question
CRITICAL: What does MACD indicator return?
Answer
MACD returns a SINGLE results vector (the MACD line values), NOT a tuple of (MACD line, Signal line). If you need both, you must call the indicator twice or compute signal separately. This is a common exam trap.
Question
What is the Commodity Channel Index (CCI)?
Answer
CCI = (typical_price - SMA_typical_price) / (0.015 × mean_deviation). Where typical_price = (high + low + close)/3. Measures deviation from average price. Values above +100: overbought. Below -100: oversold. Unbounded oscillator.
Question
What is the Stochastic Indicator?
Answer
%K = 100 × (close - lowest_low) / (highest_high - lowest_low) over N periods. %D = SMA of %K (typically 3 periods). Compares closing price to price range. %K > 80: overbought. %K < 20: oversold. Crossovers generate signals.
Question
What is the Percentage Price Oscillator (PPO)?
Answer
PPO = [(EMA_short - EMA_long) / EMA_long] × 100. Similar to MACD but expressed as percentage, making it comparable across different price levels. Positive PPO: bullish. Negative PPO: bearish. Zero-line crossovers signal trend changes.
Question
Why must indicators return a SINGLE results vector?
Answer
Project/exam requirement: indicators must return a single numpy array/pandas Series, not tuples or multiple structures. If indicator produces multiple values (like MACD line and signal), return only the primary one or combine into one metric. Ensures consistent API.
Question
Why standardize indicator values (Standard Score)?
Answer
Different indicators have vastly different scales (RSI: 0-100, Momentum: -∞ to +∞, %B: 0-1). Standardization: z = (x - mean) / std makes them comparable. Essential for: ML algorithms (especially KNN), combining indicators, preventing scale bias.
Question
What is Standard Score (z-score) formula?
Answer
z = (x - μ) / σ, where x = raw value, μ = mean, σ = standard deviation. Transforms data to mean=0, std=1. Positive z: above average. Negative z: below average. |z| > 2: unusual value (beyond ~95% of data).
Question
How do you combine multiple indicators for trading signals?
Answer
Common approaches: 1) Require confirmation from 2-3 indicators (e.g., RSI oversold AND Bollinger %B < 0 AND positive momentum). 2) Weighted voting system. 3) Use as features for ML model. 4) Sequential filters. Goal: reduce false signals, increase confidence.
Question
What is a lagging indicator vs leading indicator?
Answer
Lagging: Follows price movements, confirms trends after they start (SMA, MACD). Better for trend-following. Leading: Attempts to predict future movements, shows divergence before price reverses (RSI, Stochastic). Better for reversal trading. Use both for complete picture.
Question
What is indicator divergence?
Answer
Divergence occurs when price and indicator move in opposite directions. Bullish divergence: price makes lower low, indicator makes higher low (momentum weakening, potential reversal up). Bearish divergence: price makes higher high, indicator makes lower high (potential reversal down).
Question
How do you apply filters to reduce indicator noise?
Answer
Filtering techniques: 1) Smooth with moving average. 2) Require threshold crossing (not just level, must exceed by X%). 3) Confirmation period (signal must persist for N days). 4) Combine with volume. 5) Use multiple timeframes. Reduces whipsaws and false signals.
Question
What are typical lookback windows for indicators?
Answer
Short-term: 5-10 days (day trading, responsive). Medium-term: 14-20 days (swing trading, balanced). Long-term: 50-200 days (position trading, smooth). RSI: 14 days. Bollinger: 20 days. SMA crossover: 50/200 days. Adjust based on trading timeframe and volatility.
Question
How do you generate buy/sell signals from Bollinger Bands?
Answer
Mean reversion strategy: Buy when price touches lower band (oversold), sell when touches upper band (overbought). Breakout strategy: Buy when price breaks above upper band with volume (strong momentum). Context matters: trending vs ranging markets require different interpretations.
Question
What is the limitation of using only technical indicators?
Answer
Indicators are based purely on price/volume history, ignore: fundamentals, news, macro events, market sentiment, regime changes. Can give false signals in: low liquidity, manipulation, black swan events. Always combine with risk management and consider market context.
Question
How do you use RSI in trending vs ranging markets?
Answer
Ranging market: Traditional interpretation (RSI > 70 sell, < 30 buy) works well for mean reversion. Trending market: RSI can stay overbought/oversold for extended periods. In uptrend, buy on RSI dips to 40-50. In downtrend, sell on RSI rises to 50-60. Adjust thresholds.
Question
What is the role of volume in confirming indicator signals?
Answer
Volume confirms signal strength. Price breakout above Bollinger Band WITH high volume: strong signal. WITHOUT volume: weak, likely false breakout. Volume divergence (price up, volume down): weak trend, potential reversal. Volume is the conviction behind price moves.
Question
In Project 6/8: How many indicators should a Manual Strategy use?
Answer
At least 3 indicators from Project 6. Combining multiple indicators provides: confirmation (reduces false signals), different perspectives (trend + momentum + volatility), robustness (if one fails, others compensate). More isn't always better—focus on complementary, non-redundant indicators.
Question
What is whipsaw and how do indicators help?
Answer
Whipsaw: rapid price fluctuations causing multiple false entry/exit signals, leading to losses from transaction costs. Indicators help by: smoothing noise (SMA, EMA), requiring confirmation from multiple sources, adding filters/thresholds, adjusting sensitivity (lookback periods).
Question
How do you backtest indicator-based strategies?
Answer
1) Define clear entry/exit rules from indicator signals. 2) Apply to historical data. 3) Calculate returns accounting for transaction costs. 4) Compare to benchmark (buy-and-hold). 5) Evaluate metrics: cumulative return, Sharpe ratio, max drawdown. 6) Test on out-of-sample data to avoid overfitting.
Question
What is the danger of optimizing indicator parameters?
Answer
Over-optimization (curve-fitting): Finding parameters that work perfectly on historical data but fail on new data. Solution: Use standard parameters (RSI=14, Bollinger=20/2), validate on out-of-sample data, prefer robust strategies that work across parameter ranges, avoid excessive parameter tuning.