Slides

advertisement
Compounding
複利
張智星 (Roge Jang)
jang@mirlab.org
http://mirlab.org/jang
台大資工系 多媒體檢索實驗室
Scientific Computing: Compounding
The Euler’s Number

Euler’s number:
n
1 1 1 1 1
 1
e  lim 1    lim      
n 
 n  n n 0 n ! 0! 1! 2! 3!
 2.71828182845904523536

Proof by binomial theorem (二項式定理):
 x  y
n
n
 C x
k 0
 x  nx
n
n 1
y
n
k
nk
n
n!
y 
x n k y k
k 0 ( n  k )! k !
k
n  n  1
2
x
n 2
y 
2
n  n  1 n  2 
6

 yn
Scientific Computing: Compounding
Compounding (複利)

故事



國王和棋盤
為什麼領18%是老賊?
Credit cards (Annual interest rate: 2.74%~20%)


George & Mary現金卡廣告
2006年,台灣有70萬人淪為卡奴,平均欠款數100萬新
台幣… (source)


20K payment per month, 4 years to clear the debt  Wrong!
It takes 8 years to clear it!
10K payment per month, 8 years to clear the debt Wrong!
You cannot even catch the interests!
Scientific Computing: Compounding
Basic Formula for Compounding
Basic formula

f

Example
n


 p 1 r


p  present value (principal)
f  final value
r  interestrateper t imeperiod
n  no.of timeperiods
1 r
p
1 r
p1  r 
1

Initial investment: 1000
Annual interest: 3%
No. of periods: 20 years
f  1000* 1  3 / 100
 1806.11
20
1 r
p1  r 
2
p1  r 
3
p1  r 
n
Scientific Computing: Compounding
Periodic Compounding

Periodic compounding

Formula:

Example


 r
f  p1  
 n
tn
Monthly compounding
 3% 
f  1000* 1 

 12 
Daily compounding
20*12
 3% 
f  1000* 1 

 365
 1820.75
20*365
 1822.07
Scientific Computing: Compounding
Continuous Compounding

Continuous compounding

Formula:
 
1 
 r

f  p * lim1    p lim1 


n
n


 n
  n/r 
tn

Example:
f  1000* e20*3%  1822.12
n/r
rt

  pert


Scientific Computing: Compounding
Comparison

Effect of compounding at various frequencies, with an initial
investment of 1000 and 20% annual interest. (source)
Scientific Computing: Compounding
Rule of 70

Goal


A quick method to
estimate the doubling
time of an investment

Rule of 72
Rule of 69
Reference

Wiki
Formula

T*r=70


Also known as




T=doubling time in year
r=annual interest rate
(%)
Example:




r=1%  T=70
R=3%  T=23.3
r=18%  T=3.9
R=20%  T=3.5
Scientific Computing: Compounding
How to Derive the Rule of 70

3 Ways of compounding to derive the rule

Formulas:
Yearlycompounding : f / p  2  1  r   T1 
T
ln2
ln2 0.6931 0.7



ln1  r 
r
r
r
ln2 / 12
ln2 / 12 0.6931 0.7



ln1  r / 12
r / 12
r
r
ln2 0.6931 0.7
Continuouscompounding : f / p  2  e rT  T3 


r
r
r
12T
r 

Monthlycompounding : f / p  2  1  
 12 

 T2 
Examples:
T1  23.45 70/3  23.33

r  3%  T2  23.13 70/3  23.33
T  23.10 70/3  23.33
 3
Quiz : Prove that lim ln1  r   r.
r 0
Scientific Computing: Compounding
Time Value of Money

Time value of money


The value of money usually increases with time
(if invested properly).
數線圖(現金流量表)

在時間軸上秀出收入及支出,並以期末(或期初
)總值來判斷投資是否划算
當期收入
當期支出
f1 期末總收入
p
a1
a2
a3

f 2 期末總支出
Scientific Computing: Compounding
Mortgage Computation

Problem


