Beispiel #1
0
        private double GetSecondDerivativeToStrike(double t, double k)
        {
            // there is possibility that the bump sizes are different between forward and backward.
            // we use the minimum of them to calculate the second order derivative.
            double bumpsize = PriceBump.MinBump(k);

            return((ImpliedVol.GetValue(t, k + bumpsize) + ImpliedVol.GetValue(t, k - bumpsize) - 2 * ImpliedVol.GetValue(t, k)) /
                   (bumpsize * bumpsize));
        }