30 const ext::shared_ptr<FdmMesher>& mesher,
31 const ext::shared_ptr<GeneralizedBlackScholesProcess>& bsProcess,
37 qTS_(bsProcess->dividendYield().currentLink()),
39 sigma1_(bsProcess->blackVolatility().currentLink()){
56 const ext::shared_ptr<FdmMesher>& mesher,
75 const ext::shared_ptr<FdmMesher>& mesher,
76 const ext::shared_ptr<CoxIngersollRossProcess> & cirProcess,
77 const ext::shared_ptr<GeneralizedBlackScholesProcess> & bsProcess,
81 .mult(
Array(mesher->layout()->size(), 2*
rho*cirProcess->volatility()))),
84 sigma1_(bsProcess->blackVolatility().currentLink()),
99 const ext::shared_ptr<FdmMesher>& mesher,
100 const ext::shared_ptr<CoxIngersollRossProcess> & cirProcess,
101 const ext::shared_ptr<GeneralizedBlackScholesProcess> & bsProcess,
108 cirProcess->volatility(),
110 cirProcess->level()),
134 return (dy + dx + dz);
141 else if (direction == 1)
144 QL_FAIL(
"direction too large");
153 if (direction == 0) {
156 else if (direction == 1) {
160 QL_FAIL(
"direction too large");
1-D array used in linear algebra.
void setTime(Time t1, Time t2)
const TripleBandLinearOp & getMap() const
const TripleBandLinearOp dxxMap_
const ext::shared_ptr< YieldTermStructure > qTS_
const FirstDerivativeOp dxMap_
const ext::shared_ptr< FdmMesher > mesher_
const ext::shared_ptr< BlackVolTermStructure > sigma1_
FdmCIREquityPart(const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< GeneralizedBlackScholesProcess > &bsProcess, Real strike)
void setTime(Time t1, Time t2)
const NinePointLinearOp & getMap() const
FdmCIRMixedPart(const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< CoxIngersollRossProcess > &cirProcess, const ext::shared_ptr< GeneralizedBlackScholesProcess > &bsProcess, Real rho, Real strike)
const ext::shared_ptr< FdmMesher > mesher_
const NinePointLinearOp dyMap_
const ext::shared_ptr< BlackVolTermStructure > sigma1_
Size size() const override
Array apply_direction(Size direction, const Array &r) const override
Array preconditioner(const Array &r, Real s) const override
std::vector< SparseMatrix > toMatrixDecomp() const override
void setTime(Time t1, Time t2) override
Time is required.
Array apply_mixed(const Array &r) const override
Array solve_splitting(Size direction, const Array &r, Real s) const override
Array apply(const Array &r) const override
FdmCIROp(const ext::shared_ptr< FdmMesher > &mesher, const ext::shared_ptr< CoxIngersollRossProcess > &cirProcess, const ext::shared_ptr< GeneralizedBlackScholesProcess > &bsProcess, Real rho, Real strike)
void setTime(Time t1, Time t2)
const TripleBandLinearOp & getMap() const
const TripleBandLinearOp dyMap_
const ext::shared_ptr< FdmMesher > mesher_
FdmCIRRatesPart(const ext::shared_ptr< FdmMesher > &mesher, Real sigma, Real kappa, Real theta)
SparseMatrix toMatrix() const override
Array apply(const Array &r) const override
NinePointLinearOp mult(const Array &u) const
void swap(NinePointLinearOp &m) noexcept
SparseMatrix toMatrix() const override
Array solve_splitting(const Array &r, Real a, Real b=1.0) const
void axpyb(const Array &a, const TripleBandLinearOp &x, const TripleBandLinearOp &y, const Array &b)
TripleBandLinearOp mult(const Array &u) const
Array apply(const Array &r) const override
#define QL_FAIL(message)
throw an error (possibly with file and line information)
memory layout of a fdm linear operator
const ext::shared_ptr< FdmMesher > mesher_
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
ext::shared_ptr< YieldTermStructure > q
ext::shared_ptr< YieldTermStructure > r
ext::shared_ptr< BlackVolTermStructure > v
second derivative operator
second order mixed derivative linear operator