MarcusRainbow / QuantMath

Financial maths library for risk-neutral pricing and risk
MIT License
370 stars 43 forks source link

Handle stochastic flows in Monte-Carlo #17

Open MarcusRainbow opened 6 years ago

MarcusRainbow commented 6 years ago

Cashflows in BlackDiffusion are easy, because BlackDiffusion is not a stochastic rate model. The more general case needs to be handled too.

A simple example is a physically settled option, which has flows of stock rather than cash. In the European product, we sidestep the issue by treating all options as cash-settled for Monte-Carlo valuation. However, it would make a simple test-case to treat physically settled options correctly.

Somehow we need to pass the weights for the paths into the mc_price method. This could be done via the context, which would mean decorating it. Or it could be done by adding another parameter to the mc_price method.