Logo
Reference manual - version orea_version
LgmScenarioGenerator Class Reference

Scenario Generator using LGM model paths. More...

#include <orea/scenario/lgmscenariogenerator.hpp>

Inheritance diagram for LgmScenarioGenerator:

Public Member Functions

 LgmScenarioGenerator (QuantLib::ext::shared_ptr< QuantExt::LGM > model, QuantLib::ext::shared_ptr< QuantExt::MultiPathGeneratorBase > multiPathGenerator, QuantLib::ext::shared_ptr< ScenarioFactory > scenarioFactory, QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > simMarketConfig, Date today, DateGrid grid)
 Constructor.
 ~LgmScenarioGenerator ()
 Destructor.
std::vector< QuantLib::ext::shared_ptr< Scenario > > nextPath () override
void reset () override
 Reset the generator so calls to next() return the first scenario.
Public Member Functions inherited from ScenarioPathGenerator
 ScenarioPathGenerator (Date today, const vector< Date > &dates, TimeGrid timeGrid)
 Constructor.
virtual QuantLib::ext::shared_ptr< Scenarionext (const Date &d) override
 Return the next scenario for the given date.
Public Member Functions inherited from ScenarioGenerator
virtual ~ScenarioGenerator ()
 Default destructor.

Additional Inherited Members

Protected Attributes inherited from ScenarioPathGenerator
Date today_
vector< Date > dates_
Size pathStep_
TimeGrid timeGrid_
std::vector< QuantLib::ext::shared_ptr< Scenario > > path_

Detailed Description

Scenario Generator using LGM model paths.

The generator expects

  • a calibrated model,
  • an associated multi path generator (i.e. providing paths for all factors of the model ordered as described in the model),
  • a scenario factory that provides building scenario class instances,
  • the configuration of market curves to be simulated
  • a simulation date grid that starts in the future, i.e. does not include today's date
  • the associated time grid including t=0

Member Function Documentation

◆ nextPath()

std::vector< QuantLib::ext::shared_ptr< Scenario > > nextPath ( )
overridevirtual

Implements ScenarioPathGenerator.

◆ reset()

void reset ( )
overridevirtual

Reset the generator so calls to next() return the first scenario.

This allows re-generation of scenarios if required.

Implements ScenarioGenerator.