First of all, thank you for a great risk library, it’s very useful!
I have a question regarding the possibility to calculate a portfolio’s NPV using a valuation date which is different from the market date. QuantLib allows this for swap legs with the following function (+ it gives the flexibility of providing a different settlement date as well):
Real npv(const Leg& leg,
const YieldTermStructure& discountCurve,
Date settlementDate = Date(),
Date npvDate = Date());
Is there a similar parameter that we can set in the NPV analytic xml node to do so?
I guess QL does not have this flexibility for all instrument types (only swap legs) so it would require more work than just exposing the existing QL features.
Would it not be possible to just “roll” down all the market curves (including vol surfaces?), like I guess it is done in the MC simulation but without the stochastic part?
My end goal would be to see the MTM of a portfolio evolve through time (and possibly calculate it for a specific date), assuming the current market forwards realise. I can always simulate a large number of NPV paths and average them but that seems like an overkill for simple forward-implied MTM valuation. Is there any other way to do this?
I would greatly appreciate your thoughts on this.