Bonds and Related Issues kicheon changyahoo co kr
Bonds and Related Issues kicheon. chang@yahoo. co. kr 1
Contents Topics Contents Numerical Method 보간법 행렬연산 Simulation Solver/Optimization Bond Price/Duration/Convexity Immunization Finding YTM Term structure 이론 Bootstrapping Fitting the yield curve Bond Futures 채권선도(FRA) 국고채선물 이론가 계산 2
Preface • “Theory Excel VBA” Type – Memorize it in your hand rather than in your head!! • Engineering Approach – 수학적 엄밀성보다는 직관적 이해 – (ex) • A bird in the hand is worth two in the bush – Do not hesitate to raise your hand whenever questionable – Use the break time, e-mail etc. . • Two way vs One way 3
Numerical Methods 4
Numerical Method & Finance 5
Numerical Method/Simultaneous equations • Why simultaneous equations? – (ex) (Polynomial, Spline) Interpolation, Finite Difference Method, Bootstrapping… • How to do? 6
Numerical Method/Cholesky Decomposition • Why? – We know – What is • How? • Where(application)? – Generating correlated random variables 7
Numerical Method/Linear Interpolation Linear interpolation Log interpolation Exponential interpolation 8
note 9
Numerical Method/ Polynomial interpolation N+1 equations N+1 unknowns 10
Numerical Method/Polynomial Interpolation Example 11
Numerical Method/ Polynomial interpolation Base function(0) Base function(1) Lagrange polynomial interpolation 12
Numerical Method/ Polynomial interpolation Lagrange polynomial interpolation 13
Numerical Method/Polynomial interpolation the problem 14
Numerical Method/Spline interpolation 15
Numerical Method/spline interpolation 2차 스플라인 보간법 3차 스플라인 보간법 16
Numerical Method/2 D interpolation 17
Numerical Method/Optimization: Solver 18
Numerical Method/Bisection method 19
Numerical Method/Newton method Algorithm 20
Caution! • There is no panacea! – Try possible Initial values – 함수의 전반적 형태파악 • 단조증가/감소함소 21
Numerical Method/Simulation/ Uniform Random Variable RND 22
Numerical Method/Simulation/Uniform RV Examples Calculating PI 23
Numerical Method/Simulation/ Transforming RV • 12 난수법 – – Definition: Why 12 RVs? Central Limit Theorem: Does CLT really work? FREQUENCY(samples, 구간) 24
Numerical Method/Simulation/ Transforming RV • Transform method – Idea – Functions: Norm. SDist(x), Norm. SInv(p) – test Transform 25
Multi-variable case • From uncorrelated RVs to correlated RVs 26
Bonds 27
Bonds/Market 자료: www. ksdabond. or. kr 29
Bonds/Market 자료: www. ksdabond. or. kr 30
Bond/price 31
Bond/Price Example 32
Bonds/Terminology • Conventional price • Theoretical price • Dirty price – Cash price – Invoice price • Clean price – Quoted price 34
Bonds/Day count convention 36
Bonds/User Defined Function Test Numbers 37
Bonds/Duration • History of bond sensitivity – Maturity – CF Weighted Average Term to Maturity – PV Weighted Average Term to Maturity • Meaning of Macauley Duration – Investment Horizon → Immunization – Sensitivity → Modified Duration 38
Bonds/Modified Duration • What we want to know is… – What if the yield moves up 1%p? • Mac. Duration does not give the answer • Modified Duration 39
Bonds/Convexity • If we hedged the bond’s duration, then what happens to the value of our portfolio when yield moves? • Convexity – 듀레이션 헤지된 포트폴리오의 손익변화 측정에 사용 – See the Taylor Expansion 40
Bonds/Numerical Convexity Difference approximation 41
note (Excel 2007에서는 위 설정없이 “Application. price”로 사용가능) 42
Bonds/Taylor Expansion • We want to decompose(analyse) any function to “polynomial functions” • How to find the coefficients – Above equation should hold when x=0 – Differentiating and inputting x=0 still hold equality – and so on 43
Bonds/Summary 45
Bonds/Summary 46
Bonds/Immunization Request Alternatives 47
Bond/Immunization Example Scenario Analysis Check “Macauley duration” 48
Bond/Finding YTM(1) • Why numerical method? • Bisection Method 49
Bond/Finding YTM VBA code 50
Bond/Finding YTM(2) yield 51
Term structure of Interest rates 52
TS/Terminology • Zero rate – Definition: • Par yield – Definition: such that • Forward rate(Implied forward rate, Forward rate agreement) – see FRA for pricing – Relationship between spot rate and forward rate • Discount factor – _ 53
Term structure of interest rates 54
Term structure of interest rates • Which one? (in terms of modeling yield curve) – Yield of zero coupon bond is not enough – Zero price • Cubic functions – Forward rate • Nelson-Seigel function 55
Term Structure of Interest rates 56
TS/Why yields differ? 57
TS/Issues • Finding the current term structure of interest rates – Fitting Yield Curve – To price illiquid bonds • Estimating the future term structure of interest rates – Economics/Econometrics – To trade bonds • Modeling the future term structure of interest rates – Finance – To price Fixed Income Derivatives 58
Finding Yield Curve • Bootstrapping and Interpolation – 다양한 만기의 이자율 상품의 가격이 고시되는 경우 – Interest Rate Swap Market • Functional Approach – Function types • Cubic function • Piece-wise cubic function • Nelson-Seigel function 59
TS/Bootstrapping 60
TS/Bootstrapping Example 행렬을 이용하는 방법 61
TS/Bootstrapping More considerations Available prices Bootstrapping formula 62
TS/Bootstrapping/more consideration Example 63
TS/Bootstrapping/more consideration Example 64
TS/Bootstrapping/summary 65
TS/Fitting the yield curve 66
TS/Functional Forms 67
Polynomial Model/Cubic Function • Yield curve function – Model: – No Arbitrage condition • Bond price • Find coefficients 68
Polynomial Model/Cubic Function/ Data 자료: Bloomberg 69
Polynomial Model/Cubic Function Example Function cubic. F(t, b 0, b 1, b 2, b 3) cubic. F = b 0 + b 1 * t + b 2 * t ^ 2 + b 3 * t ^ 3 End Function 70
Spline: Piece-wise polynomial • More freedom More accurate one Zero price • Bond price T • Continuity Condition+1 st & 2 nd differential condition • Find coefficients 71
Polynomial Model/Nelson-Siegel Instantaneous forward rate discount factor 72
note 73
Polynomial Model/Nelson-Seigel Example 74
Polynomial Model/Nelson-Seigel Example Function df_Nelson. Seigel(a_, b_, c_, alpha, t) Dim A As Double, B As Double, C As Double A = AA(b_, c_, alpha) B = BB(a_) C = CC(c_, alpha) df_Nelson. Seigel = Exp(-A - B * t - (A + C * t) * Exp(-alpha * t)) End Function AA(b_, c_, alpha) AA = b_ / alpha + c_ / (alpha * alpha) End Function BB(a_) BB = a_ End Function CC(c_, alpha) CC = c_ / alpha End Function 75
Graphs: polynomial vs Nelson-Seigel 76
Bond Futures/Forward 77
Bond Futures/주식선도 78
Bond Futures/이자율 선도(FRA) 79
Bond Futures/UDF 82
KTB Futures/Market 83
KTB Futures Check 84
KTB Futures/Market 85
KTB Futures/이론가 계산 87
KTB Futures/functions 88
KTB Futures/functions 89
KTB Futures Example 90
Note: Excel functions DSC=coupdaysnc 기준일부터 다음 이자지급일까지의 날수 E=coupdays A=coupdaybs N=coupnum 91
bonus • Convexity adjustment 92
Thank you! 94
- Slides: 94