Q: Instrument::NPV() : is this really the present value?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Q: Instrument::NPV() : is this really the present value?

John McMahon-2
If it is, why was NPV() picked as the method name?
Just curious.
John McMahon




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really the present value?

Luigi Ballabio

On Jun 6, 2007, at 8:35 PM, John McMahon wrote:
> If it is, why was NPV() picked as the method name?

It is. We're used to call it "net present value," hence the acronym.
Then again, English is not my native language. Is just "present value"
more common?

Later,
        Luigi


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

John McMahon-2
following an offline conversation with a few of you:
i think npv is a corporate finance term where the meaning of net is 'net of
cost of acquisition' (net of a market price), pre-dating 'complex' cashflows
like swaps
present value itself ought to be a strong enough concept to include
aggregates of positive and negative cashflows (ie apply to swap sides).
---
eg in a bond, you can PV its coupons+principal; if you have its market
price, you could also, separately NPV it.
In this context, yield is the internal rate of return which makes NPV==0.
---
excel calls its PV calculation =NPV(), which could explain this alternative
use of npv??

John


"Luigi Ballabio" <[hidden email]> wrote in message
news:[hidden email]...

>
> On Jun 6, 2007, at 8:35 PM, John McMahon wrote:
>> If it is, why was NPV() picked as the method name?
>
> It is. We're used to call it "net present value," hence the acronym.
> Then again, English is not my native language. Is just "present value"
> more common?
>
> Later,
> Luigi
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ 




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

Luigi Ballabio
On Thu, 2007-06-07 at 17:57 +0100, John McMahon wrote:

> following an offline conversation with a few of you:
> i think npv is a corporate finance term where the meaning of net is 'net of
> cost of acquisition' (net of a market price), pre-dating 'complex' cashflows
> like swaps
> present value itself ought to be a strong enough concept to include
> aggregates of positive and negative cashflows (ie apply to swap sides).
> ---
> eg in a bond, you can PV its coupons+principal; if you have its market
> price, you could also, separately NPV it.
> In this context, yield is the internal rate of return which makes NPV==0.

John,
        you're right---PV seems more general. We could rename the method in
future releases. Thoughts anyone?

Luigi


----------------------------------------

Greenspun's Tenth Rule of Programming:
Any sufficiently complicated C or Fortran program contains an
ad-hoc, informally-specified bug-ridden slow implementation of
half of Common Lisp.



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

marco.tarenghi@libero.it
In my opinion the best term is NPV and not PV. I agree with John considerations, but the NPV term is much more general since it actually applies either to instruments having only positive cashflows (for example bonds) either to swaps and other much more complicated instruments having cashflows with different sign. So the word Net is easily understandable. Also the yield is the rate of return for which a given price is coherent with the stream of cashflows: here no kind of present value has to be considered, also because the price is the value of the bond at its settlement date (which is not necessarily today), so it is not the Present Value.
Hence, since NPV is a method of the general object Instrument, I think it is better to keep it with the N.

I don't want to be tedious but I'm also saying these things since it happened to me that I had to change my code (based on QuantLib) following some trivial change in Quantlib itself like the change of a name. This is quite annoying, besides being dangerous given the risk of forgetting to change something. I think that among different versions, the names should remain the same, unless their action change.

Sorry if I have been too long
Bye
Marco



---------- Initial Header -----------

>From      : [hidden email]
To          : "John McMahon" [hidden email]
Cc          : [hidden email]
Date      : Fri, 15 Jun 2007 11:44:34 +0200
Subject : Re: [Quantlib-users] Q: Instrument::NPV() : is this really thepresent value?







> On Thu, 2007-06-07 at 17:57 +0100, John McMahon wrote:
> > following an offline conversation with a few of you:
> > i think npv is a corporate finance term where the meaning of net is 'net of
> > cost of acquisition' (net of a market price), pre-dating 'complex' cashflows
> > like swaps
> > present value itself ought to be a strong enough concept to include
> > aggregates of positive and negative cashflows (ie apply to swap sides).
> > ---
> > eg in a bond, you can PV its coupons+principal; if you have its market
> > price, you could also, separately NPV it.
> > In this context, yield is the internal rate of return which makes NPV==0.
>
> John,
> you're right---PV seems more general. We could rename the method in
> future releases. Thoughts anyone?
>
> Luigi
>
>
> ----------------------------------------
>
> Greenspun's Tenth Rule of Programming:
> Any sufficiently complicated C or Fortran program contains an
> ad-hoc, informally-specified bug-ridden slow implementation of
> half of Common Lisp.
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