銀行貸款100萬,20年還清,利率固定為3%,請
問每個月還款金額?
銀行傳統


利率  年利率
複利計算方式  以「月」為單位來計算複利
Time period is “month”
r is “monthly interest”
Scientific Computing: Compounding
Types of Mortgage Payment

Typical types of mortgage computation
(source)



本息平均攤還法
本金平均攤還法
Examples



Payment derivation
Comparison
Spread sheet
Scientific Computing: Compounding
本息平均攤還:月付額 (1/2)

現金流量圖
f1
p
x
x
x
x

f2

Formula
 f1  p1  r 12*20

240


1 r  1
2
239
 f 2  x  x1  r   x1  r     x1  r   x
r
pr1  r 
f1  f 2  x 
1  r 240  1
240
Scientific Computing: Compounding
本息平均攤還:月付額 (2/2)

現金流量圖
p
x

Formula
x
x
Let bi be the totalunpaid amountat periodi. T hen
b0  p
b1  p1  r   x
b2   p1  r   x 1  r   x

 bi  bi 1 1  r   x, with b0  p.

Quiz

(a) Find theclose- formsolutionof bi .
(b) Set bn  0 to find the valueof x.
本息平均攤還:
本金及利息每期分攤
Scientific Computing: Compounding

現金流量圖
p
x

x
x

本金及利息每期分攤
Let x  pi  qi , where pi is theprincipaland qi is theinterestreturned.T hen
q1  pr, p1  x  q1
q2   p  p1 r , p2  x  q2
q3   p  p1  p2 r , p3  x  q3

i 1


 qi   p   pk r , pi  x  qi
k 1



Quiz:
(a) Find therecurrentformulaof qi .
(b) Find theclose- formexpressionof qi .
Scientific Computing: Compounding
本金平均攤還法 (1/2)

現金流量圖
f1
p
a1
a2
a3
a1  p / n  pr
a2  p / n  ( p  p / n) r
a3  p / n  ( p  2 p / n)r

 i 1 
ai  p / n  p1 
r
n 


ai
f2
Quiz :
 f1  p1  r n

n
 How to prove f1  f 2 ?

n i
 f 2   ai 1  r 
i 1

Hints:

S0   1  r   1  1  r 
i
n
/ r
S1   i1  r   1  r S 0 / r  n1  r  / r
i
n
Scientific Computing: Compounding
本金平均攤還法 (2/2)

現金流量圖
f1
p
a1
a2
a3

ai
Let ai  pi  qi be theperiodicpayment,
where pi and qi are principaland interestcomponents
, respectively.T hen:
p1  p2    pn  p / n
q1  pr
q2   p  p / n r
q3   p  2 p / n r

qi   p  i  1 p / n r
f2
Scientific Computing: Compounding
Hints

You can use the following 2 functions (in the
utility toolbox) to compute loan and saving:

loan.m


年利率3%
Monthly payment  x=loan(p, 3/100, 20)
saving.m


為期20年
Present value  p=saving(x, 3/100, 20, ‘initial’);
Final value  f=saving(x, 3/100, 20, ‘final’);
p
f
x
x
x

Moreover, self demo of the functions…
Scientific Computing: Compounding
Rule of 200

p/x vs. r

Plot of p/x vs. r
240
r 
(1  r /12) 240  1

p * 1  
x
12
r /12


p
(1  r /12) 240  1
1  (1  r /12) 240
 

x  r /12  (1  r /12) 240
r /12
12*20
230
220
210
200
p/x
 r=2.0%, p/x=197.67
190
 r=2.5%, p/x=188.71
 r=3.0%, p/x=180.31
180
170
160
150
0
0.5
1
1.5
2
2.5
3
3.5
Annual interest rate r (%)
4
4.5
社會新鮮人的困惑:
Monthly income=22k  Mortgage = 7k (= 1/3 of income)
台北市哪裡去找140萬的房子?
5
Scientific Computing: Compounding
References

References


Wiki: Time value of money
Wiki: Compound interest
Download