I have a theoretical question concerning NPV calculation of financial products.
I know how to calculate it when future flows have to be estimated, but I am wondering how to calculate past flows. In fact, I am even wondering if it makes sense to calculate past flows for NPV of a financial product as it is generally used to estimate value of cashflows to be received/paid in the future.
Let me give you more context about this question: I am a programmer and I am working on a "NPV" function where the pricing date is a parameter, this date is used to discount the flows (this "NPV" function will price "as of" pricing date). It would be possible to use this npv function choosing a pricing date before trade booking but also in the middle of the trade "life" (for example, for an IR Swap, it would be possible to select a pricing date where some payments have already been done and some other still didn't occur).
I see several possibilities:
force to select a pricing date before occurence of the first payment (if we consider NPV calculation only making sense to evaluate if it worths entering in a new deal or not)
only take into account future flows of the trade
estimate future flows and, for the past flows, retrieve the realized payments
This question will probably look abstract (and even weird!) for most of you. I am aware of it and sorry about that. Your feedbacks are welcomed.
Thanks and regards