McPricer Class Template Reference#include <ql/Pricers/mcpricer.hpp>
List of all members.
Detailed Description
template<class MC, class S = Statistics>
class QuantLib::McPricer< MC, S >
base class for Monte Carlo pricers
Eventually this class might be linked to the general tree of pricers, in order to have tools like impliedVolatility available. Also, it could, eventually, offer greeks methods. Deriving a class from McPricer gives an easy way to write a Monte Carlo Pricer. See McEuropean as example of one factor pricer, Basket as example of multi factor pricer.
|
Public Member Functions |
Real | value (Real tolerance, Size maxSample=QL_MAX_INTEGER) const |
| add samples until the required tolerance is reached
|
Real | valueWithSamples (Size samples) const |
| simulate a fixed number of samples
|
Real | errorEstimate () const |
| error Estimated of the samples simulated so far
|
const S & | sampleAccumulator (void) const |
| access to the sample accumulator for more statistics
|
Protected Attributes |
boost::shared_ptr< MonteCarloModel<
MC, S > > | mcModel_ |
Static Protected Attributes |
const Size | minSample_ = 1023 |
|