Ferdinando M. Ametrano-3
Hi Marco

> I don't want to be tedious but I'm also saying these things since it happened to me that I
> had to change my code (based on QuantLib) following some trivial change in Quantlib
> itself like the change of a name. This is quite annoying, besides being dangerous [...]

in all but the last release we have always been backward compatible,
that is the library was backward compatible and the user was suggested
to recompile it with QL_DISABLE_DEPRECATED defined, so to check in
time what features/names changed in release x before they actually
disappear from the release x+1

maybe this was not clear enough.

This said I'm sorry, but since being backward compatible is such a
burden we dropped it until 1.0 is released.

ciao -- Nando

PS if you contribute your code with test cases the dev team will take
care of its maintenance ;-)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

marco.tarenghi@libero.it
Hi Nando,
I know what you are saying but compatibility is preserved only between two following versions, I should anyway change my code for future versions.
For example: you renamed the SimlpeSwap as VanillaSwap and this required me a lot of work...
I understand that sometimes names could change, but I would avoid doing it unless it is really meaningful...

---------- Initial Header -----------

>From      : [hidden email]
To          : "[hidden email]" [hidden email]
Cc          : "quantlib-users" [hidden email]
Date      : Fri, 15 Jun 2007 12:20:36 +0200
Subject : Re: [Quantlib-users] Q: Instrument::NPV() : is this really thepresent value?







> Hi Marco
>
> > I don't want to be tedious but I'm also saying these things since it happened to me that I
> > had to change my code (based on QuantLib) following some trivial change in Quantlib
> > itself like the change of a name. This is quite annoying, besides being dangerous [...]
>
> in all but the last release we have always been backward compatible,
> that is the library was backward compatible and the user was suggested
> to recompile it with QL_DISABLE_DEPRECATED defined, so to check in
> time what features/names changed in release x before they actually
> disappear from the release x+1
>
> maybe this was not clear enough.
>
> This said I'm sorry, but since being backward compatible is such a
> burden we dropped it until 1.0 is released.
>
> ciao -- Nando
>
> PS if you contribute your code with test cases the dev team will take
> care of its maintenance ;-)
>


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

John McMahon-2
In reply to this post by marco.tarenghi@libero.it
Afternoon Marco, You make several points:
1. NPV is more general than PV
2. Net in this context is more easily understandable
3. present value isn't considered in caclulating yield/IRR
4. PV isn't appropriate since the discounting-to day isn't necessarily today
(and by implication 'Present' implies 'today').
5. The proposed change is backwards-incompatible.

On these points I think:
1.  technically NPV is more specific than PV.  Though I can think of two
usages where NPV is the term in common use: FpML and Excel.
2. Net in this context is less understandable, since it implies positive and
negative cashflows are being netted, but often there won't be negative CFs
3. The present value of bond cashflows is indeed used in calculating the
yield/IRR of a bond.
4. The current method name, NPV, also has the concept of 'present' in it so
this cannot be used to help determine which choice is best
5. I suspect the guys at Microsoft Excel came to a similar point when they
found out that their =NPV() was actually a PV.  Rather than break all the
world's excel spreadsheets, they decided to leave it in.  Is quantlib at a
similar point?

I wonder why FpML uses NPV.

John

<[hidden email]> wrote in message
news:JJO9JU$[hidden email]...
In my opinion the best term is NPV and not PV. I agree with John
considerations, but the NPV term is much more general since it actually
applies either to instruments having only positive cashflows (for example
bonds) either to swaps and other much more complicated instruments having
cashflows with different sign. So the word Net is easily understandable.
Also the yield is the rate of return for which a given price is coherent
with the stream of cashflows: here no kind of present value has to be
considered, also because the price is the value of the bond at its
settlement date (which is not necessarily today), so it is not the Present
Value.
Hence, since NPV is a method of the general object Instrument, I think it is
better to keep it with the N.

