Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-03 |
|
|
View PDF |
The NPV function computes the net present value of a series of cash flow values.
Return Value
DECIMAL
The result returned by the NPV function is dimensioned by all the dimensions of cashflows except its time dimension. When cashflows is dimensioned only by the time dimension, NPV returns a single value.
Syntax
NPV(cashflows, discount-rate, [time-dimension])
Arguments
A numeric expression that is dimensioned by time-dimension and specifies the series of cash flow values.
Note:
All cash flows are assumed to occur at the beginning of the time period with which they are associated. The cash flows are discounted back to the beginning of the earliest time period that appears in the current status of the time dimension. NPV ignores cash flows that corresponds to out-of-status dimension positions.A numeric expression that specifies the interest rate for each period to be used to discount the cash flow values. It can either be a single value or an array of values with one or more non-time dimensions. You should express the discount rate as a decimal quantity; for example, 8.25 percent as .0825
.
NPV accepts any positive discount rate, and it also accepts a negative discount rate when the rate is greater than minus one (that is, rate >
-1
). When you supply a negative rate, you must precede it with a comma.
A name that specifies the time dimension. When cashflows has a dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR, NPV will automatically use that dimension, and you can omit the time-dimension argument.
Notes
NA Discount Rate
When the discount rate used to compute a result value is equal to NA
, then that result value is NA
.
Cash Flow Timing
Different assumptions about the intra-period timing of the cash flows, or the base time point for the present value calculations, can be accommodated by multiplying the result of the NPV function by the following quantity: one plus the discount rate, raised to an appropriate positive or negative power.
Examples
Example 20-32 Computing the Net Present Value
The following statements create a dimension called project
, add values to it, and create a variable called cflow
, which is dimensioned by year
and project
.
DEFINE project DIMENSION TEXT MAINTAIN project ADD 'a' 'b' 'c' 'd' 'e' DEFINE cflow VARIABLE DECIMAL <project year>
When you assign the following values to CFLOW,
------------------------CFLOW---------------------- -----------------------PROJECT--------------------- YEAR a b c d e ------------ ---------- ---------- ---------- ---------- ------- Yr95 -200.00 -200.00 -300.00 -100.00 -200.00 Yr96 100.00 150.00 200.00 25.00 25.00 Yr97 100.00 400.00 200.00 100.00 200.00
then the following statement
REPORT NPV(cflow, .08, year)
uses a discount rate of 8 percent to create the following report of the net present value of the cflow
data.
NPV(CFLOW, PROJECT .08, YEAR) -------------- ---------- a -21.67 b 281.82 c 56.65 d 8.88 e -5.38