Causal versus centered averages
The “Causal vs Centered Averages: The Future-Data Trap” visual (PDF p. 5) contrasts an average using only observed values with a centered version that secretly needs future candles.
Quantitative Trading, Signal Processing, and Practical Market Execution
Free Google Books Preview
Read a free sample of this book on Google Books before you buy.
100-page visual signal-processing reference · Faramarz Kowsari
This 100-page illustrated mathematics and signal-processing reference investigates why familiar moving averages smooth price, how they respond to volatility and frequency, and when apparently elegant indicators can become impossible to trade in real time. The book makes the calculations, timing assumptions and limitations visible rather than treating a smooth line as a forecast.
The following highlights are drawn from identifiable visual teaching pages in the original PDF rather than invented chapter headings.
The “Causal vs Centered Averages: The Future-Data Trap” visual (PDF p. 5) contrasts an average using only observed values with a centered version that secretly needs future candles.
A beautifully turning centered line can depend on data unavailable at the decision instant. The example distinguishes real-time viability, repainting, time-shifting and information delay.
The mathematical spread on PDF page 47 presents the Simple Moving Average as a finite impulse response filter, with its boxcar weights and a sinc-like frequency response.
The same signal-processing diagram illustrates main-lobe attenuation, side lobes and frequency leakage: smoothing one kind of noise does not eliminate every unwanted oscillation.
No. It connects moving averages to calculations, signal processing and the limitations of implementing indicators on real-time market data.
Centered filters can depend on future observations. A historical chart may look helpful while the same signal could not have been calculated in that form in live trading.
Yes. The visual page on causal versus centered averages distinguishes real-time, non-repainting calculations from hindsight-dependent calculations.
Yes. The source shows transfer functions, FIR filter diagrams, time-domain windows and frequency-response charts, including a worked SMA example.
No. Mathematical correctness does not imply market predictability or overcome costs, delays and regime changes.
Learn the reasoning behind the picture. Read the original visual explanations and risk notes in The Mathematical Anatomy of Moving Averages.
Get The Mathematical Anatomy of Moving Averages by Faramarz Kowsari · Preview the available pages
Educational illustrations are not proof of historical returns or future profitable trades.MATHEMATICAL ANATOMY / VISUAL EXPLAINERS
Moving-average charts are easy to recognize; their mathematical assumptions are less obvious. These five illustrated essays use visual references as starting points for independent lessons on filtering, memory, signal interpretation and strategy testing. The purpose is to understand what a moving average can measure and where that measurement can mislead a trader.
The selected images are shown once each; clicking any image opens The Mathematical Anatomy of Moving Averages by Faramarz Kowsari on Google Play Books.
The central design decision is how much of the past each new price is allowed to displace.
VISUAL RESEARCH NOTE 01 / FILTER FUNDAMENTALS
A simple moving average is a particular mathematical filter, not a forecast. An N-period SMA assigns the same weight, 1/N, to the latest N price observations. In a 20-period SMA, every closing price in the window contributes 5% to the output. When the oldest price leaves the window, its influence disappears in a single step. That is very different from continuously fading memory.
In signal-processing terms, this is a finite impulse response (FIR) filter with a rectangular, or boxcar, weighting kernel. Its linear-phase property creates a low-frequency group delay of roughly (N − 1)/2 bars: approximately 9.5 bars for SMA(20). A line that appears stable during noisy trading may therefore react late when the underlying price process changes direction.
The useful question is not whether SMA is “good” or “bad,” but what the window length suppresses and what it delays. Faramarz Kowsari’s The Mathematical Anatomy of Moving Averages extends this question into filter weights, frequency response and trading consequences.
VISUAL RESEARCH NOTE 02 / EXPONENTIAL WEIGHTING
An exponential moving average changes the memory rule. With the conventional span parameter N, its smoothing coefficient is α = 2/(N + 1), and the update is EMAₜ = αPₜ + (1 − α)EMAₜ₋₁. The weight assigned to a price k bars ago is proportional to α(1 − α)ᵏ. Recent prices influence the line most; older values fade geometrically rather than dropping out at a fixed boundary.
For a conventional 20-period EMA, α is about 0.0952. The contribution from a historical observation halves after roughly 6.9 bars. This helps explain why an EMA and an SMA with the same displayed period can behave differently. The period label alone does not fully describe filter speed, memory or sensitivity to abrupt price changes.
A faster response can be useful for short-horizon monitoring, yet it also makes the estimate more vulnerable to transitory moves. The book develops the connection between EMA half-life, lag, filtering and execution so traders can choose a response profile deliberately rather than copy a popular setting.
A signal is only as meaningful as its assumptions about noise, trend and the real execution clock.
VISUAL RESEARCH NOTE 03 / SIGNAL INTERPRETATION
When a fast moving average crosses a slower one, the event describes a relationship between two differently smoothed histories. It does not independently reveal future price direction. In a sustained trend, an MA crossover can offer a repeatable method of identifying directional persistence. During sideways price action, the same rule can reverse repeatedly and produce a costly chain of false starts.
The gap between the two averages, its rate of change and the volatility of the instrument can provide more context than the crossover event alone. An absolute difference of ten points means something very different on instruments with different prices or volatility. Normalizing the spread by ATR or price can make comparisons more meaningful, but no normalization removes the need for out-of-sample testing.
A better research design specifies the entry timestamp, closing-price availability, confirmation delay, stop logic and fees before inspecting performance. The Mathematical Anatomy of Moving Averages connects crossover mechanics to signal delay, regime filters and validation, the details that an attractive chart can conceal.
VISUAL RESEARCH NOTE 04 / ALTERNATIVE SMOOTHERS
Two lines can share a period label yet encode different assumptions about price history. A linearly weighted moving average (WMA) assigns progressively larger weights to more recent observations. The Hull Moving Average (HMA) combines weighted averages to reduce apparent lag, sometimes at the cost of greater turning sensitivity or overshoot. Kaufman’s Adaptive Moving Average (KAMA) uses an efficiency-ratio concept to adjust its response to the character of recent price movement.
These designs address different problems. A low-lag curve may track a trend change more quickly but overshoot around sharp reversals. An adaptive smoother may suppress noise in choppy intervals yet react differently after volatility or path structure changes. None can escape the fundamental choice between responding to movement and rejecting noise.
To compare them fairly, hold the price input, decision time, risk policy and transaction-cost assumptions constant. The book goes further into WMA, HMA, KAMA and filter engineering, explaining why changing the mathematics should change the questions asked of a strategy.
A convincing chart is the beginning of a test, never the result of one.
VISUAL RESEARCH NOTE 05 / FROM VISUAL TO VALIDATION
A moving-average system can be mathematically coherent and still be impossible to trade as displayed. A centered average uses observations on both sides of its plotted time point; that makes it valuable for retrospective smoothing but unsuitable as a live signal unless its output is delayed until all required values exist. When charts shift the estimate backward for visual neatness, the historical curve can imply an information advantage the trader never had.
The same scrutiny applies to ordinary causal indicators. A strategy should distinguish an unfinished bar from a confirmed close, specify order execution assumptions and account for spread, slippage and commissions. If an attractive result disappears after small changes in lookback, asset, date range or cost model, it may reflect parameter luck rather than a durable process.
The real milestone is not finding the smoothest line. It is developing a repeatable protocol for causal calculations, walk-forward evaluation, regime sensitivity and honest execution. Those are central themes of Faramarz Kowsari’s visual guide, The Mathematical Anatomy of Moving Averages.
What should determine the moving-average length: popularity, an optimized backtest or a reasoned choice of memory and delay? The complete book examines SMA, EMA, weighted and adaptive filters, signal-processing concepts, practical horizons and systematic evaluation across 100 illustrated lessons.
Explore The Mathematical Anatomy of Moving Averages on Google Play Books Read the available free preview
Visual references are externally hosted on Pinterest; rights remain with the original creators. The commentary here is independent educational analysis, not an assertion that the images demonstrate profitable results. External images may change or become unavailable. Trading involves risk.QUANTITATIVE TRADING / EXTENDED VISUAL LIBRARY
Twenty-seven additional Pinterest-hosted visual references accompany independent educational essays on indicator mechanics, signal behavior and trading-system research. Each essay offers a practical idea that can be tested rather than a claim that any single chart proves future returns.
Visuals are provided as external research references. Their exact text and design details have not been independently verified. The accompanying editorial commentary does not claim that every pictured graphic directly depicts the associated formula. For deeper examples and worked quantitative reasoning, explore The Mathematical Anatomy of Moving Averages by Faramarz Kowsari on Google Play Books.
RESEARCH SERIES 01
Five connected investigations into price memory, weighting, lag and the difference between SMA and EMA.
ILLUSTRATED TRADING RESEARCH · 01
Every SMA begins with equal weights. For an N-period SMA, each price contributes exactly 1/N while it remains in the window; as a new price enters, the oldest observation disappears completely. This seemingly innocent rule makes an SMA a finite impulse response filter rather than a predictive model.
A 10-bar SMA and a 50-bar SMA therefore answer different questions about history. One follows recent developments more closely; the other averages a wider interval. Neither knows the next candle. The useful test is whether the smoothing horizon fits the holding period and the expected persistence of the market move.
See the SMA weighting mathematics in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 02
A moving average trades immediacy for stability. Increasing its lookback usually reduces short-term fluctuations, yet a turning market must first overwrite a larger portion of the old window before the line follows. On a linear trend, an N-point simple moving average has a characteristic delay of roughly (N−1)/2 bars.
This matters when a trade is triggered by price crossing a slow average. The crossing may occur well after the first reversal, and the strategy may then incur a second delay while waiting for a close or order fill. A system that looks smooth on a chart can be late twice: mathematically and operationally.
Understand the cost of smoothing in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 03
The standard EMA updates recursively: EMAₜ = αPₜ + (1−α)EMAₜ₋₁. For the usual span convention α = 2/(N+1), so an EMA(20) has α ≈ 0.0952. Recent prices receive the largest weight, while older prices persist with exponentially declining influence.
That means the last price has roughly 9.5% of the immediate influence on EMA(20), not 5% as in SMA(20). This faster weighting can improve responsiveness without proving superior profitability. EMA settings should be chosen in relation to intended reaction speed, noise, instrument volatility and transaction costs.
Explore exponential smoothing in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 04
Two traders can say “20-period EMA” without knowing how quickly its historical influence fades. The weight on an observation k bars ago is proportional to (1−α)ᵏ; its half-life is ln(0.5)/ln(1−α). Under the standard EMA(20) convention, that is approximately 6.9 bars.
Thinking in half-life creates a more intuitive connection between indicator settings and the horizon of a trading idea. It also exposes a subtle limitation: historical shocks never vanish exactly from the recursive EMA, even though their effect may become negligible.
Learn to tune EMA by decay in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 05
SMA and EMA are often compared on the same nominal period as though that made their sensitivity equivalent. It does not. SMA gives equal weight to its window and none beyond it; EMA emphasizes the most recent price while retaining diminishing influence from earlier observations.
A useful comparison holds constant the input data, decision timing, trading costs and evaluation sample. Instead of asking which curve looks closest to price, examine lag, false signals, drawdowns and whether gains persist under modest parameter changes. A sharper line is not automatically a better strategy.
Compare SMA and EMA assumptions in The Mathematical Anatomy of Moving Averages
RESEARCH SERIES 02
Separate what a moving-average signal describes from what it can legitimately predict.
ILLUSTRATED TRADING RESEARCH · 06
A 50-day average crossing above a 200-day average is widely called a golden cross. It indicates that a shorter historical estimate has moved above a longer one, which can be consistent with a trend regime change. It does not promise that future returns will be positive.
Because both averages are delayed transformations of price, the crossover often arrives after a meaningful portion of a rally or decline. Researchers should specify whether the trade occurs at the crossover close, the following open or after additional confirmation; these choices can materially change backtested outcomes.
Read the crossover research chapter in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 07
Fast and slow moving averages cross most frequently when recent trends reverse relative to the longer history. But a low-persistence market may make the same pair switch direction repeatedly, leading to whipsaws. Transaction costs convert apparently harmless extra trades into a real performance penalty.
One mitigation to test is a minimum separation between averages, potentially scaled by volatility; another is to require a minimum slope or trend-strength condition. Every filter adds parameters and thus another overfitting risk. Evaluate it on fresh periods, not merely on the chart that inspired the idea.
Investigate whipsaw-resistant design in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 08
Trading above a rising moving average can be one definition of an upward regime. It is a descriptive filter: current price exceeds a smoothed record of recent prices. The same condition may occur late in an overextended trend, so it should not automatically be interpreted as a bargain entry.
A robust rule explains what happens when the price falls through the average, how much tolerance is allowed, and whether a touch, intrabar penetration or confirmed close counts. Those details determine the number and quality of actionable signals.
Study price-versus-average rules in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 09
A moving average can become a focal point for participants and appear to behave like dynamic support or resistance. The line itself, however, does not have the mechanical ability to prevent a price decline or rally. Apparent rebounds may reflect trend persistence, order flow or selection bias in the examples traders remember.
To test a “bounce from EMA” idea, first define the distance from the line, the permitted overshoot, the confirmation event and the failure rule. Compare bounce rates with an appropriate baseline instead of collecting only attractive screenshots.
Explore testable support logic in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 10
The sign of a moving average's slope shows whether its smoothed estimate is rising or falling. A crossover reports the relative ordering of two estimates; slope and distance between them add different information. For example, two averages can be bullishly ordered while both are flattening.
Raw slope is scale-dependent. Researchers often compare normalized slope, such as change relative to price or volatility, across instruments. Thresholds must be chosen before out-of-sample tests to avoid converting historical noise into a supposedly universal “strong trend” reading.
Examine slope-based indicators in The Mathematical Anatomy of Moving Averages
RESEARCH SERIES 03
Multiple averages can illuminate different horizons, but correlated signals are not independent proof.
ILLUSTRATED TRADING RESEARCH · 11
A moving-average ribbon displays several lookbacks at once, creating a visual picture of how trends differ by horizon. When averages bunch together, their historical estimates converge; when they spread, the horizons disagree more strongly. Neither condition independently identifies the next breakout.
Closely spaced averages can also create an illusion of multiple independent confirmations, even though every line is derived from the same price series. Consider the covariance of the signals before treating five aligned averages as five separate pieces of evidence.
Study multi-horizon market memory in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 12
The moving average convergence/divergence (MACD) line is usually EMA(12) minus EMA(26), with a commonly used EMA(9) signal line applied to that difference. It measures the distance between fast and slow exponentially smoothed estimates; the histogram then measures their separation from the signal line.
The numbers 12, 26 and 9 are conventions, not universal constants. Signals change with timeframe, volatility and market structure. When evaluating MACD, consider whether it provides information beyond the EMA pair already visible on the chart and whether its signals survive costs.
Explore EMA-based momentum measurement in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 13
A trader may use a long-horizon average for directional context and a shorter one for execution timing. This can reduce contradictory trades, but the timeframes are not independent. A 5-minute candle is part of the hourly bar, and one hour's trend can reverse while the daily average remains unchanged.
A backtest must never consult the final value of an unfinished higher-timeframe bar as if it were already known. Align timestamps carefully, then test whether an additional timeframe genuinely improves results after realistic entry delays.
Read multi-horizon design ideas in The Mathematical Anatomy of Moving Averages
RESEARCH SERIES 04
Explore how modifying the averaging formula changes responsiveness, overshoot and data requirements.
ILLUSTRATED TRADING RESEARCH · 14
A linear weighted moving average places progressively more emphasis on newer observations, commonly weighting the newest of N values by N and the oldest by 1, then dividing by N(N+1)/2. Compared with equal-weight SMA, recent changes matter more and old values fade through the finite window.
Faster reaction can come with a more jagged estimate. A valid comparison measures both response time and variability on identical data instead of assuming that visual closeness to price creates a trading advantage.
Compare weighted filters in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 15
Hull Moving Average (HMA) uses combinations of weighted moving averages, often written as WMA(2×WMA(n/2)−WMA(n), √n). The construction seeks to reduce apparent lag while retaining some smoothing. Its response can look strikingly close to current price.
That responsiveness is not costless. A filter designed to reduce delay can accentuate certain movements, create overshoot, or produce rapid direction changes when price is noisy. Test how its turning points behave with completed bars and transaction costs rather than relying on a polished historical curve.
Understand the Hull filter in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 16
Kaufman's Adaptive Moving Average (KAMA) adapts its smoothing response using an efficiency ratio: the magnitude of net price change divided by the sum of absolute bar-to-bar changes over the same interval. A near-straight path yields a higher ratio than a noisy zigzag with similar net movement.
The adaptive coefficient then moves between chosen fast and slow smoothing limits. That can make the line respond more actively during directional price paths and more slowly in choppy ones. But the efficiency ratio summarizes the recent path, not the probability of a future trend.
Explore adaptive moving averages in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 17
Double and triple exponential moving averages combine repeated EMA outputs to counter some of the delay created by smoothing. A common DEMA formula is 2EMA(P) − EMA(EMA(P)); a common TEMA formula is 3EMA(P) − 3EMA(EMA(P)) + EMA(EMA(EMA(P))).
These algebraic combinations can track turns faster, but they may amplify some transient behavior. Results should be assessed for overshoot, noise sensitivity and actual trading execution, not only for how neatly the line hugs price.
Study composite exponential filters in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 18
A volume-weighted moving average (VWMA) computes the sum of price times volume over a window divided by the sum of volume over that window. High-volume bars exert greater influence than low-volume bars, making the output distinct from an equally weighted price SMA.
This introduces a data-quality consideration: spot FX tick volume, exchange-traded share volume and consolidated futures volume are not interchangeable. Researchers should identify the volume feed and test whether weighting improves their decision process rather than assume every high-volume bar carries superior information.
Read volume-sensitive smoothing methods in The Mathematical Anatomy of Moving Averages
RESEARCH SERIES 05
Frequency response and causality matter as much as attractive curves and textbook formulas.
ILLUSTRATED TRADING RESEARCH · 19
A causal moving average transforms a time series into a smoother estimate using information available up to the decision time. The input is price; the output is a weighted combination of observations. In the language of digital signal processing, the weights define the filter's impulse response.
Thinking of an indicator as a filter immediately reveals the real choices: what frequencies to attenuate, how much delay to accept, how to handle startup observations and whether historical calculations use future data. This perspective makes trading indicators easier to audit.
Explore the signal-processing foundation in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 20
An N-point SMA is a rectangular moving-window filter. Its frequency response has a characteristic main lobe and side lobes, so it attenuates some oscillations more strongly than others rather than simply deleting all high-frequency noise. The magnitude response also includes regularly spaced nulls.
This explains why a smooth-looking curve may still transmit unwanted cycles or show oscillatory artifacts in the wrong market regime. Changing window length changes the frequency response as well as the time-domain lag.
Study the SMA transfer function in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 21
Moving averages are often applied to closing prices by default, yet the same filter can be applied to typical price (H+L+C)/3, median price (H+L)/2, or other defined sources. Switching the input changes the estimated series before any smoothing has occurred.
Comparisons must specify whether source data are adjusted for splits, dividends, session boundaries or missing candles. Otherwise, a researcher may attribute a difference to the average type when it actually comes from the underlying data preparation.
Read source and data-selection guidance in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 22
A centered moving average may include bars on both sides of the plotted timestamp, making it attractive for studying cycles after the fact. But the values to the right of a decision point do not exist yet in live trading. Plotting the centered value as a current signal creates a look-ahead problem.
The valid live alternative must delay the output until its full observation window is available, or use a causal design based only on current and past samples. This is one of the simplest ways to separate a useful explanatory chart from a tradable rule.
Learn causal versus centered filtering in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 23
An indicator can appear to change its mind without using any forbidden future data: the current bar's close, high and low are still evolving until the bar completes. A strategy tested on finished candles may therefore behave differently when executed on each intrabar update.
Define whether your rule acts on a live tick, the confirmed close or the next bar's open. For higher timeframes, use only the last completed higher-timeframe observation if that is what the live system could know. Execution timing is part of the indicator specification.
Explore non-repainting implementation in The Mathematical Anatomy of Moving Averages
RESEARCH SERIES 06
Bring research design, costs, risk and parameter stability into the moving-average conversation.
ILLUSTRATED TRADING RESEARCH · 24
A moving-average strategy can appear successful when its length is chosen after inspecting the full dataset. Walk-forward analysis separates parameter selection from later evaluation: fit or choose parameters on a historical window, then assess them on a subsequent unseen period.
Repeatedly redesigning the rule after examining out-of-sample results weakens the claim of independent validation. Record the selection protocol, costs and decisions in advance, and examine performance across several market regimes rather than one convenient trend.
Read system-validation methods in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 25
A moving-average signal observed on a chart is not automatically the price at which an order can be filled. Spread, exchange fees, commissions, slippage, latency and gaps turn a visual entry into an uncertain realized trade. Short-horizon crossover systems are particularly sensitive to frequent turnover.
Simulate entries using feasible timestamps and fill assumptions, then stress costs beyond the historical average. A model that works only at zero friction is a hypothesis about the chart, not yet evidence for a viable trading process.
Examine cost-aware MA trading in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 26
A moving average may help define a regime or an exit condition, but it should not be confused with an independent risk limit. Price can gap through the line, and average-based stops can expand in fast markets. Position sizing and maximum loss constraints require their own rules.
For research, compare indicator-triggered exits with fixed-volatility and time-based alternatives on the same signals. Evaluate the full distribution of returns, drawdowns and tail losses; win rate alone hides the size of losing trades.
Explore practical execution and exits in The Mathematical Anatomy of Moving Averages
ILLUSTRATED TRADING RESEARCH · 27
When a moving average appears to work only at period 37 but fails badly at 35 and 39, the narrow optimum may reflect sampling noise. Map performance across neighboring settings, assets, start dates and regimes. Broad regions of acceptable outcomes are more credible than a single sharp peak, although never proof of future success.
A defensible study includes realistic costs, multiple testing awareness, sensitivity analysis and fully unseen periods. The goal is not to discover the prettiest backtest; it is to learn which findings remain when the market and research assumptions change.
Study robustness and parameter sensitivity in The Mathematical Anatomy of Moving Averages
They point to questions that deserve precise answers: What historical observations does an indicator use? How much delay does it introduce? Does a signal survive realistic execution costs and unseen market regimes? The Mathematical Anatomy of Moving Averages examines these foundations through an extended quantitative and visual treatment of SMA, EMA and more advanced smoothing techniques.
Explore the complete book on Google Play Books Read the available book preview
Source images are externally hosted by Pinterest. Ownership and reuse rights remain with the original creators. Image captions on this page describe independent educational concepts, not verified statements about each external graphic. Trading and historical examples do not guarantee results.Explore the library by subject and find related books faster.
This title is part of the Faramarz Kowsari Trading Books Library, a dedicated collection of practical books on futures, options, order flow, Smart Money Concepts, technical analysis, scalping, swing trading, market-specific trading, risk and systematic research.