Class BarrierOptions

  • public class BarrierOptions
    extends Object
    This class implements the valuation of barrier options. Currently only supports a a lognormal model. We use the notation from the book by Espeen Gaarder Haugh. "The complete Guide to Option Pricing Formulas".
    Alessandro Gnoatto
    • Method Detail

      • blackScholesBarrierOptionValue

        public static double blackScholesBarrierOptionValue​(double initialStockValue,
                                                            double riskFreeRate,
                                                            double dividendYield,
                                                            double volatility,
                                                            double optionMaturity,
                                                            double optionStrike,
                                                            boolean isCall,
                                                            double rebate,
                                                            double barrierValue,
                                                            BarrierOptions.BarrierType barrierType)
        Value a barrier option.
        initialStockValue - The model's initial value of the stock.
        riskFreeRate - The model's risk free rate of the stock.
        dividendYield - The model's dividend yield of the stock.
        volatility - The model's volatility yield of the stock.
        optionMaturity - The product's option maturity.
        optionStrike - The product's option strike.
        isCall - If true, the a call option will be valued, otherwise a put option.
        rebate - The product's rebate.
        barrierValue - The location of the barrier.
        barrierType - The type of the barrier.
        The value of the option.