Calculate SMA and EMA. Smooth trends, reduce noise in time series data.
Moving Averages (MA) are statistical techniques that smooth time series data by calculating rolling averages over a fixed window. Two main types:
Key Characteristics:
Common Uses: Technical analysis, forecasting, demand planning, quality control, signal processing.
Decide window size: 3 (responsive), 10 (balanced), 50 (smooth). Larger = smoother but slower response.
For each position i ≥ p: SMA[i] = average of last p values. Repeat for each data point.
Multiplier = 2/(p+1). Start with EMA₁ = SMA₁. Each EMA[i] = (current × mult) + (prior EMA × (1−mult)).
Price above MA = uptrend (bullish). Price below MA = downtrend (bearish). Compare to recent history for signals.
Data: 10, 11, 12, 11, 13, 14, 15, 16, 15, 17 Period: 3 SMA(3) Calculation: - SMA[2] = (10 + 11 + 12) / 3 = 11.00 - SMA[3] = (11 + 12 + 11) / 3 = 11.33 - SMA[4] = (12 + 11 + 13) / 3 = 12.00 - SMA[5] = (11 + 13 + 14) / 3 = 12.67 - SMA[6] = (13 + 14 + 15) / 3 = 14.00 - SMA[7] = (14 + 15 + 16) / 3 = 15.00 - SMA[8] = (15 + 16 + 15) / 3 = 15.33 - SMA[9] = (16 + 15 + 17) / 3 = 16.00 ← Latest SMA EMA(3) Calculation: Multiplier = 2/(3+1) = 0.5 - EMA[1] = SMA[1] = 11.00 (initialization) - EMA[2] = (12 × 0.5) + (11.00 × 0.5) = 11.50 - EMA[3] = (11 × 0.5) + (11.50 × 0.5) = 11.25 ... continuing pattern, EMA[9] ≈ 15.88 ← Latest EMA
Related Tools
Effect size measure.
Information entropy.
Species diversity.
Categorical variability.
Intraclass correlation.
Percentage change.