Message Boards Message Boards

Solving Black-Scholes PDE with NDSolve

Posted 11 years ago

Hi, there

I've tried to replicate the procedure described in the Black-Scholes PDE numerically solved in Mathematica on Youtube, and encountered a problem.

So.. I do exactly as described in the video, but as shown below, I get a different result and I don't know why.

T = 1;
sigma = 0.3;
r = 0.05;
K = 10;

sol = NDSolve[{D[V[S, t], t] + r*S*D[V[S, t], S] + 1/2 sigma^2 S^2 D[V[S, t], {S, 2}] - r V[S, t] == 0, V[S, T] == Max[S - K, 0], V[1000, t] == 1000 - K, V[0, t] == 0},  V, {S, 0.1, 1000}, {t, 0, T}]

When I evaluate the resulting function for a price of 10 at time 0:

 V[10, 0] /. sol

I get {5.96577}, which is different from the price of {1.42313} given by the formula:

FinancialDerivative[{"European", "Call"}, {"StrikePrice" -> 10.00, "Expiration" -> 1},  {"InterestRate" -> 0.05, "Volatility" -> sigma, "CurrentPrice" -> 10}]

Is there a problem with NDSolve[], or I'm just ignoring some recent change implemented in Mathematica 10?

POSTED BY: Sandu Ursu
2 Replies
POSTED BY: Marco Thiel

The difference is caused by precision: the interval for S is quite long, so step size will be large. You could decrease it to max 100, or you could set PrecisionGoal.

POSTED BY: Sjoerd de Vries
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract