Skip to content

Fix Vasicek zero-reversion limit#2599

Merged
lballabio merged 1 commit into
lballabio:masterfrom
jewonj0620:feature/fix-vasicek-zero-reversion-limit
May 22, 2026
Merged

Fix Vasicek zero-reversion limit#2599
lballabio merged 1 commit into
lballabio:masterfrom
jewonj0620:feature/fix-vasicek-zero-reversion-limit

Conversation

@jewonj0620
Copy link
Copy Markdown
Contributor

@jewonj0620 jewonj0620 commented May 22, 2026

The small-a branch is still needed for numerical stability, but returning 0.0 is not the correct limit.

Let tau = T - t. In the Vasicek model,

$$ P(t,T,r) = A(t,T)\exp(-B(t,T)r), $$

with

$$ B(t,T) = \frac{1-\exp(-a\tau)}{a}. $$

Using the Taylor expansion of exp(-a*tau) around a = 0,

$$ B(t,T)= \tau - \frac{a\tau^2}{2} + \frac{a^2\tau^3}{6} + O(a^3), $$

so (B(t,T) \to \tau).

For the A(t,T) term, QuantLib uses

$$ \log A(t,T)=\left(b + \frac{\lambda\sigma}{a} - \frac{\sigma^2}{2a^2}\right) (B(t,T)-\tau) -\frac{\sigma^2 B(t,T)^2}{4a}. $$

Substituting the expansion of (B(t,T)),

$$ B(t,T)-\tau= -\frac{a\tau^2}{2} +\frac{a^2\tau^3}{6} +O(a^3), $$

and

$$ B(t,T)^2 =\tau^2-a\tau^3+O(a^2). $$

Therefore,

$$ \log A(t,T) \to -\frac{1}{2}\lambda\sigma\tau^2 +\frac{\sigma^2\tau^3}{6}. $$

Hence,

$$ A(t,T) \to \exp\left( -\frac{1}{2}\lambda\sigma\tau^2 +\frac{\sigma^2\tau^3}{6}\right). $$

Therefore, the small-a branch should return this finite limit instead of 0.0.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 74.641% (+0.003%) from 74.638% — jewonj0620:feature/fix-vasicek-zero-reversion-limit into lballabio:master

@lballabio lballabio merged commit 2eb8684 into lballabio:master May 22, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants