private double FindTheoretical(int[] p, double k) { double result = 0; if (Derivative == Derivative.Caplet) { result = _economy.CapletBlackScholes(p[0], k); } if (Derivative == Derivative.Swaption) { result = _economy.SwaptionBlackScholes(p[0], p[1], k); } if (Derivative == Derivative.Custom) { result = 0; } return(result); }