Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'option pricing' topicStudent Support Forum > General > Archives > "option pricing"

Next Comment >Help | Reply To Topic
Author Comment/Response
Tony
08/29/12 08:24am

I type the following comment. Why no graph is outputted?

Norm[x_] := CDF[NormalDistribution[0, 1], x];
d1[k_, T_, r_, sigma_, deta_, s_,
t_] := {Log[s/k] + (r - deta + 0.5*sigma^2)*(T - t)}/sigma/
Sqrt[T - t];
d2[k_, T_, r_, sigma_, deta_, s_,
t_] := {Log[s/k] + (r - deta - 0.5*sigma^2)*(T - t)}/sigma/
Sqrt[T - t];
c[k_, T_, r_, sigma_, deta_, s_, t_] :=
s*Exp[-deta*(T - t)]*Norm[d1[k, T, r, sigma, deta, s, t]] -
k*Exp[-r*(T - t)]*Norm[d2[k, T, r, sigma, deta, s, t]];
Manipulate[
Plot[c[40, 1, 0.08, 0.3, 0, s, t], {s, 1, 70},
PlotRange -> {{0, 70}, {0, 50}}], {t, 1/12, 11/12}]



URL: ,

Subject (listing for 'option pricing')
Author Date Posted
option pricing Tony 08/29/12 08:24am
Re: option pricing jf 08/30/12 11:49am
Next Comment >Help | Reply To Topic