Next: Interpolation
Up: Crank-Nicolson Method
Previous: Example - European Put
General
- Remember that if you write functions for either of the stages (setup or solving) you will need to pass vectors by reference if you wish for them to be changed in the main code. There may be situations where it is more efficient to copy some of the vectors to the function (you may not want to resetup the matrix equation at every timestep)
- By structuring your program in this way it should be simple to flip between solving the matrix equations with a direct or iterative method.
American options
- You will need to solve the equations using an iterative method in order to complete the coursework since American option cannot be solved directly.
- Extrapolation techniques may be used on American options.
Barrier options
- Barrier options supply a boundary condition over a region of
-space.
- All this means is that your equations in that region will be boundary condition equations rather than the usual inner equations.
- As such changes need only be made to the setup stage, not the solving stage.
- Remember that there can be potentially large nonlinear errors if the grid points do not fall on both the barrier and the strike price.
Next: Interpolation
Up: Crank-Nicolson Method
Previous: Example - European Put
Paul Johnson
2009-04-06