MarcusRainbow / QuantMath

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

Sort out price recursion #31

Closed MarcusRainbow closed 6 years ago

MarcusRainbow commented 6 years ago

The price method needs to take a date (or a vector of them), let's call it the val_date. The price returned should be the expected screen price as of the val date. Flows that go ex should be triggered by the val date. Discounting should be to the val_date plus the standard settlement.

The Priceable interface should also support a method that returns the discount date given a val date. Then if you want to discount to a particular date, rather than using standard settlement, you can do so easily.

MarcusRainbow commented 6 years ago

This is implemented, at least for a single val date. Tested for a European option on a basket underlying.