Twofold problem with Maxima: derivative of cdf_normal and expressing result as an expression of a var...
Subject: Twofold problem with Maxima: derivative of cdf_normal and expressing result as an expression of a var...
From: Julien Martin
Date: Thu, 29 Oct 2009 17:48:15 +0100
Hello,
I am trying to use Maxima in order to compute a partial derivative of the
C(S,t) function below
d1:(log(S/K)+(r+sigma^2/2)*(T-t))/(sigma*sqrt(T-t))
d2:d1-(sigma*sqrt(T-t))
C(S,t):=S*cdf_normal(d1,0,1) - K*exp(-r*(T-t))*cdf_normal(d2,0,1)
-diff(C(S,t),t)
For you information I am in reference to the Black and Scholes formula:
http://en.wikipedia.org/wiki/Black%E2%80%93Scholes#Greeks and I am trying to
compute the Theta.
The problem is that this does not give me the expected result because I
would like for the result be expressed as an expression of d1, d2. How can I
achieve that??
Morevoer, I should get a pdf_distrib (derivative of cdf_distrib) somewhere
in the result.
Can anyone please help?
Thanks in advance,
Julien.
ps. I did make sure distrib was loaded before running the above.