/// <summary> /// Values a digital option with greeks. /// </summary> /// <param name="callFlag"></param> /// <param name="fwdPrice"></param>. /// <param name="strike"></param> /// <param name="vol"></param> /// <param name="t"></param> /// <returns>value, d_dfwdPrice, d2_dfwdPrice2, d_dvol, d_dstrike, d2_dstrike2, d_dt</returns> public object[,] DigitalWithGreeks(bool callFlag, double fwdPrice, double strike, double vol, double t) { var unqVals = OptionAnalytics.DigitalWithGreeks(callFlag, fwdPrice, strike, vol, t); var result = RangeHelper.ConvertArrayToRange(unqVals); return(result); }
/// <summary> /// Flats the skew price. /// </summary> /// <param name="forward">The FWD.</param> /// <param name="r">The r.</param> /// <param name="q">The q.</param> /// <returns></returns> private double FlatSkewPrice(double forward, double r, double q) { double[] p = OptionAnalytics.DigitalWithGreeks(_isCall, forward, _strike, _volatility, _tau); return(p[0]); }