QuantEcon / SimpleDifferentialOperators.jl

Library for simple upwind finite differences
MIT License
12 stars 2 forks source link

Do we need to adjust the "mixed" boundary conditions for upwind finite differences #137

Closed jlperla closed 5 years ago

jlperla commented 5 years ago

Tricky question: Does the weird upwind finite difference with boundaries thing apply to the drift of the stochastic process, or the term on front of the actual equation?

Note that with xi_lower and xi_upper in equation (22) and (23) whether you use forward or backward finite differences is important.

Is it possible that the current discretization only works for certain sign combinations? Basically, the suggestion is that (54) and (55) might be incorrect.

That is (54) might only be correct if xi_L > 0? and if xi_L < 0 then it should be

(v_1 - v_0)/Delta + xi_L v_1 = 0

Or, potentially it has nothing to do with sign of the xi_L itself, but instead is about the sign of the drift of the process on the inside instead. i.e. the formula

There is something similar for equation (55) to (58)

chiyahn commented 5 years ago

Yes. As seen from the notebook added in #138