Two kinds of pricing engines, MCBarrierEngine and MCBarrierNoBiasEngine are provided to evaluate the barrier option.
MCBarrierEngine generates the result with bias because it only considers whether the asset price at each discrete time point hits the barrier level.
However, the asset price during each discrete time interval maybe go up and down to hit the barrier level, which causes the bias of result. MCBarrierNoBiasEngine is to approximate the price process during the interval by a Brownian bridge. After simulating the asset price at each discrete time point, draw the maximum or minimum of the stock price on the interval using the known theoretical distribution of a Brownian Bridge, refer to ‘’Going to Extremes: Correcting Simulation Bias in Exotic Option Valuation - D.R. Beaglehole, P.H. Dybvig and G. Zhou, Correcting for Simulation Bias in Monte Carlo methods to Value Exotic Opitons in Models Driven by Levy Process - Claudia Ribeiro and Nick Webber.’‘
In the following, take up-and-out barrier option as an example to elaborate the two kinds of pricing engines. Let \(T\) be the maturity time of option, the barrier level is \(B\). The maturity time \(T\) is discretized by time steps \(N\). The rebate value is \(R\). If a barrier option fails to exercise, the seller might pay a rebate to the buyer of the option. Knock-outs might pay a rebate when they are knocked out, and knock-ins may pay a rebate if they expire without ever knocking in.