Understanding Market Indicators: SMA, EMA, and Kalman Filters
Technical indicators help you extract signal from market noise. In this guide, we'll walk through three indicators available in Kalmate's Pipeline — and show you the actual math with real numbers.
Simple Moving Average (SMA)
The SMA calculates the average price over a fixed window. Each day gets equal weight.
SMA(3) — STEP BY STEP
Using real closing prices from a typical AAPL week
| Day | Close | SMA(3) | Calculation |
|---|---|---|---|
| 1 | 100 | — | not enough data |
| 2 | 102 | — | not enough data |
| 3 | 101 | 101.00 | (100 + 102 + 101) ÷ 3 |
| 4 | 103 | 102.00 | (102 + 101 + 103) ÷ 3 |
| 5 | 105 | 103.00 | (101 + 103 + 105) ÷ 3 |
The SMA smooths out daily fluctuations. On day 5, the price jumped to 105, but the SMA only moved to 103 — it lags because it averages the last 3 days equally.
Exponential Moving Average (EMA)
The EMA gives more weight to recent prices, making it more responsive. The formula uses a multiplier: Multiplier = 2 ÷ (period + 1).
EMA(3) — SAME DATA, FASTER RESPONSE
EMA multiplier for period 3: 2 ÷ (3 + 1) = 0.5
| Day | Close | EMA(3) | Formula |
|---|---|---|---|
| 1 | 100 | — | seed with SMA |
| 2 | 102 | — | seed with SMA |
| 3 | 101 | 101.00 | seed = SMA = 101.00 |
| 4 | 103 | 102.00 | 103 × 0.5 + 101 × 0.5 |
| 5 | 105 | 103.50 | 105 × 0.5 + 102 × 0.5 |
Notice the difference on day 5: SMA = 103.00 vs EMA = 103.50. The EMA reacted faster because it weighted the latest price (105) at 50% instead of 33%. This makes EMA better for short-term trading.
Kalman Filter — Adaptive Smoothing
The Kalman filter is a recursive algorithm that estimates the "true" price by filtering out noise. Unlike SMA/EMA which use fixed windows, the Kalman filter adapts to volatility automatically.
In Kalmate's Pipeline, the Kalman filter node outputs: smoothed price, trend component, cycle component, and confidence bands. It's particularly useful for noisy markets where SMA/EMA give inconsistent signals.
SMA vs EMA vs KALMAN — WHEN TO USE WHAT
Try It Yourself in the Pipeline
Open Kalmate's Pipeline and build this setup in under 30 seconds:
- Add a Symbol Input node, set it to
AAPL - Add a Price Feed node, connect from Symbol Input
- Add an SMA Indicator (period 20), connect from Price Feed
- Add a Kalman Filter, connect from Price Feed
- Add two Chart Output nodes, connect SMA to one and Kalman to the other
- Compare the smoothed lines — see how Kalman adapts while SMA lags
The Pipeline runs automatically as you build. Change the symbol to BTC-USD or any other ticker and watch both indicators update instantly.