25#ifndef quantlib_two_factor_models_g2_h
26#define quantlib_two_factor_models_g2_h
65 ext::shared_ptr<ShortRateDynamics>
dynamics()
const override;
69 "g2 model needs two factors to compute discount bond");
70 return discountBond(now, maturity, factors[0], factors[1]);
78 Time bondMaturity)
const override;
83 Size intervals)
const;
101 class FittingParameter;
115 class SwaptionPricingFunction;
161 Real value = 0.5*temp1*temp1 + 0.5*temp2*temp2 +
162 rho_*temp1*temp2 + forward;
1-D array used in linear algebra.
Size size() const
dimension of the array
Dynamics(Parameter fitting, Real a, Real sigma, Real b, Real eta, Real rho)
Rate shortRate(Time t, Real x, Real y) const override
Real value(const Array &, Time t) const override
Impl(Handle< YieldTermStructure > termStructure, Real a, Real sigma, Real b, Real eta, Real rho)
Handle< YieldTermStructure > termStructure_
Analytical term-structure fitting parameter .
FittingParameter(const Handle< YieldTermStructure > &termStructure, Real a, Real sigma, Real b, Real eta, Real rho)
Two-additive-factor gaussian model class.
Real discountBond(Time now, Time maturity, Array factors) const override
Real swaption(const Swaption::arguments &arguments, Rate fixedRate, Real range, Size intervals) const
Real sigmaP(Time t, Time s) const
Real discountBondOption(Option::Type type, Real strike, Time maturity, Time bondMaturity) const override
void generateArguments() override
DiscountFactor discount(Time t) const override
Implied discount curve.
Real A(Time t, Time T) const
ext::shared_ptr< ShortRateDynamics > dynamics() const override
Returns the short-rate dynamics.
Real B(Real x, Time t) const
Shared handle to an observable.
Ornstein-Uhlenbeck process class.
Base class for model parameter implementation.
Base class for model arguments.
1-dimensional stochastic process
Arguments for swaption calculation
Term-structure consistent model class.
const Handle< YieldTermStructure > & termStructure() const
Deterministic time-dependent parameter used for yield-curve fitting.
Class describing the dynamics of the two state variables.
Abstract base-class for two-factor models.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
std::size_t Size
size of a container
Ornstein-Uhlenbeck process.
Abstract two-factor interest rate model class.