25#ifndef quantlib_extended_cox_ingersoll_ross_hpp
26#define quantlib_extended_cox_ingersoll_ross_hpp
56 bool withFellerConstraint =
true);
58 ext::shared_ptr<Lattice>
tree(
const TimeGrid& grid)
const override;
60 ext::shared_ptr<ShortRateDynamics>
dynamics()
const override;
65 Time bondMaturity)
const override;
126 Real expth = std::exp(
t*h);
127 Real temp = 2.0*h + (
k_+h)*(expth-1.0);
128 Real phi = forwardRate -
130 x0_*4.0*h*h*expth/(temp*temp);
148 inline ext::shared_ptr<OneFactorModel::ShortRateDynamics>
150 return ext::shared_ptr<ShortRateDynamics>(
1-D array used in linear algebra.
Dynamics of the short-rate under the Cox-Ingersoll-Ross model
Cox-Ingersoll-Ross model class.
Short-rate dynamics in the extended Cox-Ingersoll-Ross model.
Dynamics(Parameter phi, Real theta, Real k, Real sigma, Real x0)
Real shortRate(Time t, Real y) const override
Compute short rate from state variable.
Real variable(Time t, Rate r) const override
Compute state variable from short rate.
Impl(Handle< YieldTermStructure > termStructure, Real theta, Real k, Real sigma, Real x0)
Real value(const Array &, Time t) const override
Handle< YieldTermStructure > termStructure_
Analytical term-structure fitting parameter .
FittingParameter(const Handle< YieldTermStructure > &termStructure, Real theta, Real k, Real sigma, Real x0)
Extended Cox-Ingersoll-Ross model class.
Real discountBondOption(Option::Type type, Real strike, Time maturity, Time bondMaturity) const override
void generateArguments() override
ext::shared_ptr< Lattice > tree(const TimeGrid &grid) const override
Return by default a trinomial recombining tree.
ext::shared_ptr< ShortRateDynamics > dynamics() const override
returns the short-rate dynamics
Real A(Time t, Time T) const override
Shared handle to an observable.
Base class for model parameter implementation.
Base class for model arguments.
Term-structure consistent model class.
const Handle< YieldTermStructure > & termStructure() const
Deterministic time-dependent parameter used for yield-curve fitting.
Cox-Ingersoll-Ross model.
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
ext::shared_ptr< YieldTermStructure > r