-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a Surface
type.
#141
Comments
I could mess with this potentially. Where were you wanting this to go? Do you want visualization? |
Visualisation is not very high on the list, but could possibly make a new macro to plot a surface, e.g. The idea is that we need fairly generic Edit: I've come back to this issue many times and have yet to be able to settle on an implementation. For example, for the Any thoughts ? |
Typical way to store curves or surfaces is to store a mesh and a function or the function values if you have a function defined on the surface. A question would be how general do you want these meshes? For instance, do you want polygonal meshes? If I had to guess, most of the curves/surfaces would start as graphs of functions, e.g., a curve of the form My gut tells me that using |
The function may be unknown, and the curve may simply be some market data, such as the US yield curve:
In this case, we would then have the inverse problem of calibrating some function to the data, such as the Nelson-Siegel-Svensson model, which we could then also use to interpolate between the data (needed for bond pricing, etc). And the key thing here is that we need the curves/surfaces to handle date-based indexing/construction, with my preference being
|
Maybe polars is safe to go with given it can do a lot of nice formatting/etc. However, and not to just go back and forth, but it wouldn't be too hard to go from ndarray to polars and vice versa if need be. |
If we can ensure that we can fit various models to the data and interpolation works, then polars would be awesome |
I realised Polars has a |
A
Surface
type could represent a volatility surface, for example.It would simply by a type with a
space
dimension (e.g. strikes, spot) and atime
dimension (e.g. dates, seconds, whatever).Possibly implement as a collection of
Curve
s, with aligned initial/terminal timestamps.The text was updated successfully, but these errors were encountered: