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.
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.