Thanks Femto Trader for bumping this. I took a quick look at Quantlib (and 
Ito) and I have to say, their numerical methods are very rudimentary (in 
fact, one of their methods for stochastic processes, EndPointEuler, doesn't 
have finite moments for its error due to KPS 1994...). For anything that 
isn't a Jump Process you can currently use DifferentialEquations.jl which 
has higher Strong order methods for solving the SDEs (with efficient 
adaptivity coming whenever my paper gets past peer review... short summary: 
mathematicians don't like computer science tools to show up in their math 
papers even if it makes it faster...). That's the thing though, you have to 
know the stochastic differential equation for the process.

That said, it would pretty trivial to use dispatch so that way you define a 
"GeneralizedBlackScholes" equation, when then uses dispatch to construct an 
SDE and apply an optimized SDE method to it. Since you can already do this 
manually, it would just take setting up an object and a dispatch for each 
process. Would this kind of ease-of-use layer for quants be something 
anyone is interested in?

The other thing is the Forward Kolmogorov PDEs associated to the SDEs. 
Currently I have FEM methods for Poisson and Semilinear Heat Equations 
which, as with the SDEs, can define any of the processes. This has a few 
more fast methods than Quantlib, but it doesn't have TRBDF2 (but that would 
be pretty trivial to implement. If you want it let me know, it should take 
less than hour to modify what I have for the trapezoid rule since it's just 
about defining the implicit function, NLsolve handles the solving).

However, for most PDEs in finance you likely don't need the general 
boundaries that FEM provides and so FDM (finite difference methods) can 
probably be used. I haven't coded it up yet because I was looking for the 
right implementation. I am honing in on it: ImageFiltering.jl gives a good 
n-dimensional LaPlacian operator (and if I can convince Tim Holy it's 
worthwhile, parallel/multithreaded), and I will be building up Grids.jl 
<> memory-efficient iterators 
for storing the space. This should lead to blazing fast FDM implementations 
where the only actual array are the independent variable (the option price) 
itself, so it should also be pretty memory efficient. I'll be pairing this 
with the standard methods but also some very recent Implicit Integrating 
Factor Methods (IIF) which should give a pretty large speedup over anything 
in Quantlib for stiff equations. Would anyone be interested in a quant 
ease-of-use interface over this as well? (If you'd like to help speed this 
up, the way to do that is to help get Grids.jl implemented. The ideas are 
coming together, but someone needs to throw together some prototype (which 
shouldn't be too difficult))

Note that Jump Processes can easily be done by using callback functions 
(independent jumps can be computed in advance and then use an appropriate 
tspan, adding the jump between the intervals. Dependent jumps just need to 
use a callback within to add a jump in the appropriate intervals and maybe 
interpolate back a bit, likely better with adaptive timestepping), and I'll 
probably make an API to make this easier.

Let me know what you guys would like to see on the differential equation / 
stochastic processes side and I'll make it happen. I'm doing most of this 
stuff for SPDEs in stochastic systems biology, but the equations are 
literally the same (general SDEs and semilinear Heat equations) so I'm 
plowing through whatever I can.

On Thursday, October 1, 2015 at 7:34:32 PM UTC-7, Christopher Alexander 
> I think the Ito package is a great start, and I've forked it to work on 
> adding to it other features of Quantlib (as best as I can!).  I'm glad 
> someone mentioned the InterestRates package too as I hadn't seen that.  I 
> work at major bank in risk, and my goal is to at some point sell them on 
> the power of Julia (we are currently a Python/C++ shop).
> - Chris
> On Friday, September 11, 2015 at 2:05:39 AM UTC-4, Ferenc Szalma wrote:
>> Are there any quant finance packages for Julia? I see some rudimentary 
>> calendar and day-counting in Ito.js for example but not much for even a 
>> simple yield2price or price2yield or any bond objects in Julia packages on 
>> GitHub. What is the best approach, using C++ function/object from Quantlib, 
>> to finance in Julia?

Reply via email to