KYLChiu / ExoticMonteCarloEngine

Apache License 2.0
6 stars 0 forks source link

[Python] Add local vol model #52

Open ccjeremylo opened 1 year ago

ccjeremylo commented 1 year ago

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:

Code up an implied_vol_surface abstract base class

Code up a local_vol_surface abstract base class

Use local vol given by BS_local_vol object in our GBM analytical stock price long stepping simulator

Write tests and notebook to check:

KYLChiu commented 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?

ccjeremylo commented 1 year ago

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.