FinancePy icon indicating copy to clipboard operation
FinancePy copied to clipboard

Implement numba'd conjugate gradient minimiser

Open domokane opened this issue 4 years ago • 4 comments

The conjugate gradient descent algorithm in scipy is slow and prevents the calling function from being jitted by numba. Idea is to find a python version of the CG minimiser that can be jitted to give faster minimisations.

domokane avatar Jan 02 '21 20:01 domokane

I'd be happy to have a go at this

idorrington92 avatar Apr 03 '23 13:04 idorrington92

I am not sure this is still needed. Look in utils at solver_cg.py and solver_nm.py to see the functions that were added and where they are used to see if everything is as fast as it can be. I had lots of issues with numba but I think they now work. But I have sort of forgotten so I am not 100% sure.

domokane avatar Apr 03 '23 13:04 domokane

I saw solver_cg but it didn't look like it was being used anywhere... and it looks like equity_vol_surface (and others) are using the scipy solver. Though it looks like it tries solver_nm and only uses scipy's CG when that fails to converge (or when the user specifies to use it).

idorrington92 avatar Apr 03 '23 14:04 idorrington92

Yes. My main focus was on the FX surface solver. If you see a need to work on it let me know. I am jammed on other things right now but if there is stuff to be done on this it would be very helpful.

domokane avatar Apr 03 '23 14:04 domokane