Docs / nablatensor-cva / com.nablatensor.cva
final class
HwShortRate
A one-factor Hull-White short rate as an on-tape step block, plus an analytic zero-coupon bond reconstruction P(t, T) from the simulated r_t.
dr = a (b - r) dt + sigma dW
A flat instantaneous forward f(0, .) = r0 stands in for the full theta(t) term structure — the same simplification as com.nablatensor.quant.HullWhite1F#bond, which this mirrors. Every coefficient is an ADouble input, so one adjoint sweep of a valuation built on this block yields dV/dr0, dV/da, dV/db and dV/dsigma together.
Constructors
Methods
The path at t = 0: r = r0, integral 0.
One Euler step forward given a standard-normal draw z.
exp(-integral_0^t r du) along this path — the stochastic discount factor.
Analytic P(t, T) from the simulated short rate r_t, for an initial curve with a flat instantaneous forward f(0, .) = r0:
B(t,T) = (1 - e^{-a (T-t)}) / a
P(t,T) = exp( -r0 (T-t) + B r0 - sigma^2/(4a) B^2 (1 - e^{-2 a t}) - B r_t )