Open ccjeremylo opened 1 year ago
Generally LGTM - minor comments/questions only:
Re "Assume we have access to liquid put and call option quotes": not sure if we mean store quotes in a csv file or equivalent. Could run out of memory if we have an especially large dataset. Dummy data is good, we probably want to minimise dependencies on other libraries anyway (as much as possible).
For vol_surface_interpolation: does interpolate need to take 4 parameters? (t0, K0, t1, K1)? Might be better to group these into tuples if so?
Agree that parameter class lambdas should be limited... anything against EM time-stepping?
Yes, exactly, I meant storing quotes in a csv format. Definitely not some large dataset. Not supricingly, lots of people have worked on vol surface modelling, and I managed to find some open source analysis on vol surface modelling with real option data available - we can borrow the data from there when needed - see e.g. here. His github profile has a lot of interesting work in it actually.
For the vol_surface_interpolation
, I am assuming we have access to the entire vol surface. I think I can send out a PR shortly actually - would very much welcome any code design feedback.
No, nothing about EM-stepping, just that I have not put too much thoughts into it. Start with something easy first, given we know the exact solution of GBM. Why we start doing fancier models like SV or jumps etc, then we can't get away with using numerical methods. The interface should be identical anyway.
See #14 for background.
Proposal for local vol model design:
Assume we have access to liquid put and call option quotes
Code up a
vol_surface_interpolation
abstract base class:interpolate()
Code up an
implied_vol_surface
abstract base classimplied_vol()
to get IV any given T and K: $T,K \mapsto \sigma(T-t_0,K)$equity_BS_implied_vol_surface
child class that takes in objectvol_surface_interpolation
as input in ctorCode up a
local_vol_surface
abstract base classlocal_vol()
BS_local_vol
child class that takes in objectequity_BS_implied_vol_surface
as input in ctorlocal_vol_surface
Use local vol given by
BS_local_vol
object in our GBM analytical stock price long stepping simulatorlambda
$s \mapsto \widetilde{\sigma}(s,K)$ for a given $K$, and use that as an input to our BS simulation engine - doesn't seem like a scalable design...suggestions are welcomeWrite tests and notebook to check: