35 explicit FxBsModel(
const QuantLib::ext::shared_ptr<FxBsParametrization>& parametrization);
40 Size
n()
const override {
return 1; }
41 Size
m()
const override {
return 1; }
43 Array
eulerStep(
const Time t0,
const Array& x0,
const Time dt,
const Array& dw,
const Real r_dom,
44 const Real r_for)
const override;
51 : parametrization_(parametrization) {
52 QL_REQUIRE(parametrization !=
nullptr,
"FxBsModel: parametrization is null");
55inline Array
FxBsModel::eulerStep(
const Time t0,
const Array& x0,
const Time dt,
const Array& dw,
const Real r_dom,
56 const Real r_for)
const {
58 return x0 + (r_dom - r_for - 0.5 * sigma * sigma) * dt + sigma * std::sqrt(dt) * dw[0];
FxBsModel(const QuantLib::ext::shared_ptr< FxBsParametrization > ¶metrization)
const QuantLib::ext::shared_ptr< Parametrization > parametrizationBase() const override
Handle< Quote > fxSpotToday() const override
QuantLib::ext::shared_ptr< FxBsParametrization > parametrization_
Array eulerStep(const Time t0, const Array &x0, const Time dt, const Array &dw, const Real r_dom, const Real r_for) const override
FX Black Scholes parametrization.