コード例 #1
0
 public double exactSolution(double asset, double time) {
   setup(asset, time);
   return -asset * Math.exp(-dividend * (maturityTime - time)) * SpecialFunctions.normalCdf(-d[0])
       + strike
           * Math.exp(-interestRate * (maturityTime - time))
           * SpecialFunctions.normalCdf(-d[1]);
 }
コード例 #2
0
 public double exactDelta(double asset, double time) {
   setup(asset, time);
   return Math.exp(-dividend * dt) * (SpecialFunctions.normalCdf(d[0]) - 1);
 }
コード例 #3
0
 public double exactTheta(double asset, double time) {
   setup(asset, time);
   return -volatility * asset * Math.exp(-dividend * dt) * nPrime(-d[0]) / (2 * Math.sqrt(dt))
       - dividend * asset * SpecialFunctions.normalCdf(-d[0]) * Math.exp(-dividend * dt)
       + interestRate * strike * Math.exp(-interestRate * dt) * SpecialFunctions.normalCdf(-d[1]);
 }