Class MCPRPerformanceEngine
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
MCPerformanceEngine on pseudo-random draws with QuantLib's default statistics: QuantLib-Python's
MCPRPerformanceEngine, QuantLib's MCPerformanceEngine<PseudoRandom>, its calculations closed at
PseudoRandom and GeneralStatistics.
public static class MCPRPerformanceEngine
- Inheritance
-
MCPRPerformanceEngine
- Inherited Members
Methods
Calculate(CliquetOption, EvaluationContext, GeneralizedBlackScholesProcess, bool, bool, int?, double?, int?, long)
Prices a performance option by Monte Carlo.
public static OneAssetOptionResults Calculate(CliquetOption option, EvaluationContext context, GeneralizedBlackScholesProcess process, bool brownianBridge, bool antitheticVariate, int? requiredSamples, double? requiredTolerance, int? maxSamples, long seed)
Parameters
optionCliquetOptionThe option.
contextEvaluationContextThe evaluation context.
processGeneralizedBlackScholesProcessThe Black-Scholes process.
brownianBridgeboolWhether the draws are ordered by a Brownian bridge.
antitheticVariateboolWhether antithetic variates are used.
requiredSamplesint?The number of samples, or null.
requiredTolerancedouble?The absolute tolerance, or null; it takes precedence.
maxSamplesint?The most samples for a tolerance, or null for no limit.
seedlongThe seed, in [1, 4294967295].
Returns
- OneAssetOptionResults
The option's results, the NPV and the error estimate; the expired results when it has expired.
Exceptions
- ArgumentNullException
The option, the context or the process is null.
- ArgumentOutOfRangeException
A number of samples is negative, or the seed is outside its range.
- NanoQLException
The option's terms are invalid, neither a tolerance nor a number of samples is given, or the samples can't reach the tolerance.