|
From: Sashan G. <sa...@gm...> - 2007-01-03 02:10:14
|
Hi I downloaded quantlib and had a look at the euler solver (expliciteuler.hpp) but all I can find is the interface to the class. I can't find the implementation, the code that does f(x + h) = h*f'(x) + f(x). I've implemented some numercial ode solvers in some work I did at university in physically based animation and am curious about applications in financial mathematics. I had a look at the todo list and it mentioned richardson extrapolation. I have rough plan for implementing this so that it can handle any solver (ie. Euler, RK4 etc...). The basic idea is that the solver classes define methods that return the value of the approximation A (see http://en.wikipedia.org/wiki/Richardson_extrapolation for definition) and the class that performs Richardson's extrapolation defines a method to apply the recurrance relation (defined in the above link) for a single time step. Since the approximation A differs depending on the type of the solver used this approach will not constrict the class that implements the Richardson extrapolation to a specific ODE solver. I can detail this approach with some C++ code hopefully sometime soon. -- sashan http://sashang.orcon.net.nz |