Re: Solving for equations with CDF functions
- To: mathgroup at smc.vnet.net
- Subject: [mg67813] Re: Solving for equations with CDF functions
- From: "James Gilmore" <james.gilmore at yale.edu>
- Date: Sat, 8 Jul 2006 04:56:50 -0400 (EDT)
- Organization: Yale University
- References: <e8lgau$r6e$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Matt, I assume you got the "Solve::tdep" error messageas I did? I doesn't look like the Solve algorithms will work in this case. Given the equations involve the Erf (see the help browser for the integral def.) and Log, it might be better to set up a numerical solution, with NSolve or FindRoot, which evaluates K(S,T,C,...) when S,T,C,... are given? This approach might be efficient, but I suppose that depends on exactly what you want to do with K, i.e. plot it, substitute it into another equation, or just write an analytical solution? Cheers James Gilmore <jmp306 at gmail.com> wrote in message news:e8lgau$r6e$1 at smc.vnet.net... > I'm trying to do this in mathematica. Bascially it's the black-scholes > equation in finance, but I need a solution for K given all the other > variables. > > << Statistics`ContinuousDistributions` > << Statistics`DiscreteDistributions` > normdist = NormalDistribution[0, 1] > d1 = (Log[(S/K)] + (r + delta + .5*sigma^2)*T)/(sigma*Sqrt[T]) > d2 = d1 - sigma*Sqrt[T] > price = S*Exp[-delta*T]*CDF[normdist, d1] - K*Exp[-r*T]*CDF[normdist, > d2] > Solve[C == price, K] > > > I think I'm making a pretty dumb error, but I just can't figure out > what it is. Any guidence would be very helpful. > > Thanks > Matt >