*! version 1 feb2013
help pvvar

Title

pvvar -- Returns the present value of a series of payments (cash flows)

Syntax

pvvar
varname1 varname2
[, options ]

Options
due(#) When payments are due or made: 0 = end of period (default), or 1 = beginning of period

generate(string) Set the new variable's name.

Description

pvvar Returns the present value of a series of payments (based on a compounded interest rate).
The cash flows must occur at regular intervals and match the corresponding periodic discount rate.
pvvar generates a new variable containing the entire schedule of discounted cash flows.

Options

due(#) When payments are due or made: 0 = end of period (default), or 1 = beginning of period.

generate(string) Set the middle part of new variable's name, default is d.
The new varname is composed as follows: varname1 + _d + value of due option.

Definitions

pvvar uses the following conventions:

¤ Periodic cash flows must be placed in varname1.

¤ Periodic discount rate must be placed in varname2. Enter as a decimal fraction (so should be greater than 0 and smaller than 1).

Input Arguments

The first entry in each varname should be the initial period's value.

Example

Find the (end of period) present value of the following yearly cash flows.

. list year cash_flow disc_rate if year<=5, sep(0) noobs

+
+
| year cash_flow disc_rate |
+
+
| 1 $ 10,000 0.15 |
| 2 $ 20,000 0.10 |
| 3 $ 30,000 0.12 |
| 4 $ 40,000 0.14 |
| 5 $ 50,000 0.15 |
+
+

. pvvar cash_flow disc_rate
Present Value = 95120.032
Note: New variable's name is cash_flow_d0

Examples

. pvvar var1 var2, due(1)

. pvvar var1 var2, due(1) gen(disc)

Saved results

Scalars

r(due) due value

r(PV) Present value of cash flows

Author

Maximo Sangiacomo
Email: msangia@hotmail.com