Black-Scholes期权定价公式

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
  ]

posted on 2016-12-04 16:00  WMN7Q  阅读(1077)  评论(0编辑  收藏  举报

导航