
252 Appendix E: Formulas Used
File name: hp 12c pt_user's guide_English_HDPMF123E27 Page: 252 of 275
Printed Date: 2005/8/1
Dimension: 14.8 cm x 21 cm
Discounted Cash Flow Analysis
Net Present Value
NPV
= net present value of a discounted cash flow.
CF
j
= cash flow at period
j
.
n
n
i
CF
i
CF
i
CF
CF
NPV
)
1
(
...
)
1
(
)
1
(
2
2
1
1
0
+
+
+
+
+
+
+
=
Internal Rate of Return
n
= number of cash flows
CF
j
= cash flow at period
j
.
IRR
= Internal Rate of Return
0
1
)
1
(
)
1
(
1
0
CF
IRR
IRR
IRR
CF
j
q
j
nq
k
j
n
j
+
⎥
⎦
⎤
⎢
⎣
⎡
+
⋅
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
+
−
⋅
=
∑
−
=
−
<
∑
Calendar
Actual Day Basis
∆
DYS = f(
DT
2
) – f(
DT
1
)
where
f(
DT
) = 365 (
yyyy
) + 31 (
mm
– 1) +
dd
+ INTG (
z
/4) –
x
and
for
mm
≤
2
x
= 0
z
= (
yyyy
) – 1
for
mm
> 2
x
= INTG (0.4
mm
+ 2.3)
z
= (
yyyy
)
INTG = Integer portion.
Note:
Additional tests are performed in order to ensure that the century (but
not millennium) years are not considered leap years.
30/360 Day Basis
DAYS
= f(
DT
2
) – f(
DT
1
)
f(
DT
) = 360 (
yyyy
) + 30
mm
+
z
for f(
DT
1
)
if
dd
1
= 31 then
z
= 30
if
dd
1
≠
31 then
z
=
dd
1
for f(
DT
2
)
if
dd
2
= 31 and
dd
1
= 30 or 31 then
z
= 30
if
dd
2
= 31 and
dd
1
< 30 then
z
=
dd
2
if
dd
2
< 31 then
z
=
dd
2