Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • MonteCarloModel

Index

Type aliases

Static mc_traits

mc_traits: MC

Static path_generator_type

Static path_pricer_type

Static result_type

result_type: Real

Static rng_traits

rng_traits: RNGTraits

Static sample_type

sample_type: Sample<Path> | Sample<MultiPath>

Static stats_type

stats_type: Statistics

Constructors

constructor

Properties

MC

RNG

S

S: any

Private _cvOptionValue

_cvOptionValue: result_type

Private _cvPathGenerator

_cvPathGenerator: path_generator_type

Private _cvPathPricer

_cvPathPricer: PathPricer<Path | MultiPath>

Private _isAntitheticVariate

_isAntitheticVariate: boolean

Private _isControlVariate

_isControlVariate: boolean

Private _pathGenerator

_pathGenerator: path_generator_type

Private _pathPricer

_pathPricer: PathPricer<Path | MultiPath>

Private _sampleAccumulator

_sampleAccumulator: stats_type

Methods

addSamples

  • addSamples(samples: Size): void
  • Parameters

    Returns void

mcmInit

sampleAccumulator

  • Returns stats_type