frannuca / nurbs

NURBS interpolation for 1D plots and Surfaces
0 stars 0 forks source link

First approach for volatility surface #2

Open frannuca opened 11 years ago

frannuca commented 11 years ago

We need to see how the algorithm behaves with vol surfaces. In Sophis we need to re-generate the whole volatility surface at once (typically 10y in maturity and from 0 to 500% in strike performance. We could create a vol surf grid and apply the following nurb construction:

val bspline = new Nurbs2DEqually(qk, Array(1, 2), Seq(nSamplesX, nSamplesY)) where Array(1,2) denotes lineal interpolation for maturity and second order interpolation for strike, asuming that x-axis applies to time and y-axis to strike.

If the surface is acceptable we need to migrate into breeze and in parallel code the surface generator in C#

frannuca commented 11 years ago

Breeze on Win64 arch reports the following error: org.jblas ERROR Couldn't load copied link file: java.lang.UnsatisfiedLinkError:

gbasler commented 11 years ago

I'm trying to reproduce it but the network @ work is so incredibly freaking slow, I'm getting nowhere...

frannuca commented 11 years ago

It worked but without blas. I think it has a local implementation or something where it reverts if blas is not found.

frannuca commented 11 years ago

I have added a first quick look-up method inside the getNormalizedCoord in Nurbs2DBase. The performance improvement is good, now Equally, Chord and Centripetal have similar speed for 5600 samples computation. Still needs re-factoring and allow to the user to choose the axis grid tolerance (maybe through akka.conf file)

gbasler commented 11 years ago

Cool, I'll have a look ;) Just done some cleanups.

gbasler commented 11 years ago

Did you notice that the error has increased?

frannuca commented 11 years ago

Sorry for the latest version commit but I had lots of merging problems. The error should be now better in this latest version. Now the axis are pre-sampled with an amount of points dependent on the tolerance. The error is slightly lager for the cases of Chord and Centripetal than for the case of Equidistant grid samples.

gbasler commented 11 years ago

Ok, I'll try it... I readded my changes...