25#ifndef quantlib_short_rate_model_engine_hpp
26#define quantlib_short_rate_model_engine_hpp
37 template <
class Arguments,
class Results>
42 const ext::shared_ptr<ShortRateModel>& model,
48 const ext::shared_ptr<ShortRateModel>& model,
58 template <
class Arguments,
class Results>
60 const ext::shared_ptr<ShortRateModel>& model,
63 timeSteps_(timeSteps) {
65 "timeSteps must be positive, " << timeSteps <<
69 template <
class Arguments,
class Results>
74 timeSteps_(timeSteps) {
76 "timeSteps must be positive, " << timeSteps <<
80 template <
class Arguments,
class Results>
82 const ext::shared_ptr<ShortRateModel>& model,
85 timeGrid_(timeGrid), timeSteps_(0) {
89 template <
class Arguments,
class Results>
92 if (!timeGrid_.empty())
93 lattice_ = this->model_->tree(timeGrid_);
Base class for some pricing engine on a particular model.
Handle< ShortRateModel > model_
Shared handle to an observable.
Engine for a short-rate model specialized on a lattice.
LatticeShortRateModelEngine(const ext::shared_ptr< ShortRateModel > &model, Size timeSteps)
LatticeShortRateModelEngine(const ext::shared_ptr< ShortRateModel > &model, const TimeGrid &timeGrid)
ext::shared_ptr< Lattice > lattice_
LatticeShortRateModelEngine(const Handle< ShortRateModel > &model, Size timeSteps)
Abstract short-rate model class.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Generic option engine based on a model.
std::size_t Size
size of a container
Abstract interest rate model class.