Kernel Regression and the Nadaraya-Watson Estimator
A way to fit a curve through scattered data without assuming any functional form — at each point, estimate the outcome as a weighted average of nearby observations, with closer points getting more weight.
Prerequisites: Kernel Density Estimation, Bandwidth Selection for Smoothers
You have scattered data pairs — say, option moneyness against implied volatility — and you want a curve through them, but you don't trust any particular parametric shape (quadratic, cubic, whatever) to be right. Fitting the wrong shape everywhere is worse than fitting no fixed shape at all. Kernel regression sidesteps the choice entirely: instead of fitting one global curve, it estimates the value at each point separately, as a weighted average of whatever data happens to be nearby.
An analogy: pricing a house from its neighbors
To estimate what a house is worth, one approach is a weighted average of nearby houses' recent sale prices — with weights that fade smoothly as a comparable house gets farther away in location or size, rather than a hard cutoff. A house next door counts a lot; a house across town barely counts at all. Kernel regression does exactly this for any - relationship: to estimate at some value of , take a weighted average of the 's from data points whose 's are nearby, letting the weight smoothly decay with distance rather than picking a fixed neighborhood or a fixed functional shape.
The idea, one symbol at a time
The Nadaraya-Watson estimator at a point is
where is a kernel function (commonly a Gaussian bump) that assigns higher weight to closer to , and is the bandwidth controlling how quickly that weight decays. In plain English: the estimate at is a weighted average of all the observed , where the weight on each observation is determined entirely by how close its is to — points right at count heavily, points far away barely count at all, and the denominator simply rescales the weights so they add up to 1 (turning them into a proper weighted average rather than a raw weighted sum).
Worked example 1: implied vol at a specific strike, by hand
Suppose you have three observed (moneyness, implied vol) pairs: , , , and you want to estimate implied vol at moneyness , using a simple triangular kernel with bandwidth that gives weight . Distances: weight ; weight ; weight (outside the window entirely). The estimate:
Notice the far point at contributes nothing — outside the triangular window it's given zero weight — while the closer point at carries more influence than the slightly farther point at .
Worked example 2: what happens with a wider bandwidth
Redo the same estimate with instead, which now includes the third point too: weights become , , .
The wider bandwidth pulls in the point at (21%) and shifts the estimate up from to — a direct, hand-computable illustration of why bandwidth choice (see Bandwidth Selection for Smoothers) changes the answer, sometimes substantially, even with the exact same data.
What this means in practice
Kernel regression is used wherever a relationship is believed to be smooth but not well described by any specific functional form — smoothing an implied volatility smile, estimating how expected returns vary with a continuous factor exposure, or building a nonparametric hedge-ratio curve. It requires no assumption about linearity or curvature, at the cost of needing more data to estimate well (see Parametric vs. Nonparametric Models) and needing a well-chosen bandwidth to avoid either overfitting or oversmoothing.
The Nadaraya-Watson estimator predicts y at any x as a weighted average of observed y's, weighting each observation by a kernel function of its distance from x — nearby points dominate, distant points fade out, and no functional form for the relationship is ever assumed.
Kernel regression suffers badly from boundary bias: near the edges of your data range, the kernel window can only see points on one side, so the weighted average is systematically pulled toward the interior rather than reflecting the true edge behavior — a stock's implied vol curve estimated this way will look artificially flat right at the extreme strikes just because there's no data beyond the boundary to balance the average. Local polynomial regression (see Local Polynomial Regression and LOESS) is a standard fix for this specific problem.
Related concepts
Practice in interviews
Further reading
- Nadaraya, 'On Estimating Regression', Theory of Probability and Its Applications
- Hastie, Tibshirani & Friedman, The Elements of Statistical Learning, ch. 6