Skip to main content
Improved formatting
Source Link
Michael E2
  • 244.7k
  • 18
  • 350
  • 774

Ok I think this method worked, but still NDSolve gives an unstable solution.

barriersolution = NDSolve[{D[V[S, t], t] + rSD[V[S, t], S] + 1/2 sigma^2 S^2 D[V[S, t], {S, 2}] - r V[S, t] == 0, DirichletCondition[V[S, t] == 1, (S >= 100 && t == 1)], DirichletCondition[V[S, t] == 0, ( S < 100 && t == 1)]}, V, {S, 10, 200}, {t, 0, 1}, PrecisionGoal -> 10]

barriersolution = 
 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, 
   DirichletCondition[V[S, t] == 1, (S >= 100 && t == 1)], 
   DirichletCondition[V[S, t] == 0, ( S < 100 && t == 1)]}, 
  V, {S, 10, 200}, {t, 0, 1}, PrecisionGoal -> 10]

It's not at all stable for V[100,0]V[100,0] ranging from 0.43 to 0.56 for slight change of SS boundaries. I was trying to price binary digitals with a pde where payoff is 1 if Spot > 100Spot > 100 at expiry. Probably I should supply the mesh along with the pde problem to get a stable solution. Maybe a mesh which is finer near expiry time and very sparse before expiry time.

Ok I think this method worked, but still NDSolve gives an unstable solution.

barriersolution = NDSolve[{D[V[S, t], t] + rSD[V[S, t], S] + 1/2 sigma^2 S^2 D[V[S, t], {S, 2}] - r V[S, t] == 0, DirichletCondition[V[S, t] == 1, (S >= 100 && t == 1)], DirichletCondition[V[S, t] == 0, ( S < 100 && t == 1)]}, V, {S, 10, 200}, {t, 0, 1}, PrecisionGoal -> 10]

It's not at all stable for V[100,0] ranging from 0.43 to 0.56 for slight change of S boundaries. I was trying to price binary digitals with a pde where payoff is 1 if Spot > 100 at expiry. Probably I should supply the mesh along with the pde problem to get a stable solution. Maybe a mesh which is finer near expiry time and very sparse before expiry time.

Ok I think this method worked, but still NDSolve gives an unstable solution.

barriersolution = 
 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, 
   DirichletCondition[V[S, t] == 1, (S >= 100 && t == 1)], 
   DirichletCondition[V[S, t] == 0, ( S < 100 && t == 1)]}, 
  V, {S, 10, 200}, {t, 0, 1}, PrecisionGoal -> 10]

It's not at all stable for V[100,0] ranging from 0.43 to 0.56 for slight change of S boundaries. I was trying to price binary digitals with a pde where payoff is 1 if Spot > 100 at expiry. Probably I should supply the mesh along with the pde problem to get a stable solution. Maybe a mesh which is finer near expiry time and very sparse before expiry time.

Source Link

Ok I think this method worked, but still NDSolve gives an unstable solution.

barriersolution = NDSolve[{D[V[S, t], t] + rSD[V[S, t], S] + 1/2 sigma^2 S^2 D[V[S, t], {S, 2}] - r V[S, t] == 0, DirichletCondition[V[S, t] == 1, (S >= 100 && t == 1)], DirichletCondition[V[S, t] == 0, ( S < 100 && t == 1)]}, V, {S, 10, 200}, {t, 0, 1}, PrecisionGoal -> 10]

It's not at all stable for V[100,0] ranging from 0.43 to 0.56 for slight change of S boundaries. I was trying to price binary digitals with a pde where payoff is 1 if Spot > 100 at expiry. Probably I should supply the mesh along with the pde problem to get a stable solution. Maybe a mesh which is finer near expiry time and very sparse before expiry time.