QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
mctraits.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
5 Copyright (C) 2003, 2004, 2005 StatPro Italia srl
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
25#ifndef quantlib_mc_traits_hpp
26#define quantlib_mc_traits_hpp
27
28#include <ql/methods/montecarlo/pathgenerator.hpp>
29#include <ql/methods/montecarlo/multipathgenerator.hpp>
30#include <ql/methods/montecarlo/pathpricer.hpp>
31#include <ql/math/randomnumbers/rngtraits.hpp>
32
33namespace QuantLib {
34
35 // path generation and pricing traits
36
38 template <class RNG = PseudoRandom>
40 typedef RNG rng_traits;
41 typedef Path path_type;
43 typedef typename RNG::rsg_type rsg_type;
45 enum { allowsErrorEstimate = RNG::allowsErrorEstimate };
46 };
47
49 template <class RNG = PseudoRandom>
50 struct MultiVariate {
51 typedef RNG rng_traits;
54 typedef typename RNG::rsg_type rsg_type;
56 enum { allowsErrorEstimate = RNG::allowsErrorEstimate };
57 };
58
59}
60
61
62#endif
Generates a multipath from a random number generator.
Correlated multiple asset paths.
Definition: multipath.hpp:39
Generates random paths using a sequence generator.
single-factor random walk
Definition: path.hpp:40
base class for path pricers
Definition: pathpricer.hpp:40
Definition: any.hpp:35
default Monte Carlo traits for multi-variate models
Definition: mctraits.hpp:50
RNG::rsg_type rsg_type
Definition: mctraits.hpp:54
MultiPathGenerator< rsg_type > path_generator_type
Definition: mctraits.hpp:55
PathPricer< path_type > path_pricer_type
Definition: mctraits.hpp:53
default Monte Carlo traits for single-variate models
Definition: mctraits.hpp:39
RNG::rsg_type rsg_type
Definition: mctraits.hpp:43
PathGenerator< rsg_type > path_generator_type
Definition: mctraits.hpp:44
PathPricer< path_type > path_pricer_type
Definition: mctraits.hpp:42