I don't want to be tedious but I'm also saying these things since it
happened to me that I had to change my code (based on QuantLib) following
some trivial change in Quantlib itself like the change of a name. This is
quite annoying, besides being dangerous given the risk of forgetting to
change something. I think that among different versions, the names should
remain the same, unless their action change.

Sorry if I have been too long
Bye
Marco



---------- Initial Header -----------

>From      : [hidden email]
To          : "John McMahon" [hidden email]
Cc          : [hidden email]
Date      : Fri, 15 Jun 2007 11:44:34 +0200
Subject : Re: [Quantlib-users] Q: Instrument::NPV() : is this really
thepresent value?







> On Thu, 2007-06-07 at 17:57 +0100, John McMahon wrote:
> > following an offline conversation with a few of you:
> > i think npv is a corporate finance term where the meaning of net is 'net
> > of
> > cost of acquisition' (net of a market price), pre-dating 'complex'
> > cashflows
> > like swaps
> > present value itself ought to be a strong enough concept to include
> > aggregates of positive and negative cashflows (ie apply to swap sides).
> > ---
> > eg in a bond, you can PV its coupons+principal; if you have its market
> > price, you could also, separately NPV it.
> > In this context, yield is the internal rate of return which makes
> > NPV==0.
>
> John,
> you're right---PV seems more general. We could rename the method in
> future releases. Thoughts anyone?
>
> Luigi
>
>
> ----------------------------------------
>
> Greenspun's Tenth Rule of Programming:
> Any sufficiently complicated C or Fortran program contains an
> ad-hoc, informally-specified bug-ridden slow implementation of
> half of Common Lisp.
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-modeT di Wind
http://i-mode.wind.it/



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/ 




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

Ferdinando M. Ametrano-3
Hi John

On 6/15/07, John McMahon <[hidden email]> wrote:
> I wonder why FpML uses NPV.

hope it doesn't sound rude, but I would keep NPV even for just that
reason alone.

Actually it's months now I have on my to do list to adopt FpML
terminology in variable names and, God forbids me ;-), function/class
names

ciao -- Nando

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this reallythepresent value?

John McMahon-2
Hi, FpML 4.3 is a big document.  I see some reference in the text describing
cashflows as being NPV'ed, but I don't see 'NPV' used in, eg the schema for
interest rate derivatives or return swaps.  For equity derivatives, the
terms equityValuation and valuationTime are used.  Perhaps their use of NPV
in descriptive parts of the text shouldn't be given weight  - after all, it
is the schemas which count.

If there are any FpML experts out there, now's the time to contribute.

Nando, given that there's a quantlib task outstanding to convert
variable/methods to more FpML compliant ones, I guess you could postpone any
consideration of a change until then.

John

"Ferdinando Ametrano" <[hidden email]> wrote in message
news:[hidden email]...

> Hi John
>
> On 6/15/07, John McMahon <[hidden email]> wrote:
>> I wonder why FpML uses NPV.
>
> hope it doesn't sound rude, but I would keep NPV even for just that
> reason alone.
>
> Actually it's months now I have on my to do list to adopt FpML
> terminology in variable names and, God forbids me ;-), function/class
> names
>
> ciao -- Nando
>




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Q: Instrument::NPV() : is this really thepresent value?

Luigi Ballabio
In reply to this post by marco.tarenghi@libero.it

On Jun 15, 2007, at 12:34 PM, [hidden email] wrote:
> Hi Nando,
> I know what you are saying but compatibility is preserved only between
> two following versions, I should anyway change my code for future
> versions.
> For example: you renamed the SimlpeSwap as VanillaSwap and this
> required me a lot of work...
> I understand that sometimes names could change, but I would avoid
> doing it unless it is really meaningful...

Marco,
        I feel your pain---we too have a substantial amount of code based on
QuantLib and had to go through the changes. Bear with us until next
release (namely, 0.9.0). It will be almost a beta of 1.0, so things
shouldn't change between those two release; and once something is in
1.0, I'll try and make sure that it stays in all 1.x releases.

Later,
        Luigi



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users