Manual 08 Price, variance, confidence, Greeks

Metrics

Metrics are functions of a model, a zero rate curve, a Monte Carlo configuration and a payoff. They all accept a single payoff or a vector of payoffs (priced on the same paths), and most of them also positions and portfolios.

MetricReturns
pricerMonte Carlo estimate of the price
variancevariance of the discounted payoff per path: the variance of the price times Nsim (with AntitheticMC, from the averages of the antithetic pairs)
confinterconfidence interval of the price at a given level (default 99%); with AntitheticMC from the antithetic pairs, which are the independent samples, and not an error estimate with SobolMC
deltasensitivity to the spot price, by bump and reprice
rhosensitivity to the zero rate, by bump and reprice
FinancialMonteCarlo.distributionsimulated values of the underlying at a given time
pricer(model, underlying, rfCurve, mcConfig, payoff)
pricer(model, underlying, rfCurve, mcConfig, [payoff_1, payoff_2])     # vector of prices
pricer(model, underlying, rfCurve, mcConfig, 2.0 * payoff_1 - payoff_2) # price of a position
variance(model, underlying, rfCurve, mcConfig, payoff)
confinter(model, underlying, rfCurve, mcConfig, payoff, 0.95)
delta(model, underlying, rfCurve, mcConfig, payoff, 1e-4)               # spot bump
rho(model, underlying, rfCurve, mcConfig, payoff, 1e-4)                 # rate bump

The bump and reprice greeks use the same seed for the base and the bumped prices, so the Monte Carlo noise largely cancels. For exact pathwise derivatives, use dual numbers instead, see Automatic differentiation.

For a market data set and a portfolio, delta takes the name of the underlying to bump:

delta(market, rfCurve, mcConfig, portfolio, "ENI")

See Metrics in the API reference.