Docs / nablatensor-quant / com.nablatensor.quant.analytic

final class

BarrierAnalytic

Reiner-Rubinstein closed forms for a single-barrier European option with continuous monitoring, zero rebate, and a constant cost of carry b and volatility sigma.

This is the exact reference for the smoothed, per-step-monitored barrier in ExoticProducts.barrier: the Monte-Carlo payoff there trades a small bias (set by the smoothing width and the discrete monitoring) for a differentiable price, and this class is what that bias is measured against. Note that a discretely monitored barrier converges to the continuous price only after the Broadie-Glasserman-Kou exp(0.5826 sigma sqrt(dt)) shift, so a like-for-like check uses many monitoring dates.

The eight in/out x up/down x call/put combinations are assembled from the standard six terms A, B, C, D (the E, F rebate terms are zero here) with a call/put sign phi and an up/down sign eta.

Methods

static AnalyticGreeks of(OptionType type, Kind kind, double spot, double strike, double barrier, double maturity, double rate, double carry, double vol)
type
call or put on the terminal underlying
kind
up/down x in/out
spot
spot S
strike
strike K
barrier
barrier level H
maturity
time to expiry in years T
rate
continuously-compounded discount rate r
carry
cost of carry b (use r for a non-dividend stock)
vol
lognormal volatility sigma
static double price(OptionType type, Kind kind, double spot, double strike, double barrier, double maturity, double rate, double carry, double vol)

Bare price.