jlperla / continuous_time_methods

MIT License
23 stars 15 forks source link

Figure out the right hand boundary value used for option value problem #4

Closed jlperla closed 7 years ago

jlperla commented 7 years ago

Take a look at the stopping problem: http://www.princeton.edu/~moll/HACTproject/option_simple.pdf

Download http://www.princeton.edu/~moll/HACTproject/option_simple_LCP.m and http://www.princeton.edu/~moll/HACTproject/LCP.m

The goal is to figure out what the boundary value used for the right hand side of the finite difference scheme.. If the diffusion term was not there, this wouldn't be a problem since it uses the backward differences as upwind. But with the 2nd order term we need something else for the final point?

jlperla commented 7 years ago

You can also see https://ecommons.cornell.edu/bitstream/handle/1813/5453/2003-279.pdf?sequence=1&isAllowed=y

jlperla commented 7 years ago

Looking at that code, the key is to understand the construction of the A matrix. In particular,

A =spdiags(Y,0,I,I)+spdiags(X(2:I),-1,I,I)+spdiags([0;Z(1:I-1)],1,I,I);
A(I,I)= Y(I) + sig2(I)/(2*dx2);
A(I,I-1) = X(I);
jlperla commented 7 years ago

Take a look at http://www.princeton.edu/~moll/Lecture1_Rochester.pdf and http://www.princeton.edu/~moll/Lecture2_Rochester.pdf

jlperla commented 7 years ago

I think you finished this, so closing the issue.