QuantLib_MonteCarloModel man page

MonteCarloModel< MC, RNG, S > — General-purpose Monte Carlo model for path samples.  


#include <ql/methods/montecarlo/montecarlomodel.hpp>

Public Types

typedef MC< RNG > mc_traits
typedef RNG rng_traits
typedef MC< RNG >::path_generator_type path_generator_type
typedef MC< RNG >::path_pricer_type path_pricer_type
typedef path_generator_type::sample_type sample_type
typedef path_pricer_type::result_type result_type
typedef S stats_type

Public Member Functions

MonteCarloModel (const boost::shared_ptr< path_generator_type > &pathGenerator, const boost::shared_ptr< path_pricer_type > &pathPricer, const stats_type &sampleAccumulator, bool antitheticVariate, const boost::shared_ptr< path_pricer_type > &cvPathPricer=boost::shared_ptr< path_pricer_type >(), result_type cvOptionValue=result_type(), const boost::shared_ptr< path_generator_type > &cvPathGenerator=boost::shared_ptr< path_generator_type >())
void addSamples (Size samples)
const stats_type & sampleAccumulator (void) const

Detailed Description

template<template< class > class MC, class RNG, class S = Statistics>

class QuantLib::MonteCarloModel< MC, RNG, S >" General-purpose Monte Carlo model for path samples.

The template arguments of this class correspond to available policies for the particular model to be instantiated---i.e., whether it is single- or multi-asset, or whether it should use pseudo-random or low-discrepancy numbers for path generation. Such decisions are grouped in trait classes so as to be orthogonal---see mctraits.hpp for examples.

The constructor accepts two safe references, i.e. two smart pointers, one to a path generator and the other to a path pricer. In case of control variate technique the user should provide the additional control option, namely the option path pricer and the option value.

Examples: DiscreteHedging.cpp.


Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

The man pages addSamples(3), mc_traits(3), MonteCarloModel(3) and rng_traits(3) are aliases of QuantLib_MonteCarloModel(3).

Fri Sep 1 2017 Version 1.10.1 QuantLib