Numerical Integration for Discretizing Nelson–Siegel State Variance
Summary
The document concerns discretizing the conditional variance of a continuous-time arbitrage-free dynamic Nelson–Siegel factor model for use with a Kalman filter on yield data. The variance is expressed as an integral over the sampling interval of matrix exponentials surrounding the factor covariance matrix. The questioner has a daily interval and correlated factors, and seeks a practical way to evaluate this matrix integral.
The accepted response proposes numerical quadrature because the interval is small. It outlines midpoint rectangle and trapezoidal approximations, then a composite trapezoidal rule that divides the interval into subintervals. The response presents these methods as increasing in computational effort and accuracy, but supplies no numerical comparison, error bound, or validation on yield data. Thus, the guidance is a practical approximation suggestion rather than a derivation of an exact discretization; users still need to assess accuracy for their parameter values and intended use.
Key ideas
- The conditional state variance is obtained by integrating a matrix-valued function across the sampling interval.
- Numerical quadrature can approximate the integral when the interval is short.
- The response describes midpoint rectangle and trapezoidal approximations.
- A composite trapezoidal rule increases the number of evaluation points and computational work.
- The document provides no error analysis or empirical comparison of the approximation methods.
Tags
Full text
# Discretizing the conditional variance in the Arbitrage Free Dynamic Nelson Siegel model
# Discretizing the conditional variance in the Arbitrage Free Dynamic Nelson Siegel model
for my thesis I am trying to fit the correlated factor arbitrage free dynamic Nelson Siegel model to yield data. I use the Kalman filter to model this but since the model is in continuous time, I need to discretize the conditional mean and conditional variance. The conditional mean was not difficult but I can't succeed in discretizing the variance. The expression for the conditional variance is: $$ V[X_t|Y_{t}] = \int_0^{\Delta t} \exp(-K^P s)\Sigma \Sigma' \exp(-[K^P]'s) ds $$ where $\Delta t = 1 / 252$ and
$$ K^P = \begin{bmatrix} k_{11} & k_{12} & k_{13} \\ k_{21} & k_{22} & k_{23} \\ k_{31} & k_{32} & k_{33} \end{bmatrix} $$ and $$ \Sigma = \begin{bmatrix} \sigma_{11} & 0 & 0 \\ \sigma_{21} & \sigma_{22} & 0 \\ \sigma_{31} & \sigma_{32} & \sigma_{33} \end{bmatrix} $$
I hope this is the place to ask this question and that you guys can help me, thanks in advance!
## Answer by JejeBelfort (score 0, accepted)
https://quant.stackexchange.com/a/34519
Regarding the comment we had, and since $\Delta t$ is rather small, numerical integration could be suited for purpose.
According to this Wikipedia article, three options are available.
Denoting by $f(s)$ the integrand, that is:
$$f(s) = \exp \left( -K^P s\right) \Sigma \Sigma' \exp \left( - [K^P]' s\right),$$ the quantity $V \left[ X_t | Y_t \right]$ can be approximated by the following rules (ranked in ascending order in terms of complexity and accuracy):
- Rectangle rule:
$$\int_0^{\Delta t} f(s)ds \approx \Delta t f\left( \frac{\Delta t}{2}\right)$$
- Trapezoidal rule:
$$\int_0^{\Delta t} f(s)ds \approx \Delta t \left( \frac{f(0) + f(\Delta t)}{2}\right)$$
- Decomposition rule for $n > 1$:
$$\int_0^{\Delta t} f(s)ds \approx \frac{\Delta t}{n} \left( \frac{f(0)}{2} + \sum_{k=1}^n f\left(k \frac{\Delta t}{n}\right) + \frac{f(\Delta t)}{2}\right)$$Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.