28 a_(arguments_[0]),
b_(arguments_[1]),
sigma_(arguments_[2]),
29 lambda_(arguments_[3]) {
44 - 0.5*sigma2/(_a*_a))*(bt - (
T -
t))
45 - 0.25*sigma2*bt*bt/_a);
54 return (1.0 - std::exp(-_a*(
T -
t)))/_a;
59 Time bondMaturity)
const {
66 v =
sigma()*
B(maturity, bondMaturity)* std::sqrt(maturity);
68 v =
sigma()*
B(maturity, bondMaturity)*
69 std::sqrt(0.5*(1.0 - std::exp(-2.0*_a*maturity))/_a);
Standard constant parameter .
Single-factor affine base class.
Real discountBond(Time now, Time maturity, Array factors) const override
Constraint imposing positivity to all arguments
Real B(Time t, Time T) const override
Real discountBondOption(Option::Type type, Real strike, Time maturity, Time bondMaturity) const override
Vasicek(Rate r0=0.05, Real a=0.1, Real b=0.05, Real sigma=0.01, Real lambda=0.0)
Real A(Time t, Time T) const override
ext::function< Real(Real)> b
Real Time
continuous quantity with 1-year units
Real blackFormula(Option::Type optionType, Real strike, Real forward, Real stdDev, Real discount, Real displacement)
ext::shared_ptr< BlackVolTermStructure > v