EconStatsCraft rigorous, plain-spoken econometrics
Econometrics that explains itself.
Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.
Load a dataset to see it here.
EconStatsCraft › Yield curve (Nelson–Siegel / Svensson)
A yield curve is a shape, not a series. Three common factors - level, slope and curvature - describe almost all of it, so forecasting the curve means forecasting three numbers instead of thirteen, and the forecast is a curve rather than lines that might cross.
A yield curve is a dozen or more maturities that move almost in lockstep, so describing it with a dozen numbers is wasteful. Nelson-Siegel replaces them with three that have direct readings: a level that sets where the whole curve sits, a slope that bends the short end away from the long, and a curvature that lifts or dips the middle. Almost every curve ever observed is well described by those three.
Any term-structure question: where rates are going across maturities, whether an inversion is expected to persist, what a bond portfolio’s duration is exposed to. Also the standard benchmark a macro-augmented yield model has to beat, and a hard one to beat.
The Nelson-Siegel form for the yield at maturity \tau is y(\tau)=\beta_0+\beta_1\frac{1-e^{-\lambda\tau}}{\lambda\tau}+\beta_2\left(\frac{1-e^{-\lambda\tau}}{\lambda\tau}-e^{-\lambda\tau}\right). The first loading is 1 at every maturity, so \beta_0 is the LEVEL. The second decays from 1 at \tau\to0 to 0 at the long end, so \beta_1 is the SLOPE and \beta_0+\beta_1 is the instantaneous short rate. The third loading is zero at both ends and humped in between, so \beta_2 is CURVATURE and \lambda sets where the hump sits. Given \lambda the model is linear in the betas and fits by OLS, which is why \lambda is usually fixed or profiled over a grid rather than estimated jointly.
y_t(\tau) = L_t + S_t\frac{1-e^{-\lambda\tau}}{\lambda\tau} + C_t\left(\frac{1-e^{-\lambda\tau}}{\lambda\tau} - e^{-\lambda\tau}\right)
13 maturities from 1 to 360 months over 120 dates, fitted with a decay of λ = 0.0609 - which places the curvature loading's peak at 24 months of those available. Three factors reproduce the whole cross-section to a root-mean-square error of 6.8 basis points, which is the fact the entire literature rests on: a curve with thirteen degrees of freedom is really moving in three. The factors also mean what their names claim, and the note checks rather than asserts it - Level correlates 0.9964 with the 360-month yield, Slope 0.9947 with the one-month-minus-360-month spread, and Curvature 0.9311 with 2×m24 − m1 − m360. Forecasting is then done on the three factors rather than the thirteen yields: a VAR(1) takes Level from 3.2746 to 3.5975 and Curvature from 1.2422 to 0.5610 over six periods, and the curve is rebuilt from those. Note the interval on the reconstructed one-month yield runs from 0.62 to 3.80 - a 300 basis point band around a 17 basis point predicted move, which is the honest uncertainty of a yield forecast and is usually omitted from the chart.
| If you see this | It means | Do this |
|---|---|---|
| Poor fit at the very short end | Money-market instruments behave differently | Consider excluding maturities under three months |
| Curvature coefficient huge | lambda misplaced, so the hump is in the wrong place | Profile lambda over a grid |
| Betas jumping between days | Joint estimation hitting different local minima | Fix lambda across the sample |
| A curve needing two humps | Nelson-Siegel is too rigid | Use Svensson, and expect less stable betas |
| Fitted forward rates going negative at the long end | No arbitrage-free constraint | Use the CDR arbitrage-free form |
| Fewer than four maturities | Three parameters plus lambda is not identified | The model needs more points than parameters |
Principal components, which finds the same three factors without imposing a shape. Bond pricing, for what the curve is used to discount.
Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · VECM · ARDL & bounds test
Line chart · Area chart · Bar chart · Stacked bar · Scatter plot · Bubble chart · Histogram · Box plot · Pie chart · Heat map · Rebased to 100 · Lorenz curve and Gini
World map · Bivariate map · Flow map · India - state map · India - district map
Descriptive statistics · Summary by group · Two-way table · Classical statistical tests
Multiple regression (OLS) · Logit / Probit · Tobit (censored) · Truncated regression · Multinomial logit · Ordered logit / probit · Quantile regression · Poisson / Negative binomial
Time-varying coefficients (Kalman) · Unit root tests · Correlogram (ACF / PACF) · ARIMA / SARIMA · Rolling-origin cross-validation · Theta method · Unobserved components · STL forecasting · Forecast combination · Markov regime switching · Change frequency (resample) · ARCH / GARCH volatility · Decompose & filter · Spectral analysis · Exponential smoothing · Forecast accuracy
Yield curve (Nelson–Siegel / Svensson) · Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · VECM · ARDL & bounds test
Panel regression · Panel cointegration tests · Heterogeneous panel: Mean Group & PMG · Gravity model of trade · Dynamic panel GMM · Panel diagnostics · Panel unit-root tests
Principal components (PCA) · Factor analysis · Cluster analysis
Conjoint analysis · MaxDiff (best–worst scaling) · TURF - reach of a product line · Price sensitivity (Van Westendorp) · Market basket analysis · Perceptual map · Scale reliability (Cronbach’s alpha) · Key driver analysis
Spatial autocorrelation · Spatial regression · Heckman selection · Instrumental variables (2SLS) · Difference-in-differences · Staggered difference-in-differences · Regression discontinuity · Matching & weighting · Oaxaca–Blinder decomposition
Black–Scholes option pricing · Bond price, duration & convexity · Merton distance to default · EMI / home loan planner · CAPM / beta estimation · Multi-factor model · Portfolio optimization · Value at Risk & Expected Shortfall · Performance & drawdown · Time value of money & NPV/IRR · Equity valuation (DDM, FCF, residual income) · Cost of capital (WACC) · Binomial option pricing · Option strategies (payoff & profit) · Forwards, futures & swaps · Credit risk & Basel capital · Extreme value theory (tail risk)
Life table · Life annuity · Life insurance pricing · Chain ladder reserving · Buhlmann credibility · Survival analysis · Mortality graduation · Aggregate loss model · Ruin probability · Multi-state Markov model · Loss severity fitting
Monte Carlo experiment · F-test, Wald & Chow · Structural breaks & stability
Regression vs machine learning · Ridge / Lasso / Elastic Net · Random forest · Gradient boosting
EconStatsCraft rigorous, plain-spoken econometrics
Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.
Load a dataset to see it here.
Pick the example closest to your question. You get a spreadsheet with the right columns and a few rows showing the expected format - replace the numbers with your own, then paste or upload it back.
Copy the header row from the table above (or from the downloaded template), put your own rows underneath, and paste the whole thing here. It is checked against the layout before anything is imported.
Or click a row in the preview below.
For a units or notes row.
Search every source at once. World Bank indicators need countries and years; everything else loads in one click.
Loading the catalogue…
The engine stays loaded, so this is quick - and it leaves your open tab and panel layout alone.
⌘/Ctrl+Enter runs the current analysis. ⌘/Ctrl+P exports the session as a PDF. Esc closes this.
In the Notebook: Enter starts a new block and
Shift+Enter a new line inside one; Backspace at the start
joins back into the paragraph above; / on an empty line inserts anything.
⌘/Ctrl+B, I, E, H and
M apply bold, italic, code, highlight and maths.
#, ##, -, 1., > and
``` at the start of a line convert it.
Sign in to run unlimited analyses.
Scroll to pan · Esc to close