Black-Scholes期权定价公式


没在mathematica里找到内置的函数,自己写了一下,记录在这,方便以后使用。


(*s-代表0时刻的价格  t--代表时长 k--代表执行价 r--代表利率 a--代表波动率*)
p[s_, t_, k_, r_, a_] := Block[{w, wp, wp2},
  w = (r*t + a^2*t/2 - Log[k/s])/(a*Sqrt[t]);
  wp = NProbability[x < w, x \[Distributed] NormalDistribution[0, 1]];
  wp2 = NProbability[x < w - a*Sqrt[t], 
    x \[Distributed] NormalDistribution[0, 1]];
  s*wp - k*E^(-r*t)*wp2
  ]

相关文章:

  • 2021-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-02-02
  • 2021-10-15
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案