Finanicial mathematics (do questions 1 & 4 only) knowledge of python

Anonymous
timer Asked: Apr 5th, 2018
account_balance_wallet $20

Question description

Download Python 2.7, please try the following:-

https://www.anaconda.com/download/ For those who are on Mac, Python is already preinstalled. Please google to get more details.

Instructions

Please print screen and paste the answers in excel. Send me the python file if possible.

Just need to attempt question 1 and 4 only. (Qns is in file FIN main Tma01)

Extra material is attached.


FIN201 FINANCIAL MATHEMATICS STUDY GUIDE (5CU) Course Development Team Head of Programme : Dr Ding Ding Course Developer(s) : Dr Tan Chong Hui Production : Educational Technology & Production Team © 2017 Singapore University of Social Sciences. All rights reserved. No part of this material may be reproduced in any form or by any means without permission in writing from the Educational Technology & Production, Singapore University of Social Sciences. Educational Technology & Production Singapore University of Social Sciences 461 Clementi Road Singapore 599491 Release V2.3 CONTENTS COURSE GUIDE 1. Welcome .............................................................................................................1 2. Course Description and Aims .........................................................................1 3. Learning Outcomes .......................................................................................... 3 4. Learning Material ............................................................................................. 4 5. Assessment Overview ...................................................................................... 5 6. Course Schedule ................................................................................................ 6 7. Learning Mode ..................................................................................................7 STUDY UNIT 1 TIME VALUE OF MONEY Learning Outcomes ......................................................................................... SU1-1 Chapter 1 Concept: Interest Rates ................................................................. SU1-2 Chapter 2 Concept: Time Value of Money ................................................... SU1-8 Chapter 3 Calculation .................................................................................... SU1-13 Quiz .................................................................................................................. SU1-20 Solutions or Suggested Answers ................................................................. SU1-22 STUDY UNIT 2 STATISTICS AND NUMERICAL METHODS WITH EXCEL AND PYTHON Learning Outcomes ......................................................................................... SU2-1 Chapter 1 Basics of Statistics .......................................................................... SU2-2 Chapter 2 Basics of Numerical Methods .................................................... SU2-20 Chapter 3 Using Excel ................................................................................... SU2-23 Chapter 4 Using Python ................................................................................ SU2-32 Quiz .................................................................................................................. SU2-45 Solutions or Suggested Answers ................................................................. SU2-47 STUDY UNIT 3 EQUITIES Learning Outcomes ......................................................................................... SU3-1 Chapter 1 Market ............................................................................................. SU3-2 Chapter 2 Signals and Quotes ........................................................................ SU3-4 Chapter 3 Instruments..................................................................................... SU3-9 Chapter 4 Calculations .................................................................................. SU3-12 Chapter 5 Concept: The Capital Asset Pricing Model .............................. SU3-16 Chapter 6 Analyses and Strategies .............................................................. SU3-19 Quiz .................................................................................................................. SU3-21 Solutions or Suggested Answers ................................................................. SU3-23 STUDY UNIT 4 FIXED INCOME Learning Outcomes ......................................................................................... SU4-1 Chapter 1 Market ............................................................................................. SU4-2 Chapter 2 Signals and Quotes ........................................................................ SU4-4 Chapter 3 Instruments................................................................................... SU4-10 Chapter 4 Calculations .................................................................................. SU4-17 Quiz .................................................................................................................. SU4-51 Solutions or Suggested Answers ................................................................. SU4-53 STUDY UNIT 5 FOREIGN EXCHANGE Learning Outcomes ......................................................................................... SU5-1 Chapter 1 Market ............................................................................................. SU5-2 Chapter 2 Signals and Quotes ........................................................................ SU5-4 Chapter 3 Interest Rate Parity ...................................................................... SU5-12 Chapter 4 Instruments................................................................................... SU5-15 Chapter 5 Calculations .................................................................................. SU5-21 Chapter 6 Analyses and Strategies .............................................................. SU5-26 Quiz .................................................................................................................. SU5-27 Solutions or Suggested Answers ................................................................. SU5-29 STUDY UNIT 6 OPTIONS Learning Outcomes ......................................................................................... SU6-1 Chapter 1 Market ............................................................................................. SU6-2 Chapter 2 Signals and Quotes ........................................................................ SU6-5 Chapter 3 Instruments..................................................................................... SU6-7 Chapter 4 Concept: Market Price vs Theoretical Price ............................. SU6-10 Chapter 5 Calculations .................................................................................. SU6-14 Chapter 6 Analyses and Strategies .............................................................. SU6-22 Quiz .................................................................................................................. SU6-26 Solutions or Suggested Answers ................................................................. SU6-28 COURSE GUIDE FIN201 COURSE GUIDE 1. Welcome (Access video via iStudyGuide) Welcome to the course FIN201 Financial Mathematics, a 5 credit unit (CU) course. This Study Guide will be your personal learning resource to take you through the course learning journey. The guide is divided into two main sections – the Course Guide and Study Units. The Course Guide describes the structure for the entire course and provides you with an overview of the Study Units. It serves as a roadmap of the different learning components within the course. This Course Guide contains important information regarding the course learning outcomes, learning materials and resources, assessment breakdown and additional course information. 2. Course Description and Aims The study of finance requires the understanding of fundamental financial concepts as well as the proficiency in applying basic mathematics to these concepts with the aid of robust computational tools. FIN201 Financial Mathematics is designed to equip students with the ability to understand the real-world issues and the proficiency to calculate with a full range of products in the world of finance. Software tools used for the course include a computational platform for statistics (e.g. Python) and spreadsheet software (e.g. Excel). Course Structure This course is a 5-credit unit course presented over 6 weeks. There are six Study Units in this course. The following provides an overview of each Study Unit. 1 FIN201 COURSE GUIDE Study Unit 1 – The Time Value of Money This unit helps you understand the concept of the time value of money. Study Unit 2 – Statistics and Computing with Python and Excel This unit helps you to recall some statistical concepts essential to finance and introduces Python and Excel as computing platform for the course. Study Unit 3 - Equities The unit covers the basic mathematics and computations that you will encounter in equities. Study Unit 4 – Fixed Income The unit covers the basic mathematics and computations that you will encounter in fixed income. Study Unit 5 – Foreign Exchange The unit covers the basic mathematics and computations that you will encounter in foreign exchange. Study Unit 6 - Options The unit covers the basic mathematics and computations that you will encounter in options. 2 FIN201 COURSE GUIDE 3. Learning Outcomes Knowledge & Understanding (Theory Component) By the end of this course, you should be able to:  Compute present value (PV), future value (FV), compounding, discounting or other associated notions  Apply the methods of statistical inference in reasoning about data  Compare between the various fixed income instruments and their quantitative representations  Calculate prices or other quantitative information related to fixed income market instruments  Calculate various types of interest rates (e.g. spot, forward) from the term structure  Explain the various foreign exchange instruments and their quantitative representations  Calculate prices or other quantitative information related to foreign exchange market instruments  Discuss the various equity instruments and their quantitative representations  Calculate prices or other quantitative information related to equity market instruments Key Skills (Practical Component) By the end of this course, you should be able to:  Use a computing tool (e.g. Excel/Google Spreadsheets or Python) for financial calculations.  Use a financial information system (e.g. Reuters Eikon, or the Internet) for obtaining market data and information as well as harnessing well-documented API/library/models to make inferencing more expedient 3 FIN201 COURSE GUIDE 4. Learning Material The following is a list of the required learning materials to complete this course. Required Textbook(s) Steiner, B. (2007). Mastering financial calculations: A step-by-step guide to the mathematics of financial market instruments. Harlow, England: Financial Times Prentice Hall. Other recommended study material (Optional) The following learning materials may be required to complete the learning activities: Special Requirement (Optional) Any other requirement(s) needed for the course such as the use of lab equipment. Windows or Mac OS with Excel installed 4 FIN201 COURSE GUIDE 5. Assessment Overview The overall assessment weighting for this course for the Evening Cohort is as follows: Assessment Description Weight Allocation Assignment 1 Tutor-Marked Assignment / TMA 1 25% Assignment 2 Tutor-Marked Assignment / TMA 2 25% Examination Written examination 50 % TOTAL 100% The overall assessment weighting for this course for the Day-time Cohort is as follows: Assessment Description Weight Allocation Pre-Course Quiz 1 1% Pre-Course Quiz 2 1% Pre-Course Quiz 3 1% Pre-Course Quiz 4 1% Pre-Course Quiz 5 1% Pre-Course Quiz 6 1% Assignment 2 Tutor-Marked Assignment / TMA 17% Assignment 3 Class Test 17% Class Participation Class Participation 10% Examination Written Examination 50% Assignment 1 TOTAL 100% UniSIM’s assessment strategy consists of two components, Overall Continuous Assessment (OCAS) and Overall Examinable Component (OES) that make up the overall course assessment score. (a) OCAS: The sub-components are reflected in the tables above and are different for the day-time and evening cohort. The continuous assignments are compulsory and are non-substitutable. 5 FIN201 COURSE GUIDE (b) OES: The Examination is 100% of this component. To be sure of a pass result you need to achieve scores of 40% in each component. Your overall rank score is the weighted average of both components. Non-graded Learning Activities: Activities for the purpose of self-learning are present in each study unit. These learning activities are meant to enable you to assess your understanding and achievement of the learning outcomes. The type of activities can be in the form of Quiz, Review Questions, Application-Based Questions or similar. You are expected to complete the suggested activities either independently and/or in groups. 6. Course Schedule To help monitor your study progress, you should pay special attention to your Course Schedule. It contains study unit related activities including Assignments, Selfassessments, and Examinations. Please refer to the Course Timetable in the Student Portal for the updated Course Schedule. Note: You should always make it a point to check the Student Portal for any announcements and latest updates. 6 FIN201 COURSE GUIDE 7. Learning Mode The learning process for this course is structured along the following lines of learning: (a) Self-study guided by the study guide units. Independent study will require at least 3 hours per week. (b) Working on assignments, either individually or in groups. (c) Classroom Seminar sessions (3 hours each session, 6 sessions in total). iStudyGuide You may be viewing the iStudyGuide version, which is the mobile version of the Study Guide. The iStudyGuide is developed to enhance your learning experience with interactive learning activities and engaging multimedia. Depending on the reader you are using to view the iStudyGuide, you will be able to personalise your learning with digital bookmarks, note-taking and highlight sections of the guide. Interaction with Instructor and Fellow Students Although flexible learning – learning at your own pace, space and time – is a hallmark at SUSS, you are encouraged to engage your instructor and fellow students in online discussion forums. Sharing of ideas through meaningful debates will help broaden your learning and crystallise your thinking. Academic Integrity As a student of SUSS it is expected that you adhere to the academic standards stipulated in The Student Handbook, which contains important information regarding academic policies, academic integrity and course administration. It is necessary that you read and understand the information stipulated in the Student Handbook, prior to embarking on the course. 7 STUDY UNIT 1 TIME VALUE OF MONEY FIN201 STUDY UNIT 1 Learning Outcomes By the end of this unit, you should be able to: 1. Describe the significance of the time value of money. 2. Express present values and future values through the use of interest rates. 3. Give the value of the NPV from the IRR or vice versa. SU1-1 FIN201 STUDY UNIT 1 Chapter 1 Concept: Interest Rates In this unit, we will discuss one of the most fundamental facts in finance - that an amount of money now will be valued differently in the future. This is known as the time value of money. The reason for the fact can be traced to the existence of demand for idle cash in the financial environment. This means that if you are able to lend to the demand, you will be rewarded by means of interest when the loan is repaid. In a nutshell, the time value of money is a relationship between the present value and the future value of a cash flow expressed in terms of an interest rate. This and related notions will be explored here. 1.1 Simple and Compound Interest Our concern is with the value of a cash flow at different points in time. Its current value is called present value or PV. Its value in the future is called future value or FV. The interpretation is that an amount PV is loaned to someone who has immediate demand for it. To pay for immediacy, the lender receives an amount FV when the loan expires which is greater than PV. PV and FV are related by an equation: 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟), where 𝑟 is called the interest rate. Written this way, we understand that FV is obtained from PV by compounding forward at rate 𝑟. The diagrammatic representation of this relationship is a good way to visualise it: Figure 1.1 SU1-2 FIN201 STUDY UNIT 1 Alternately, we may write 𝑃𝑉 = 𝐹𝑉 , 1+𝑟 which says that 𝑃𝑉 may be obtained from FV by discounting backward at rate 𝑟. The diagrammatic representation of the relationship looks like this: Figure 1.2 Note that we have not distinguished the future by the actual amount of time that elapses. If we do, we will have to specify: 1. the current time, 𝑡 = 0 2. the future time, 𝑡 = 𝑇 Consequently, the duration of the period is 𝑇 − 0 = 𝑇 , and the corresponding relationships for PV and FV are: 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟𝑇) 𝑃𝑉 = 𝐹𝑉 1 + 𝑟𝑇 It is customary in finance to regard a duration of 1 year to be 1 unit of time. In this 𝐹𝑉 regard, the formulae 𝑃𝑉 = 1+𝑟 and 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟) concern PV and FV that are 1year apart. It is also customary to publish interest rate as annualised. What that means is that if I say the interest rate is 5%, then by default, it refers to the rate of interest growth for a period of 1 year. Sometimes, this fact may be emphasised by writing 5% p.a., where p.a. = per annum. SU1-3 FIN201 STUDY UNIT 1 When the interest rate 𝑟 is used this way to relate PV and FV, i.e. in order to obtain PV from FV or vice versa, one only needs to multiply or divide by a simple factor (1 + 𝑟𝑇), we say that 𝑟 is a simple rate. If there are more than 1 period over which interest accumulates, the notion of compound interest rate is applied. For instance, in the following diagram: Figure 1.3 PV is loaned at time 𝑡 = 0 ("now") until 𝑡 = 𝑇1. At 𝑇1 , interest is paid out. Then right away, both principal and interest are reinvested until 𝑡 = 𝑇2 . Thus, interest is compounded twice. Suppose this is done at the rate 𝑟. What that means is that the FV at time 𝑇2 is given by 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟𝑇1 ) × (1 + 𝑟(𝑇2 − 𝑇1 )) where the expression 𝑇2 − 𝑇1 is the length of the period between times 𝑇1 and 𝑇2 . If the compounding periods have equal lengths (say, all equal to 𝛿𝑡), i.e. 𝑇1 = 𝑇2 − 𝑇1 = 𝛿𝑡, then the above formula may be written as 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟𝛿𝑡)2 . Often in practice, the compounding occurs over a period of 1 year, so that twice-a-year 1 means "compound every 6 months". In this case, 𝛿𝑡 = 2 and 𝑟 𝐹𝑉 = 𝑃𝑉 × (1 + )2 . 2 Generally, if interest on a loan that is given for a year is to be compounded 𝑛 times a year at a (compound) interest rate of 𝑟, then 𝑟 𝐹𝑉 = 𝑃𝑉 × (1 + )𝑛 . 𝑛 SU1-4 FIN201 STUDY UNIT 1 In all these examples, 𝑟 is known as a compound interest rate for the way it is used to derive FV from PV. Example If $100 is deposited at 7% over 35 days, how much is obtained at the end of the period? We will use the formula 𝐹𝑉 = 𝑃𝑉(1 + 𝑟𝑇) to compute the answer. The interest rate 𝑟 = 7/100 is regarded to be annualised. The 35 35 length of time is the factor 𝑇. We will taken 𝑇 = 365, i.e. 35 days to be 365 of 1 year. Note that this is not always true, since 1 year can have 366 days. The way this fraction is computed is known as the day count convention. Unless it is specified otherwise, we will always select a simple day count convention, such as the one that is used here, called ACT/365. Thus, 𝐹𝑉 = 100 × (1 + 0.07 × 35 ) ≈ 100.67, 365 showing that the amount obtained at the end of the period is $100.67. 1.2 Nominal and Effective Rates If an interest rate is given to be 𝑟 (assumed annualised) and it is to be applied to a deposit over a period 𝑡 , the sum of principle plus interest obtained at the end of the period is given by 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟𝑡). The effective rate (aka equivalent annual rate) 𝑟𝑒𝑓𝑓 is defined by the following equation: (1 + 𝑟𝑒𝑓𝑓 )𝑡 = 1 + 𝑟𝑡. SU1-5 FIN201 STUDY UNIT 1 1 For example, if 𝑡 = 4 , i.e. the period is a quarter, then the effective rate is given by 𝑟 1 + 𝑟𝑒𝑓𝑓 = (1 + )4 . 4 Note that the RHS represents compounding 4 times, while the LHS represents compounding-forward by the simple rate 𝑟𝑒𝑓𝑓 . Relative to the effective rate, the rate 𝑟 is known as the nominal rate. Another way to describe this relationship is: a nominal rate undergoes compounding in the calculation of interest over a year while the effective rate is always used as a simple rate in the calculation of interest over a year. Example If interest is to be accumulated for $1000 at the rate of 5%, quarterly per year for 3 years, what is the effective rate? The stated rate of 5% is the nominal rate. We may compute 𝐹𝑉 = 1000 × (1 + 0.05 4×3 ) . 4 The effective rate is obtained like this: 1000(1 + 𝑟𝑒𝑓𝑓 )3 = 1000(1 + 0.05 4×3 ) , 4 which implies that 𝑟𝑒𝑓𝑓 = (1 + 0.05 4 ) − 1 ≈ 0.0509. 4 Example If 3% is the nominal interest rate, what is the quarterly equivalent? The question must be interpreted appropriately. Nominal rate is defined relative to the effective rate or annual equivalent rate. The phrase "quarterly equivalent" is not consistent with "annual equivalent" but it is used to suggest that the nominal rate is compounded 4 times in a year and the effective rate is desired to be found. SU1-6 FIN201 STUDY UNIT 1 We find its value like this: 1 + 𝑟𝑒𝑓𝑓 = (1 + 0.03 4 ) 4 and hence 𝑟𝑒𝑓𝑓 = (1 + 0.03 4 ) − 1 ≈ 0.0303. 4 These sections from the Textbook (and do the associated exercises):  Chapter 1 Simple and compound interest  Chapter 1 Nominal and effective rates Have you ever wondered where the notions of interest and interest rate come from? Who on earth came up with these ideas? SU1-7 FIN201 STUDY UNIT 1 Chapter 2 Concept: Time Value of Money The time value of money is a fundamental fact of finance. There are many ways to express it, one of which is this: an amount of money at a certain time is not worth the same as the same amount at another time. For example, $100 at present is not equal in value as $100 in a year's time. Another way is to visualise a cash flow at present and another that is equally valued at some time 𝑇 later: Figure 1.4 Each arrow represents a cash flow and the length indicates the amount of cash in the flow. The cash flow at present is usually called the present value (abbrev. PV) and that in the future against which the PV is compared is called the future value (abbrev. FV). Valuation is always done with respect to a point in time, usually at present. Thus, the value of the cash flow at present is PV, while the value of FV, also at present, is not exactly FV - the amount needs to be discounted to the present. In the simplest case, the PV and the FV are related by an equation: 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟), Where 𝑟 is the interest rate for the period. The interpretation is: in order to obtain the FV from the PV, we need to compound the PV into the future at a certain interest rate. SU1-8 FIN201 STUDY UNIT 1 Thus, finding FV from PV is called compounding. The factor (1 + 𝑟) is called the compounding factor. Conversely, finding PV from FV is called discounting and it is expressed by the following: 𝑃𝑉 = 𝐹𝑉 . 1+𝑟 1 The factor 1+𝑟 is called the discounting factor. The above picture relating PV and FV is made simple as the relationship involves only the interest rate 𝑟 and nothing else. In general, the relationship between PV and FV involves several more items: 1. interest rate, 𝑟 2. interest accumulation/computation period (usually fraction of a year), 𝛼 3. number of accumulation/computation periods in the entire loan period, 𝑛 A concrete example is this: a loan is made for 3 years at an interest rate of 5% per annum with interest computed at half-yearly intervals. This may be visualised as follows: Figure 1.5 SU1-9 FIN201 STUDY UNIT 1 Interest that is accumulated over each computation period is commonly assumed to be reinvested (as is true in the case of a fixed deposit over the entire period). In this case, the relationship between PV and FV is given by 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟𝛼)𝑛 . Here, 𝛼 is the fraction of the year that constitutes the interest accumulation/computation period, and 𝑛 is the total number of such periods in the entire loan period. 1 In the current example, 𝛼 = 2 and 𝑛 = 3 × 2 = 6 , and so the formula reads: 𝑟 𝐹𝑉 = 𝑃𝑉 × (1 + )2×3 . 2 Some points to note:  1 1 1 𝛼 is assumed to be 2 , 4 , 12 in the cases of semi-annually, quarterly and monthly compounding respectively. In real-world practice, the actual form that this fraction takes depends on the day count convention that is assumed. If the actual number of days is taken into account, we may express 𝛼 as No.Days in Period No.Days in Year . This is known as ACT/ACT.  Interest rates are commonly assumed to be annualised. For example, a 3% interest rate on a principal of $100 will garner an interest of $3% × 100 = $3 after 1 year. Sometimes, in order to emphasise the fact, we may write "3% p.a." where p.a. stands for per annum.  Please check: the product 𝛼𝑛 must always be equal to 𝑇, the length of the entire loan period. There are 3 scenarios in which the basic time-value-of-money equation may be useful and the equation is expressed slightly differently: Finding FV from PV and 𝒓 The equation 𝐹𝑉 = 𝑃𝑉 × (1 + 𝑟𝛼)𝑛 SU1-10 FIN201 STUDY UNIT 1 tells us how to find FV from PV. The process is called compounding, or forwardvaluing. The factor (1 + 𝑟𝛼)𝑛 is known as the compound factor. Finding PV from FV and 𝒓 In order to find the PV from the FV, we may use the equivalent formula 𝑃𝑉 = 𝐹𝑉 . (1 + 𝑟𝛼)𝑛 Here, the process is called discounting or present-valuing and the factor 1 (1+𝑟𝛼)𝑛 is known as the discount factor. Finding 𝒓 from FV and PV If we need to find the rate 𝑟 that is required to compound PV into FV over a total loan period of length 𝑛𝛼 and with interest computation period of length 𝛼, then we may use the equivalent formula 𝑟 = (( 𝐹𝑉 1 1 )𝑛 − 1) × . 𝑃𝑉 𝛼 These sections from the Textbook (and do the associated exercises):  Chapter 1 Future value / present value; time value of money  Chapter 1 Discount factors When I write down "PV" or "FV", with the intention to calculate with them, either numerically or in formulae, I am applying a very useful methodology of mathematics, called representation. Crudely put, it's just "writing things down clearly". Representation is useful for the following reasons:  it allows us to reason about real world entities in mathematical terms SU1-11 FIN201 STUDY UNIT 1  it allows us to use computers to help us in our reasoning because symbolic representations such as PV or FV are readily understood by machines Take a look at Apple's stock price history. Represent (i.e. write down) the stock price in a suitable fashion so that you may be able to discuss the following points with your friends or calculate the values with a computer: 1. 2. 3. 4. 5. today's stock price 1-day return annual return price change over the last week the price peaked in May last year SU1-12 FIN201 STUDY UNIT 1 Chapter 3 Calculations Investments often involve a series of cash flows into the future, not just a single cash flow. In order to assess the worth of the investment, it is necessary to find the present value of the series of cash flows. This is then regarded as the value of the investment. 3.1 Net Present Value (NPV) The NPV of a series of cash flows is the sum of the PV of each of the constituent cash flow. Suppose that the series of cash flow is represented by the following diagram: Figure 1.6 The amount for each cash flow is indicated by 𝐶𝑖 . The NPV is given by the formula: 𝑁𝑃𝑉 = 𝑃𝑉(𝐶1 ) + 𝑃𝑉(𝐶2 ) + 𝑃𝑉(𝐶3 ) + 𝑃𝑉(𝐶4 ) + 𝑃𝑉(𝐶5 ). Note that the PV at each time 𝑡𝑖 depends on the discount factor corresponding to 𝑡𝑖 . Suppose the discount factor at 𝑡𝑖 is 𝑑𝑖 , then the NPV formula may be expressed as: 𝑁𝑃𝑉 = 𝐶1 𝑑1 + 𝐶2 𝑑2 + 𝐶3 𝑑3 + 𝐶4 𝑑4 + 𝐶5 𝑑5 . SU1-13 FIN201 STUDY UNIT 1 Depending on the kind of interest rate information provided, the discount factors may be calculated differently. For instance, if it is assumed that there is a constant effective annual yield 𝑦, then 𝑑𝑖 = 1 (1 + 𝑦)𝑡𝑖 and the NPV works out to be 𝑁𝑃𝑉 = 𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 + + + + . 𝑡 𝑡 𝑡 𝑡 1 2 3 4 (1 + 𝑦) (1 + 𝑦) (1 + 𝑦) (1 + 𝑦) (1 + 𝑦)𝑡5 Example Find the NPV of the following cash flows, discounting at a rate of 5%. Year Cash Flow 1 100 2 -20 3 +180 The NPV is found by: 100 −20 180 + + ≈ 232.59. 1 + 5% (1 + 5%)2 (1 + 5%)3 3.2 Internal Rate of Return (IRR) The IRR is the interest rate or yield that needs to be applied to a series of cash flows such that the PV of the series is equal to a specified amount. Usually, this specified amount is the upfront payment one is willing to put down into the investment that is promising the series of cash flows. SU1-14 FIN201 STUDY UNIT 1 From the interpretation, the IRR converts information in terms of cash amounts (the upfront payment) into information in terms of rates or yields (the IRR). This allows us to compare the attractiveness of the investment with other investments in the market whose attractiveness is similarly expressed in terms of rates and yields. To illustrate how IRR is defined and calculated, let's suppose that we are contemplating an investment that comprises 5 cash flows 𝐶1 , 𝐶2 , … , 𝐶5 as illustrated from above. Suppose also that we will decide to invest if the PV of the investment is at least equal to a pre-specified amount 𝑋. Then the IRR is given by the value of 𝑟 that satisfies the following equation: 𝑋= 𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 + + + + . 𝑡 𝑡 𝑡 𝑡 1 2 3 4 (1 + 𝑟) (1 + 𝑟) (1 + 𝑟) (1 + 𝑟) (1 + 𝑟)𝑡5 Notice that it is not a straightforward matter to compute 𝑟 when all the other parameters are given. It is not possible to "just plug in" like how 𝑋 may be computed from all other parameters. It is necessary to "solve for 𝑟". In Excel, this may be done with the Solver add-in. With Python, this may be done using a root finding method in the scipy.optimize module. Example Find the IRR of the following cash flows, given that an upfront of $200 is desired. Year Cash Flow 1 100 2 -20 3 +180 The IRR is found by solving for 𝑟 in 200 = 100 −20 180 + + . 1 + 𝑟 (1 + 𝑟)2 (1 + 𝑟)3 SU1-15 FIN201 STUDY UNIT 1 Using Python's scipy.optimize.bisect method (which will be explained in detail in the next unit), its value is equal to 0.12. Can you find this solution manually or with a calculator? 3.3 Many Measurements of Return A return is conceptually this: an initial amount of cash 𝐶0 becomes another amount of cash 𝐶1 some time later. The absolute return is 𝐶1 − 𝐶0 while the relative return is 𝐶1 − 1. "Relative" here refers to "per unit of initial amount". 𝐶 0 But there is another angle to the word "relative" or "rate". It is this: per unit of time. The latter cash flow 𝐶1 occurs some time later but no mention is made as to exactly when that is. If it is specified that 𝐶1 is received 6 months later, then a notion of "rate of return" may 𝐶 encompass "per unit of initial amount" and "per unit of time". The expression 𝐶1 − 1 0 may be called the absolute rate of return (for the 6-month period) to distinguish it from 𝐶 2 × (𝐶1 − 1) which is the annualised rate of return, which is more commonly assumed. 0 But note that this usage of the term "absolute" conflicts with the notion of "absolute" mentioned above. The point is, there are many ways to measure return. In most realistic scenarios, various factors may arise to complicate the definition. Some of these factors are:  the length of time over which the return is measured  more than 1 cash flow is involved  the existence of both cash inflows and outflows The IRR is a measurement of return that takes into account all cash flows, both inflows and outflows. Other measurements are time-weighted rate of return, equivalent annual rate of return, daily return, etc. SU1-16 FIN201 STUDY UNIT 1 3.4 Annuities An annuity is a regular stream of future cash flows which can be purchased as an investment. If the stream of cash flows extends indefinitely (i.e. there is no end-date), then the annuity is known as a perpetuity. The cash flows in an annuity may be a fixed amount or it may grow over time. We may for simplicity assume that the cash flows occur annually. The cash flows in an annuity may be given either at the start of the year or at the end of the year. In the following example, we will work out the relationship between yield (i.e. equivalent annual rate) and the NPV of the annuity. We will use the following setup: the NPV of a series of cash flows 𝐶1 , 𝐶2 , 𝐶3 , … is given by 𝑁𝑃𝑉 = 𝐶1 𝐶2 𝐶3 + + +⋯ 2 1 + 𝑦 (1 + 𝑦) (1 + 𝑦)3 In the case of an annuity, there are 𝑛 cash flows altogether. In the case of a pertuity, there is an infinite number of cash flows. 3.4.1 Annuity Pays a Constant Amount at the End of Each Year As the cash flow is constant, say 𝐶𝑖 = 𝐶 , we may write 𝑁𝑃𝑉 = 𝐶 𝐶 𝐶 𝐶 + + +⋯+ . 2 3 1 + 𝑦 (1 + 𝑦) (1 + 𝑦) (1 + 𝑦)𝑛 The expression on the RHS is a geometric progression (recall from high-school mathematics). It has a formula: 𝑁𝑃𝑉 = 1 𝑛 𝐶 1 − (1 + 𝑦 ) = 1+𝑦 1− 1 1+𝑦 𝐶 1 𝑛 (1 − ( ) ) 𝑦 1+𝑦 SU1-17 FIN201 STUDY UNIT 1 3.4.2 Annuity Pays a Constant Amount at the Beginning of Each Year In this case, the NPV is 𝑁𝑃𝑉 = 𝐶 + 𝐶 𝐶 𝐶 𝐶 + + + ⋯+ . 2 3 1 + 𝑦 (1 + 𝑦) (1 + 𝑦) (1 + 𝑦)𝑛−1 Using the formula for the geometric progression once again, we obtain 𝑁𝑃𝑉 = =𝐶× 1 1 − (1 + 𝑦 )𝑛 1 1−1+𝑦 𝐶 1 𝑛−1 (1 + 𝑦 − ( ) ) 𝑦 1+𝑦 3.4.3 Perpetuity Pays a Constant Amount at the End of Each Year This is equivalent to allowing 𝑛 to be exceedingly large in the case of an annuity that pays a constant amount at the end of each year. Thus, the NPV of the perpetuity is 𝑁𝑃𝑉 = 𝐶1 𝐶2 𝐶3 + + +⋯ 2 1 + 𝑦 (1 + 𝑦) (1 + 𝑦)3 𝐶 1 𝑛 (1 − ( ) ) 1+𝑦 𝑛→∞ 𝑦 = lim = 𝐶 𝑦 3.4.4 Annuity Pays an Amount Which Grows Each Year at the End of the Year Suppose that the growth is expressed by a growth rate 𝑔, so that 𝐶𝑖 = (1 + 𝑔)𝑖−1 𝐶. In other words, the first cash flow is 𝐶, the second is (1 + 𝑔)𝐶 , the third is (1 + 𝑔)2 𝐶 , and so on. SU1-18 FIN201 STUDY UNIT 1 The NPV is then given by 𝑛 𝑁𝑃𝑉 = ∑ 𝑖=1 (1 + 𝑔)𝑖−1 𝐶 . (1 + 𝑦)𝑖 This is a geometric progression whose first term is 𝐶 1+𝑦 and common ratio is 1+𝑔 1+𝑦 . Hence the formula tells us that 𝑁𝑃𝑉 = 1+𝑔 1 − ( 1 + 𝑦 )𝑛 𝐶 = × 1+𝑔 1+𝑦 1−1+𝑦 𝐶 1+𝑔 𝑛 × (1 − ( ) ) 𝑦−𝑔 1+𝑦 These sections from the Textbook (and do the associated exercises):  Chapter 1 Cashflow analysis, NPV, IRR and time-weighted rate of return  Chapter 1 Annuities For a further oral elaboration of the concept of the Time Value of Money, watch: Time Value of Money (Access video via iStudyGuide) Practical calculations of interest rates require the concept of Day Count Convention. For an explanation of the concept, watch: Day Count Convention (Access video via iStudyGuide) The formulae that are derived in this section depend on your knowledge of geometric progressions and geometric series from high school mathematics. Review these concepts by following the course tracks on Sequences and Introduction to Geometric Series at Khan Academy. SU1-19 FIN201 STUDY UNIT 1 Quiz 1) If 3% is the quarterly equivalent rate, what is the nominal interest rate? a. b. c. d. 2.95% 2.96% 2.97% 2.98% 2) Time value of money rules out a. b. c. d. the possibility that interest rates can be positive the possibility that interest rates can be negative the possibility that interest rates can fluctuate the possibility that interest rates can stagnate 3) The _________ expresses the relationship between the present value and the future value of a cash flow. a. b. c. d. interest interest rate principal term 4) The nominal interest rate undergoes compounding in the calculation of interest over a year. a. True b. False 5) The future value is bigger than the present value a. b. c. d. in all cases if the interest rate is positive if the interest rate is zero if the interest rate is negative SU1-20 FIN201 STUDY UNIT 1 6) The tool in Excel that is useful for solving IRR problems is a. b. c. d. the Analysis ToolPak the Solver add-in the Ribbon the worksheet 7) A root finding function can be found in the Python module scipy.stats. a. True b. False 8) If interest rate is assumed to be constant over terms, the discount factor for Year 1 a. b. c. d. is the square root of the discount factor for Year 2 is the square of the discount factor for Year 2 is equal to the discount factor for Year 2 is twice the discount factor for Year 2 9) The return of an investment over half a year must be _________ in order to obtain the annualised figure. a. b. c. d. unchanged compounded discounted doubled 10) Finding the present value of future cash flows through discounting with a constant interest rate makes the crucial assumption that the interest rate is _________ over the term of the cash flows. a. b. c. d. changing unchanging increasing decreasing SU1-21 FIN201 STUDY UNIT 1 Solutions or Suggested Answers Quiz Question 1: c Question 2: b Question 3: b Question 4: a Question 5: b Question 6: b Question 7: b Question 8: a Question 9: d Question 10: b SU1-22 STUDY UNIT 2 STATISTICS AND NUMERICAL METHODS WITH EXCEL AND PYTHON FIN201 STUDY UNIT 2 Learning Outcomes By the end of this unit, you should be able to: 1. Review statistical concepts and numerical methods. 2. Summarise financial calculations from Excel. 3. Identify the appropriate Python modules for financial computations. SU2-1 FIN201 STUDY UNIT 2 Chapter 1 Basics of Statistics The purpose of this unit is to collect together some materials and methods that will be very useful in the measuring, mapping and modelling of things in finance. These materials and methods are gathered from 4 areas:     Statistics Numerical Methods Excel Python Statistics is useful whenever we need to deal with lots of numbers. Financial data is a lot of numbers! Statistical notions are indispensable for us. Numerical methods are a particular branch of applied mathematics that enables us to interpolate, extrapolate and solve. For example, the Internal Rate of Return is hard to work out by hand and needs to be solved using some numerical method, such as the bisection method. The theories behind statistics and numerical methods have been implemented in various software packages. We will explore Excel and Python and use them to aid us in calculations in finance. The object of our focus in statistics is data. We will be concerned with data that is a sequence of numbers: 𝑥1 , 𝑥2 , … , 𝑥𝑛 . For example, the sequence may be the sequence of S&P 500 index from inception until now. Occasionally, we will have to compare between two sequences. For instance, we may need to measure the relationship between S&P 500 index and Apple's stock price to see how closely the latter follows the market. In such cases, we will be concerned with 2 sequences of numbers, or 2 datasets: 𝑥1 , 𝑥2 , … , 𝑥𝑛 . 𝑦1 , 𝑦2 , … , 𝑦𝑛 . Statistics allows us to summarise these datasets in various ways. SU2-2 FIN201 STUDY UNIT 2 1.1 Averages "Average" commonly refers to what is technically called the arithmetic mean in statistics: 𝑛 1 1 𝜇 = 𝑥 = (𝑥1 + 𝑥2 + ⋯ + 𝑥𝑛 ) = ∑ 𝑥𝑖 . 𝑛 𝑛 𝑖=1 The various expressions shown above are the various abbreviations that are commonly used for this mean. Sometimes, in addition to the dataset 𝑥1 , 𝑥2 , … , 𝑥𝑛 , weights are also given: 𝑤1 , 𝑤2 , … , 𝑤𝑛 , each weight 𝑤𝑖 corresponding to each 𝑥𝑖 , 𝑖 for 𝑖 respectively. For instance, one can imagine a scenario whereby the expected return of asset 𝑖 is 𝑥𝑖 and an amount 𝑤𝑖 of the asset 𝑖 is purchased. Then the overall return of the portfolio thus assembled is 𝑛 𝑤1 𝑥1 + 𝑤2 𝑥2 + ⋯ + 𝑤𝑛 𝑥𝑛 = ∑ 𝑤𝑖 𝑥𝑖 . 𝑖=1 This is called the weighted average of the dataset 𝑥1 , 𝑥2 , … , 𝑥𝑛 with respect to the weights 𝑤1 , 𝑤2 , … , 𝑤𝑛 . The geometric mean is the expression 1 (𝑥1 𝑥2 ⋯ 𝑥𝑛 )𝑛 . It may be applied to find a sort of average between quantities that are naturally multiplied together, rather than added together. For instance, discount factors. When there is no confusion as to which mean is being referred to, we'll just say "mean". All these various types of means are centrality measures, i.e. each measure picks out a special number that is recognised as a central element of the dataset. In this regard, two other centrality measures are the median and the mode. The mode is the data value that occurs the most frequently in the entire dataset. It is possible to have more than 1 mode in a single dataset. The median is the middle data value when all the data values in the dataset are ranked in an increasing order. SU2-3 FIN201 STUDY UNIT 2 Example For the dataset 1,5,8,4,1,8,4,10, find the 1. 2. 3. 4. 5. Arithmetic mean Weighted average according to the weighting rule: "half for odd, quarter for even" Geometric mean Mode Median For (1), the arithmetic mean is: 1 + 5 + 8 + 4 + 1 + 8 + 4 + 10 = 5.125. 8 For (2), the weighted average is 1 1 1 1 1 1 1 1 1 × 2 + 5 × 2 + 8 × 4 + 4 × 4 + 1 × 2 + 8 × 4 + 4 × 4 + 10 × 4 2.75 = 4.3636. For (3), the geometric mean 1 (1 × 5 × 8 × 4 × 1 × 8 × 4 × 10)8 ≈ 3.878. For (4), there are 3 modes: 1, 4 and 8. For (5), in order to find the median, firstly, we have to rank the data in increasing order: 1,1,4,4,5,8,8,10. There are 8 elements altogether. Thus, there are 2 central values: 4 and 5. The median 4+5 is therefore 2 = 4.5. 1.2 Expectation of a Random Variable A random variable 𝑋 is a representation of a dataset of values. In other words, it can assume any value from the dataset with a certain chance factor attached to each value. Think of a biased coin. The chance that it will be heads is some probability 𝑝 and the chance that it will be tails is 𝑞 = 1 − 𝑝. SU2-4 FIN201 STUDY UNIT 2 In the same way, a random variable 𝑋 may be visualised as a table: Value Probability 𝑥1 𝑝1 𝑥2 𝑝2 𝑥3 𝑝3 The expectation of 𝑋, written 𝐸(𝑋), is the average value of 𝑋, given by the weighted average 𝐸(𝑋) = 𝑝1 𝑥1 + 𝑝2 𝑥2 + 𝑝3 𝑥3 . The expectation has the following properties: 1. If 𝑋 and 𝑌 are two random variables, then 𝐸(𝑋 + 𝑌) = 𝐸(𝑋) + 𝐸(𝑌). 2. If 𝑋 is a random variable and 𝑎 is a number, then 𝐸(𝑎𝑋) = 𝑎𝐸(𝑋). 1.3 Spreads A spread measure is a formula that computes how spread-out a dataset is. The most commonly used spread measures in statistics are the variance: (𝑥1 − 𝑥)2 + (𝑥2 − 𝑥)2 + ⋯ + (𝑥𝑛 − 𝑥)2 ∑𝑛𝑖=1( 𝑥𝑖 − 𝑥)2 𝜎 = = 𝑛 𝑛 2 and the standard deviation: 𝜎. Yes, the standard deviation is the square root of the variance. Essentially, they measure the same thing. One being the square root of the other, they differ in terms of units. The standard deviation is of the same unit as the data values in the dataset and SU2-5 FIN201 STUDY UNIT 2 consequently we may use the standard deviation to measure distances between data values. Thus, if 2 data values 𝑥𝑖 and 𝑥𝑗 satisfy 𝑥𝑖 − 𝑥𝑗 = 2𝜎, then we may say that they are 2 standard deviations apart. Take a look at the formula and try to see what it's trying to compute: the variance is an average of distances between each data point 𝑥𝑖 and the mean 𝑥 (distance is here defined to the square of the difference). Example For the dataset 1,5,8,4,1,8,4,10, find the standard deviation and the variance. How many standard deviations is 10 away from the mean? The mean is 5.125 (see above). The variance is 9.609. The standard deviation is 𝜎 = √9.609 = 3.100. Since 10−5.125 3.100 = 1.573, which may be rewritten as 10 − 5.125 = 1.573 × 𝜎, the value 10 is 1.573 standard deviations away from the mean. 1.4 Biased versus Unbiased In statistics, the variance and standard deviation that are defined above are called biased variance and biased standard deviation respectively. The word biased means that in a theoretical sense, these are not the most accurate estimates of spreads. The unbiased variance is given by the formula 𝜎^2 = (𝑥1 − 𝑥)2 + (𝑥2 − 𝑥)2 + ⋯ + (𝑥𝑛 − 𝑥)2 ∑𝑛𝑖=1( 𝑥𝑖 − 𝑥)2 = 𝑛−1 𝑛−1 and the unbiased standard deviation is 𝜎^. SU2-6 FIN201 STUDY UNIT 2 The distinction is due to the denominator "𝑛 − 1" instead of "𝑛". So when do we use the unbiased version and when do we use the biased version? The answer is this: if we are computing the spread of actual data values, we will use the biased version. If we intend to fit the standard deviation to a probability distribution, then we will use the unbiased version. 1.5 Variance of a Random Variable If 𝑋 is a random variable, then the variance of 𝑋 is defined in the following way: 𝑉𝑎𝑟(𝑋) = 𝐸((𝑋 − 𝐸(𝑋))2 ). In other words, first we compute the number 𝜇 = 𝐸(𝑋). Then we plug 𝜇 into the above formula to compute the variance: 𝑉𝑎𝑟(𝑋) = 𝐸((𝑋 − 𝜇)2 ). From this expression, we see that the variance of a random variable may be interpreted as the average (squared) distance between a value of 𝑋 and the mean value 𝜇. This is exactly the definition of spread as we have stated above. An alternative way to write the variance is this: 𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − 𝐸(𝑋)2 . The two formulae are exactly equivalent. Note that according to this definition, if 𝑎 is a number, then 𝑉𝑎𝑟(𝑎𝑋) = 𝑎2 𝑉𝑎𝑟(𝑋). SU2-7 FIN201 STUDY UNIT 2 1.6 Correlation and Covariance: Relationships between Two Datasets The most common measures of relationships between 2 datasets is the covariance and the Pearson correlation coefficient (or correlation coefficient or just correlation). The covariance of the datasets 𝑥1 , 𝑥2 , … , 𝑥𝑛 and 𝑦1 , 𝑦2 , … , 𝑦𝑛 is 𝐶𝑜𝑣(𝑥, 𝑦) = ∑𝑛𝑖=1 𝑥𝑖 𝑦𝑖 − (∑𝑛𝑗=1 𝑥𝑗 )(∑𝑛𝑘=1 𝑦𝑘 ) 𝑛 . The correlation is 𝜌= 𝐶𝑜𝑣(𝑥, 𝑦) , 𝜎𝑥 𝜎𝑦 where 𝜎𝑥 and 𝜎𝑦 are the standard deviations of the dataset 𝑥 and 𝑦 respectively. The correlation coefficient is a number that lies between −1 and 1. If it turns out to be 1, then the two datasets are related linearly, i.e. the pairs (𝑥𝑖 , 𝑦𝑖 ) all lie on a single straight line with a positive slope. If it turns out to be −1, then the pairs lie on a single straight line with a negative slope. If it turns out to be 0, then we interpret that the relationship between the two datasets is random. Any value in-between is interpreted between being linear related and random. The following scatter plots make the intuition for correlation coefficient clear: SU2-8 FIN201 STUDY UNIT 2 Figure 2.1 Incidentally, scatter plots are very powerful in rendering relationships that may exist within bivariate data (i.e. a dataset of the form (𝑥1 , 𝑦1 ), (𝑥2 , 𝑦2 ), … , (𝑥𝑛 , 𝑦𝑛 ) ). Notice how the covariance and the correlation are related. The correlation is obtained from the covariance by normalising (i.e. dividing) by the standard deviations of the two datasets. Hence, the covariance contains 3 pieces of information: • • • the relationship that is represented by the correlation coefficient the standard deviation of the dataset 𝑥 the standard deviation of the dataset 𝑦 As it involves 3 concepts together, it is generally hard to interpret exactly what the covariance tells us apart from whether the relationship is a positive or negative one. 1.7 Covariance of 2 Random Variables The notion of covariance has an analogue for random variables. If 𝑋 and 𝑌 are 2 random variables, their covariance is 𝐶𝑜𝑣(𝑋, 𝑌) = 𝐸(𝑋𝑌) − 𝐸(𝑋)𝐸(𝑌). SU2-9 FIN201 STUDY UNIT 2 Note that 𝐶𝑜𝑣(𝑋, 𝑋) = 𝐸(𝑋 2 ) − 𝐸(𝑋)2 by this formula. This shows that the covariance of 𝑋 and itself is its variance. The covariance has the following properties: if 𝑋, 𝑌, 𝑍 are 3 random variables, then 1. 2. 3. 𝐶𝑜𝑣(𝑋, 𝑌 + 𝑍) = 𝐶𝑜𝑣(𝑋, 𝑌) + 𝐶𝑜𝑣(𝑋, 𝑍) 𝐶𝑜𝑣(𝑋 + 𝑌, 𝑍) = 𝐶𝑜𝑣(𝑋, 𝑍) + 𝐶𝑜𝑣(𝑌, 𝑍) 𝐶𝑜𝑣(𝑎𝑋, 𝑌) = 𝐶𝑜𝑣(𝑋, 𝑎𝑌) = 𝑎𝐶𝑜𝑣(𝑋, 𝑌) 1.8 Variance of a Sum of Random Variables Suppose 𝑋 and 𝑌 are 2 independent random variables, then it is known that 𝑉𝑎𝑟(𝑋 + 𝑌) = 𝑉𝑎𝑟(𝑋) + 𝑉𝑎𝑟(𝑌) = 𝜎𝑋2 + 𝜎𝑌2 , where 𝜎𝑋 and 𝜎𝑌 are the standard deviations of 𝑋 and 𝑌 respectively. In general, without assuming independence, it is known that 𝑉𝑎𝑟(𝑋 + 𝑌) = 𝜎𝑋2 + 𝜎𝑌2 + 2𝜎𝑋 𝜎𝑌 𝜌𝑋𝑌 , where 𝜌𝑋𝑌 is the correlation coefficient of 𝑋 and 𝑌. If there are 3 random variables 𝑋, 𝑌, 𝑍, then 𝑉𝑎𝑟(𝑋 + 𝑌 + 𝑍) = 𝜎𝑋2 + 𝜎𝑌2 + 𝜎𝑍2 + 2𝜎𝑋 𝜎𝑌 𝜌𝑋𝑌 + 2𝜎𝑌 𝜎𝑍 𝜌𝑌𝑍 + 2𝜎𝑍 𝜎𝑋 𝜌𝑍𝑋 . If there are 4 random variables 𝑊, 𝑋, 𝑌, 𝑍, then 𝑉𝑎𝑟(𝑊 + 𝑋 + 𝑌 + 𝑍) 2 = 𝜎𝑊 + 𝜎𝑋2 + 𝜎𝑌2 + 𝜎𝑍2 + 2𝜎𝑋 𝜎𝑌 𝜌𝑋𝑌 + 2𝜎𝑌 𝜎𝑍 𝜌𝑌𝑍 +2𝜎𝑍 𝜎𝑋 𝜌𝑍𝑋 + 2𝜎𝑊 𝜎𝑋 𝜌𝑊𝑋 + 2𝜎𝑊 𝜎𝑌 𝜌𝑊𝑌 + 2𝜎𝑊 𝜎𝑍 𝜌𝑊𝑍 . The same pattern holds for any number of random variables. This formula may be applied to calculate the volatility of a portfolio of assets. SU2-10 FIN201 STUDY UNIT 2 1.9 Histograms When we compute a measure (mean or spread), we are computing a single number from a dataset which may comprise many data values. Hence, while statistical measures are useful summaries, they lose information. Plotting the dataset as a histogram retains more information about the set than just the mean or standard deviation. The following histogram describes the daily returns of Yahoo! stock between 2010 and 2015. Figure 2.2 A histogram categorises the data into a small number of bins and displays the count of each bin, thus simplifying the dataset and enables visualisation at the same time. A histogram tells us something about the dataset. It gives us information about the source. From the first histogram above, the daily returns of Yahoo! stock are mostly concentrated between -5% and 5%. There are some extremes near -10% and 10%. This gives us a sense of how the stock price fluctuates on a daily basis. 1.9.1 Bin Size One choice that needs to be made in plotting histograms is the bin size. If the bin size is chosen too large, we will obtain a histogram that looks like this: SU2-11 FIN201 STUDY UNIT 2 Figure 2.3 The result is a histogram with only 4 categories (bin width = 0.5). This is too rough and it hides the intricacies of how the data is distributed. If the bin size is chosen too small, we obtain: Figure 2.4 SU2-12 FIN201 STUDY UNIT 2 The result is a histogram that is quite complex as it reveals too much details from within the dataset. The goals of simplifying the dataset and revealing its distribution are opposite to each other and requires a bit of balancing. 1.9.2 Types of Histograms: Count, Relative Frequency, Normalised In the histograms above, each vertical bar represents the number of data values in the dataset that belongs to the category beneath the bar. For example, in the second histogram, the bar that extends over the interval 0 to 5 has a height of about 630. This means that roughly 630 days of Yahoo! returns are positive and less than 5%. Thus, the histogram shows the count for each category. There are two other kinds of histograms: relative frequency and normalised. A bar in a relative frequency histogram shows the fraction of the dataset that belongs to it. The following histogram is a relative frequency version of the 4-bar histogram from above: Figure 2.5 A normalised histogram has the property that the total area in the vertical bars is 1. It allows the histogram to be interpreted as a probability distribution since total probability in a distribution is always 1. SU2-13 FIN201 STUDY UNIT 2 The normalised version of the above histogram is this: Figure 2.6 The count histogram, relative frequency histogram and normalised histogram have equal shapes. They differ from each other only by a scale factor in the vertical direction. 1.10 Probability Distributions Another simplification of the dataset is through interpretation by a mathematical probability distribution. Such a probability distribution is visualised by means of its density function 𝑦 = 𝑓(𝑥). When this function is plotted, it gives a description of how the data is spread out in the same way a histogram displays the spread. The distributions encountered in basic statistics are:     the normal distribution the Student's t distribution the chi-squared distribution the F distribution The normal distribution is commonly used in applications. It is used to give a mathematical interpretation of datasets that clearly display a concentration of data values and a spread of data values away from the central position. SU2-14 FIN201 STUDY UNIT 2 For instance, consider a dataset of IQ scores whose histogram looks like this: Figure 2.7 The histogram is informative about its underlying dataset, but it's not so easy to deal with in writings. Instead, we overlay the density function of a normal distribution, making sure that the mean and the standard deviation of the distribution agree with the mean and the standard deviation of the dataset: SU2-15 FIN201 STUDY UNIT 2 Figure 2.8 The overlay allows the underlying dataset to be interpreted in terms of the normal distribution. For example, to the question: what proportion of the dataset is greater than 100?, we may answer half since the normal distribution that has been calibrated to the dataset has mean equal to 100, and thus half of its area is to the right of 100 and the other half is to the left. Notice that we have not sought out the dataset for this answer. Instead, we use the normal distribution that has been fitted to the dataset. 1.10.1 Continuous and Discrete Distributions A continuous distribution is used to summarise a huge dataset. The distributions mentioned above - normal, Student's t, chi-squared, F - are all continuous distributions. A continuous probability distribution is specified by its probability density function (PDF) which is intended to be a close approximation of the normalised histogram of the dataset. For instance, the PDF of the normal distribution with mean 𝜇 and standard deviation 𝜎 is 𝑓(𝑥) = 1 𝜎√2𝜋 1 2 𝑒 −2𝜎(𝑥−𝜇) . This is a very concise description. It is for this conciseness that datasets are often interpreted in terms of PDFs. SU2-16 FIN201 STUDY UNIT 2 Another key feature of continuous distributions is that areas under the graph of the density function are interpretable as probabilities. For instance, the probability that IQ is greater than 120 is given by the shaded area below: Figure 2.9 On the other hand, if there are lots of data and they are required to be grouped in several discrete categories, then a discrete probability distribution is more useful. A discrete probability distribution is described by a table: Value Probability 𝑥1 𝑝1 𝑥2 𝑝2 ⋯ ⋯ 𝑥𝑛 𝑝𝑛 SU2-17 FIN201 STUDY UNIT 2 Here, the distribution has 𝑛 categories and the probability that the category 𝑥𝑖 occurs is 𝑝𝑖 . Due to the fact that the 𝑝𝑖 's are probabilities, they must be non-negative and satisfy 𝑝1 + 𝑝2 + ⋯ + 𝑝𝑛 = 1. For example, a fair dice is described by the following probability distribution: Value Probability 1 1/6 2 1/6 3 1/6 4 1/6 5 1/6 6 1/6 Probability distributions are very important in finance as we have to deal with lots of data as well as uncertainty concerning the future. As probability distributions are approximations of histograms, they allow us to work with lots of data in terms of a concise representation. As the language of probability distributions revolves around probabilities, they allow us to talk about reason and compute with chances concerning uncertainty which is inherent in financial transactions and investments. These sections from the Textbook (and do the associated exercises):  Chapter 2 Averages - arithmetic and geometric means, weighted averages, median and mode SU2-18 FIN201 STUDY UNIT 2  Chapter 2 Variance, standard deviation and volatility  Chapter 2 Correlation and covariance  Chapter 2 Histograms, probability density and the normal probability function SU2-19 FIN201 STUDY UNIT 2 Chapter 2 Basics of Numerical Methods Two sets of numerical methods are the most important for practical finance:  interpolation and extrapolation methods o help to find approximate values between data points or outside of data range  root finding methods o help to find solutions of equations We will discuss them here so that you will be able to confidently use them in Excel or Python. 2.1 Interpolation and Extrapolation "Interpolation" means finding a number between some given ones. For example, given 𝑥+𝑦 𝑥 and 𝑦 , interpolating fairly between them, we obtain the mid-point 2 . "Extrapolation" means finding a number that lies beyond some given ones. Interpolation and extrapolation are often applied where data is missing. For instance, if it is known what the 4-year and 5-year interest rates are, it's possible to deduce a 4.5year interest by taking the average of the 2 known rates. More precisely, if the 4-year rate is 5% and the 5-year rate is 6%, then we may estimate that the 4.5-year rate is 5+6 %, i.e. 5.5%. 2 How to find the 4-year-and-3-month rate (i.e. 4.25 since 3-month = 0.25)? Let's put the interest rates of concern side-by-side: 𝑟(4), 𝑟(4.25), 𝑟(5) The simplest assumption one can make is that the points (4, 𝑟(4)), (4.25, 𝑟(4.25)), (5, 𝑟(5)) lie on a straight line. Obtaining 𝑟(4.25) this way is known as linear interpolation. SU2-20 FIN201 STUDY UNIT 2 Solving for 𝑟(4.25), we have: 𝑟(4.25) − 𝑟(4) 𝑟(5) − 𝑟(4) = , 4.25 − 4 5−4 i.e. 𝑟(4.25) = (𝑟(5) − 𝑟(4)) × 0.25 + 𝑟(4) = (5 − 4) × 0.25 + 4 = 4.25. 2.2 Root Finding Root finding is the problem that arises when we need to find the value of 𝑥 for which a given equation 𝑓(𝑥) = 0 holds. For example, to find the IRR means to solve for 𝑟 in 𝑃𝑉 = 𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 + + + + . (1 + 𝑟)𝑡1 (1 + 𝑟)𝑡2 (1 + 𝑟)𝑡3 (1 + 𝑟)𝑡4 (1 + 𝑟)𝑡5 In other words, if we write 𝑓(𝑟) = 𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 + + + + − 𝑃𝑉, (1 + 𝑟)𝑡1 (1 + 𝑟)𝑡2 (1 + 𝑟)𝑡3 (1 + 𝑟)𝑡4 (1 + 𝑟)𝑡5 then the IRR is the solution to the equation 𝑓(𝑟) = 0. Many methods are available to find roots to equations. Two commonest ones are: • • the bisection method the Newton-Raphson method Do not worry about how these methods work - you will not be tested on this. Just be aware of their names, where they can be found in Excel or Python and how they may be applied. SU2-21 FIN201 STUDY UNIT 2 These sections from the Textbook (and do the associated exercises):  Chapter 1 Interpolation and extrapolation The following YouTube videos explain the mechanics behind the bisection method and the Newton-Raphson method:  How to locate a root : Bisection Method : ExamSolutions  Newton's Method SU2-22 FIN201 STUDY UNIT 2 Chapter 3 Using Excel We will discuss the following aspects of Excel in order to get you up-to-speed quickly:         Basic objects of Excel The several categories of "things" that we manipulate all the time in Excel - if we are aware of them, we'll be able to work with them more efficiently Excel financial formulae There are several categories of worksheet functions in Excel. Apart from certain bread-and-butter type functions (e.g. AVERAGE), the category of financial functions is the most useful for a finance student. We'll make use of a few financial functions in this course. The Data Analysis add-in This add-in helps to deal with basic statistics. The Solver add-in This add-in helps in root-finding. It is required for IRR or YTM problems. 3.1 Basic Objects of Excel Excel is made up of parts. As the software is large and has undergone development for many years, it is quite complex. For this reason, we may at times think of its structure as being hierarchical. The most important objects making up Excel are the following:        Application Workbooks Worksheets Cells Ranges Formulae Add-ins The term "objects" is not imaginary. At its core, Excel is created in terms of these objects. You may refer to Excel Object Model for a glimpse of this core: https://msdn.microsoft.com/en-us/library/office/ff194068.aspx Let me show you what these objects are in pictures. SU2-23 FIN201 STUDY UNIT 2 When Excel is installed onto a computer, there is a single Excel application residing on the computer. Figure 2.10 Each file that one creates in order to use Excel is known as a workbook. Figure 2.11 Opening a workbook, 3 worksheets are pre-created, ready to be used. SU2-24 FIN201 STUDY UNIT 2 Figure 2.12 The cell A1 above is selected. There are altogether 1,048,576 rows and 16,384 columns in Excel 2007, 2010 and 2013. That makes a total of 17,179,869,184 (17 billion) cells. A rectangular block is known as a range. Figure 2.13 Values of various types may be entered into the cells. What makes Excel very useful is that in addition to values, formulae can also be written into cells. For example, typing "=NOW()" into cell A1 gives the current date and time. SU2-25 FIN201 STUDY UNIT 2 Figure 2.14 These functions are pre-packaged functionalities that are very often used. They greatly facilitate calculations with data. In order to use them efficiently, it is necessary to know what functions there are. Excel functions can be grouped into the following categories:               Compatibility functions Cube functions Database functions Date and time functions Engineering functions Financial functions Information functions Logical functions Lookup and reference functions Math and trigonometry functions Statistical functions Text functions User defined functions that are installed with add-ins Web functions For more details, you may refer to: https://support.office.com/en-us/article/Excelfunctions-by-category-5f91f4e9-7b42-46d2-9bd1-63f26a86c0eb SU2-26 FIN201 STUDY UNIT 2 3.2 Excel Financial Formulae The most important Excel functions for the finance student are the financial functions. A listing of them can be found here: https://support.office.com/en-us/article/Financialfunctions-reference-5658d81e-6035-4f24-89c1-fbf124c2b1d8 Some of the more commonly used ones, also important for us, are:                ACCRINT DISC DURATION EFFECT FV INTRATE IRR MDURATION NPV NPER PMT PRICE PV RATE YIELD 3.3 The Data Analysis Add-in The Data Analysis add-in contains a library of analysis tools for basic statistics. Figure 2.15 For example, the Descriptive Statistics tool computes the basic descriptive statistics for a dataset that is set within a range. SU2-27 FIN201 STUDY UNIT 2 Figure 2.16 The output of the above setting is this: Figure 2.17 SU2-28 FIN201 STUDY UNIT 2 3.4 The Solver Add-in The solver add-in implements some root-finding algorithms. It basically enables us to solve for the roots of equations, such as the following: 𝑓(𝑦) = 5 5 105 + + − 100. 2 1 + 𝑦 (1 + 𝑦) (1 + 𝑦)3 The solution 𝑦0 to 𝑓(𝑦) = 0 is the yield-to-maturity of a par bond which matures in 3 years and has an annual coupon rate of 5% p.a. This may be solved with the solver as follows. First, set up the worksheet this way: Figure 2.18 We don't know what the correct YTM should be at first, so we set it at some arbitrary value: 2%. As the PV (i.e. the sum of all the discounted cash flows) is not 0, we know that 2% is not the correct YTM. Next, we open the solver window and type in the necessary parameters: SU2-29 FIN201 STUDY UNIT 2 Figure 2.19 Running it, we obtain: Figure 2.20 We see that 5% is the correct answer. The solver is not the only way to solve this particular problem. SU2-30 FIN201 STUDY UNIT 2 The Excel function IRR is designed with this purpose in mind. We may invoke: in any cell on the worksheet and we'll obtain the answer 5%. Another solution is to observe that 100𝑦 100𝑦 100(1 + 𝑦) + + = 100 1 + 𝑦 (1 + 𝑦)2 (1 + 𝑦)3 is always true regardless of the value of 𝑦. Hence, if we compare this with the equation 5 5 105 + + − 100 = 0 2 1 + 𝑦 (1 + 𝑦) (1 + 𝑦)3 which we need to solve, immediately we see that 𝑦 = 0.05 is an answer. One point to remember is this: there can be many approaches to finding an answer. Having many tools around - mathematical formulae, Excel functions, Excel add-ins makes the task easier. 1. Browse the Excel functions (by category) webpage. Try to commit to memory the most important things on the webpage pertaining to how the functions are classified. 2. Browse the Financial functions (reference) webpage. Locate the key financial functions mentioned above and read what these functions do. 3. Browse the PV function webpage. Read to become familiar with the sort of information that you can find on the page. SU2-31 FIN201 STUDY UNIT 2 Chapter 4 Using Python We will discuss the following aspects of Python in order to get you up-to-speed quickly:     Installing and Starting Python Using Python as a Calculator Basic Objects of Python Useful Modules 4.1 Installing and Starting Python Python is a very popular programming language. Some of its features make it very useful for beginners:  It has a command line interpreter, allowing it to be used like a calculator.  It has a rich set of built-in modules. This means that, once installed, it can be used to perform many different kinds of commonly encountered calculations without having to install any further modules.  It has a strong community of developers and contributors. This means that apart from its built-in libraries, there are a lot of very useful, more specialised and well-maintained libraries residing on the internet, ready to be installed and used.  It is largely open-source. This means that using it for calculations is free.  It has a clean syntax. This means that codes written in Python are quite humanreadable and easy to keep and maintain. Do go ahead and install Python on your machine. We'll use it freely in this course. Python is currently in its version 3. However, version 2 has existed for a long time and there is rich support for it on the internet. Thus, we will use the latest version of Python 2 (i.e. 2.7) here. Python may be downloaded from its website. However, we will not install Python directly from its source site. Instead, we will install Python from here: http://pythonxy.github.io/ SU2-32 FIN201 STUDY UNIT 2 Here, Python is packaged with many libraries apart from its built-in suite to facilitate scientific computing. A part of scientific computing is data analysis. Python data analysis libraries are very useful in finance. Go ahead and install the latest version of Python-xy (as of 30 Dec 2015, the latest version is Python 2.7.10.0). Once installed, run the Spyder IDE (i.e. integrated development environment). You will find yourself in this environment: Figure 2.21 The pane on the left is the Editor pane. It is used for writing scripts to be saved away in files. The pane on the right is the Console pane. It allows Python to be used like a calculator. What that means is that the mode of interaction between Python and the user goes like this:   User issues commands Python computes and replies This interactivity makes Python friendlier to use than some older languages such as C or C++. There are quite a few other panes. To see them, check out View>Panes. SU2-33 FIN201 STUDY UNIT 2 4.2 Using Python as a Calculator Go ahead and type something into the right-hand-side console. Figure 2.22 Every line typed into the console and ended with an "Enter" is interpreted by Python. If it doesn't make sense, Python will let you know. Otherwise, it will report the value of the statement that you have just typed. You may follow what I have typed as shown above to get started. Don't worry about typing the wrong things. It's not easy to get Python stuck. SU2-34 FIN201 STUDY UNIT 2 4.3 Basic Objects of Python A computer does a few things very well and very efficiently. We may understand these things in this manner:  computers manipulate values and data structures  data structures are like containers, and values are like contents in the containers  values and data structures can be stored in variables, which are named, for us to manipulate The first step in using Python is to be aware of the kinds of values and data structures that exist. The basic value types are:    integer (e.g. -1, 0, 100) float (e.g. -4.5, 0.0, 34.23) string (e.g. 'abcd', "superman") The basic data structures are:    list (e.g. [1,2,3], ['a', 'b', 4]) tuple (e.g. (1,2,3), ('a', 'b', 4)) dictionary (e.g. {'name': 'John', 'age': 15, 'school': 'XYZ Sec. Sch.'}) Type the following examples into the console and have a look: SU2-35 FIN201 STUDY UNIT 2 Figure 2.23 In order to use these values and data structures, they must be stored away, kept in variables which are named: Figure 2.24 SU2-36 FIN201 STUDY UNIT 2 Now we may manipulate the values and data structures by manipulating the names (which refer to the variables or containers of these values): Figure 2.25 These basic facts about values, data structures and names/variables play a role in the writing of a Python program (aka script) which is similar to bricks and mortar that go into the construction of a building. To see the overall structure of a building, it's very useful to examine examples of scripts that perform intuitive tasks. 4.4 Useful Modules Python comes with a rich set of built-in modules. This practically means that any basic calculation or computational task is no further than a few commands away provided you know where to look for the relevant ones. The internet Python community has also built and maintained a rich ecology of modules that extend the built-in ones that come installed with a minimal installation of Python. The following modules are useful for handling data in finance:   pandas_datareader numpy, scipy, matplotlib and pandas SU2-37 FIN201 STUDY UNIT 2 4.4.1 pandas-datareader The pandas-datareader module allows data from the internet (various sources) to be downloaded with Python. Check to see if the module has been installed by typing on the command line. If Python complains (with some error message), that means that the module is not on your system. Thus, you must install it before proceeding. To do so, open the Command Prompt window and execute the command pip install pandas_datareader which should install the module onto your system. Make sure that you are connected to the internet when you're doing this. Figure 2.26 Now, back in Spyder, type the following statements into the console. SU2-38 FIN201 STUDY UNIT 2 Figure 2.27 The first statements import pandas_datareader as web import datetime as dt import pandas as pd loads the required modules into the program. datetime is a standard Python module manipulating dates and times. pandas is a robust Python module for handling time series. Our focus here is on the pandas_datareader module which provides the functionality to access data found on the internet. In particular, the web object is loaded into memory. After the module importation segment, parameters that will be needed for the body of the program are defined: startdate = dt.date(2017, 8, 1) SU2-39 FIN201 STUDY UNIT 2 enddate = dt.date.today() engine = 'google' s = ['GOOGL','AAPL'] x = pd.DataFrame() Here, the start and end dates of data download are specified to be between 1/8/2017 and the current date (i.e. today). Data will be downloaded from Google’s servers – hence the engine variable is specified with the string ‘google’. We want to download Google and Apple stock price data. Hence their ticker symbols are stored in the list s. The data downloaded will be stored in a Pandas DataFrame – hence the variable x is defined. The loop for ticker in s: y = web.DataReader(ticker, engine, startdate, enddate) y = y.loc[:, ['Close']] y = y.rename(columns={'Close': ticker}) x = pd.concat([x,y], axis = 1, join='outer') goes into the list of tickers, and for each ticker symbol in the list, downloads the data from Google, extracts only the ‘Close’ data column into the variable y, rename the dataframe object y corresponding to the column that has just been extracted with ‘Close’ (otherwise, some default name will be given in y), and finally, this y is concatenated onto x. The result is that x is a dataframe that contains the close columns of the price data of Google and Apple over the given period. The pandas_datareader module is a boon for the finance student who wishes to analyze financial data. With Python, this makes efficient analysis possible. Previously, for many years, the module that takes this place was yahoo-finance. This was discontinued after Yahoo! took down its historical data service. 4.4.2 numpy, scipy, matplotlib and pandas The trio - numpy, scipy and matplotlib - are very important and useful Python modules for data analysis. You may think of numpy as the primitive package that provides the nuts and bolts for scipy to latch on, scipy contains functions much like the Excel functions, only much more, and matplotlib is the chart and graph plotting library. pandas is a more recent module that facilitates the handling of time series. It is built on top of the trio. We will use pandas to visualise the returns of Yahoo! stock price. SU2-40 FIN201 STUDY UNIT 2 Type the following into the Spyder console: # import statements import pandas_datareader.data as web import datetime as dt import pandas as pd import matplotlib.pyplot as plt # set parameters startdate = dt.date(2016, 1, 1) enddate = dt.date.today() engine = 'google' ticker = 'YHOO' # download data y = web.DataReader(ticker, engine, startdate, enddate) # calculate and plot returns prices = list(y['Close']) s = pd.Series(prices) ret = (s - s.shift(1)) / s * 100 ret.hist() # need this to actually see the graph plt.show() In addition to what has been entered before, there are these additional lines: SU2-41 FIN201 STUDY UNIT 2 s = pd.Series(prices) ret = (s - s.shift(1)) / s * 100 ret.hist() The import statement imports the pandas library into Python. The statement s = pd.Series(prices) stores the list of prices that was obtained earlier as a pandas time-series object. This facilitates manipulation as the next line shows: ret = (s - s.shift(1)) / s * 100 What this does is to compute the daily returns from the prices. Given the sequence of daily prices: … , 𝑝𝑖−1 , 𝑝𝑖 , 𝑝𝑖+1 , …, the return on the 𝑖-th day is 𝑟𝑖 = 𝑝𝑖 − 𝑝𝑖−1 . 𝑝𝑖−1 Expressed as a percentage, it is 100 × 𝑟𝑖 %. In the expression above, s stands for 𝑝𝑖 , s.shift(1) stands for 𝑝𝑖−1 , and so (s - s.shift(1)) / s.shift(1) stands for 𝑝𝑖 −𝑝𝑖−1 𝑝𝑖−1 . The mulitplication-by-100 is to convert the return into a percentage. SU2-42 FIN201 STUDY UNIT 2 Finally, the statement ret.hist() instructs Python to draw this picture: Figure 2.29 Sections 1 to 4 in The Python Tutorial that's found at Python HQ site. SU2-43 FIN201 STUDY UNIT 2 Watch this video on Python 100 in which I talk about the nature of the programming language, how it may be useful to you and the steps to install it on your computer: Starting to Use Python (Access video via iStudyGuide) Watch this video in which I explain the components behind Excel that you may not be aware of as a user of its worksheets interface: Excel Nuts and Bolts (Access video via iStudyGuide) As a supplement to your reading assignment for Python, you may view the video explanations of Python by Khan Academy at YouTube. SU2-44 FIN201 STUDY UNIT 2 Quiz 1) The version of Python that is recommended for usage in this course is a. b. c. d. 2.5 2.7 3.0 3.5 2) Google's version of Excel is called a. b. c. d. Giselle gExcel Google Spreadsheets Sheets@Google 3) If you arrange some numbers in an increasing order, the number in the middle is a. b. c. d. the mean the median the mode the standard deviation 4) If X is a random variable, then Var(3X) is equal to a. b. c. d. 0 Var(X) 3Var(X) 9Var(X) 5) If the correlation coefficient of a set of data points on the xy-plane is 1, then a. b. c. d. the data points are randomly distributed the data points lie on a straight line with positive slope the data points lie on a straight line with negative slope the data points lie on two lines, one with positive slope and the other with negative slope SU2-45 FIN201 STUDY UNIT 2 6) Which of the following does not affect the value of the covariance of X and Y? a. b. c. d. The correlation coefficient of X and Y The variance of X The variance of Y The mean of X 7) The last version of Python in the 2.x series is a. b. c. d. 2.1 2.3 2.5 2.7 8) Which of the following is not a Python module for numerical analysis and visualisation? a. b. c. d. numpy scipy matplotlib yahoo-finance 9) As a finance student, which of the following categories of Excel worksheet functions are you most unlikely to use? a. b. c. d. Financial functions Statistical functions Engineering functions Date and time functions 10) The Excel formula for calculating interest rate is PV. a. True b. False SU2-46 FIN201 STUDY UNIT 2 Solutions or Suggested Answers Quiz Question 1: b Question 2: c Question 3: b Question 4: d Question 5: b Question 6: d Question 7: d Question 8: d Question 9: c Question 10: b SU2-47 STUDY UNIT 3 EQUITIES FIN201 STUDY UNIT 3 Learning Outcomes By the end of this unit, you should be able to: 1. Outline significant features of the equity market. 2. Recognise basic equity instruments. 3. Report on company characteristics through ratios and valuation models. SU3-1 FIN201 STUDY UNIT 3 Chapter 1 Market The stock market refers collectively to the activity of stock trading. It is mainly organised through centralised exchanges. For example, in Singapore, the Singapore Stock Exchange (SGX) is the centralised exchange for stock trading. In the United States, the New York Stock Exchange and the Nasdaq are the major stock exchanges. How stocks are traded has been continually evolving since the first stock exchange was established in Amsterdam in 1602. With internet on the scene to facilitate communication and interaction, various non-traditional means of trade congregation have arisen, such as electronic exchanges, dark pools, and so on. This trend can be understood from the following perspective. Centralised and organised exchanges possess some important features that facilitate trading. Being centralised aids in the location of trade counterparties and helps keep prices liquid and current. Modern stock exchanges are highly complex and organised to handle the huge volume of trades, process the transactions and help to ameliorate credit risk. These features are not immediately present in the OTC market. So instead of expecting new technology to make traditional exchanges obsolete, it is more reasonable to foresee coevolution between the various market forms on the road ahead. Statistics on the exchanges around the world are collected by the World Federation of Exchanges. These numbers tell us the shape of stock exchanges and hence the state of the stock market internationally. For instance, there were 2868 listed companies on Nasdaq, 2441 listed companies on NYSE and 771 listed companies on SGX in November 2015. The values of share trading (measured in terms of No. Shares Traded x Stock Price) in the same month are respectively USD 893,981.3 million, USD 1,272,753.2 million and USD 13,728.6 million for Nasdaq, NYSE and SGX. Each stock exchange actually holds two markets - the primary market and the secondary market. The primary market for stocks is also known as the market for Initial Public Offerings (IPOs). After its IPO, a stock proceeds to be traded in the secondary market. As a publicly listed company is accountable to the public for its finances, its life in the stock market goes through a regular cycle within a year. Four times annually, a company has to announce its earnings. An earnings season is a period of time when many companies release their earnings announcements. In the US, these seasons are from early to mid-January, April, July and October, during which a flurry of stock market activities is always expected. Other regular activities in the life of stocks are stock splits and rights issues. SU3-2 FIN201 STUDY UNIT 3 A split is an adjustment to the total number of shares in issue. It is an attempt to improve the liquidity for trading since a cheaper share price allows for finer groupings of shares in a portfolio and avails itself to be traded by more market participants. A stock split naturally diminishes the price of each share. Hence, stock splits always compensate existing shareholders with more shares on a pro-rata basis. Conversely, a reverse split replaces old shares by fewer new ones. This may be viewed as an attempt to increase the price of each share which is psychologically advantageous to do so if the share price has fallen too low. On the other hand, a rights issue occurs when a company wishes to raise new capital by issuing new shares to existing shareholders. Related to a rights issue is a share (or private) placement. Here, new shares are issued to external shareholders, usually small in number (i.e. not public) and institutional in scale. In any case, the purpose is to raise funds for the company and invariably results in the dilution of existing shares. Thus, the move needs to be justified to shareholders. 1. These sections from the Textbook (and do the associated exercises):  Chapter 12 Introduction  Chapter 12 Stock splits and rights issues 2. The Amsterdam stock exchange is the first stock exchange in the world. Read about it at Wikipedia. How do people come up with the idea of a stock? 1. Visit the websites of major stock exchanges in your cognitive vicinity (e.g. SGX, NYSE, Nasdaq). What are the types of information that you can find there? What are the top level sections at the websites? 2. By using the statistics provided by the World Federation Exchange, plot suitable charts to compare between the stock exchanges around the world in terms of (a) the number of listed companies, (b) the values of share trading, and (c) the domestic market capitalisation. SU3-3 FIN201 STUDY UNIT 3 Chapter 2 Signals and Quotes The stock prices at which trades occur are a result of the activity of trading. Stock prices provide traders and investors an important signal that relates to the wellbeing of a company. If a company creates a brilliant product that has a good potential with the mass market, then the stock price rises in anticipation. If it then turns out that the mass market does not appreciate the product even though it is brilliant, then there is a sell-off and the stock price falls. Notice that there is separation between the state of the company in terms of its stock price, and its state with regard to what it does fundamentally as a business. This results in two points:  the performance of the stock price and the fundamental performance of the company in the business may lag each other in time;  the performance or potential performance of the company in the business world is perceived by the traders and investors before it is reflected in the stock price. This means that there can be under-reaction or over-reaction in the stock price relative to its performance in the business world. Thus, stock price trajectories never proceed in a straight line. There is always some volatility intrinsic to it. The following is the trajectory of Apple's stock price (Src: Yahoo! Finance): Figure 3.1 SU3-4 FIN201 STUDY UNIT 3 Notice that it traces a path through time. This path appears pretty uneven. In finance, this unevenness is referred to as volatility. Several things are pertinent on the trajectory. Rises are times when investors who have invested in the stock are happy. Falls are when they are unhappy. But notice that a fall may then lead to a further rise. Hence, some investors regard themselves as long-term investors as they believe that the fundamental characteristics of the stock will eventually drive it to a "correct" high level that is commensurate to the fundamental characteristics. If one takes a step back and observes what goes on in the stock market, it is fair to say that no one can absolutely predict every move that the stock price makes. There is a high level of unpredictability. However, there is also some evidence that some investors possess the knack of getting their investments substantially correct. Warren Buffet is the most prominent example. The opportunity to make money from stocks creates a lot of interest in price movements. There is a general interest in assessing the price trajectory, attempting to grasp what it is doing and how it is going to move next as well as communicating about it, as journalist and commentators do. Allow me to point out an important fact: price trajectories such as the one that you visualise above, can be represented as a sequence of numbers, called the price data: … , 𝑝𝑖−2 , 𝑝𝑖−1 , 𝑝𝑖 , 𝑝𝑖+1 , 𝑝𝑖+2 , …. The sequence of price points is obtained by noting the price that is recorded at regular time intervals. In actuality, price is recorded whenever a trade occurs. For liquid stocks, this may mean many price data points within a minute. The most easily available price data on the internet are recorded at the daily frequency. For example, Yahoo! Finance data for Apple (recorded daily) is freely available for downloading. Price data, being a sequence of numbers, allows us to measure various aspects of it. We list some common measures here: SU3-5 FIN201 STUDY UNIT 3 Return The return at time 𝑖 is given by 𝑟𝑖 = 𝑝𝑖 − 𝑝𝑖−1 . 𝑝𝑖−1 If the frequency is daily, then the return is called the daily return. If it is annually, then the return is called an annual return. Annual returns are commonly used by fund managers to report the performance of their funds. Continuous Return The continuous return at time 𝑖 is given by 𝑟𝑖 = ln( 𝑝𝑖 ). 𝑝𝑖−1 The continuous return is approximately equal to the return. It arises theoretically and is used often in textbooks and academic papers. Price Change The price change at time 𝑖 is given by 𝛿𝑖 = 𝑝𝑖 − 𝑝𝑖−1 . The price change is less often used than the return as a measure because price changes occur at different scales for different stocks while price returns may be compared uniformly across all stocks. Volatility The volatility of a stock is the standard deviation of the returns of the stock price taken over some appropriate period. Suppose I would like to assess how volatile the stock is over the past month. Then I would collect daily price data from the past month (say of 31 days): 𝑝𝑖−30 , 𝑝𝑖−29 , … , 𝑝𝑖−1 , 𝑝𝑖 , SU3-6 FIN201 STUDY UNIT 3 compute the daily returns: 𝑝𝑖−29 − 𝑝𝑖−30 𝑝𝑖−1 − 𝑝𝑖−2 𝑝𝑖 − 𝑝𝑖−1 ,…, , , 𝑝𝑖−30 𝑝𝑖−2 𝑝𝑖−1 or 𝑟𝑖−29 , … , 𝑟𝑖−1 , 𝑟𝑖 for brevity, and then the standard deviation: (𝑟 − 𝑟)2 + ⋯ + (𝑟𝑖−1 − 𝑟)2 + (𝑟𝑖 − 𝑟)2 √ 𝑖−29 . 30 As the data is daily in frequency, this expresses the daily volatility. To obtain an annualised volatility (which is what is standardly assumed when one says "volatility" in finance), we multiply by a factor of √252 (252 is the number of business days in a year): (𝑟𝑖−29 − 𝑟)2 + ⋯ + (𝑟𝑖−1 − 𝑟)2 + (𝑟𝑖 − 𝑟)2 𝜎31 = √252 × √ . 30 I have written the 31-day (annualised) volatility as 𝜎31 . We may also compute an 𝑛day (annualised) volatility 𝜎𝑛 for any 𝑛, depending on the period of time that we're interested in. Stock prices at present are quoted up to cents. Thus we see that Apple's stock price is quoted at 99.52 or 97.39. The broker will quote the price of the stock in the form of a bid and ask, such as 99.51-99.53. The lower price 99.51 is the bid price or the price at which the broker will buy from the investor. The higher price 99.53 is the ask price or the sell price at which the broker will sell to the investor. The price 99.52, being right in between, is called the mid-market price. The difference of 99.53 - 99.51 = 0.02 or 2 cents, is called the spread. It represents the profit that the broker makes per share for every buy-sell round trip. In order to maintain an orderly market, stock exchanges have trading halts on extreme price moves and volatility. For example, Rule 80B of NYSE stipulates in detail the conditions under which trading will be halted if the market becomes too volatile. This implies that within a day, the stock market index is guaranteed not to drop beyond a certain level. This puts investors psychologically at ease. SU3-7 FIN201 STUDY UNIT 3 Rule 80B of NYSE on trading halts due to extraordinary market volatility. 1. Find out what the shape of the distribution of Apple's daily return look like. 2. Find the date(s) on which Apple's 31-day volatility is the highest in its history. SU3-8 FIN201 STUDY UNIT 3 Chapter 3 Instruments 3.1 Stocks and Indices The basic instruments in the stock market are the stocks themselves. Stocks can be managed in a collection or portfolio. Mutual funds do this as a business. A stock index is a weighted average of the prices of a basket of stocks. For example, the Dow Jones Industrial Average (DJIA) is computed as the average of 30 stock prices. The S&P 500 is a weighted average of the stock prices of 500 stocks in the US market and it is the most prominent stock market signal from the US. The weighting for DJIA is the simple one (all weights equal 1) while the weighting for S&P 500 is the number of tradable shares of a stock in the market. Thus, the S&P 500 index is said to be weighted by market capitalisation. A formula for an index weighted by market capitalisation may be written this way: Index = ∑(number of shares issued x price of share) . divisor 3.2 Single Stock Futures Single stock futures are futures contract whose underlying asset is a single stock. When two parties enter into a single stock futures contract, the following happens:  the contract is entered into on a start date, call it time 0  party A agrees to buy a single stock from party B at a price 𝐾 that is determined at time 0  at time 𝑇, called the maturity, party A buys the stock from party B at price 𝐾 In the above scenario, A is said to be in the long position while B is said to be in the short position. The price 𝐾 is called the strike price. For example, suppose A and B enter into a futures contract to trade AAPL stock 1 month from now at $100. Suppose that at maturity, the stock price of AAPL is $110. Then A will buy the stock from B at $100. This is seen as a gain for A, since he can immediately sell the stock in the market to make $10. Conversely, if the stock price of SU3-9 FIN201 STUDY UNIT 3 AAPL is $90 at maturity, then it is seen as a loss for A, since he can otherwise obtain the stock from the market at $90. Thus, he makes a loss of $10. You would enter into a short position in a single stock futures for one of two reasons:  because you think that the stock price will fall by maturity (speculation)  because you want to protect the value of the stock that you have already owned (hedging) The reasons for the long position are similar (i.e. speculation or hedging). If a futures contract is traded at an exchange, the listed price is the strike price. There is however, another notion of price associated to a futures contract - its theoretical price, or fair price, or theoretical stock futures price. This must be distinguished from its strike price. At the exchange, a futures contract is entered into without any initial charge. Its fair price is 0. However, its strike price is never 0. The strike price is empirically determined by trading activities in the market. The theoretical price is derived mathematically from assumptions. It is derived from the perspective of one who is trying to hedge the futures contract by trading the underlying stock. The theoretical stock futures price is given by the following formula: (current share price − PV of any dividends) × (1 + 𝑖 × 𝛼), where 𝛼 is the maturity of the contract expressed as a fraction of the year (1 year = 1 unit by convention in finance), 𝑖 is the short-term interest rate and PV stands for "Present-Value". 3.3 Stock Index Futures A stock index futures is a futures contract whose underlying is a stock index. It is similar in concept and purpose to a single stock futures, except that you will use it to speculate or hedge the market-wide movements instead of a single stock. SU3-10 FIN201 STUDY UNIT 3 One difference is that while the short party in a single stock futures contract may deliver the single stock asset at maturity, the short party in an index futures contract must deliver cash (i.e. the futures contract is cash-settled) as it is impossible to deliver all the stocks in an index. There is similarly a notion of theoretical stock index futures price or the fair price. And again, this must be distinguished from the contract's strike price. These sections from the Textbook (and do the associated exercises):  Chapter 12 Stock indices  Chapter 12 Single stock futures  Chapter 12 Stock index futures SU3-11 FIN201 STUDY UNIT 3 Chapter 4 Calculations 4.1 Ratios Ratios are fractions computed from the characteristics of a company and its stock. It is commonly used in fundamental analysis to compare between stocks so as to select a more attractive one for investment. Ratios do not have an absolute unit, unlike, for example, the metric system - everyone knows the meaning of 1 cm. Ratios only make sense in comparative terms - when they are compared against themselves over time, or when they are compared between different companies. Some common ratios are: Return on Equity (ROE) ROE = earnings book value This indicates the return that the management is achieving with the capital that is available in the company. Dividend Yield Dividend yield = dividend per share share price This indicates the dividend return that is received on the capital that is invested in the share. Earnings Yield and Price/Earnings Ratio (PE ratio) Earnings yield = PE ratio = earnings per share share price share price earnings per share These two ratios are reciprocal to each other. SU3-12 FIN201 STUDY UNIT 3 The earnings yield is the return that is achieved for the capital that is invested in the share. The PE ratio is the opposite of this: it is the price that is paid in order to achieve a given earnings by the company. Price/Book Ratio (PB ratio) PB ratio = share price book value per share This ratio indicates the value of the share as given by its share price over its book value. Earnings Per Share (EPS) EPS = earnings number of shares issued This ratio indicates literally what its name suggests. Dividend Cover Dividend cover = earnings total dividend payout This measures how able the company is in paying its dividends. Projected Earnings Growth (PEG ratio) PEG = PE ratio forecast earnings growth rate x 100 This ratio is used in the following manner: if 2 companies have the same PE ratio but one has a lower PEG ratio, it means that its forecast earnings growth rate is higher. Hence it's a better buy. SU3-13 FIN201 STUDY UNIT 3 4.2 Valuation In stock valuation, the value of a stock is derived theoretically, and not from the price that is traded in the market. Thus, it is important when trades in shares of private (non-listed) companies occur. Two theoretical models are considered here. They both derive a relationship between the value (i.e. theoretical price) of the stock and its yield (from future cash flows). 4.2.1 The Gordon Model The Gordon model assumes that owning a stock provides an infinite series of cash flows due to dividends which grow at a constant rate 𝑔 every year. It then relates the value of the stock with the yield from the cash flow series. Suppose currently it is time 0. At time 1, a dividend of amount 𝑑(1 + 𝑔) is received. At time 2, a dividend of amount 𝑑(1 + 𝑔)2 is received. At time 𝑖, a dividend of amount 𝑑(1 + 𝑔)𝑖 is received. And so on. Suppose a rate of return or yield is expected on the cash flows. This may be found by applying the Capital Asset Pricing Model (refer to the Concept section). The theoretical price of the stock is given by (using the formula for geometric progressions) 𝑃= 𝑑(1 + 𝑔) 𝑑(1 + 𝑔)2 𝑑(1 + 𝑔)𝑖 + + ⋯ + +⋯ 1+𝑦 (1 + 𝑦)2 (1 + 𝑦)𝑖 = 𝑑(1 + 𝑔) 1 × 1+𝑔 1+𝑦 1−1+𝑦 = 𝑑(1 + 𝑔) 𝑦−𝑔 SU3-14 FIN201 STUDY UNIT 3 The formula can also be inverted to express the yield in terms of the price: 𝑦= 𝑑(1 + 𝑔) + 𝑔. 𝑃 4.2.2 The T Model The T Model posits that the yield of a stock is given by the following formula: yield = dividend + excess cash + price increase . share price The T model's yield is computed based on cash flows that occur over a year. This is in contrast with the case of the Gordon Model, whose yield is derived from cash flows that occur indefinitely. These sections from the Textbook (and do the associated exercises):  Chapter 12 Ratios  Chapter 12 Valuation SU3-15 FIN201 STUDY UNIT 3 Chapter 5 Concept: The Capital Asset Pricing Model In the academic finance or theoretical finance, there is an effort to explain the significance of a stock price. This effort consists of a search for underlying factors that drive price changes. Such a well-known model is the Capital Asset Pricing Model (or CAPM). It posits that 𝑟 − 𝑟𝑓 = 𝛽(𝑟𝑚 − 𝑟𝑓 ), where • 𝑟 is the expected return of the stock • 𝑟𝑓 is the risk-free rate in the market • 𝑟𝑚 is the expected return of the market • 𝛽 is a sensitivity measure of the stock return with respect to the market return A theoretical argument is used to establish the model. The model expresses a relationship between the market return and the return of an individual stock in the form of a linear equation. In more details, the meaning of the model is as follows. The left-hand-side is the excess return of a company stock over the risk-free rate. The right-hand side is the product of beta, the sensitivity measure, and the excess return of the market over the risk-free rate. The equation tells us that, in order to find the excess return of a company stock over the risk-free rate, one only needs to multiply beta to the excess return of the market over the risk-free rate. In other words, information about the expected return of the stock is encoded in the factor beta. To apply the model to real world data, the risk-free rate may be read from the money market, while the expected return of the market is commonly measured as the historical return on a selected market index. The market index is taken as a proxy for the entire market. Theoreticians devise sophisticated methods to measure beta from market data. We'll not be concerned with such technical issues here. Instead, let's see how the model is used in some theoretical calculations. SU3-16 FIN201 STUDY UNIT 3 Example Assume that the expected return on the market is 14%, risk free rate is 6% and beta of a security is 1.2. Calculate the expected return on the security. Since 𝐸(𝑅) = 𝑟𝑓 + 𝛽(𝐸(𝑅𝑚 ) − 𝑟𝑓 ) = 6% + 1.2(14% − 6%), where 𝐸(𝑅) denotes the expected return of the security return, and 𝐸(𝑅𝑚 ) denotes the market return. Thus, 𝐸(𝑅𝑖 ) = 15.6%. Example Consider the following project that requires an investment of $3 million. The cash flows are estimated as follows: Year Cash Flow 1 700,000 2 900,000 3 1,500,000 4 1,800,000 If 𝑟𝑓 = 6%, 𝛽 = 1.3, 𝑟𝑚 = 14%, should the project be undertaken? (Apply the Capital Asset Pricing Model to answer the question.) The project will be undertaken if the NPV of the project is positive, i.e. NPV = PV of future cash in-flows – Initial investment > 0. The PV of future cash flows are calculated as follows. First, we estimate the opportunity cost or the cost of capital from the CAPM. This is none other than the term 𝑟 in the CAPM equation. SU3-17 FIN201 STUDY UNIT 3 (Digression: When interpreted in terms of stocks, it is the expected stock return. This interpretation and the one that is required for this question are consistent in this manner: the expected return of a stock is the rate at which money invested grows. Thus, the term 𝑟 in the CAPM model is the rate of growth of cash that is associated to an asset or a project.) We have Opportunity cost = 𝑟𝑓 + 𝛽(𝑟𝑚 − 𝑟𝑓 ) = 0.06 + 1.3(0.14 − 0.06) = 16.4%. Thus, 𝑁𝑃𝑉 = 700,000 900,000 1,500,000 1,800,000 + + + − 3,000,000 = 197,275. 1.164 1.1642 1.1643 1.1644 Since NPV > 0, the project should be undertaken. Example Assume that a company has recently paid a dividend of $2. The dividend is expected to grow at a constant rate of 6%. The risk-free rate is 4%, beta is 1.2 and the expected market return is 10%. What is the value of the stock? The plan is this: first we'll derive the yield or expected rate of return, from the CAPM. Then we will apply the Gordon Model to price the stock. By the CAPM, 𝑟 = 0.04 + 1.2 × (0.10– 0.04) = 11.2%. By the Gordon Model, 𝑃= 2(1 + 0.06) = $40.77. 0.112– 0.06 SU3-18 FIN201 STUDY UNIT 3 Chapter 6 Analyses and Strategies The workflow in trading or investment proceeds like this: 1. Analysis 2. Make a choice and enter into a trading/investment position 3. Exit the position It is necessary to analyse carefully the choices that one may have before entering into a trading or investment position as it involves a real chance of losing money. As so many things are going on in the market, different styles of analysis have developed to focus on different aspects. Analysis of stocks is commonly classified as either fundamental or technical. In fundamental analysis, a collection of companies are pooled together and compared against each other with respect to certain distinguished features. Some of these features are quantitative in nature, such as the stock price itself, its returns, the PE ratio or the EPS. Other features may be qualitative in nature, such as the perceived quality of the executives, the business the company undertakes or the economy at large. The purpose of the analysis, is to make a choice for the most attractive stock in its potential to gain in price in the future. In technical analysis, what's analysed is price trajectories themselves. Certain patterns that occur along the price trajectories are deemed as signals that are indicative of the impending price movement. The purpose of the analysis, is to make suitable choice of an entry point, i.e. a time at which the trader presses the buy or the sell button and takes on a long or a short position in the stock. Apart from fundamental analysis and technical analysis, there is also something known as quantitative analysis. This makes use of statistics as a basis for decision making. For example, one may think that within a year, there are regularly distinguished periods of time, such as the 4 seasons, Christmas buying period, earnings seasons, and so on. And during each season, a certain category of stocks tends to rise appreciably in price. So an attempt may be made to formulate a strategy that selects stocks based on category per season on an annual basis. The law of large numbers in statistics helps to ensure that the decisions are correct most of the time. SU3-19 FIN201 STUDY UNIT 3 It's illuminative to put the strategies side-by-side for comparison: Analysis Features Choices Fundamental Characteristics Best company of companies from a collection Patterns in price Time of entry Technical trajectories Quantitative Statistical Categories of regularities stocks, periods of times, associated with the regularities Watch this video on the basic steps of how to use Thomson Reuter’s Eikon system to carry out fundamental analysis research: Fundamental Analysis on Eikon (Access video via iStudyGuide) Watch this video in which I explain the distinction between stock price and stock value: Stock Price vs Valuation (Access video via iStudyGuide) This is a marketing video for an automatic calendar-based trading system called “Absolute Profits”. View the video (6:00 – 27:00) and pay attention to the nature of the trading strategy that is purportedly behind the system. In other words, what information is the strategy picking out from the market and how does it use this information to trade? (As a finance student, you should be as neutral as possible towards the marketing stance of the video. You should try to appreciate what is being articulated in terms of information and decisions.) SU3-20 FIN201 STUDY UNIT 3 Quiz 1) The Amsterdam Stock Exchange was started in a. b. c. d. 2) Opportunity cost is also known as a. b. c. d. 3) NYSE Nasdaq Shanghai Stock Exchange Korea Exchange There are about _________ listed companies on the SGX. a. b. c. d. 5) chance cost cost of capital lucky price cost of opportunity The largest stock exchange in the world (2016) is a. b. c. d. 4) 1602 1702 1802 1902 250 750 1250 1750 Which of the following does not represent a bet on the economy? a. b. c. d. A position in an index option A position in an index futures Holding a share of an S&P 500 ETF Holding a share of Apple stock SU3-21 FIN201 STUDY UNIT 3 6) To verify whether or not the executives of a company are doing their best with available capital or not, an analyst will look at a. b. c. d. 7) ROE dividend yield PE ratio PB ratio The application of the Gordon model in the valuation of a publicly listed company will produce a price that is equal to the stock price. a. True b. False 8) If you are interested to speculate on Apple, the most expensive option is a. b. c. d. 9) to buy Apple option to long Apple futures contract to buy Apple stock to buy an iPhone The index of Singapore's stock market is the a. FTSE Straits Times Index b. MSCI Straits Times Index 10) Stock price generally drops right after dividend payout day. a. True b. False SU3-22 FIN201 STUDY UNIT 3 Solutions or Suggested Answers Quiz Question 1: a Question 2: b Question 3: a Question 4: b Question 5: d Question 6: a Question 7: b Question 8: c Question 9: a Question 10: a SU3-23 STUDY UNIT 4 FIXED INCOME FIN201 STUDY UNIT 4 Learning Outcomes By the end of this unit, you should be able to: 1. Describe significant features of the fixed income market. 2. Calculate with quotes of various fixed income instruments. 3. Describe significant types of price information. 4. Apply discounting methods to the pricing of basic fixed income instruments. 5. Compute with prices and rates. 6. Describe significant features of the term structure. 7. Apply bootstrapping to construct the yield curve. 8. Compute with yield curves. SU4-1 FIN201 STUDY UNIT 4 Chapter 1 Market The fixed income market is conventionally categorised into:  money market (trade in short-term instruments, i.e. 1 year or less in maturity)  bond market (trade in long-term instruments, i.e. more than 1 year in maturity) In the money market, forward rate agreements (FRAs) and interest rate futures (IRFs) are the major instruments. FRAs are found in the OTC market while IRFs are traded on exchanges. Bonds and their derivatives are the major instruments in the long-term interest rate market. Interest rates signals arise from the fixed income market. When we piece together an interest rate for each term, across all terms, we obtain a yield curve, which is a state of the fixed income market at a given time. The fixed income market is the market for borrowing and lending. In a borrowerlender relationship, we say that the borrower obtains credit from the lender. Hence the market is also called the market for credit. Another name is the debt market. This highlights the role of debt as one of two major financing means for companies. "Fixed income" refers to the series of cash flows associated with such investments. Buying a fixed income instrument is equivalent to lending money, while selling it is equivalent to borrowing money. The consequence of crystallising the borrower-lender relationship into an instrument allows it to be traded in what is called the secondary market. The primary market precedes the secondary market. It is where a fixed income instrument is first issued. All subsequent trades occur in the secondary market. The primary market is generally structured differently from the secondary market. For instance, the first issuance of the US Treasury debt instruments occurred in an auction market that involves only big market players like the major banks. The auction schedule for US Treasury securities is published regularly at its website (https://www.treasurydirect.gov/instit/annceresult/annceresult.htm). It gives a sense of the types of instruments auctioned, the meaning of settlement date and the great number of debts that is issued by the government. A crucial measure of the secondary market is liquidity. It is the single reason for the existence of the market - the ability for buyers and sellers to locate each other easily. Prior to its maturity, an instrument can change hands any number of times. The ease of trading facilitates the growth of the secondary market and the existence of the secondary market in turn improves the ease of trading. SU4-2 FIN201 STUDY UNIT 4 Borrowing and lending has a very long history in human civilisation. It preceded all other forms of financial transactions. Clay tablets from Babylonia dated back to 3000 BCE have been excavated and found to be inscribed with loan contractual obligations. In contrast, the first stock traded was that of the Dutch East Indies Company which was founded in 1602, King Alyattes of Lydia (located in modern day Turkey) first minted coins from electrum around 600 BCE, and the earliest paper currency has been traced back to the Tang dynasty in China around 800 CE. These snapshots put into perspective how the major features of today's financial landscape have evolved into its present form. These sections from the Textbook (and do the associated exercises):  Chapter 3 Overview  Chapter 6 Overview of capital market instruments SU4-3 FIN201 STUDY UNIT 4 Chapter 2 Signals and Quotes There are several standard ways that interest rate signals are commonly classified into:  Long term vs short term – short-term rates come from the money market – long-term rates are computed from yields in the capital market  Benchmark vs non-benchmark – benchmark short-term rates are averages of rates bidded/offered by top banks – benchmark long-term rates are yields of risk-free government bonds  Geographical – due to global linkages, there is a mix of dependence and independence among international rates  Instrument type – e.g. short-term loans, bonds, mortgages and other collateralised loans  Prices in the interest rate and bond derivative markets Benchmark rates (both short and long terms) give us the term structure - a barometer of the fixed income market. Let's take a look at them. 2.1 Short-Term Rates "LIBOR" stands for "London Interbank Offered Rate". It is an average of the interest rates offered (i.e. ask rate or selling rate) by top banks to one another in London for short-term loans (o/n, 1w, 2w, 1m, 2m, 3m, 4m, 5m, 6m, 7m, 8m, 9m, 10m, 11m, 12m). It is calculated by the British Bankers' Association (BBA) daily. The LIBOR is a benchmark short-term interest rate for the money market. Other interest rates are often expressed in its terms (e.g. a rate is LIBOR + 3 b.p.) and derivative contracts make reference to it as underlying. One typically finds a LIBOR for each international currency, e.g. an oft-mentioned LIBOR is the USD LIBOR. In the US, the Fed Funds rate is keenly watched as it is a key instrument used by the central bank to intervene in the money market. SU4-4 FIN201 STUDY UNIT 4 Figure 4.1 Significant market events are reflected on the trajectory of the Fed Funds rate. The peak was a deliberate policy by the then-chairman Paul Volcker as he raised rates to put an end to stagflation (stagnation plus inflation) that developed in the US over the 1970s. The interest rate environment is the lowest for decades currently (2015) as reflected by the right-end of the curve. The Fed has been lowering rates over the years to help boost the economy. 2.2 Long-Term Rates Long-term benchmark rates are found from the yields of government bonds. In the US, these are referred to as treasury instruments and are important for several reasons:  they are generally regarded as of the lowest risk, hence yields derived from them are taken as benchmark yields, relative to which other bonds are priced (e.g. quotes of bonds are often expressed in terms of a credit spread over a base yield)  government borrowing may be regarded as bedrock and driver of the debt market in general  government borrowing impacts the economy at large SU4-5 FIN201 STUDY UNIT 4 Investors of these debts are generally large institutions, such as banks and pension funds. Pension funds, which have long-term liabilities, understandably prefer to lock rates over the long term, and hence are investors of bonds. 2.3 The Term Structure or Yield Curve When long-term yields and short-term rates at a given instant are pieced together across terms (i.e. terms of maturity of the associated loans), the yield curve (aka term structure) of the fixed income market is obtained The yield curve allows us to assess the cost of borrowing in the market at the benchmark level. Actual borrowing is derived by adding an estimated credit spread to the benchmark rate (e.g. benchmark + X basis points). The term structure (aka yield curve) is commonly displayed as a curve, with the horizontal axis representing time into the future, and levels on the curve representing general borrowing cost (in terms of interest rate) for a loan that lasts the length of time: Figure 4.2 The common representation depicts the term structure as an upward sloping curve, which means that the longer the term, the higher the borrowing costs. The economists have provided reasons for this "self-evident truth" (as it seems intuitively clear that the lender would naturally charge more for a longer loan period), enshrining them into 3 "theories" - liquidity preference theory, market segmentation theory, pure expectation theory. Theory aside, it is not wholly appropriate to think that the market would behave in a certain way because a rational lender would behave in the same way, for the market is not made up of a single lender. SU4-6 FIN201 STUDY UNIT 4 The following chart shows the term structure of GBP on 9/2/2005 (ref: Wikipedia https://en.wikipedia.org/wiki/Yield_curve): Figure 4.3 It is quite unlike the upward sloping model that is depicted above. Thus, remember this: the common way to think about a term structure is that it's an upward sloping curve which indicates that the longer the term the higher the borrowing cost; however, real term structure displays more complexities than that. The term structure may be divided into 2 halves. The left-half (short end), to the left of the 1-year mark, is made up of data points from the money market. The right-half (long end) consists of yields that are extracted from bonds from the capital market. The money market thus accounts for the short end of the yield curve. The shape of the term structure changes over time as the market evolves and the prices and rates of fixed income instruments change. It is important to be aware that there are 2 dimensions of time variations in the study of interest rates: 1) from the present until time 𝑡 into the future which is called the "term"; 2) the change of a certain quantity as it evolves for time. Thus, one may talk about the 3-month interest rate as it is now, or as it was a while ago, or as it may be some time into the future. And SU4-7 FIN201 STUDY UNIT 4 similarly, we may think about the 5-year yield as it may evolve in the future as we plan our long-term investments. There is not one standard term structure. Anybody can construct one for himself using data collected from the market. However, when this is done, it is usually based on benchmark interest rates and yields such as those from the LIBOR and the US treasury instruments. Other rates and yields in the market lie close to these rates as competitive pricing action in the market keeps rates reasonably together. Attempting to construct the yield curve by hand would give us data points at a discrete set of terms: 1 day, 1wk, 1mth, 2mths, 3mths, 6mths, 12mths; 2y, 3y, 5y, 7y, 10y, 20y, 30y. These data points are then stitched together by linear interpolation to produce a yield curve. The curve provides for an easier reading than the data points. It also provides interpolation and extrapolation of rates and yields to terms that are not found in the benchmark instruments used to plot it. Currently (Jan 2016), the term structure (for AAA rated bonds and all bonds) in the Eurozone looks like this (ref: ECB https://www.ecb.europa.eu/stats/money/yc/html/index.en.html): Figure 4.4 SU4-8 FIN201 STUDY UNIT 4 Notice that the short end has dipped below the zero level, while the entire curve exhibits the standard upward sloping model behaviour. The gap between the two curves represents credit spread - there are non-AAA rated bonds in the collection of instruments that are used to plot the yield curve, and these give higher yields than the AAA-rated one. We will go through how a term structure is put together starting from rates and yields that are obtainable from instruments that are traded in the market in the next chapter. Plot the yield curve for the US fixed income market using data that is found at the Federal Reserve website. SU4-9 FIN201 STUDY UNIT 4 Chapter 3 Instruments We will be mainly concerned with these instruments:      loans forward-forwards forward rate agreements (FRAs) bonds floating rate notes (FRNs) 3.1 Loans We will consider simple loans for illustrating calculations in simple settings. Real world loans can be complicated, with the possible additions of various clauses (e.g. change of terms, collaterals, etc.) in order to make the loan attractive or to secure the loan for the creditor in case the debtor defaults. Loans are repaid with interests whose levels are mediated by the prevailing interest rates. The current prevailing interest rates are known as spot rates. 3.2 Forward-Forwards A forward interest rate is an interest rate that is posted at present but pertains to a loan that will be carried out for a period of time in the future. This is illustrated by the following diagram: Figure 4.5 A forward interest rate allows a borrower to hedge risk by fixing an interest rate which he finds reasonable at present for a loan which he intends to take out some time in the future. SU4-10 FIN201 STUDY UNIT 4 Such a loan is known as a forward loan or a forward-forward (because the start and end dates occur in the future). 3.3 Forward Rate Agreements (FRAs) A forward rate agreement (FRA) is a contract that binds two parties over the future outcome of a reference interest rate. The reference interest rate is usually some money market benchmark rate such as the LIBOR. The contract is found in the OTC market (i.e. not traded at centralised exchanges like stocks are). A brief description of how it works is this. There are two parties A and B who are engaged in an FRA contract. The FRA contract specifies the following items:      a floating rate 𝑓 a fixed rate 𝑟 a notional amount 𝑁 maturity of the contract 𝑠 length of loan period referred to by the contract 𝑡 At the end of the loan period 𝑠 + 𝑡, one party, say A, pays 𝑓×𝑡×𝑁 to his counterparty, and his counterparty, B, pays 𝑟×𝑡×𝑁 to A. Note that the floating rate is unknown at the start of the contract. It is only known at time 𝑠, at which the floating rate is said to be fixed. SU4-11 FIN201 STUDY UNIT 4 Diagrammatically, the exchange may be visualised this way: Figure 4.6 Let's try to understand this. A and B are in opposite positions with respect to their views about the floating interest rate which will apply to the future loan period between the times 𝑠 and 𝑠 + 𝑡. Figure 4.7 At the fixed rate 𝑟, the loan interest over the period is 𝑟𝑡𝑁. At the floating rate 𝑓 , the loan interest will be 𝑓𝑡𝑁. However, the value of 𝑓 is unknown initially (at time 0); only the fixed rate is known. If 𝑓 turns out higher than 𝑟, then the floating rated loan will generate a bigger interest amount than the fixed rated interest, and vice versa. Hence, an FRA is a bet of which of the two loans - fixed rated or floating rated - is higher priced at time 𝑠. B is said to be in the long position of the contract (pays fixed and receives floating) and A is said to be in the short position. The long party stands to gain from an increased floating rate, while the short party stands to gain from a decreased floating rate. SU4-12 FIN201 STUDY UNIT 4 3.3.1 Alternative Definition We may combine the two cash flows in the description into one this way: at loan-end time 𝑠 + 𝑡, the following amount needs to be paid by the long party to the short party: (𝑓 − 𝑟) × 𝑡 × 𝑁. Thus, if 𝑓 > 𝑟 at maturity, B needs to pay this amount to A. And conversely, if 𝑓 < 𝑟 , A needs to pay the negative of this amount to B. 3.4 Bonds Bonds are the key instruments of capital markets which deal with long-term interest rate risk. In order to understand bonds, we must appreciate the following key dimensions:      Issuers Primary and secondary markets Credit quality Types Pricing Issuers of bonds may be classified into several large groups:    governments (sovereign bonds) municipalities (states, cities, towns, etc.) corporates (corporate bonds) Bonds are commonly issued in auctions. Then they are processed, stripped or resold in secondary markets. The nature of the issuer affects the bond in the sense of credit quality. Credit is a measure of the likelihood of default. If credit is good, lenders are willing to lend to the borrower without further surcharge. Conversely speaking, if the issuer has a good credit quality, he may expect to borrow relatively cheaply from the market. Three major agencies rate the credit quality of firms and institutions: Standard & Poor's, Moody's and Fitch. SU4-13 FIN201 STUDY UNIT 4 S&P's credit rating scale is ranged from AAA to D and NR (not-rated) (Ref: https://www.standardandpoors.com/en_US/web/guest/article//view/sourceId/504352). As of Jan 2016, the S&P's rating of long-term debt for some entities are: - Singapore and the United States are countries with the AAA rating - Only a small handful of US companies are with the AAA rating (Microsoft, Exxon-Mobil, Johnson & Johnson) Japan is rated A+ for its weak economic outlook - Banks in general do not have the strongest of credit ratings due to the nature of their business. DBS is rated AA-. Goldman Sachs Group Inc. is rated BBB+. A bond basically promises a series of cash flow payments in the form of coupons and a final principal payout at maturity. Many variations exist because these cash flows can vary and be made dependent on market factors. Some important classes of bonds or bond-like instruments are:      Treasury bonds Corporate bonds Zero-coupon bonds Asset-backed securities Floating rate notes We will focus on treasury bonds and zero coupon bonds. 3.4.1 Treasury Bonds The US Treasury issues 3 kinds of debts:  T-bills (4w, 3m, 6m, 1y)  T-notes (2y, 3y, 5y, 7y, 10y)  T-bonds (20y, 30y) For bonds and notes (long-term instruments), coupons are issued at semi-annual frequency. The day count convention for them is ACT/ACT. For bills, the day count convention is ACT/360. 3.4.2 Zero Coupon Bonds (ZCBs) Zero-coupon bonds (ZCBs) are the simplest bonds conceptually, for there is only 1 cash flow at its maturity. SU4-14 FIN201 STUDY UNIT 4 Figure 4.8 Suppose a ZCB has a maturity of 𝑇 and a face value of $100, i.e. the holder of such a bond will expect to receive $100 at maturity. Suppose the market price of this bond is 𝑃. Then we may hypothesise a yield 𝑦 such that 𝑃= 100 . (1 + 𝑦)𝑇 The point to note here is that, in the absence of coupons, the relationship between price and yield is very simple. Given a spectrum of ZCBs of varying maturities, we would be able to compute yield numbers 𝑦𝑇1 , 𝑦𝑇2 , … , 𝑦𝑇𝑛 . These numbers together form a yield curve. The yield curve gives a snapshot of the interest rate environment in terms of cost of borrowing for various period lengths. Thus, the usefulness of ZCBs is that a collection of them of various maturities provides us with a hint of what the interest rate environment is like in terms of the cost of debt. 3.5 Floating Rate Notes In contrast to treasury bonds whose coupons are fixed rated, floating rate notes promise a series of cash flows whose amounts are dependent on some benchmark market rate. SU4-15 FIN201 STUDY UNIT 4 In fact, a short-term deposit that is rolled over periodically can be interpreted as a floating rate note. As it rolls over to the next period of deposit, the interest rate is marked to the latest market level. Effectively, the rolling deposit receives interest payouts that depend on the market interest rate level as well as the final principal repayment. Floating rate notes may be diagrammatically represented by the following series of cash flows, where the squiggly payouts refer to amounts that are not determined until some time in the future: Figure 4.9 These sections from the Textbook (and do the associated exercises):  Chapter 3 Day / year conventions  Chapter 3 Money market instruments  Appendix 2 A summary of market day / year conventions and government bond markets  Chapter 4 Forward-forwards, FRAs and futures  Chapter 6 Features and variations SU4-16 FIN201 STUDY UNIT 4 Chapter 4 Calculations 4.1 Day / Year Conventions "Day / Year" here refers to a fraction, namely the day count fraction (DCF) that appears in the computation of interest: Interest = Interest Rate x Day Count Fraction Interest is paid on a loan that is held over a fraction of the year - this is what the formula tells us. The simple concept is made complicated by the actual form that the fraction takes. How the fraction is computed depends on the convention that is assumed in the calculation. This convention is called the day count convention. Some common conventions are listed here:  ACT/ACT  ACT/365  ACT/360  30/360 "ACT" means "actual number of days" and it implies that the actual number of days that are found in the loan period is to be counted. ACT/365 is said to be on a 365-day basis, while ACT/360 is said to be on a 360-basis. Most money markets assume the ACT/360 convention which is thus commonly called the money market basis. Exceptions exist, the common of which is ACT/365. Consider the following example to see how these different conventions work out in calculations: Example Compute the interest on $100 based on a rate of 5% over a period of 62 days that belong to a single year, assuming each of the following conventions: 1. 2. 3. 4. ACT/ACT ACT/365 ACT/360 30/360 SU4-17 FIN201 STUDY UNIT 4   For ACT/ACT, we need to know whether or not the year is a leap year. Suppose it is a leap year, then the DCF is 62/366 and the interest is 62 100 × 0.05 × 366 ≈ 0.847.  For ACT/365, the interest is 100 × 0.05 × 365 ≈ 0.849.  For ACT/360, the interest is 100 × 0.05 × 360 ≈ 0.861.  62 62 For 60/360, the DCF is 60/360 as the 62-period spans 2 months which is 60 rounded to 2 × 30 for this convention. The interest is 100 × 0.05 × 360 ≈ 0.833. 4.2 Simple and Effective (or Equivalent) Rates on Different Bases Suppose it is given that the principal is $100, the interest is $3 and the period of loan is 180 days. What is the interest rate that is implied? The answer to this question depends on assumption made on the interest rate and the DCF. If 𝑟 is regarded as a simple rate on the 365-basis (which by default, means ACT/365), then we will have (1 + 𝑟 × 180 ) × 100 = 103. 365 If 𝑟 is regarded as a simple rate on the 360-basis (which by default, means ACT/360), then we will have (1 + 𝑟 × 180 ) × 100 = 103. 360 If 𝑟 is regarded as an effective or equivalent (or annual equivalent) rate on the 365basis (which by default, means ACT/365), then we will have 180 (1 + 𝑟)365 × 100 = 103. Thus, simple rates involve multiplying DCF to the rate while effective (or equivalent or annual equivalent rates) involve exponentiating the factor (1 + 𝑟) by the DCF. SU4-18 FIN201 STUDY UNIT 4 4.3 Certificate of Deposit (CD) A certificate of deposit is like a time deposit only that it is transferrable/tradeable/negotiable. When a depositor deposits at a bank by means of a CD, he in fact purchases the CD from the bank. There is a liquid CD market for him to then trade away (i.e. liquidate) his investment if he so desires to not hold it till maturity. A CD generally pays interest in the form of coupons. As it is not a discount instrument, when a CD is first issued, it is usually issued at par, i.e. at a price that is equal to its face value. The net amount received at maturity (coupons being compounded forward in time) is called the maturity proceeds. After issuance, its fair price may be computed as the NPV of the cash flows that come from owning it. Let's consider the simplest case of a CD that issues a coupon and matures at time 𝑇. The current time is assumed to be 0. Figure 4.10 Let the face value be denoted by 𝐹 and the coupon rate be denoted by 𝑟. Then the maturity proceeds is 𝐹 × (1 + 𝑇 × 𝑟). SU4-19 FIN201 STUDY UNIT 4 The NPV of the CD is obtained by discounting the maturity proceeds using a suitable yield. If the price is given, then this yield is implied. If the price is unknown and needs to be calculated, then this yield must be read from the market. In any case, the important thing to remember is that yield of an instrument is as informative as the price as one determines another. Let 𝑦 be the yield of the CD and 𝑃 be its price. Then 𝑃= 𝐹(1 + 𝑟𝑇) . (1 + 𝑦𝑇) More generally, let 𝑃(𝑡) be the price of the CD at time 𝑡. Then the price of the CD in terms of its yield is 𝑃(𝑡) = 𝐹(1 + 𝑟𝑇) . (1 + 𝑦(𝑇 − 𝑡)) Figure 4.11` From this formula, we may compute the return from holding the CD. Suppose the CD is bought at time 𝑡1 and sold at time 𝑡2 , where 𝑡1 < 𝑡2. Let's try and compute the simple return on this investment 𝑟′: (1 + 𝑟′(𝑡2 − 𝑡1 ))𝑃(𝑡1 ) = 𝑃(𝑡2 ). SU4-20 FIN201 STUDY UNIT 4 This implies that the simple return on investment on the CD is 𝑟′ = 1 𝑃(𝑡2 ) ( − 1). 𝑡2 − 𝑡1 𝑃(𝑡1 ) 4.4 Discount Instruments The pricing methods of money market instruments are generally classified into 2 types: discount and yield. 4.4.1 Present Value by Yield In the yield method, the instrument promises to pay a sequence of cash flows in the future, which when suitably discounted to the present with a suitable yield, gives the market price of the instrument. Examples of yield instruments are: CDs, Eurocurrency CPs. The relevant equation is explained as follows. Suppose:     the market price of a discount instrument is 𝑃 its face value is 𝐹 the yield on it is 𝑦 the time to maturity is 𝑇 Then these quantities are related by the equation: 𝑃= 𝐹 . 1 + 𝑦𝑇 Example A sterling commercial paper with a face value £10 million is issued for 91 days at a yield of 10%. What is its fair price given this information? SU4-21 FIN201 STUDY UNIT 4 The fair price is 10 × 106 𝑃= = 9,975,130.49. 91 1 + 0.10 × 365 Note that the 365-basis is used because the UK money market convention is ACT/365. 4.4.2 Present Value by Discount Rate In the discount method, the instrument is priced at a discount to its face value. Ownership of the instrument receives a single cash flow corresponding to the face value at maturity. The market price and the face value are related by means of a suitable discount rate. Different market conventions mean that different relationships and calculation methods govern discount instruments. We'll consider some of them here. Examples of discount instruments are: T-bills and commercial papers that are domestically denominated. Suppose:  the market price of a discount instrument is 𝑃  its face value is 𝐹  the discount rate on it is 𝑟  the time to maturity is 𝑇 Then these quantities are related by the equation: 𝑃 = 𝐹(1 − 𝑟𝑇). Example A US T-bill of $1 million is issued for 91 days at a discount rate of 6%. Find the discount and the price of the instrument. By the formula, 𝑃 = 𝐹 − 𝐹𝑟𝑇 = 106 − 106 × 0.06 × 91 The discount is 106 × 0.06 × 360 = 15,166.67. SU4-22 91 = 984,833.33. 360 FIN201 STUDY UNIT 4 4.5 Forward-Forwards A forward-forward loan can be synthetically created in the following manner:  Borrow $ X for time units of 𝑇1 at interest rate of 𝑟1  Lend $ X for time units of 𝑇2 at interest rate of 𝑟2 Diagrammatically, these are represented like this: Figure 4.12 In terms of cash flows is this:    Time 0: effectively no cash flow Time 𝑇1 : Cash outflow of $𝑋(1 + 𝑟1 𝑇1 ) Time 𝑇2 : Cash inflow of $𝑋(1 + 𝑟2 𝑇2 ) Let us work out the interest rate 𝑓 for the forward-forward contract (or just forward rate): 𝑋(1 + 𝑟1 𝑇1 ) × (1 + 𝑓(𝑇2 − 𝑇1 )) = 𝑋(1 + 𝑟2 𝑇2 ). This implies that (1 + 𝑟1 𝑇1 ) × (1 + 𝑓(𝑇2 − 𝑇1 )) = (1 + 𝑟2 𝑇2 ) and the interest rate for the forward-forward loan is given by: 𝑓=( 1 + 𝑟2 𝑇2 1 − 1) × . 1 + 𝑟1 𝑇1 𝑇2 − 𝑇1 SU4-23 FIN201 STUDY UNIT 4 Notation The 𝑎 × 𝑏 forward interest rate is the forward interest rate that refers to a loan over a future period from time 𝑎 to time 𝑏. Hence, a 3 × 6 forward rate is the forward interest rate for the loan period which begins in 3 months and which ends in 6 months. 4.5.1 Significance of the Forward Rate Consider 3 snapshots in time: 0 (now), 3 months' time ( 𝑡3 ), 6 months' times (𝑡6 ). Thus, we do not know what the 3-month interest rate will be in 3 months' time. But (1) we can expect what it may be, or (2) we may calculate the 3x6 forward interest rate. These two quantities are conceptually different. The forward rate is determinable from current information. However, conditions in the market may change and the 3-month interest rate that is actually realised in 3 months' time may be different from the forward rate. Market expectations of the 3-month interest rate in 3-months' time are different from the forward rate as well as the actual rate that is realised in 3 months' time. But such expectations have an impact on traders' decisions that ultimately shapes the reality. Example If the 3-month spot rate is equal to the 6-month spot rate, does it mean that the 3x6 forward rate is equal to either of these rates? In other words, if the market rate for loan up to 3 months is equal to the market rate for loan up to 6 months, does it mean that the 3x6 forward rate is equal to either rate? And in this case, what is the market's expectation of the 3-month forward rate in 3 months' time? Suppose for simplicity that 3-month (resp. 6-month) is 0.25 (resp. 0.5) in time length. Let the common 3-month and 6-month rate be 𝑟 and let the 3x6 forward rate be 𝑓. Then (1 + 0.25𝑟) × (1 + 0.25𝑓) = (1 + 0.5𝑟). SU4-24 FIN201 STUDY UNIT 4 This implies that 𝑓=( 1 + 0.5𝑟 − 1) × 4. 1 + 0.25𝑟 If 𝑟 = 0.1, then 𝑓=( 1 + 0.5 × 0.1 − 1) × 4 = 0.09756. 1 + 0.25 × 0.1 Thus, the forward rate may not be equal to the common spot rates that bracket it. The market's expectation is a psychological fact that can be partially sampled through surveying money market participants. From the given information here, we do not know anything about the market's expectation. 4.6 Pricing an FRA The price of an FRA refers to the fixed rate. Hence, in an FRA contract, the long party buys the floating rate at the price of the fixed rate. The price of an FRA, i.e. the fixed rate, needs to be theoretically determined. This is done by setting it to be the forward interest rate. For example, if the FRA is based on LIBOR, then the fixed rate is a LIBOR forward rate. This is justified because the forward interest rate is the theoretically fair interest rate to charge for the future loan period. 4.6.1 Quotation An FRA is more specifically referred to as a 5x8 FRA or a 3x6 FRA. In a description like this: 𝑎 × 𝑏 FRA, 𝑎 is the start month (from now) and 𝑏 is the end month (from now). The length of the future loan period is 𝑏 − 𝑎. Thus a 5x8 FRA started 5 months from now and ends 8 months from now. SU4-25 FIN201 STUDY UNIT 4 4.6.2 Settlement Suppose that a 3x6 FRA refers to the 3-month LIBOR which is realised as 11.5% in 3 months' time. Suppose also that the fixed rate of the FRA is 12.88%, the notional is USD 10,000 and that the loan period is 92 days in length. In 6 months' time, at expiry, the long party will pay (0.1288 − 0.1150) × 92 × 10000 = 35.27 360 to the short party. Note that the floating interest will have been known in 3 months' time. Hence, it is possible to discount the cash flow from 6-month point to 3-month point and for the long party to pay this amount at the 3-month point to the short party: (0.1288 − 0.1150) × 92 1 1 × 10000 × = 35.27 × 92 92 360 1 + 0.1288 × 360 1 + 0.1288 × 360 = 34.14. These are 2 possible ways to settle an FRA. The former method, in which payment occurs at the end of the loan period, is called payment-in-arrear. The latter method, in which payment occurs at the start of the loan period, is called payment-in-advance. Figure 4.13 SU4-26 FIN201 STUDY UNIT 4 Example The current market rates are as follows for SEK: Term Rate 3 months (91 days) 9.87/10.00% 6 months (182 days) 10.12/10.25% 9 months (273 days) 10.00/10.12% Find the theoretical FRA 3x9 for SEK now. Note that SEK is the ISO currency symbol for Swedish Kronor. SEK uses ACT/360 in the money market. The theoretical FRA refers to the fixed rate of the FRA that is computed using spot data. 3x9 refers to a loan period that spans the 3-month and the 9-month marks. Let the FRA fixed rate be 𝑓 𝑏 /𝑓 𝑎 . Then (1 + 0.0987 × 91 273 − 91 273 )(1 + 𝑓 𝑏 × ) = (1 + 0.1000 × ), 360 360 360 (1 + 0.1000 × 91 273 − 91 273 )(1 + 𝑓 𝑎 × ) = (1 + 0.1012 × ). 360 360 360 and This implies that 𝑓 𝑏 = 9.82% and 𝑓 𝑎 = 9.92%. SU4-27 FIN201 STUDY UNIT 4 4.7 Bond Pricing and Yield A bond is a financial instrument for borrowing money. The notion of a bond does 2 interesting things to the plain notion of borrowing. First, "borrowing money" becomes "selling a bond" and "lending money" becomes "buying a bond". Second, the bond makes an entity out of borrowing-lending so that buyers of the bond can transfer the debt to other buyers in the secondary market. 4.7.1 Basic Notions The owner of a bond can expect a cash flow sequence that looks like this: Figure 4.14 The arrows represent cash flows. These are inflows, from the perspective of the buyer. The length of the arrows represents the size of the cash flows. Thus the long arrow is the principal repayment, called the face value. The short arrows are the coupons, all of equal magnitude a certain percentage of the face value. The frequency of the bond is the number of coupon payments within a year. Thus an annual bond pays coupons on a yearly basis. US Treasury bonds are semi-annual bonds - they pay coupons every half a year. In that case, the coupon payment is given by 1 × 𝑐 × 𝐹, 2 where 𝑐 is the coupon rate (e.g. 0.10 for a 10% bond) and 𝐹 is the face value. SU4-28 FIN201 STUDY UNIT 4 In general, if the frequency of the bond is 𝑓 times a year, then the coupon is 1 𝑓 × 𝑐 × 𝐹. The entire length of the bond is called its maturity or expiry - we denote it by 𝑇. Bonds are first issued in a primary market. Thereafter, it changes hands in the secondary market at market price 𝑃𝑡 (at time 𝑡). In the diagram above, the cash flow sequence is to be expected by the buyer of the bond in the primary market at time 0. For a buyer in the secondary market, the coupons would not be the complete set as some may have already been issued. Trade may occur in-between coupon dates. The phrase "face value" needs to be explained. The word "face" is used because in the olden days, bonds are issued as paper certificates with appendages that represent coupons to be cut out and redeemed. The body of the certificate is printed with a large picture representing the issuing party, and that has been referred to as the face. The face value affects several features:    the price the coupons the principal repayment If the price of the bond is equal to its face value, then the bond is said to be issued/selling at par. If the price is lower than face, then it is said to be issued/selling at a discount. If the price is higher than face, then it is said to be issued/selling at a premium. The coupons are priced at a percentage off the face value. The principal repayment is often just the face value. Sometimes, the repayment is referred to as redemption. Then the notion of a face value is similar to that of a notional - it does not directly correspond to any physical cash flow; rather, cash flows are computed relative to it. For example, if you look at the "PRICE" function in Excel, the redemption is explained this way (ref: https://support.office.com/en-us/article/PRICE-function-3ea9deac-8dfa-436f-a7c817ea02c21b0a). SU4-29 FIN201 STUDY UNIT 4 4.8 Price and Yield Price and yield of a bond are 2 facets of the same thing. Price is the more familiar notion. The yield of a bond is the constant discount rate such that if all the cash flows are discounted to the present using this rate, the NPV is exactly equal to the price. This yield is also known as the yield-to-maturity (YTM). Thus, we have the fundamental bond pricing relationship: Price of Bond = NPV of Cash Flows using Yield-to-Maturity Suppose 𝑃 is the price, 𝑦 is the yield, coupon rate is 𝑐, face value is 𝐹, and the bond is annual and has a maturity of 𝑛 years. Then the relationship between price and yield is given by 𝑃= 𝑐𝐹 𝑐𝐹 𝑐𝐹 𝐹 + +⋯+ + . 2 𝑛 1 + 𝑦 (1 + 𝑦) (1 + 𝑦) (1 + 𝑦)𝑛 If the frequency of the bond is twice a year, then 𝑃= 0.5𝑐𝐹 0.5𝑐𝐹 0.5𝑐𝐹 0.5𝑐𝐹 𝐹 + + + ⋯+ + . 2 3 2𝑛 1 + 0.5𝑦 (1 + 0.5𝑦) (1 + 0.5𝑦) (1 + 0.5𝑦) (1 + 0.5𝑦)2𝑛 If the frequency is 𝑓 times a year, then 𝑃= 𝑐𝐹/𝑓 𝑐𝐹/𝑓 𝑐𝐹/𝑓 𝑐𝐹/𝑓 𝐹 + + +⋯+ + . 2 3 𝑓𝑛 1 + 𝑦/𝑓 (1 + 𝑦/𝑓) (1 + 𝑦/𝑓) (1 + 𝑦/𝑓) (1 + 𝑦/𝑓) 𝑓𝑛 In practice, the day convention needs to be respected in the discounting process. In that case, the pricing formula reads: 𝑘 𝐶𝑘 𝑃=∑ (1 + 𝑦/𝑓) 𝑑𝑘 𝑓 , 𝑌 where 𝐶𝑘 is the 𝑘-th cash flow, 𝑑𝑘 is the number of days until 𝐶𝑘 , 𝑌 is the number of days in the conventional year. SU4-30 FIN201 STUDY UNIT 4 Note that coupons are taken to be 𝑐𝐹 𝑓 regardless of the day count convention. We may conclude from the relationship that price and yield are inverse to one another. If the price goes up, the yield comes down. Conversely, if the price comes down, the yield goes up. Note that when "yield" is mentioned in the news, it can refer to different things. First of all, there are many yields due to the great abundance of bonds trading at varying prices. Second of all, there is a distinction between the yield of a specific bond and the yield of a market. The yield of a specific instrument is wholly obtained from its market price as explained here. The yield of a market is usually referenced to some benchmark instruments, such as Treasury bonds. Thus, the suite of Treasury debt instruments provide a spectrum of yields across the terms, giving us the term structure. This provides us with a snapshot of the state of the interest rate market in terms of borrowing costs for varying terms. Though the benchmark yields do not directly apply to specific instruments, they are comparable. The prices of non-Treasury bonds are often quoted in terms of the market yield plus a credit spread. For example, I may say that the yield of a corporate bond is "3% + 100 bp" (bp = basis point), where "3%" is understood to be a market yield (i.e. derived from a benchmark, usually risk-free, bond of the same term) and "100 bp" is the credit spread that is added to account for the credit quality of the issue. Notice that a higher credit spread implies a lower price. From the perspective of the issuer, its lower credit quality implies that its funding cost is higher when compared to other issuers. From the perspective of the investor, the bond of an issuer with a lower credit quality ought to be priced lower. Hence, the whole concept pans out nicely. Example Find the price of a bond with these conditions:      maturity: 5 years coupon rate: 5% face value: $1000 frequency: annual yield: 3% SU4-31 FIN201 STUDY UNIT 4 The price is given by 𝑃= 50 50 50 50 50 1000 + + + + + . 2 3 4 5 1 + 0.03 (1 + 0.03) (1 + 0.03) (1 + 0.03) (1 + 0.03) (1 + 0.03)5 Using Excel, we may compute this in one of the following ways: Worksheet Calculations Figure 4.15 Figure 4.16 Excel PRICE Function Figure 4.17 SU4-32 FIN201 STUDY UNIT 4 Figure 4.18 Note how the price is computed using the Excel PRICE function. As the documentation (ref: https://support.office.com/en-us/article/PRICE-function3ea9deac-8dfa-436f-a7c8-17ea02c21b0a) says that the face is assumed to be 100, we multiply by 10 the value that is computed from the PRICE function at the end. Example Find the YTM of a bond with these conditions:      maturity: 3 years coupon rate: 3% face value: $1000 frequency: semi-annual Price: $999 The price-yield relationship is given by: 999 15 15 15 15 15 15 + + + + + 1 2 3 4 5 (1 + 𝑦/2) (1 + 𝑦/2) (1 + 𝑦/2) (1 + 𝑦/2) (1 + 𝑦/2) (1 + 𝑦/2)6 1000 + . (1 + 𝑦/2)6 = It is not straightforward to solve for 𝑦. Let's see how this may be done using Excel. Excel and its Solver Add-in Set up the worksheet like this, where the yield is arbitrarily inserted for now: SU4-33 FIN201 STUDY UNIT 4 Figure 4.19 Figure 4.20 Then we open the Solver window and set it up this way: Figure 4.21 Clicking on "Solve" gives us the answer: SU4-34 FIN201 STUDY UNIT 4 Figure 4.22 Example Show that the annual par bond has a yield that is equal to the coupon rate. The bond pricing formula states: 𝑃= 𝑐𝑃 𝑐𝑃 𝑐𝑃 𝑃 + +⋯+ + , 1 2 𝑛 (1 + 𝑦) (1 + 𝑦) (1 + 𝑦) (1 + 𝑦)𝑛 where 𝑃 is the common face value and price, 𝑐 is the coupon rate, 𝑦 is the yield, and 𝑛 is the maturity. This expression may be simplified using the formula for geometric progressions: Hence, 𝑐 = 𝑦. In other words, the coupon rate is equal to the yield for the par bond. 4.9 In-Between Coupon Dates Suppose a bond has been trading in the market for a while and at present, the time to the next coupon is not a whole coupon period: SU4-35 FIN201 STUDY UNIT 4 Figure 4.23 How may we price the remaining cash flows? In other words, what is the bond pricing equation in this case? Let 𝑃 be the bond price, 𝑦 be the yield, 𝐹 be the face value, 𝑐 be the coupon rate, 𝑓 be the frequency. Let the remaining times be 𝑡1 , 𝑡2 , 𝑡3 , 𝑡4 and 𝑇 = 𝑡5 . Then the price is given by the NPV equation: 𝐹𝑐 𝐹𝑐 𝐹𝑐 𝐹𝑐 𝑓 𝑓 𝑓 𝑓 𝑃= + + + 𝑓(𝑡 −𝑡) 𝑓(𝑡 −𝑡) 𝑓(𝑡 −𝑡) 1 2 3 (1 + 𝑦/𝑓) (1 + 𝑦/𝑓) (1 + 𝑦/𝑓) (1 + 𝑦/𝑓) 𝑓(𝑡4 −𝑡) + 𝐹𝑐/𝑓 𝐹𝑐/𝑓 + (1 + 𝑦/𝑓) 𝑓(𝑡5 −𝑡) (1 + 𝑦/𝑓) 𝑓(𝑡5 −𝑡) Note that the discounting is done by raising to the power of the length of time to the cash flow. For example, the first cash flow is discounted by the factor (1 + 𝑦/𝑓) 𝑓(𝑡1 −𝑡) . The exponent is 𝑓 × (𝑡1 − 𝑡). The factor 𝑓 is due to the frequency. The factor 𝑡1 − 𝑡 is the remaining time to the first upcoming coupon, expressed using the day count fraction that is assumed in the calculation. Example The diagram below represents the remaining cash flows of a US 6% Treasury bond. SU4-36 FIN201 STUDY UNIT 4 Figure 4.24 The dates 𝑡, 𝑡1 , 𝑡2 and 𝑡3 are, respectively, 1/12/2013, 1/1/2014, 1/6/2014 and 1/1/2015. Assume that the bond is trading at par. Find its yield. Computation of yield does not require the actual face value. So let's assume that the face value is 1; hence its price is also 1. The bond pricing equation is 1= 0.03 0.03 1.03 + + . 2(𝑡 −𝑡) 2(𝑡 −𝑡) (1 + 𝑦/2) 1 (1 + 𝑦/2) 2 (1 + 𝑦/2)2(𝑡3 −𝑡) No leap year is involved and the day count convention of the US Treasury bond is ACT/ACT. Let's calculate the number of days between the dates with Excel: Figure 4.25 31 182 396 Hence, 𝑡1 − 𝑡 = 365, 𝑡2 − 𝑡 = 365 and 𝑡3 − 𝑡 = 365. SU4-37 FIN201 STUDY UNIT 4 4.9.1 Accrued Interest Another issue that arises from being in-between coupon dates is the notion of accrued interest. Let's refer to this diagram again. We'll use it for illustration only, as the general case can involve more coupons upstream. Figure 4.26 The context is that there is a bond holder and he wishes to sell his bond to a buyer. It is currently in-between coupon dates. Hence, part of the upcoming coupon is due to the bond holder as he has been holding the bond for the initial coupon period. However, once the trade settles, the ownership of the bond falls to the bond buyer and he will redeem the upcoming coupon in whole. Hence, a portion of the coupon corresponding to the length of time that the bond holder has been holding on to it during the current coupon period must be added to the price. This is called the accrued interest. It is given by the formula Accrued Interest = Fraction of Hold × 𝑐𝐹, i.e. it is the fraction of the upcoming coupon amount according to the fraction of the coupon period it is held on to. The bond price that is computed as the NPV of upcoming cash flows is actually the net price of the bond. SU4-38 FIN201 STUDY UNIT 4 The difference between the dirty price and the accrued interest is called the clean price. We have the following relationship: Dirty Price = Clean Price + Accrued Interest. In the market, the price of a bond that is quoted usually as the clean price, not the dirty price. Hence, in order to find the price of transaction, a calculation using this equation or the NPV equation is necessary. One attractive feature of the clean price in contrast to the dirty price shows up when we compare how the two prices behave across coupon periods. If we monitor the dirty price of a bond, we will notice that price jumps occur at coupon periods because coupons are suddenly removed from their price as they are issued. On the other hand, according to the definition of the clean price, as we approach a coupon date, the contribution to the pricing of the bond by the upcoming coupon is gradually diminished to zero thanks to the removal of the accrued interest. Thus, if we monitor the clean price of a bond, it will not exhibit a price jump across coupon dates. Example A 9% semi-annual bond matures on 14 Aug 2018 and its yield is 8% on 11 Jun 2013. Find its price and accrued interest on 11 Jun 2013, assuming a basis of ACT/360 and a face value of 100. The upcoming coupon dates are 14 Aug 2013, 14 Feb 2014, 14 Aug 2014, ..., 14 Aug 2018 - 11 dates altogether. The last coupon date is 14 Feb 2013. The number of days between 14 Feb 2013 and 11 Jun 2013 is 117. The accrued interest is 117 × 4.5 = 1.4625. 360 The dirty price is given by 4.5 4.5 4.5 + + ⋯+ 2×(𝑡 −𝑡) 2×(𝑡 −𝑡) 1 2 (1 + 0.08/2) (1 + 0.08/2) (1 + 0.08/2)2×(𝑡𝑛 −𝑡) 100 + , (1 + 0.08/2)2×(𝑡𝑛−𝑡) SU4-39 FIN201 STUDY UNIT 4 where the times 𝑡1 , 𝑡2 , … are the coupon dates, and the durations 𝑡1 − 𝑡, 𝑡2 − 𝑡, … are computed on a ACT/360 basis. 4.10 Term Structure Construction We will show how a term structure is constructed in the following sections. 4.10.1 Zero Rates We assume that there is a series of zero coupon bonds (ZCBs) of varying terms. Note that in reality, ZCBs are found in the form of instruments such as the US treasury bills (1m, 3m, 6m, 1y maturity). Longer-termed instruments are usually not zero-coupon. We will disregard this fact of reality and assume that ZCBs, all with face value 1, are traded at prices 𝑃1 , 𝑃2 , … , 𝑃𝑛 and have maturities 𝑇1 , 𝑇2 , … , 𝑇𝑛 . Let's consider the first ZCB with price 𝑃1 and maturity 𝑇1 . Write its YTM as 𝑦1 . By the bond pricing equation, we have 𝑃1 = 1 . (1 + 𝑦1 )𝑇1 𝑃𝑖 = 1 (1 + 𝑦𝑖 )𝑇𝑖 Similarly, we have for each 𝑖 = 2,3, …. These yields 𝑦1 , 𝑦2 , … , 𝑦𝑛 that are implied by the ZCBs, are called zero/spot yields/rates (any combination is a proper name). When the points (𝑡1 , 𝑦1 ), (𝑡2 , 𝑦2 ), … , (𝑡𝑛 , 𝑦𝑛 ) are plotted, we obtain a chart like this: SU4-40 FIN201 STUDY UNIT 4 Figure 4.27 These points constitute an outline of the term structure. The yield curve is obtained by connecting the points together by some method of interpolation. For example, we may connect successive points together by straight lines (called linear interpolation), giving us the following chart: Figure 4.28 Or we may try to connect the points together into a smooth curve, like this: SU4-41 FIN201 STUDY UNIT 4 Figure 4.29 In any case, we end up having a yield curve, which may be thought of as a function 𝑡 ↦ 𝑌(𝑡). This means that, whenever we specify a term 𝑡, we are able to read off a yield value, 𝑌(𝑡), corresponding to that term. This yield allows us to present-value future cash flows. For instance, a cash flow of 100 at time 𝑇 in the future has a PV of 100 . (1 + 𝑌(𝑇))𝑇 Example Assume the following zero-coupon yield structure: Term YTM 1-year 10.000% 2-year 10.526% 3-year 11.076% 4-year 11.655% What are the zero-coupon discount factors? What is price and yield of a 4-year, 5% coupon bond? SU4-42 FIN201 STUDY UNIT 4 The discount factors are: Term YTM Discount Factor 1-year 10.000% 1 ≈ 0.90909 (1 + 10%)1 2-year 10.526% 1 ≈ 0.81860 (1 + 10.526%)2 3-year 11.076% 1 ≈ 0.72969 (1 + 11.076%)3 4-year 11.655% 1 ≈ 0.64341 (1 + 11.655%)4 The 4-year 5% coupon bond comprises 4 cash flows of sizes 5, 5, 5 and 105 respectively. From the bond pricing equation, 𝑃= 5 5 5 105 + + + 2 3 (1 + 10%) (1 + 10.526%) (1 + 11.076%) (1 + 11.655%)4 = 5 × 0.90909 + 5 × 0.818602 + 5 × 0.729693 + 105 × 0.643414 = 79.84495 4.11 Bootstrapping We may not be able to find a good set of ZCBs that span a wide spectrum of terms to paint a good picture of the term structure. Hence we will derive zero rates from coupon bonds in a process called bootstrapping. First, we will describe the principle of how this is done. Then we will illustrate using some examples. Suppose we have annual coupon bonds 𝐵1 , 𝐵2 , … , 𝐵𝑛 over 𝑛 years, where the maturity of 𝐵𝑖 is 𝑖-year. Let's assume that the face value of each of these bonds to be 1, their coupon rates are all equal to 𝑐, and they have prices equal to 𝑃1 , 𝑃2 , … , 𝑃𝑛 respectively. SU4-43 FIN201 STUDY UNIT 4 We will find the zero rates 𝑌(1), 𝑌(2), … , 𝑌(𝑛) from this information in an iterative manner. Note the meanings of these zero rates: they give us the discount factors across terms to present-value future cash flows. The first bond does not have any interim coupons, hence: 𝑃1 = 1+𝑐 , 1 + 𝑌(1) which implies that 1+𝑐 − 1. 𝑃1 𝑌(1) = From the bond pricing equation for the second bond, we have 𝑃2 = 𝑐 1+𝑐 + , 1 + 𝑌(1) (1 + 𝑌(2))2 which implies that 𝑌(2) = ( 1 1+𝑐 2 − 1. ) 𝑐 𝑃2 − 1 + 𝑌(1) Note: the formula looks complicated, but that's not the key point. The key point is that 𝑌(2) can be obtained in terms of 𝑌(1), which has already been obtained. This is what "iterative" refers to. Let's look at the third bond. Its price is given by 𝑃3 = 𝑐 𝑐 1+𝑐 + + , 2 1 + 𝑌(1) (1 + 𝑌(2)) (1 + 𝑌(3))3 which implies that 𝑌(3) = ( 1+𝑐 𝑃3 − 𝑐 𝑐 − 1 + 𝑌(1) (1 + 𝑌(2))2 1 )3 − 1. In general, the 𝑖-th zero rate 𝑌(𝑖) is obtained from the pricing equation of the 𝑖-th bond this way: 𝑃𝑖 = 𝑐 1+𝑐 1+𝑐 1+𝑐 + + ⋯+ + 2 𝑖−1 1 + 𝑌(1) (1 + 𝑌(2)) (1 + 𝑌(𝑖 − 1)) (1 + 𝑌(𝑖))𝑖 SU4-44 FIN201 STUDY UNIT 4 implies that 𝑌(𝑖) = ( 1 1+𝑐 ) 𝑖 − 1. 𝑐 𝑐 𝑐 𝑃𝑖 − − + ⋯+ 1 + 𝑌(1) (1 + 𝑌(2))2 (1 + 𝑌(𝑖 − 1))𝑖−1 Example The 1-year interest rate is 10% and the following bonds are currently trading: Maturity Price Coupon 1-year 97.409 9% 2-year 85.256 5% 3-year 104.651 13% Find the term structure from the given information. The given information allows us to find 𝑌(1), 𝑌(2), 𝑌(3), 𝑌(4). 𝑌(1) is plainly given to be 10%. The other zeros are found by applying the formulae above: 109 𝑌(2) = ( 97.409 − 𝑌(3) = ( 9 1 + 𝑌(1) 1 )2 − 1, 1 105 )3 − 1, 5 5 85.256 − − 1 + 𝑌(1) (1 + 𝑌(2))2 113 𝑌(4) = ( 104.651 − 1 13 13 13 − − 2 1 + 𝑌(1) (1 + 𝑌(2)) (1 + 𝑌(3))3 Plugging the value of 𝑌(1) into 0.105260529055 ≈ 10.5%. the first SU4-45 )4 − 1. equation, we obtain 𝑌(2) = FIN201 STUDY UNIT 4 Plugging the values of 𝑌(1) and 𝑌(2) into the second equation, we obtain 𝑌(3) = 0.110760266184 ≈ 11.1%. Plugging the values of 𝑌(1) and 𝑌(2) and 𝑌(3) into the second equation, we obtain 𝑌(4) = 0.116550704358 ≈ 11.7%. The method applies also to bonds whose coupons are not annual. Example The 0.5-year interest rate is 10% and the following semi-annual bonds are currently trading: Maturity Price Coupon 1-year 97.409 9% 1.5-year 85.256 5% 2-year 104.651 13% Find the term structure from the given information. The given information allows us to find 𝑌(0.5), 𝑌(1), 𝑌(1.5), 𝑌(2) . We will regard these yields as annual equivalent yields for the purpose of discounting in the following. 𝑌(0.5) is plainly given to be 10%. The other zeros are found by iteration. From the bond pricing equation, 97.409 = 4.5 104.5 + , 0.5 (1 + 0.10) 1 + 𝑌(1) it's implied that 𝑌(1) = ( 104.5 4.5 97.409 − (1 + 0.10)0.5 ) − 1 = 0.122226964906 ≈ 12.2%. SU4-46 FIN201 STUDY UNIT 4 From the bond pricing equation, 85.256 = 2.5 2.5 102.5 + + , (1 + 0.10)0.5 1 + 0.122 (1 + 𝑌(1.5))1.5 it's implied that 𝑌(1.5) = ( 1 102.5 )1.5 − 1 = 0.173367059053 ≈ 17.3%. 2.5 2.5 85.256 − − (1 + 0.10)0.5 1 + 0.122 From the bond pricing equation, 104.651 = 7.5 7.5 7.5 107.5 + + + , (1 + 0.10)0.5 1 + 0.122 (1 + 0.173)1.5 (1 + 𝑌(2))2 it's implied that 107.5 𝑌(2) = ( 104.651 − 7.5 7.5 7.5 − − (1 + 0.10)0.5 1 + 0.122 (1 + 0.173)1.5 1 )2 − 1 = 0.125174188454 ≈ 12.5. 4.12 Forward and Par Yields Apart from zero yields, we may also create a term structure that is made up of par yields or forward yields. We'll start by assuming that we have the zero yields 𝑌(1), 𝑌(2), 𝑌(3), … , 𝑌(𝑛). For simplicity of illustration, we'll assume frequency of compounding within a year to be 1 here. The par yield 𝑃(𝑖) of the 𝑖-th year is the coupon rate of the par bond of 𝑖-year maturity. Thus, SU4-47 FIN201 STUDY UNIT 4 1= 𝑃(𝑖) 𝑃(𝑖) 𝑃(𝑖) 1 + 𝑃(𝑖) + + ⋯+ + . 2 𝑖−1 1 + 𝑌(1) (1 + 𝑌(2)) (+𝑌(𝑖 − 1)) (1 + 𝑌(𝑖))𝑖 Hence, 1− 𝑃(𝑖) = 1 (1 + 𝑌(𝑖))𝑖 1 1 1 1 + + ⋯+ + 𝑖−1 1 + 𝑌(1) (1 + 𝑌(2))2 (+𝑌(𝑖 − 1)) (1 + 𝑌(𝑖))𝑖 . Note that the first par yield is just the spot yield: 𝑃(1) = 𝑌(1). Using this formula, we may derive a term structure of par yields 𝑃(1), 𝑃(2), … , 𝑃(𝑛) from the zero rates. The term structure of par yields gives a picture of coupon rates of par bonds across terms as implied by the zero rates. Example Find the par yields from the zero yields 𝑌(1) = 0.1 , 𝑌(2) = 0.105 , 𝑌(3) = 0.111 , 𝑌(4) = 0.117. The first par yield is 𝑃(1) = 𝑌(1) = 0.1. The other par yields are obtained using the formulae above: 1 (1 + 𝑌(2))2 𝑃(2) = = 0.104750056548 = 10.5%, 1 1 + 1 + 𝑌(1) (1 + 𝑌(2))2 1− 1 (1 + 𝑌(3))3 𝑃(3) = = 0.110194909102 ≈ 11.0%, 1 1 1 + + 1 + 𝑌(1) (1 + 𝑌(2))2 (+𝑌(3))3 1− SU4-48 FIN201 STUDY UNIT 4 1 (1 + 𝑌(4))4 𝑃(4) = = 0.115375937612 1 1 1 1 + + + 1 + 𝑌(1) (1 + 𝑌(2))2 (+𝑌(3))3 (1 + 𝑌(4))4 ≈ 11.5%. 1− The 𝑎 × 𝑏 forward yield is the forward rate that is derived from spot yields that pertain to a forward deposit over the period [𝑎, 𝑏]. It is also called the forward-forward yield. Let's denote this to be 𝐹(𝑎, 𝑏). From the spot yields 𝑌(𝑎) and 𝑌(𝑏), we have the relationship (1 + 𝑌(𝑎))𝑎 (1 + 𝐹(𝑎, 𝑏))𝑏−𝑎 = (1 + 𝑌(𝑏))𝑏 . Note that the forward yields thus expressed are automatically assumed to be annualised. This allows the forward yield to be expressed as (1 + 𝑌(𝑏))𝑏 1 𝐹(𝑎, 𝑏) = ( )𝑏−𝑎 − 1. (1 + 𝑌(𝑎))𝑎 Example Find the forward yields 𝐹(0,1), 𝐹(1,2), 𝐹(2,3), 𝐹(3,4) from the zero yields 𝑌(1) = 0.1 , 𝑌(2) = 0.105, 𝑌(3) = 0.111, 𝑌(4) = 0.117. The first forward rate is 𝐹(0,1) = 𝑌(1) = 0.1. The other forward rates are obtained by the formula above: 𝐹(1,2) = ( (1 + 𝑌(2))2 1 )2−1 − 1 = 0.110022727273 ≈ 11.0%, (1 + 𝑌(1))1 (1 + 𝑌(3))3 1 𝐹(2,3) = ( )3−2 − 1 = 0.123097914457 ≈ 12.3%, (1 + 𝑌(2))2 𝐹(3,4) = ( (1 + 𝑌(4))4 1 )4−3 − 1 = 0.135195120367 ≈ 13.5%. (1 + 𝑌(3))3 SU4-49 FIN201 STUDY UNIT 4 These sections from the Textbook (and do the associated exercises):  Chapter 3 Money market calculations  Chapter 3 Discount instruments  Chapter 4 Applications of FRAs  Chapter 6 Introduction to bond pricing  Chapter 6 Different yield measures and price calculations  Chapter 8 Zero-coupon yields, par yields and bootstrapping  Chapter 8 Forward-forward yields  Chapter 8 Summary Watch this video in which I discuss some examples and work out some solutions under the topic of fixed income: Worked Examples in Fixed Income (Access video via iStudyGuide) Watch this video in which I explain the mechanics behind the construction of the yield curve: Bootstrapping the Yield Curve (Access video via iStudyGuide) SU4-50 FIN201 STUDY UNIT 4 Quiz 1) Short-term interest rates on the yield curve are obtained from the a. b. c. d. 2) Long-term interest rates on the yield curve are obtained from the a. b. c. d. 3) bond market cash market credit market debt market The process of creating a yield curve from bond prices is called a. b. c. d. 5) money market capital market equity market foreign exchange market The fixed income market is conventionally categorised into money market and a. b. c. d. 4) money market capital market equity market foreign exchange market bootlicking bootstrapping bootlegging booting The short end of the yield curve is found using a. b. c. d. notes and bonds equity instruments money market instruments FRAs SU4-51 FIN201 STUDY UNIT 4 6) The long end of the yield curve is found using a. b. c. d. 7) The duration of cash is a. b. c. d. 8) 0 1 2 3 The duration of a ZCB is a. b. c. d. 9) notes and bonds equity instruments money market instruments FRAs 0 1 its mid-term its maturity A 4x7 FRA pertains to a loan period a. b. c. d. between April and July that begins 4 months from now and lasts for 3 months that begins 4 months from now and lasts for 7 months that is 28 months in length 10) The notion of yield-to-maturity assumes that coupons are a. b. c. d. reinvested recomputed re-issued none of the above SU4-52 FIN201 STUDY UNIT 4 Solutions or Suggested Answers Quiz Question 1: a Question 2: b Question 3: a Question 4: b Question 5: c Question 6: a Question 7: a Question 8: d Question 9: b Question 10: a SU4-53 STUDY UNIT 5 FOREIGN EXCHANGE FIN201 STUDY UNIT 5 Learning Outcomes By the end of this unit, you should be able to: 1. Describe significant features of the foreign exchange market. 2. Compute with foreign exchange spot quotes. 3. Apply the Interest Rate Parity. 4. Compute with foreign exchange forward quotes. 5. Apply the Principle of No Arbitrage. SU5-1 FIN201 STUDY UNIT 5 Chapter 1 Market The foreign exchange market is the major market in finance that's concerned with the exchange of currencies. Some indications of its importance are these: - Without foreign exchange, international trade will not be possible. - It is the largest market in the world by dollar volume of daily trade. - It is closely related to the money market via the interest rate parity. In this unit, we will discuss how rates are commonly quoted in the foreign exchange market. In the next unit, we will delve into calculations concerning these quotes and FX instruments. According to the 2013 Triennial Central Bank Survey of Foreign Exchange and OTC Derivatives Markets Activity conducted by the Bank for International Settlements, the daily trade in the foreign exchange market is over $5 trillion in Apr 2013. By comparison, the average daily trading volume at the NYSE is about US$169 billion in 2013. The market begins trading on Monday mornings in Wellington, New Zealand and ends on Friday evenings in New York, USA. Apart from weekends and major international holidays, the market operates non-stop throughout the year. Unlike stock exchanges which are centrally organised, the foreign exchange market is distributed in nature. There is no one single geographically centralised place of trade nor is there a single regulatory body that governs the functioning of the market. However, that does not make it anarchic either since some of the largest participants are banks which are highly regulated, particularly after the Global Financial Crisis of 2007-08. In addition, central banks intermittently intervene in the market in implementing their monetary policies. Such a state of the market has not been planned internationally. Evolution is a better word to describe how it has come to be. The major form of currency at present is fiat money which comprises pieces of paper which on their own are worth little. By norm, fiat money is readily exchanged for goods and services which in turn reinforce and sustain their status of being money. If we look back in history a hundred years, most countries in the world were on the gold standard while China and Hong Kong were on the silver standard. This means that the value of the money was derived directly from the metals to which they are pegged. Towards the end of World War II, the gold standard was ratified by the international community at the Bretton Woods Conference in 1944. SU5-2 FIN201 STUDY UNIT 5 Events entering the 1970s saw gold price rising and consequently the dollar strengthening which hurt the US economy. President Nixon thus decided to halt convertibility of dollar to gold. Since then, international fiat currencies have not been pegged to anything but themselves in what has been called the floating rate regime. This has been the state of the foreign exchange market till today. 1. These sections from the Textbook (and do the associated exercises):  Chapter 9 Introduction 2. The article The Gold Standard, Bretton Woods and Other Monetary Regimes: A Historical Appraisal (pp. 160−183) to find out more about the background of the foreign exchange market as we witness it today. SU5-3 FIN201 STUDY UNIT 5 Chapter 2 Signals and Quotes 2.1 Spot Exchange Rates and Quotes Spot exchange rates refer to current rates for exchanges of currencies that are meant to take place at present. A typical exchange rate looks like this: EUR/USD 1.0810, which may also be written as EURUSD 1.0810. Generally, exchange rates are quoted as XY, where X and Y are the national currency codes as accorded by ISO 4217. X is referred to as base currency and is thought of as the asset (1 unit of this is to be priced), and Y is sometimes referred to as counter currency and is thought of as the unit of account that is used to price X. "Buying/selling X with Y" is sometimes described as "buying/selling X against Y". Thus, EUR is regarded as an asset while USD is regarded as the currency used to price it. The fact that EURUSD is quoted at 1.0810 means that EUR 1 costs USD 1.0810. EUR is also called the base currency and USD is called the counter currency in this pair. Most major currency pairs are quoted up to the 4th decimal place. The unit in the 4th decimal place (i.e. 0.0001) is called the pip. The unit in the second decimal place is called the big figure. Thus in 1.0810, there are 10 pips and the big figure is 8. The pair USDJPY is a notable exception. It is typically of such a magnitude: USDJPY 117.96. In this case, the 2nd decimal place (i.e. 0.01) is known as the pip and the unit is the big figure. Thus, there are 96 pips and 17 big figures in USDJPY 117.96. The distribution by international usage (i.e. volume of transaction) of currency and pair, according to the Triennial Survey of BIS, shows that, by far, USD, EUR and JPY are the most traded currencies internationally. The top 3 exchange rates are EURUSD, USDJPY and GBPUSD. Note that in the chart above, the pairs are not written in any particular order. For example, USD / EUR does not refer to the exchange rate USDEUR. In practice, even though USDEUR and EURUSD refer essentially to the same pair, only one of them is SU5-4 FIN201 STUDY UNIT 5 conventionally quoted in the market - namely, EURUSD. This is also true for other pairs. Thus, USDJPY is conventionally quoted but not JPYUSD. 2.2 Bid and Ask Participants in the foreign market trade for one reason or another and each has his own strategies and methods. A distinguished group of participants are the market makers. These are traders who do not typically trade a currency because they think that it may rise or fall. Instead, money makers publicise two quotes for each currency pair, one for buying and the other for selling the base currency. For instance, a bid-ask quote for EURUSD may look like this: EURUSD 1.0810 | 1.0825. What this means is that the market maker is willing to buy EUR 1 at USD 1.0810 and to sell EUR 1 and USD 1.0825. The lower price is called the bid price and the higher price is called the ask price. The bid-ask quote may be shorten into 10 | 25 This makes sense to active market participants who are highly aware of what the big figure is at any one time. The difference 25 - 10 = 15 pips is known as the bid-ask spread. The bid-ask spread represents the profit that a market maker makes. In a single exchange, the market maker merely trades one of EUR or USD for the other. Suppose he sells EUR for USD in a first leg, and then he sells USD for EUR in a second leg. He sold EUR 1 for USD 1.0825. Then he sells USD 1.0825 at EURUSD 1.0810. Note that, "selling USD" is equivalent to "buying EUR". Thus, he receives 1.0825 = 1.00138760407 1.0810 in euros. In the "round trip", the initial EUR 1 has become EUR 1.001. SU5-5 FIN201 STUDY UNIT 5 The business proposition of a market maker is thus to avoid the risk of directional trades and to focus on carrying out as many trades as possible in order to profit from the bid-ask spread. Electronic market makers can afford to keep the spread low, e.g. around 1 pip, as the high speed of trades assures them of a substantial volume. Non-electronic market makers have to make do with a larger spread. For instance, money changers can quote at spreads of about 200 pips. The spread is a measure of competition - the lower the spread, the more competitive is the market maker, but it also means that the profit per trade is tiny and has to be compensated by volume. Finally, note that with respect to a pair XY, buying Y is equivalent to selling X, and selling Y is equivalent to buying X. For the obvious reason, the bid rate must be smaller than the ask rate. If not, the market maker will bleed his profits away into a mountain of losses. From the opposite perspective, the low ask and high bid implies that I can arrange for two trades that will guarantee me profits without any risk. For example, if a market maker mistakenly quotes: EURUSD 1.0825|1.0810. Then I will sell EUR 1 for USD 1.0825 and buy EUR with USD 1.0825, resulting in EUR 1.0825 / 1.0810 = EUR 1.00138760407. Such a riskless profitable trade is known as an arbitrage opportunity. The careless market maker has thus created an arbitrage opportunity for traders. We will explain this important concept further later. For now, in order to distinguish "bid" from "ask", just remember that these terms are from the perspective of the market maker and he needs to "buy low and sell high" to stay in business. Example In one deal, Bank A buys EUR 1 million against CHF at 1.2830. In another deal, Bank A sells EUR 1 million against CHF 1.2855. What is the net result? SU5-6 FIN201 STUDY UNIT 5 Deal # Cash inflow Cash outflow 1 EUR 1,000,000 CHF 1,283,000 2 CHF 1,285,500 EUR 1,000,000 The net result requires evaluating the state of holdings for both EUR and CHF. For EUR, the net flow is 0. For CHF, there is a net inflow of 1,285,500 - 1,283,000 = 2,500. 2.3 Cross Rates A cross rate is an exchange rate that is deduced from two exchange rates that share a common currency. For example, if EURUSD and USDSEK are quoted, then the exchange rate EURSEK that is deduced is known as a cross rate. Cross rates exist because not all pairs of currencies have their exchange rates quoted directly. In this case, it will be necessary to exchange one currency for another indirectly through an intermediate series of exchanges. For example, in order to buy SEK from EUR, and if only EURUSD and USDSEK are quoted, then a possible route would be:   buy USD from EUR buy SEK from USD Example Given that the following spot rates have been quoted: USDJPY: 83.17 | 83.21 USDSGD: 1.2882 | 1.2892 Find a suitable bid-ask quote for SGDJPY. SU5-7 FIN201 STUDY UNIT 5 Let's write the bid-ask quote for SGDJPY to be SGDJPY: x | y Let's find the bid SGDJPY x first. The dealer would buy SGD 1 with JPY x. With respect to the given quotes, the dealer would buy USD 1 for JPY 83.17. This 𝑥 means that he will buy USD 83.17 for JPY x. And he would sell USD 1 for SGD 1.2892. This means that he will buy SGD 1.2892 × 𝑥 83.17 𝑥 for USD 83.17. 𝑥 Putting these together, he would buy SGD 1.2892 × 83.17 for JPY x, i.e. he would buy SGD 1 for JPY 83.17/1.2892 = JPY 64.52, 𝑥 = 64.52. Now, let's try to find the ask SGDJPY y. The dealer would sell SGD 1 for JPY y. With respect to the given quotes, the dealer would sell SGD 1 for USD 1 / 1.2882. And he would sell USD 1 for JPY 83.21, i.e. USD 1 / 1.2882 for JPY 83.21 / 1.2882. Putting these together, he would sell SGD 1 for JPY 83.21 / 1.2882. Thus 𝑦= 83.21 = 64.59. 1.2882 Here is an alternative argument that avoids the use of algebra and is somewhat more direct. From the quotes: USDJPY: 83.17 | 83.21 USDSGD: 1.2882 | 1.2892 SU5-8 FIN201 STUDY UNIT 5 suppose that we want to find the bid price of SGDJPY. This means that the dealer is willing to buy SGD 1 by selling some units of JPY. Focussing on “buy SGD, sell JPY”, we should focus on the quotes USDJPY: 83.17 (bid) USDSGD: 1.2892 (ask) This says that the dealer is willing to - buy USD 1, sell JPY 83.17 sell USD 1, buy SGD 1.2892 Combining these, he’s willing to sell JPY 83.17 and buy SGD 1.2892, which is equivalent to saying: buy SGD 1, sell 83.17/1.2892 = 64.52 Thus, the bid price SGDJPY 64.52. You may try to reconstruct this same argument for the ask price. We may abstract the general rule for computing cross rates from the above this way. Suppose we have 3 currencies X, Y, Z. X|Y is quoted as: 𝑋|𝑌: 𝑏(𝑥, 𝑦) | 𝑎(𝑥, 𝑦), X|Z is quoted as: 𝑋|𝑍: 𝑏(𝑥, 𝑧) | 𝑎(𝑥, 𝑧). With reference to the above example, we may take X to be USD, Y to be JPY and Z to be SGD. Then Z|Y is given by 𝑍|𝑌: 𝑏(𝑥, 𝑦) 𝑎(𝑥, 𝑦) | . 𝑎(𝑥, 𝑧) 𝑏(𝑥, 𝑧) SU5-9 FIN201 STUDY UNIT 5 What if instead of X|Y, Y|X is quoted instead? Then we'll begin with the quote for Y|X: 𝑌|𝑋: 𝑏(𝑦, 𝑥) | 𝑎(𝑦, 𝑥) and convert it into the quote for X|Y: 𝑋|𝑌: 𝑏(𝑥, 𝑦) | 𝑎(𝑥, 𝑦) = 1 1 | . 𝑎(𝑦, 𝑥) 𝑏(𝑦, 𝑥) We may summarise these like this: Suppose that for any 2 currencies X and Y, we write their bid and ask rates as 𝑏(𝑥, 𝑦) and 𝑎(𝑥, 𝑦). Then the following statements are true: 𝑎(𝑥, 𝑦) = 1 , 𝑏(𝑦, 𝑥) 𝑏(𝑥, 𝑦) = 1 . 𝑎(𝑦, 𝑥) 𝑏(𝑧, 𝑦) = 𝑏(𝑥, 𝑦) , 𝑎(𝑥, 𝑧) 𝑎(𝑧, 𝑦) = 𝑎(𝑥, 𝑦) . 𝑏(𝑥, 𝑧) (1) (2) Example Given the spot rates: EURUSD: 1.3166 | 1.3171 NZDUSD: 0.7634 | 0.7639 Find the spot bid-ask quotes for EURNZD. Let Z denote EUR, Y denote NZD, X denote USD. SU5-10 FIN201 STUDY UNIT 5 Then the bid-ask for EURNZD is given by 𝑏(𝑧, 𝑦) = 𝑏(𝑥, 𝑦) , 𝑎(𝑥, 𝑧) 𝑎(𝑧, 𝑦) = 𝑎(𝑥, 𝑦) . 𝑏(𝑥, 𝑧) Let's compute 𝑏(𝑧, 𝑦): 1 𝑏(𝑥, 𝑦) 𝑎(𝑦, 𝑥) 𝑏(𝑧, 𝑥) 1.3166 𝑏(𝑧, 𝑦) = = = = = 1.7235 1 𝑎(𝑥, 𝑧) 𝑎(𝑦, 𝑥) 0.7639 𝑏(𝑧, 𝑥) and 1 𝑎(𝑥, 𝑦) 𝑏(𝑦, 𝑥) 𝑎(𝑧, 𝑥) 1.3171 𝑎(𝑧, 𝑦) = = = = = 1.7253. 1 𝑏(𝑥, 𝑧) 𝑏(𝑦, 𝑥) 0.7634 𝑎(𝑧, 𝑥) Thus, the quote for EURNZD is EURNZD: 1.7235 | 1.7253 2.4 Forward Exchange Rates The forward exchange rate is an exchange rate at which a currency exchange will occur in the future but is fixed at present. The concept is analogous to the concept of a forward price or forward interest rate. For example, this information may be flashed to the trader on the quotes board: Instrument Bid Spot EURUSD 1.4066 1.4071 1m Forward EURUSD 1.4181 1.4191 SU5-11 Ask FIN201 STUDY UNIT 5 It means:     the dealer is willing to buy EUR 1 at USD 1.4066 currently the dealer is willing to sell EUR 1 at USD 1.4071 currently the dealer is willing to buy EUR 1 at USD 1.4181 one month from now the dealer is willing to sell EUR 1 at USD 1.4191 one month from now The forward instrument in the foreign exchange market is called the forward outright. This is to distinguish it from another instrument called the forward swap. We'll explain these instruments later. These sections from the Textbook (and do the associated exercises):  Chapter 9 Spot exchange rates SU5-12 FIN201 STUDY UNIT 5 Chapter 3 Concept: Interest Rate Parity The interest rate parity is a mathematical relationship between the following terms related to two currencies X and Y:     the interest rate of X the interest rate of Y the spot exchange rate between X and Y the forward exchange rate between X and Y We assume that the terms of the interest rates and the forward exchange rate are the same (i.e. all 1-month in length, or all 3-month in length, etc.), and that there is no bidask spread in the rates. In the following, we'll see two different ways for investing an amount of money. The returns from both must be equal otherwise it would be possible to lock in a risk-free profit. Step 1 Quotes Suppose we have 2 currencies X and Y. The spot exchange rate is X|Y s, and the forward exchange rate is X|Y f. The forward exchange is to occur at 𝑇 in the future. In other words, 1 unit of X is to trade for s units of Y currently. And 1 unit of X is to trade for f units of Y at time 𝑇 in the future. Step 2 Courses of Action Let's imagine that we have 1 unit of X to begin with. There are 2 things that we can do to it: 1. exchange it into Y right away and deposit that in the bank at interest rate 𝑟𝑌 until time 𝑇 2. deposit X in the bank at interest rate 𝑟𝑋 until time 𝑇 and exchange the deposit into 𝑌 SU5-13 FIN201 STUDY UNIT 5 Step 3 Reconciling the 2 Actions by the Principle of No Arbitrage Assuming that the market is efficient in coming up with prices and rates, the two ways of investing the initial unit of X must lead to the same amount of Y at time 𝑇. By method (1), the amount of 𝑌 at time 𝑇 is given by 𝑠 × (1 + 𝑟𝑌 × 𝑇). By method (2), the amount of 𝑌 at time 𝑇 is given by (1 + 𝑟𝑋 × 𝑇) × 𝑓. Equating them, we have 𝑠 × (1 + 𝑟𝑌 × 𝑇) = (1 + 𝑟𝑋 × 𝑇) × 𝑓. Rearranging, so that we obtain a formula for the forward rate: 𝑓 =𝑠× 1 + 𝑟𝑌 𝑇 . 1 + 𝑟𝑋 𝑇 This formula for the forward exchange rate is known as the interest rate parity. The relationship holds due to the Principle of No Arbitrage. This means that the violation of the relationship implies the existence of a trading strategy that is risk-free. In reality, the relationship only roughly holds because fees and commissions will reduce profits to be worth the effort. To let the notation remind us about the direction of the exchange, we may write: 𝑓𝑋|𝑌 = 𝑠𝑋|𝑌 × 1 + 𝑟𝑌 𝑇 . 1 + 𝑟𝑋 𝑇 The forward rate, as expressed by this formula, is also known as the theoretical forward outright or simply the theoretical forward. There are two things to note when we apply the formula in practice: 1. The time 𝑇 needs to take into account the day count fraction and convention of the currency. SU5-14 FIN201 STUDY UNIT 5 2. We may use it to compute the theoretical bid and ask forward rates. Inputting the bid rate for spot will give us the bid rate for forward. And similarly, for the ask rate. Example Given the following information: 31-day USD interest rate: 5% 31-day EUR interest rate: 3% Spot EURUSD rate: 1.4068 What is the forward outright? By the interest rate parity, the forward outright is 1.4068 × 31 1 + 0.05 × 360 31 1 + 0.03 × 360 SU5-15 = 1.4092. FIN201 STUDY UNIT 5 Chapter 4 Instruments The major classes of instruments in the foreign exchange market are:    spot instruments (i.e. currencies) forward instruments (forward outrights, forward swaps) derivatives (futures and options) Spot instruments have been considered in the previous section. We will consider forward outrights and forward swaps in the following. We will not discuss FX derivatives in this course. A financial instrument that implements the concept of the forward exchange rate is called a forward outright. This is a contract that fixes the rate of exchange between two currencies in the future at a level that is determined at present. A financial instrument that simultaneously involves a spot exchange and a forward outright in the opposite direction is known as a forward swap. We will discuss these two instruments in order. 4.1 Forward Outrights Forward outrights are instruments that allow traders to trade currencies in the future at an exchange rate that is fixed today. The quotes of the instrument are called forward rates (or forward outright rates). By the interest rate parity, a forward rate is affected by the spot rate level as well as the interest rates underlying the currency pair. Naturally, forward outrights fall into various terms according to when the contract expires and the trade is supposed to occur. 4.2 Forward Swaps The forward swap is conceptually the difference between a spot exchange and a forward outright. Its underlying signal is the forward swap rate. SU5-16 FIN201 STUDY UNIT 5 Let's look at the formula for the forward swap rate to understand what's going on: Forward Outright Rate = Spot Rate + Forward Swap Rate. This means that Forward Swap Rate = Forward Outright Rate − Spot Rate. The forward swap as an instrument has the same cash flow profile as a long forward and a short spot. In other words, it may synthetically be put together with one forward outright in the long position and one spot in the short position. Figure 5.1 Example Given the following information: Spot EURUSD: 1.4066 | 1.4071 Forward Swap: 0.0115 | 0.0120 Find the forward outright. SU5-17 FIN201 STUDY UNIT 5 For the bid side of the forward outright: 1.4066 + 0.0115 = 1.4181. For the ask side of the forward outright: 1.4071 + 0.0120 = 1.4191. We may use the interest rate parity to express the forward swap in terms of the interest rate differential of the two currencies involved in the exchange. Let the forward swap be denoted by 𝑤𝑋|𝑌 . We have 𝑓𝑋|𝑌 = 𝑠𝑋|𝑌 + 𝑤𝑋|𝑌 , which follows from the definition of the forward swap. We also have 𝑓𝑋|𝑌 = 𝑠𝑋|𝑌 × 1 + 𝑟𝑌 𝑇 , 1 + 𝑟𝑋 𝑇 which follows from the interest rate parity. Equating the RHSs: 𝑠𝑋|𝑌 + 𝑤𝑋|𝑌 = 𝑠𝑋|𝑌 × 1 + 𝑟𝑌 𝑇 . 1 + 𝑟𝑋 𝑇 This implies that 𝑤𝑋|𝑌 = 𝑠𝑋|𝑌 (𝑟𝑌 𝑇 − 𝑟𝑋 𝑇) . 1 + 𝑟𝑋 𝑇 Note that in the formula above, the day count convention must be taken into account in substituting the appropriate fraction for 𝑇 corresponding to the two currencies X and Y. For a quick and dirty method to approximate the swap rate, we may assume that 1 + 𝑟𝑋 𝑇 ≈ 1, SU5-18 FIN201 STUDY UNIT 5 and therefore, 𝑤𝑋|𝑌 ≈ 𝑠𝑋|𝑌 𝛥𝑌|𝑋 𝑇, where the interest rate differential 𝑟𝑌 − 𝑟𝑋 is denoted by 𝛥𝑌|𝑋 . Vice versa, we may also express the interest rate differential as 𝛥𝑌|𝑋 ≈ 𝑤𝑋|𝑌 . 𝑠𝑋|𝑌 𝑇 Example Find the forward swap and the approximate swap (using the formulae above) from the following information: 29-day USD interest rate: 5% 29-day EUR interest rate: 3% Spot EURUSD: 1.4055 Using the formula that is derived from the interest rate parity, the forward swap is given by 1.4055 × 29 29 0.05 × 360 − 0.03 × 360 29 1 + 0.03 × 360 = 0.0023. Note that both EUR and USD are ACT/360. The approximate swap rate is 1.4055 × (0.05 − 0.03) × 29 = 0.0023. 30 Thus, at 4 decimal places, the approximation is as good as the exact formula. From the swap rate formula derived from the interest rate parity, 𝑤𝑋|𝑌 = 𝑠𝑋|𝑌 (𝑟𝑌 𝑇 − 𝑟𝑋 𝑇) , 1 + 𝑟𝑋 𝑇 SU5-19 FIN201 STUDY UNIT 5 we see that if the interest rate for the counter currency Y is higher than the interest rate for the base currency X, then the swap rate is positive. In this case, we say that the base currency is selling at a premium to the counter currency. Conversely, if the interest rate for the counter currency Y is lower than the interest rate for the base currency X, then the swap rate is negative and we say that the base currency is selling at a discount to the counter currency. When bid-ask quotes are involved, swap rates are given in a pair. The pair of swap rates are then used to calculate the forward exchange rates from spot rates in a peculiar manner as the following examples illustrate. Example If the spot EURUSD is 1.4066-71 and the 1-month swap rate is 20-22, find the 1-month forward quote. The swap rate is interpreted in terms of pips. Thus 20-22 means 0.0020-0.0022. As the pair is increasing, we will add correspondingly to the spot quote to obtain the forward quote: 1.4066 + 0.0020 | 1.4071 + 0.022 or 1.4086 | 1.4093 Example If the spot EURUSD is 1.4066-71 and the 1-month swap rate is 22-20, find the 1-month forward quote. The swap rate is interpreted in terms of pips. Thus 22-20 means 0.0022-0.0020. As the pair is decreasing, we will subtract correspondingly to the spot quote to obtain the forward quote: 1.4066 - 0.0022 | 1.4071 - 0.0020 or 1.4044 | 1.4051 SU5-20 FIN201 STUDY UNIT 5 Thus the rule to obtain forward (outright) rates from (forward) swap rates is:   if the swap rates are increasing in the bid-ask quote, add them to the spot bidask quote to obtain the forward bid-ask quote if the swap rates are decreasing in the bid-ask quote, subtract them from the spot bid-ask quote to obtain the forward bid-ask quote These sections from the Textbook (and do the associated exercises):  Chapter 9 Forward exchange rates SU5-21 FIN201 STUDY UNIT 5 Chapter 5 Calculations 5.1 Forward-Forward Swap A forward-forward swap (or simply forward-forward) is a swap deal that involves 2 forward dates. Diagrammatically, it looks like this: Figure 5.2 This may be interpreted as a combination of two ordinary forward swaps in opposite directions: Figure 5.3 SU5-22 FIN201 STUDY UNIT 5 in the long position and Figure 5.4 Let's consider the following example. Example Given the following quotes: Name Rate EURCHF spot 1.2325 / 35 1-month swap 65 / 61 3-month swap 160 / 155 If the client wishes to sell EUR one month forward and buy EUR three months forward, what are the rates involved? SU5-23 FIN201 STUDY UNIT 5 From the perspective of the dealer, this is equivalent to:  sell EUR spot and buy EUR one month forward  buy EUR spot and sell EUR three months forward Thus the rate to charge the client is 1.2330 − 0.0065 = 1.2265 for the one-month forward swap and 1.2330 − 0.0155 = 1.2175 for the three-month forward swap. The mid-market of 1.2330 is chosen for convenience. In other words, the dealer is to buy EUR for CHF at EURCHF 1.2265 at 1-month and to sell EUR for CHF at EURCHF 1.2175 at 3-month. Just as forward swaps are characterised by the difference between the forward and spot exchange rates, the forward-forward swap may be characterised by the difference between the two forward exchange rates, in this case, namely, 1.2175 − 1.2265 = (−0.0155) − (−0.0065) = −0.009. Conversely, if the client wishes to buy EUR one month forward and sell EUR three months forward, the dealer will do this:  buy EUR spot and sell EUR one month forward  sell EUR spot and buy EUR three months forward at the respective exchange rates of 1.2330 − 0.0061 = 1.2269 and 1.2330 − 0.0160 = 1.2170. The difference between them is (−0.0160) − (−0.0061) = −0.0099. Thus the price of the forward-forward swap is 99/90. Note that the negative sign is implied by the reversed ordering of the two numbers as is the case for forward swaps. The general rule to remember is this: Suppose 𝑡 and 𝑇 are two times in the future, with 𝑡 < 𝑇. Suppose the bid and ask swap rates are 𝑤𝑡𝐵 | 𝑤𝑡𝐴 and 𝑤𝑇𝐵 | 𝑤𝑇𝐴 . SU5-24 FIN201 STUDY UNIT 5 Then the forward-forward bid-ask rates are 𝑤𝑇𝐵 − 𝑤𝑡𝐴 | 𝑤𝑇𝐴 − 𝑤𝑡𝐵 . 5.2 Non-Deliverable Forwards In a forward outright, two currencies are exchanged on a future date. Some currencies may not be easily exchanged, perhaps due to capital controls. In this case, a forward outright wouldn't be implementable. Instead, a non-deliverable forward (NDF) would be the suitable instrument to trade in order to bet on the future movement of the exchange rate. A NDF is an agreement to exchange two currencies on a certain date 𝑇 at a certain exchange rate and to counter-exchange the same pair of currencies in an offsetting trade at the spot rate 2 days before 𝑇. Here's an example. Example It is currently 15 April. A company needs to buy TWD 100 million against USD for settlement in 3 months on 17 July. It does this with a 3-month NDF at the rate of USDTWD 30.06 entered into with a dealer. Two days before maturity on 15 July, the spot rate is USDTWD 29.43. If actual cash flows were involved, they would look like this, from the perspective of the company: 15 July: Currency Flow TWD - 100,000,000 USD + 100,000,000 / 29.43 SU5-25 FIN201 STUDY UNIT 5 17 July: Currency Flow TWD + 100,000,000 USD - 100,000,000 / 30.06 Netting the cash flows and disregarding the 2-day interest, we obtain an inflow of 100,000,000 100,000,000 − = 71213.33 29.43 30.06 in USD for the company. In an NDF, actual cash flows do not occur. Instead, the company receives a settlement of USD 71,213.33 on 17 July. The advantages of an NDF are:  it allows the forward exchange of a hard-to-trade currency  it avoids the risk involved in exchanging principal amounts  it can be used for both hedging and speculation These sections from the Textbook (and do the associated exercises):  Chapter 9 Forward-forwards  Chapter 9 Non-deliverable forwards SU5-26 FIN201 STUDY UNIT 5 Chapter 6 Analyses and Strategies It is known in the FX market that when the spot exchange rate nears a round figure (e.g. 1.1000 as opposed to 1.1155), it becomes more volatile. The article on trading near a round figure that is to be distributed in class prior to discussion. Obtain data from a suitable Financial Information System (e.g. Eikon, internet or metatrader). Find out if it is true that volatility increases near round figures. If so, are you able to formulate a suitable trading strategy? Watch this video for a visual-oral presentation of the steps that are required to compute cross rates in foreign exchange: Computing Cross Rates (Access video via iStudyGuide) Watch this video for a presentation of further worked examples under the topic of forex: Worked Examples in Forex (Access video via iStudyGuide) SU5-27 FIN201 STUDY UNIT 5 Quiz 1) A pip for EURUSD is a. 0.1 b. 0.01 c. 0.001 d. 0.0001 2) A pip for USDJPY is a. b. c. d. 3) Foreign exchange trading begins weekly from a. b. c. d. 4) 0.1 0.01 0.001 0.0001 Singapore, Singapore Wellington, New Zealand Tokyo, Japan Sydney, Australia The "value" of the currency is largely determined relative to other international currencies. This state of affairs is known as a. the silver standard b. the gold standard c. the Bretton Woods system d. the floating rate regime 5) An exchange rate that is determined from a chain of other exchange rates involving the pair at the ends of the chain is known as a/an a. b. c. d. cross rate interest rate chain rate swap rate SU5-28 FIN201 STUDY UNIT 5 6) Interest rate parity is a relationship between the interest rates of two currencies that depends on the spot and forward exchange rates. a. b. 7) Chinese capital controls made _________ an attractive instrument to bet on movements in exchange rates that involve the CNY. a. b. c. d. 8) non-deliverable forwards Chinese stocks binary options currency swaps A forward outright and a forward swap are different because the former involves a counter exchange of currencies at initiation. a. b. 9) True False True False The second most traded currency is a. b. c. d. USD EUR SGD DEM 10) There was a significant drop in international foreign exchange activity on 1 Jan 1999 because on that day many currencies ceased to exist and the _________ came in existence. a. b. c. d. Deutsche mark euro sterling none of the above SU5-29 FIN201 STUDY UNIT 5 Solutions or Suggested Answers Quiz Question 1: d Question 2: b Question 3: b Question 4: d Question 5: a Question 6: a Question 7: a Question 8: b Question 9: b Question 10: b SU5-30 STUDY UNIT 6 OPTIONS FIN201 STUDY UNIT 6 Learning Outcomes By the end of this unit, you should be able to: 1. Describe significant features of the options market. 2. Compute option prices with the Black-Scholes model. 3. Compute option prices with the binomial model. SU6-1 FIN201 STUDY UNIT 6 Chapter 1 Market Options and forward/futures contracts are the primary types of financial derivatives in the financial markets. Futures contracts were introduced at the Dojima Rice Exchange (Osaka, Japan) in 1710 (Ref: Wikipedia on Dojima Rice Exchange). Both types of instruments were used in speculation during tulipmania in Holland in the 1600s (Ref: Economist article: Was tulipmania irrational?). The first organised exchange in futures contracts that was established in the United States in 1848 was the Chicago Board of Trade (CBOT), while the first organised exchange in options contracts established was the Chicago Board Options Exchange (CBOE) in the United States in 1973. This shows that there is a history to the trading of derivatives, particularly options. What are new in the 20th century, therefore, are the advent of information technology, which affects the trading of all financial instruments, and the invention of mathematical modelling methods that are used in the pricing and risk management of options. At CBOE, trading activities in the options produce prices for the instrument. Off the exchanges, in the OTC market, where options are also traded, the pricing of options cannot be found simply by watching the market because it is non-existent. It is in this context that mathematical modelling methods play the important role of putting a price on an option so that it may be rationally and accountably traded and used in hedging. CBOE is not the only exchange that trades options. The International Securities Exchange (ISE) is another example. But if we browse the Products page at CBOE, we may obtain an idea of the sort of options and options-related contracts that are standardly traded globally at the moment. I'll list the headlines here:  VIX Index & Volatility o VIX is the foremost volatility index. It is sometimes called dubbed the "fear index" for the stock market. When there is a lot of anxiety in the stock market, VIX goes up. On the contrary, when the market is calm, VIX comes down. While that is the qualitative manner to understand VIX, it is in fact precisely stated in terms of a mathematical formula that involves the prices of options on the S&P 500 index. In other words, the level of VIX commensurates with the general level of option prices in the market as it is represented by the prices of a prominent market index. CBOE introduced the VIX index in the 1990s. After the index has been firmly established in the psyche of market participants, the exchange introduced futures and options on VIX in the 2000s. SU6-2 FIN201 STUDY UNIT 6  SPX & Stock Index Options o SPX refers to the S&P 500 index. These options have market indices as underlying. Generally, they are cash-settled and are European in style.  Options on Single Stocks, ETFs & ETNs o This is the major category of options at CBOE. Generally, such options are physically delivered (i.e. asset-settled) and are American in style.  Mini Options o Mini options have smaller sizes (i.e. each price change (in tick) corresponds to a smaller P&L on a single contract). Mini options allow more investors to participate in their trades.  Weekly Options o These options have maturities of a week. This is in contrast with the main category of single stock options, which have maturities of several months.  End-of-Month & Quarterly Options o These are S&P500 index options that have maturity at month-ends or quarter-ends. They facilitate fund managers who want to match their end-of-month or end-of-quarter fund performance with the market index.  FLEX Options/CFLEX o These are customisable option contracts.  Strategy Benchmark Indices o These indices keep track of some basic option strategies. The description above gives you an idea of some of the key dimensions in options and how they are used by market participants. Options are financial instruments that are relatively hard to understand for the general public. The general media either refer to options as boon or bane, depending on the mood of the times. From the perspective of economists, derivatives are useful because they can be applied to the hedging of risk, just as insurance contracts protect us from highly undesirable states of affairs in our lives. As with all financial instruments, there is more than one side to the story. Options are also used for speculation. SU6-3 FIN201 STUDY UNIT 6 1. These sections from the Textbook (and do the associated exercises):  Chapter 11 Overview  Chapter 11 OTC options vs exchange-traded options 2. The history of CBOE at this link. 3. What is Tulipmania? Get a glimpse here. The CBOE 40th anniversary video describes the development of the institution over 40 years of innovation. Pay attention to how the options exchange developed over the years. This is interesting because it reflects the development of the options market in general. SU6-4 FIN201 STUDY UNIT 6 Chapter 2 Signals and Quotes The following picture shows what an option chain for the S&P 500 index (Ref: CBOE delayed quotes) looks like: Figure 6.1 The tables look complicated but organised. The complication is due to the fact that options are categorised according to the underlying reference price, rate or index. Here, the underlying is the S&P 500 index. And corresponding to this single index, there are many options that are currently traded in the market. These options are organised according to:    Maturity date Strike price Call or put The statistics in the tables are interesting. It is an empirical fact that options are most actively traded at-the-money. What this means is that those options whose strike prices are near to the current level of the underlying have the highest trade volumes and open interests. Can you find where the strike prices - 1615, 1622 - are printed above? It is also an empirical fact that the activity dies down when the options are near maturity. This is evident above since this picture is taken in January 2016 and the maturities of the contracts here are in the same month. As with all financial instruments that are traded through a middleman, there are bid and ask prices, opening and closing prices. One can only holistically make sense of options prices by taking into account the following: 1. The price of an option comes in a trajectory, not just snapshots of price points. SU6-5 FIN201 STUDY UNIT 6 2. An option makes a contractual reference to its underlying. Hence what happens to the underlying price/rate/index affects the option price greatly. 3. An option does not exist in isolation. It exists within the option chain. Thus, the behaviour of any one option in an option chain is associated with the behaviours of other options in the chain. 4. The VIX index provides a background level for option prices, since it is roughly a weighted average of prices of options on the S&P 500 index and this index is the most prominent index of the US stock market. Read the contract specification for equity options at CBOE. By browsing option chains of the S&P 500 index, pick out patterns of how the index option prices are distributed. (Sources of option chains data may be found at CBOE's website, marketwatch.com and Reuters Eikon.) How does movement in the S&P 500 index affect movement in its option chain? For example, if there is a 60-point-move in the S&P 500 index over the course of a single day, what magnitudes of price moves would we see empirically in its option chain that may be associated with the 60-point move? SU6-6 FIN201 STUDY UNIT 6 Chapter 3 Instruments An option is a contract between two parties. One party is called the long (i.e. he is in the long position), while the counterparty is called the short (i.e. he is in the short position). An option is a derivate contract, in the sense that it makes a reference to some underlying asset or index. There are two pertinent times in the contract - initiation and expiry (or maturity). The simplest types of contracts are classified by the following:    call or put cash-settled or physically delivered European or American These are all regarded as vanilla as they are commonly found in the market. At initiation, when a call contract is entered into, the short promises to sell the underlying to the long at a specified strike price on expiry. Thus, if the underlying asset is Apple stock, the strike price is $100 and the maturity is 1 month, then the short is promising the long to sell Apple stock to him at $100 per share 1 month from now. In more legalistic terms, a call option contract is a right of the long party to buy an underlying asset at a stipulated strike price on a stipulated date in the future from the short party. Analogously, a put option contract is a right of the long party to sell an underlying asset at a stipulated price on a stipulated date in the future from the short party. From the perspective of the party who is long call, at maturity, the payoff to his option position looks like this: SU6-7 FIN201 STUDY UNIT 6 Figure 6.2 The parameter 𝐾 is the strike price, and 𝑆𝑇 is the underlying price at maturity. If the underlying price ends at 𝐾 exactly or at a value that is less than 𝐾, then the payoff to the long party is 0. This is because, the market price is less than the strike price, there is no reason for the long to buy the underlying from the short since he could get it from the market at a cheaper price. If the underlying price ends at a value greater than 𝐾, then the payoff is the excess amount over the strike price. The reason is this: once the long buys the underlying from the short at the strike price 𝐾, he can right away sell it in the market at the price 𝑆𝑇 , making the amount 𝑆𝑇 − 𝐾 in the procedure. In the same way, the payoff to a put option looks like this: Figure 6.3 SU6-8 FIN201 STUDY UNIT 6 Since the long party has the right to sell in a put option contract at the stipulated strike price, he would only do so if the market price is lower than 𝐾, thereby pocket a profit that is equal to the deficiency below 𝐾. If the market price were higher than 𝐾, there is no reason for the party in the long position to sell the underlying to his option counterparty. In the scenarios described above, it is assumed the short party will deliver physical underlying (for stocks, this is some shares of the stock; for commodities, this is a physical good). In some cases, it is practically impossible to deliver physically - such is the case for index options. Then cash-settlement is the alternative mode that works. The cash-settlement procedure builds the "buy-underlying-from-counterparty/sellunderlying-to-the-market" procedure into the contract. The final dimension is European/American. European options do not allow the option holder from exercising the contract any time prior to expiry. On the other hand, American options allow the option holder to exercise at any time in the life of the option. The payoff of call and put options may be mathematically expressed this way: Call option: max{𝑆𝑇 − 𝐾, 0}, Short option: min{𝐾 − 𝑆𝑇 , 0}. 𝑇 here presents time at maturity. For American options, it's more appropriate to write these this way: Call option: max{𝑆𝑡 − 𝐾, 0}, Short option: min{𝐾 − 𝑆𝑡 , 0}, where 𝑡 represents the current time. If the underlying price is equal to the strike price, the option is said to be at-the-money (ATM). If the options gives a positive payoff on exercise, it is said to be in-the-money (ITM). Otherwise, it is said to be out-of-the-money (OTM). SU6-9 FIN201 STUDY UNIT 6 Chapter 4 Concept: Market Price vs Theoretical Price In economic or financial theories, prices are explained, i.e. there are principles, more fundamental than the current price, that can explain the current price. In the market, the price is determined by interactions and constraints. A trade is conducted at a price, thus producing a price point. Many trades over time produce a price trajectory. Prices are not quoted arbitrarily. For example, the current price level has a significant impact on where it will be next. If a price is too high or too low as compared to the current market price (relative), it's considered too high or too low (absolute). When you learn about options and their prices, you must keep this distinction in mind. When you observe the prices at CBOE, these are market prices. They are not produced by a calculation, by a person or a computer. They are produced by a process - the activity of trading. On the other hand, the academic profession produces theoretical prices to reason with. These prices are useful in the market when the corresponding instrument is not traded widely and therefore when it is hard to gauge the price of the instrument. The well-known Black-Scholes model and the binomial model are theoretical prices. They do not explain market prices. They are used in the market when market prices are absent. Two major principles of theoretical pricing are these:   Discounted expected future payoff The Principle of No Arbitrage 4.1 Expected Present Value of Future Payoff Suppose there is a financial instrument that needs to be priced. Its value is dependent on the state of the world. For example, if the economy is not performing well, its price may be deemed to be low. And so on. So suppose there are 𝑛 states of the world: 𝜔1 , 𝜔2 , … , 𝜔𝑛 . These states occur at some time 𝑇 in the future (e.g. 1 month from now). In each state 𝜔𝑖 , the price of the instrument is 𝑃𝑖 . SU6-10 FIN201 STUDY UNIT 6 Put in another way: we know affirmatively what the prices of the instrument will be in the different scenarios in the future, but we do not know its price presently. Two uncertainties are pertinent here: the existence of several scenarios (i.e. states), so that we do not know which scenario will actually arise; and the uncertainty about the future. The way theoretical finance solves these problems is as follows. In order to price something in the future at present, we discount the future cash flow to the present with a risk-free rate. So suppose 𝑟 is a risk-free interest rate. Second, to handle the probable outcomes 𝜔1 , 𝜔2 , … , 𝜔𝑛 , we posit that there are 𝑛 corresponding probabilities 𝑝1 , 𝑝2 , … , 𝑝𝑛 , so that 𝑝1 + 𝑝2 + ⋯ + 𝑝𝑛 = 1 and the following table gives the probability distribution of the various outcome states: State Probability Price / Cash Flow 𝜔1 𝑝1 𝑃1 𝜔2 𝑝2 𝑃2 ⋯ ⋯ ⋯ 𝜔𝑛 𝑝𝑛 𝑃𝑛 The present value of the instrument is then expected to be given by the following expression: 𝑒 −𝑟𝑇 (𝑝1 𝑃1 + 𝑝2 𝑃2 + ⋯ + 𝑝𝑛 𝑃𝑛 ), i.e. the discounted probability-weighted future prices. Note that this is a generalisation of the method of PV as it includes a mechanism for discounting to the present with an interest rate. The generalisation is due to the uncertainty by the various states that can occur in the future. This uncertainty is "removed" or "balanced" by the probability weights and the averaging. SU6-11 FIN201 STUDY UNIT 6 If the discounting is removed from the expression, then the value is the expected future value. Here are some applications to the pricing of financial instruments. Example Assume that a security is likely to provide returns over the next year as follows: Return (R) Probability (p) 6% 0.3 7.5% 0.2 8.5% 0.2 10% 0.3 What is its expected return? The expected return is calculated as: 4 𝐸(𝑅) = ∑ 𝑝𝑖 𝑅𝑖 = 0.3 × 6% + 0.2 × 7.5% + 0.2 × 8.5% + 0.3 × 10% = 0.08 = 8%. 𝑖=1 Example There are two possible states of the economy 𝜔1 , 𝜔2 one year from now. In 𝜔1, the price of Apple stock is deemed to be $90, while in 𝜔2 , it is deemed to be $110. Given that the risk-free interest rate is 5% and the states are equally likely to occur, find the expected present value of the stock. The expected present value is given by (in $) 1 1 𝑒 −0.05×1 × ( × 90 + × 110) = 95.12. 2 2 SU6-12 FIN201 STUDY UNIT 6 4.2 The Principle of No Arbitrage An arbitrage opportunity is a trading strategy that (1) has no chance of losing money and (2) has a positive chance of making money. The Principle of No Arbitrage states that in an efficient market, there is no arbitrage opportunity. This is the key principle behind the theoretical pricing of options (more generally, any financial derivatives) in theoretical economics and theoretical finance. When applied to option pricing, the result is the Black-Scholes option pricing model and its famous pricing formulae (for vanilla European call and put options). The way these option pricing formulae are derived goes as follows, in principle: when the option writer sells an option to the long position, he does not regard it as a bet. He is all aware that he is under the risk of having to deliver the stock (in the case of a call option), because if the stock price were to rise at maturity, he is compelled to buy the stock from the market at a relatively higher price to sell to the long at a relatively cheaper price. In order to protect himself, he buys a certain number of shares of the stock to hedge. This hedging strategy is in effect an insurance mechanism and therefore, like any insurance policy, needs to be charged a premium. The theoretical Black-Scholes option prices give the amount that the option buyer needs to pay to the option writer at the start of the contract. As a consequence, note that theoretical option prices are not the present value of expected future cash flows! These sections from the Textbook (and do the associated exercises):  Chapter 11 The ideas behind option pricing To what extent can life insurance premiums be interpreted as the present value of expected future cash outflows by insurance companies? SU6-13 FIN201 STUDY UNIT 6 Chapter 5 Calculations The simplest options are the vanilla, European, call and put options. The standard mathematical models in finance that are used to price such options are the BlackScholes model and the binomial model. 5.1 The Black-Scholes Model The de facto theoretical pricing model is the Black-Scholes Model. This says that the price of a call option is given by the formula: 𝐶(𝑆, 𝑡) = 𝑁(𝑑1 )𝑆 − 𝑁(𝑑2 )𝐾𝑒 −𝑟(𝑇−𝑡) , where 𝑑1 = 𝑆 𝜎2 (ln( ) + (𝑟 + )(𝑇 − 𝑡)), 𝐾 2 𝜎√𝑇 − 𝑡 1 𝑑2 = 𝑑2 − 𝜎√𝑇 − 𝑡 and the price of the put option is given by the formula: 𝑃(𝑆, 𝑡) = 𝑁(−𝑑2 )𝐾𝑒 −𝑟(𝑇−𝑡) − 𝑁(−𝑑1 )𝑆. Some things to note about the formulae are discussed here. There are 5 parameters: underlying price 𝑆, strike price 𝐾, risk-free rate 𝑟, time to maturity 𝑇 − 𝑡 and volatility 𝜎 . The time 𝑡 represents the current time when the options are priced, and 𝑇 is the time at maturity. The pricing functions 𝐶(𝑆, 𝑡) and 𝑃(𝑆, 𝑡) have 𝑆 and 𝑡 only in their arguments because the other parameters 𝐾, 𝑟 and 𝑇 are regarded as fixed (i.e. strike price and maturity are fixed in the contract, while risk-free rate is relatively stable as compared to stocks and their option prices). The function 𝑁(−) is the standard normal cumulative distribution function (CDF). Hence, there are these relationships arising from their interpretations as probabilities: SU6-14 FIN201 STUDY UNIT 6 𝑁(𝑑1 ) + 𝑁(−𝑑1 ) = 1, 𝑁(𝑑2 ) + 𝑁(−𝑑2 ) = 1. Associated to the pricing formula, is the concept of the delta. For the call option, the delta is given by the formula: 𝛥𝐶 (𝑆, 𝑡) = 𝑁(𝑑1 ), while for the put option, it is given by 𝛥𝑃 (𝑆, 𝑡) = 𝑁(𝑑1 ) − 1. These formulae were originally derived by Fisher Black and Merton Scholes in 1973 with the interpretation given below: Step 1: Initiation An option buyer buys an option from an option writer and pays him an option premium, i.e. either 𝐶(𝑆0 , 0) or 𝑃(𝑆0 , 0), where 𝑆0 is the stock price at time 0, the initiation of the contract. Step 2: Hedging the short option position The option writer hedges his position by maintaining this portfolio: 𝛥𝑂 (𝑆𝑡 , 𝑡) × 𝑆𝑡 + Cash. 𝑂 here stands for 𝐶 (call) or 𝑃 (put), depending on whether he has sold a call or put option, and 𝑆𝑡 stands for the stock price at time 𝑡. He holds 𝛥𝑂 (𝑆, 𝑡) shares of the stock. And he holds a certain amount of cash with the bank. Delta is computed based on the formula given above. Everyday, as the stock price changes, the option writer needs to recompute Delta. That will help him determine the new number of shares that he should hold according to the Black-Scholes Theory. If Delta goes up, he needs to withdraw or borrow cash from the bank to buy shares. If Delta goes down, he needs to sell shares to reduce his holding, and deposit the proceeds into the bank. SU6-15 FIN201 STUDY UNIT 6 Step 3: At expiry At expiry, the Black-Scholes Theory guarantees that the option writer has exactly 1 share of stock to deliver to the option buyer if it's a call option that's in-the-money, or the cash to pay to the option buyer if it's a put option that's in-the-money. The key point is this: if the option writer charges the option buyer a premium that is given by the Black-Scholes formula, and if he then hedges his position in accordance to the Black-Scholes dynamic hedging recipe listed down here, he will be fully and exactly hedged at expiry of the contract. An option writer in a bank will make money from providing this service by charging a fee that is added on top of the premium. 5.2 The Binomial Model The binomial model is an approximation of the Black-Scholes model. The answer that it produces becomes closer and closer to the Black-Scholes model answer if the tree in the model becomes more refined (i.e. has more steps). The input to the binomial model consists of the following parameters: • initial stock price 𝑆0 • strike price 𝐾 • time to maturity 𝑇 • number of time steps 𝑛 • up factor 𝑢 • down factor 𝑑 • risk-free interest rate 𝑟 • call or put We will consider only the case of 𝑛 = 1 here, i.e. the future is represented by only 1 time step: SU6-16 FIN201 STUDY UNIT 6 Figure 6.4 The single node on the left represents the situation at time 0, i.e. now. The two nodes on the right represent two possible states at time 1, i.e. future. In deriving the option price, there will be two passes, which are called forward induction and backward induction. Step 1: Forward induction Fill the initial node with the initial stock price 𝑆0 . As it evolves into the future, time 1, it can either go up or come down. It goes up by multiplication by the up-factor 𝑢, and it comes down by multiplication by the down factor 𝑑. Thus we obtain a diagram like this: SU6-17 FIN201 STUDY UNIT 6 Figure 6.5 Step 2: Evaluate the option payoff Given the states at time 𝑇 = 1, the option payoff at maturity would be determined. In other words, though we may not know that option payoff would be in the future, we will know what it will be provided we are told what the stock price will be. This is simply because the contract ties the option payoff to the value of the stock price at maturity. And the model posits that there are two possibilities: the stock price can be either 𝑢𝑆0 or 𝑑𝑆0 . Let's assume that the option is a call, so its payoff formula is given by max(𝑆 − 𝐾, 0), and we obtain the following picture after evaluating with the stock price: SU6-18 FIN201 STUDY UNIT 6 Figure 6.6 We have used the notation 𝐶1 (𝑢) to denote the call option price at time 1 when the state is "up", and 𝐶1 (𝑑) to denote the call option price at time 1 when the state is "down". Step 3: Backward induction We apply the following formula to the two payoffs above to obtain the option price at present: 𝑇 𝐶0 = 𝑒 −𝑟𝑛 (𝑝̃𝐶1 (𝑢) + 𝑞̃𝐶1 (𝑑)), where 𝐶0 denotes the call option price time time 0, i.e. at present, and 𝑇 𝑝̃ 𝑒 𝑟𝑛 − 𝑑 = 𝑢−𝑑 𝑞̃ = 1 − 𝑝̃ This formula is known as the risk-neutral pricing formula. It is analogous to the method of the discounted expected present valuation in form, but the probability weights 𝑝̃ and 𝑞̃ are not real probabilities - they are called risk neutral probabilities. (If you find the terminology very strange, it's OK, because it is indeed very strange. These concepts arise from theoretical reasoning in academic finance, in particular, from the Principle of No Arbitrage. They don't necessarily have to relate to anything that we may deem real from the financial markets.) SU6-19 FIN201 STUDY UNIT 6 At this point, we have finally found the present value of the option price. On diagram, this looks like: Figure 6.7 The entire argument can be compressed into one step as the following example shows. Example Given the following parameters:      initial stock price 𝑆0 = 100 strike price 𝐾 = 100 up factor 𝑢 = 2 down factor 𝑑 = 0.5 risk-free interest rate 𝑟 = 0.05 Find the prices of the 1-year expiry call and put options by using the 1-step binomial model. In the forward induction step, the two possibilities for the stock price at time 1 are: 200 and 50. For the call option, the corresponding payoffs are: 100, 0 For the put option, the corresponding payoffs are: 0, 50 The risk neutral probabilities are: SU6-20 FIN201 STUDY UNIT 6 1 𝑝̃ 𝑒 0.05×1 − 0.5 = = 0.367514064251, 2 − 0.5 𝑞̃ = 1 − 𝑝̃ = 0.632485935749. The current price of the call option is therefore: 1 𝐶0 = 𝑒 −0.05×1 (𝑝̃ × 100 + 𝑞̃ × 0) = 34.9590191833. The current price of the put option is therefore: 1 𝑃0 = 𝑒 −0.05×1 (𝑝̃ × 0 + 𝑞̃ × 50) = 30.0819616334. These sections from the Textbook (and do the associated exercises):  Chapter 11 Pricing models SU6-21 FIN201 STUDY UNIT 6 Chapter 6 Analyses and Strategies There are several ways options may be traded. They are listed/categorised here:    As a standalone Together with its underlying asset In a combination with other options As in any financial position, there are 2 reasons why one may enter into a trading position: for hedging or for speculation. In addition, as options have expiries, one may hold an option until maturity or close the position prior to expiry (which may be easily achieved in a liquid market such as in an exchange setting). As a standalone, there are 4 possibilities, as one may: 1. 2. 3. 4. long a call long a put short a call short a put Let me analyse some strategies here. When one longs a call, one gains when the price of the call option rises. Since in turn, when the underlying stock rises in price, the call option price also rises, longing a call may be viewed as a trading strategy that bets on rising stock price. It is an alternative to buying a stock that is relatively cheaper (since the price of an option is on the order of about 10% of the stock price) and at the same time, a protected form of investment since drastic price fall in the stock has little effect on the option price. When one longs a put option, one gains when the stock price falls. Thus, this is a trading position that is entered into to either bet on the fall of a stock price or to hedge against the fall of the stock price. Shorting a stock directly is generally frowned upon or disallowed. Taking a long position in put option is an alternative to shorting. When one longs a stock and shorts a call option, the position is called a covered call. This position may be interpreted this way. Suppose that we own a stock and its price is currently stagnant. We may sell a call option to earn the premium in the meanwhile. If our expectation of stagnancy remains, then we would earn the premium. Otherwise, if the price of the stock suddenly rises to the extent that it crosses the strike, then the in-the-money option will require us to deliver the stock at the strike price. Since we hold the stock for delivery, the position is said to be "covered". SU6-22 FIN201 STUDY UNIT 6 Option strategies are thus put together to achieve certain trading, hedging or investment goals. To guide us in formulating these goals, we have to remember what the payoff profile of the call and put options looks like: Figure 6.8 Figure 6.9 SU6-23 FIN201 STUDY UNIT 6 These payoff diagrams are from the perspective of the long position and they include the upfront option premium. Thinking about how strategies work is to consider what happens to the payoff when the underlying price ends up at option maturity at the various locations relative to the strike price 𝐾. Combinations of options allow payoff diagrams of other shapes to be constructed. These shapes may be used in a bet that stock price will be in certain ranges at option expiry. These sections from the Textbook (and do the associated exercises):  Chapter 11 Trading with calls and puts  Chapter 11 Hedging with options Nick Leeson is well-known to have brought down the venerable Barings Bank which was founded in 1762. He took big bets on the Nikkei 225 index by shorting options. If Leeson was neutral to the direction of the market, he was likely to have sold equal numbers of call and put options on the index. 1. What is the resulting position commonly called? 2. Under what condition would he have profited from the position? 3. Use historical data on Nikkei 225 options to analyse the before-and-after of 4. the option strategy around Jan 17, 1995. SU6-24 FIN201 STUDY UNIT 6 Watch this video to appreciate the key concepts behind the theory of option pricing: The Idea behind Option Pricing (Access video via iStudyGuide) Watch this video to see how to solve problems with the binomial model: The Binomial Model (Access video via iStudyGuide) SU6-25 FIN201 STUDY UNIT 6 Quiz 1) The CBOE was founded in a. b. c. d. 2) Which of the following is not a parameter in the Black-Scholes options model? a. b. c. d. 3) volatility interest rate strike price option price _________ options are relatively cheaper. a. b. c. d. 4) 1970 1971 1972 1973 In-the-money At-the-money Out-of-the-money Make-a-lot-of-money If one takes on a long position in a put option, one is _________ on the underlying. a. bearish b. bullish c. ambivalent 5) An owner of an American option has _________ choices, namely, _________. a. b. c. d. 6) 1; wait for expiry 1; exercise opportunistically 2; wait for expiry or exercise opportunistically 3; trade it, wait for expiry or exercise opportunistically The Principle of No-Arbitrage states that there is no investment that has both a positive chance of making profits and a positive chance of making losses. a. True b. False SU6-26 FIN201 STUDY UNIT 6 7) The 3 steps of implementation of the binomial model are _________, evaluation of option payoff and _________. a. b. c. d. 8) A futures contract does not require this but an option contract requires this. This is a. b. c. d. 9) reflection, action digestion, execution forward induction, backward induction deduction, induction premium foresight hindsight cost When the stock market is full of fear and anticipation, prices in the options market will a. b. c. d. fall rise be unaffected rise and fall in regular succession 10) The implied volatility is the volatility parameter in the Black-Scholes model that is found by substituting market option price into the Black-Scholes pricing formula. a. True b. False SU6-27 FIN201 STUDY UNIT 6 Solutions or Suggested Answers Quiz Question 1: d Question 2: d Question 3: c Question 4: a Question 5: d Question 6: a Question 7: c Question 8: a Question 9: b Question 10: a SU6-28
AAPL histogram and daily price volatility (base) C:\Users\Yap>python Python 2.7.14 |Anaconda, Inc.| (default, Nov 8 2017, 13:40:45) [MSC v.1500 64 b it (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pandas_datareader.data as web >>> import datetime as dt >>> import pandas as pd >>> startdate = dt.date(2017, 8, 1) >>> enddate = dt.date.today() >>> engine = 'iex' >>> s = ['AAPL','IBM'] >>> fx = pd.DataFrame() >>> >>> for ticker in s: ... y = web.DataReader(ticker, engine, startdate, enddate) ... y = y.loc[:,['close']] ... y = y.rename(columns={'close':ticker}) ... fx = pd.concat([fx,y],axis=1,join='outer') ... 1y 1y >>> print (fx['AAPL'].head(5)) date 2017-08-01 156.7645 2017-08-02 155.3312 2017-08-03 153.7793 2017-08-04 154.5899 2017-08-07 156.9820 Name: AAPL, dtype: float64 >>> import numpy as np >>> s = fx['AAPL'] >>> vol_s = np.sqrt(s.var(axis=0)) >>> print (vol_s) 8.57728421341 >>> import matplotlib.pyplot as plt >>> returns = s/s.shift(1) - 1.0 >>> ax1 = returns.hist() >>> ax1.set_xlabel('returns') Text(0.5,0,u'returns') >>> ax1.set_ylabel('count') Text(0,0.5,u'count') >>> plt.show() Page 1 of 3 Page 2 of 3 Page 3 of 3
FIN 201: FINANCIAL MATHEMATICS Study Unit 2: Statistics with Excel and Python Prepared by: Irene Yap, CFA 1 Statistics: Measures Measures of central tendency Arithmetic mean - Weighted & unweighted return Geometric mean Median Mode Spread (Measure of dispersion) – A measure of risk Standard deviation (SD), variance – Biased/unbiased Portfolio SD affected by: Covariance and Correlation Readings: Chapter 2 – Averages – arithmetic and geometric means, weighted averages, median and mode 2 Averages Data set: 1, 5, 8, 4, 1, 8, 4, 10 Calculate arithmetic mean, weighted mean, geometric mean, median and mode. Arithmetic mean Using Python numpy >>> numpy.average(x) 5.125 Arithmetic mean Weighted mean using weighting rule “half for odd, quarter for even” 1 1 1 1 1 1 1 1 (1x + 5 x + 8 x + 4 x + 1x + 8 x + 4 x + 10 x ) / 2.75 = 4.3636 2 2 4 4 2 4 4 4 Readings: Chapter 2 – Averages – arithmetic and geometric means, weighted averages, median and mode 3 Averages Geometric mean (1 X 5 X 8 X 4 X 1 X 8 X 4 X 10)1/8 = 3.878 Median 1, 1, 4, 4, 5, 8, 8, 10 Using Python numpy >>> numpy.median(x) 4.5 Take the average of the 2 central values: 4 & 5 4 +5 = 4.5 Median = 2 Mode Highest frequency. 3 modes: 1, 4, 8 Readings: Chapter 2 – Averages – arithmetic and geometric means, weighted averages, median and mode 4 Calculating on Excel Using Excel to calculate median and geometric mean If you use the MODE function, you will only get one mode. This series of data has multiple modes. For Excel 2010 and higher, you may type “=mode.mult(B16:B23)” and press CTRL SHIFT ENTER as it is an array function. 5 Spreads – Variance and Standard Deviation (SD) Variance:Biased variance: Biased vs unbiased:  Use biased when using actual data values  Use unbiased when fitting probability distribution Unbiased variance: Standard deviation:σ = √ σ2 Volatility pa = SD x √frequency of data pa Readings: Chapter 2 – Variance, Standard Deviation and Volatility 6 Spreads – Variance and Standard Deviation (SD) Using the previous data, find the SD and variance. How many SDs is 10 away from the mean? Data set: 1, 5, 8, 4, 1, 8, 4, 10 Mean = 5.125 Variance = 9.609 Hence, SD = √ 9.609 = 3.100 Since 10 − 5 .125 = 1 .573 3 .100 5.125 10 – 5.125 = 1.573 x σ Hence, 10 is 1.573 SDs away from the mean. Readings: Chapter 2 – Variance, Standard Deviation and Volatility 8.225 10 3.10 = 1 SD 10 – 5.125 = ? SD 7 Spreads – Variance and Standard Deviation (SD) Using Excel to calculate mean and variance [(Xi-E(X)]2 biased Using Python numpy to calculate mean and variance x=[1, 5, 8, 4, 1, 8, 4, 10] >>> import numpy >>> numpy.mean(x) 5.125 >>> numpy.var(x) 9.609375 >>> numpy.std(x) 3.0998991919093113 8 Statistical measures: More examples - unweighted mean, SD Year Return 1 7% 2 7.5% 3 8% 4 8.5% 5 9% Suppose you hold Stock A over the past 5 years and these are its returns by year. Average return (unweighted) Average return = Σ Ri = (7+7.5+8+8.5+9)/5 = 8% Unbiased SD (unweighted) Variance = Σ [Ri – E(R)]2 n–1 = (0.07 -0.08)2 + (0.075 -0.08)2 + (0.08 -0.08)2 + (0.085 -0.08)2 + (0.09 -0.08)2 4 = 0.0000625 On financial calculator, use sX (and not σX) Standard deviation (SD) = √0.0000625 = 0.0079 or 0.79% Readings: Chapter 2 – Variance, Standard Deviation and Volatility 9 Statistical measures: More examples - weighted mean, SD 0.3 6% Suppose you are considering investing in Stock B and you think its returns over the next year will be as displayed in the table. 0.2 7.5% Expected return (weighted) 0.2 8.5% E(R) = ΣPi Ri 0.3 10% E(R) = (0.3*6%)+(0.2*7.5%)+(0.2*8.5%)+(0.3*10%) Probability Return = 8% Expected SD (weighted) Variance = ΣPi [Ri – E(R)]2 = 0.3(6% - 8%)2 + 0.2(7.5% - 8%)2 + 0.2(8.5% - 8%)2 + 0.3(10% - 8%)2 = 0.00025 Standard deviation = √ 0.00025 = 0.01581 or 1.581% On financial calculator, use σX (and not sX) Readings: Chapter 2 – Variance, Standard Deviation and Volatility 10 Statistical measures: More examples - weighted mean, SD (Using Python) #Calculate weighted average >>> x = (6, 7.5, 8.5, 10) >>>wts = (0.3, 0.2, 0.2, 0.3) >>> numpy.average (x, weights = wts) 8.0 # Calculate weighted average and weighted standard deviation >>> def weighted_avg_and_std(x, weights): average = numpy.average(x, weights=wts) variance = numpy.average((x-average)**2, weights=wts) return (average, math.sqrt(variance)) >>> x = (6, 7.5, 8.5, 10) >>> wts = (0.3, 0.2, 0.2, 0.3) >>> print weighted_avg_and_std(x, wts) (8.0, 1.5811388300841898) Calculating variance and SD for 2 securities Event Probability Return on Securities RA (60%) RB (40%) 1 0.3 8% 7% 2 0.4 9% 10% 3 0.3 11% 12% You are considering these 2 securities --- A and B --- for investment. Calculating expected portfolio return: Method 1: Using asset-weighted return E(RA) = 0.3 (8%) + 0.4 (9%) + 0.3(11%) = 9.3% E(RB) = 0.3 (7%) + 0.4 (10%) + 0.3 (12%) = 9.7% E(RP) = 0.6 (9.3%) + 0.4 (9.7%) = 9.46% Method 2: Using event-weighted return RP1 RP2 RP3 E(RP) = 0.6 (8%) + 0.4 (7%) = 7.6% = 0.6 (9%) + 0.4 (10%) = 9.4% = 0.6 (11%) + 0.4 (12%) = 11.4% = 0.3 (7.6%) + 0.4 (9.4%) + 0.3 (11.4%) = 9.46% Readings: Chapter 2 – Variance, Standard Deviation and Volatility 12 Calculating variance and SD for 2 securities Calculating portfolio SD Method 1: (Mean from event-weighted) Event Prob Return on Securities RA (60%) RB (40%) 1 0.3 8% 7% 2 0.4 9% 10% 3 0.3 11% 12% Var(RP) = 0.3(0.076 – 0.0946)2 + 0.4(0.094 – 0.0946)2 + 0.3(0.114 – 0.0946)2 = 0.00021684 σP = √ 0.00021684 = 0.014725 or 1.4725% Comparing individual SD with portfolio SD Portfolio SD (1.4725%) is below the weighted average SD of the 2 securities Var(RA) = 0.3 (8% - 9.3%)2 + 0.4 (9% - 9.3%)2 + 0.3(11% - 9.3%)2 = 0.000141 Use this method (or financial calculator) if you are dealing with weighted SD σA = √ 0.000141 = 1.1874% Var(RB) = 0.3(7% - 9.7%)2 + 0.4 (10% - 9.7%)2 + 0.3(12% - 9.7%)2 = 0.000381 σB = √ 0.000381 = 1.9519% Readings: Chapter 2 – Variance, Standard Deviation and Volatility 13 Measuring Relationships between 2 Datasets Covariance measures the co-movement between 2 assets. Covariance of 2 datasets x1, x2, …, xn and y1, y2, ..yn is given by: 1 n Covariance (X, Y) = ∑ [Xi − E(X)][Yi − E(Y)] n i =1 Correlation is a normalised version of covariance and is given by: ρX,Y = CovX,Y/ σX σY Readings: Chapter 2 – Variance, Standard Deviation and Volatility 14 Covariance and Correlation Coefficient -1 Perfectly negatively correlated 0 No correlation +1 Perfectly positively correlated ρA,B = CovA,B/ σA σB Readings: Chapter 2 – Correlation and covariance 15 Covariance and Correlation Coefficient Method 2: A 2nd method to calculate portfolio SD for this 2-security portfolio: Portfolio Variance = WA2σA2 + WB2σB2 + 2 WAWB CovAB Portfolio Variance = (0.6)2(0.000141) + (0.4)2(0.000381) + 2(0.6)(0.4)(CovA,B) OR Portfolio Variance = (0.6)2(0.000141) + (0.4)2(0.000381) + 2(0.6)(0.4)(ρA,B)σA σB Where ρA,B = correlation coefficient between securities A and B Notice that: CovA,B = ρA,B σA σB OR ρA,B = CovA,B/ σA σB For a 3 security (A, B & C) portfolio, Variance = WA2σA2 + WB2σB2 + WC2σC2 + 2 WAWB CovAB + 2 WBWC CovBC + 2 WAWC CovAC If n = no. of securities, no of covariance terms is given by: n( n − 1) 2 Readings: Chapter 2 – Correlation and covariance 16 Correlation Coefficient Correlation coefficient for various values depicted 17 Graphical representations of data: Histogram Histogram This histogram describes the daily returns of Yahoo Inc stock between 2010 and 2015. It shows the daily returns are concentrated between -5% and 5%, with extremes near -10% and 10% Contains more information than mean & SD 18 Graphical representations of data: Probability Distributions Continuous vs discrete probability distributions Continuous distribution - a curve Discrete – tabular representation 19 Graphical representations of data: Probability Distributions Most commonly used: Normal distribution Concepts Continuous probability distribution – a curve. PDF – probability density function: Area under the curve is a probability. Shows how likely each result will occur, with total probabilities under the curve adding up to 100% CDF – cumulative distribution function: Shows the probability that the result will be no greater than a particular number A normalised histogram corresponds to a probability distribution. Areas under the histogram can be read as probabilities 20 Probability Distributions: Normal Distribution Normal distribution (µ, σ) Standard normal distribution (µ=0, σ=1) 21 Probability Distributions: Using Excel The mean and SD of daily returns on a stock are 0.04% and 1.9%. Assuming a normal probability distribution, what is the probability of an absolute return on any one day worse than -5%? Answer Method 1 Method 2 22 Probability Distributions: Using Python Method 3 23 Probability Distributions: Using Excel Understanding Method 1 SD Mean -5% -3.76% -1.86% TRUE: cumulative distribution function FALSE: probability mass function 0.04% 1.94% 1.9% = 1 SD 24 Probability Distributions: Using Excel Understanding Method 2 -5% -3.76% -1.86% 0.04% 1.94% 1.9% = 1 SD -5%-0.04% = ? SD 25 Probability Distributions: Using Python Understanding Method 3 X = (-0.05 – 0.0004)/0.019 Print x -2.652663157895 Norm cdf (x) 0.0039933 26 Interpolation / Extrapolation 27 Interpolation and extrapolation Interpolation from scipy.interpolate import interp1d xp = [30, 61] fp = [8.0, 8.5] numpy.interp (39, xp, fp) Out[5]: 8.14516129032258 • Suppose the 1 mth (30-day) money market rate is 8.0%, the 2 mth (61-day) rate is 8.5% and you wish to find out the 39-day rate. • Using straight line interpolation: x − 8% 39 − 30 x − 8% 9 = ⇒ = 8.5% − 8.0% 61 − 30 0.5% 31 9 x = ( x0.5%) +8% ⇒ x = 8.15% 31 Formula: First known rate + difference between known rates x (days from first date to interpolated date)/(days between known dates) • OR simply: 8.0% + (8.5% - 8.0%) x 9/31 = 8.15% 28 Interpolation and extrapolation Extrapolation • The 2 mth (61-day) rate is 7.5% and the 3 mth (92-day) rate is 7.6%. What is the 93-day rate? • Using straight line extrapolation: x − 7.5% 93 − 61 x − 7.5% 32 = ⇒ = 7.6% − 7.5% 92 − 61 0.1% 31 32 x = ( x0.1%) +7.5% ⇒ x = 7.6032% 31 Formula: First known rate + difference between known rates x (days from first date to interpolated date)/(days between known dates) • OR simply: 7.5% + (7.6% - 7.5%) x 32/31 = 7.6032% 92d, 7.6% 61d,7.5% 93d, x% 29 Interpolation and Extrapolation: Logarithmic 30 Interpolation and Extrapolation: Logarithmic Example 2: Application 31 Logarithmic (or geometric) interpolation The 2 mth (61-day) rate is 7.5% and the 3 mth (92-day) rate is 7.6% (a) What is the 73-day rate using logarithmic interpolation? log7.5 + (log7.6 − log7.5)x 12 = 2.02003 31 e 2.02003 = 7.5386 (b) What is the 93-day rate using logarithmic extrapolation? log7.5 + (log7.6 − log7.5)x 32 = 2.02858 31 e 2.02003 = 7.6032 32 Root finding (Finding IRR) Root finding: problem that arises when we need to find the value of r for which a given equation f (r) = 0 Eg to solve for r below (which is the IRR): We need to rewrite as: Then the IRR is the solution to the equation: f (r) = 0 Readings: How to locate a root : Bisection Method : ExamSolutions; Newton's Method 33 Root finding: Using Excel function IRR Another method is to use Excel function IRR A 1 B 2 3 4 5 6 Year 0 Year 1 Year 2 Year 3 -100 5 5 105 7 8 IRR 5.00% =IRR(B3:B6) Readings: Browse the Excel functions (by category) webpage. the Financial functions (reference) webpage. PV function webpage 34 Root finding: Using Excel “Solver” Solver add-in:Solves for roots of equations such as this: Solution to f(y) = 0 provides the value of y Where y = YTM of a par bond with 5% annual coupon rate and maturing in 3 years Readings: Browse the Excel functions (by category) webpage. the Financial functions (reference) webpage. PV function webpage 35 Root finding: Using Excel’s Solver add-in To install Solver Step 1 Step 2 36 Root finding: Using Excel’s Solver add-in To install Solver Step 3 37 Root finding: Using Excel’s Solver add-in To install Solver Step 4 Step 5 38 Root finding: Using Excel’s Solver add-in Using the same figures as the previous slide: We key in 2% as a hypothetical YTM. Not correct because PV ≠ 0 Running solver, we obtain 5% as the YTM Readings: Browse the Excel functions (by category) webpage. the Financial functions (reference) webpage. PV function webpage 39 Root finding: Using Python interpreter Solve for y in the following par bond using Python: 100 = 4 spaces 10 110 + (1 + y ) (1 + y ) 2 NB: Put a dot (.) after the numbers in the numerator to indicate they are floating point real numbers. 40 Root finding: Using Python Console 4 spaces 41 Root finding for par bonds Note that for par bonds, Is true regardless of the value of y. In other words, for par bonds (price = 100), y = YTM = coupon rate Hence, for this par bond, y = 5% = YTM as well as coupon rate Readings: Browse the Excel functions (by category) webpage. the Financial functions (reference) webpage. PV function webpage 42 Python The basic value types are: integer (e.g. -1, 0, 100) float (e.g. -4.5, 0.0, 34.23) string (e.g. 'abcd', "superman") The basic data structures are: list (e.g. [1,2,3], ['a', 'b', 4]) tuple (e.g. (1,2,3), ('a', 'b', 4)) dictionary (e.g. {'name': 'John', 'age': 15, 'school': 'XYZ Sec. Sch.'}) 43 Python 44 Python 45 Python Calculates (-1)+ (34.23) Repeats string ‘abcd’ Prints the 3rd entry in [] Prints the 2nd entry onwards in [] Prints the entry assigned to ‘name’ 46 Python The following modules are useful for handling data in finance: yahoo-finance Numpy, scipy, matplotlib, math and pandas Numpy: Numeric Python - provides efficient operation on arrays of homogeneous data. A NumPy array is a multidimensional array of objects all of the same type SciPy: Scientific Python – has scientific and numerical tools to support special functions, integration, ordinary differential equation (ODE) solvers, etc Both NumPy and SciPy are usually not installed by default Matplotlib – plotting library for the Python programming language and its numerical mathematics extension NumPy. Math – provides functions for specialised mathematical operations eg exp and log, sqrt, trigonometry, etc Pandas – to conduct data analysis for tabular data such as in an Excel worksheet, matrix data or statistical data sets 47 Excel functions Excel functions Excel financial functions 48 Useful Python modules to install Useful modules to install: • numpy • scipy • matplotlib • pandas • pandas_datareader If pip is installed, type the following in “Search” to install pandas_datareader cmd C:\users\your name>pip install pandas_datareader C:\users\your name>pip install numpy scipy matplotlib pandas In general: C:\users\yourname>pip install requests 49 Install from cmd (Command prompt) 50 Python console 51 Install from cmd (Command prompt) 52
FIN201: Financial Mathematics Irene Yap, CFA JAN 2018 SEMESTER FIN 201: FINANCIAL MATHEMATICS • Textbook • Mastering Financial Calculations – Bob Steiner, 3rd edition. FT Publishing • Study Guide (required reading) • FIN 201: Financial Mathematics • Recommended • At least 270 hours of self-study Textbook: Mastering Financial Calculations – Bob Steiner, 3rd edition. FT Publishing 2 COURSE OUTLINE Study Unit 1 : Time Value of Money • Textbook – Read Chapter 1 Study Unit 2 : Statistics and Numerical Methods with Excel and Python • Textbook – Read Chapter 2 and Chapter 1’s “Interpolation and Extrapolation” Study Unit 3 : Equities • Textbook – Read Chapter 12 Study Unit 4 : Fixed Income • Textbook – Read Chapters 3, 4, 6 & 8 Study Unit 5 : Foreign Exchange • Textbook – Read Chapter 9 Study Unit 6 : Options • Textbook – Read Chapter 11 Textbook: Mastering Financial Calculations – Bob Steiner, 3rd edition. FT Publishing 3 COURSE ASSESSMENT Assessment Description Weight Deadline Assessment 1 Individual case study 1 25% Seminar Wk 4: 9 April 2018, 2355 hrs Assessment 2 Individual case study 2 25% Seminar Wk 7: 30 April 2018, 2355 hrs OCAS Examination 50% Open Book Examination 50% OES TBC 50% TOTAL 100% OCAS: Overall continuous assessment OES: Overall examinable component • Individual case study 1 will test material based on Seminars 1, 2 and 3 only. • Individual case study 2 will test material based on Seminars 4, 5 and 6 only. • Marks deduction scheme for late submission will apply. • To pass, students need to score at least 20% (out of 50%) for OCAS; and at least 20% (out of 50%) for OES Readings: Chapter 1 – Simple and Compound Interest; Nominal and Effective Rates 4 Study Unit 1 Time Value of Money 5 (1) Time value of money (TVM) • $1 today vs $1 one year later different because of: – Inflation – Investment opportunities • When we add cash flows occurring at different points in time, we need to use a discount rate: – Discount future cash flows to the present time OR – Compound cash flows to a future date 6 Compounding vs discounting compounding 0 1 FV = ? 2 3 6% $100 $100 3 discounting 0 7% 1 2 PV = ? 7 (2) TVM: Concepts and Calculations Types of interest rates:• Simple vs compound interest rates • Nominal vs effective interest rates • Continuous rate Variables in TVM:• FV, PV, t, r, PMT • Frequency • Compounding • Discount factors • Day count fractions 8 Interest rates • The price of money; reward for postponing consumption or foregoing liquidity • Simple interest vs compound interest • FV = P + I FV = Future value P = Present value I = Interest Compound interest is used for periods longer than 1 year Simple interest is used for periods up to 1 year 9 Simple interest vs Compound interest Simple interest Year Principal Interest (5%) Closing balance 1 $100 $5 $105 2 $100 $5 $110 3 $100 $5 $115 Compound interest Year Principal Interest (5%) Closing balance 1 $100 $5 $105 2 $105 5% x $105 = $5.25 $110.25 3 $110.25 5% x $110.25 = $5.5125 $115.7625 10 Simple vs compound interest – annual compounding You place $100 at 5% interest rate for 3 years • Simple interest Example 1a FV = PV x (1 + nr) = $100 x (1 + 3 x 0.05) = $115 • Compound interest Example 1b FV = PV x (1 + r)n = $100 x (1 + 0.05)3 = $115.7625 11 Simple vs compound interest – semi-annual compounding • If interest is compounded more than once a year, eg You place $100 at 5% pa compounded semi-annually for 3 years. m = no of periods within a yr; N = no of yrs; r = interest rate. • Simple interest Example 2a FV = PV x (1 + mNr) = $100 x (1 + 6 x 0.025) = $115 • Compound interest Example 2b FV = PV x (1 + r/m)mN = $100 x (1 + 0.05/2)6 = $115.9693 12 Simple interest vs compound interest – Example for more frequent compounding • Using Example 1 again: • You place $100 at 5% interest rate for 3 years • Assume interest is compounded quarterly: • FV = $100 x (1 + 0.05/4)3x4 = 116.075452 • PV (1 + reff)3 = PV (1 + nom i/m)Nm • Or (1 + reff)3 = (1 + nom i/m)Nm N = no of years m = frequency of compounding within a year 13 Python calculation using numpy: FV FV = $100 x (1 + 0.05/4)3x4 = 116.075452 numpy.fv(rate, nper, pmt, pv) Calculates FV with quarterly compounding 14 Python calculation using scipy: FV FV = $100 x (1 + 0.05/4)3x4 = 116.075452 scipy.fv(rate, nper, pmt, pv) Calculates FV with quarterly compounding 15 Financial calculator Financial calculator: TI BAII Plus TVM: For calculating PV, FV, PMT (annuities) Cashflow TVM DATA and STAT are used together, to enter and process statistical data respectively CF & NPV: For calculating uneven cash flows occurring in the future DATA: For entering statistical data STAT: For calculating mean and standard deviation ICONV to change from nominal to effective i/r and vice versa 16 Time Line -$1,000 $1,400 1 0 PV 2 3 4 FV John wants to accumulate $1,400 in 4 years and he has $1,000 to invest today. What should the interest rate be, for him to accomplish this purpose? FV = PV (1 + r)t $1,400 = $1,000 (1 + r)4 ($1,400/$1,000)1/4 – 1 = 8.7757% INPUTS OUTPUTS 1 P/Y 4 N I/Y -1,000 0 PV PMT ? = 8.7757% 1,400 FV 17 Compounding with constant interest rates • Consider an investment of $100 which earns interest of 5% every year for 4 years. FV at end of 4 years = $100(1+0.05)4 = $121.55 $100(1+0.05) $100(1+0.05)2 $100(1+0.05)3 $100(1+0.05)4 $PV(1+r) $100 $PV 0 $PV(1+r)2 1+r 1+r 1 $PV(1+r)3 $PV(1+r)4 1+r 1+r 2 3 FV Using Python numpy >>> numpy.fv(0.05, 4, 0, 100) -121.55062500000003 4 >>> numpy.fv(rate, nper, pmt, pv) Download Python software on your laptop. You are advised to download Python 2.7.10.0 from this source: http://python-xy.github.io/ This url is also given in your study guide, Page SU2-32. 18 Compounding with changing interest rates • Consider another investment of $100 which earns interest of 5% in Year 1, 5.2% in Year 2, 5.4% in Year 3 and 5.8% in Year 4. FV at end of 4 years = $100(1.05)(1.052)(1.054)(1.058) = $123.18 $100 $PV 0 $100(1+0.05)(1+0.052)(1.0540)(1.058) $PV(1+r1)(1+r2)(1+r3)(1+r4) $100(1+0.05)(1.052)(1.054) $PV(1+r1)(1+r2)(1+r3) $100(1+0.05) $100(1+0.05)(1+0.052) $PV(1+r1)(1+r2) $PV(1+r1) 1 + r4 1 + r1 1 + r2 1 + r3 1 2 4 3 19 Compounding with changing interest rates: Using Excel Worksheet to calculate FV Method 1 1 2 3 4 5 6 7 A PV r1 r2 r3 r4 FV B 0.05 0.052 0.054 0.058 Method 2 C 100 1.05 1.052 1.054 1.058 123.1775 =PRODUCT(C2:C6) 1 2 3 4 5 6 7 A PV r1 r2 r3 r4 FV B 0.05 0.052 0.054 0.058 C 100 1.05 1.052 1.054 1.058 123.1775 =C2*C3*C4*C5*C6 20 Relationship between PV and FV Assuming annual compounding: • If interest rates remain unchanged through all compounding periods 1 to n: FV = PV(1+r)n PV = FV/(1+r)n • If interest rates change every year. FV = PV(1+r1)(1+r2)(1+r3)…. (1+rn) PV = FV/{(1+r1)(1+r2)(1+r3)…. (1+rn)} 21 Comparing different compounding frequencies Compounding scheme Annual Semi-annual Quarterly Monthly Daily (360 days) Daily (365 days) Continuous Where t r = = Future value (1 + r) t (1 + r/2) 2t (1 + r/4) 4t (1 + r/12) 12t (1 + r/360) 365t (1 + r/360) 365t e rt Equivalent annual rate (EAR) r (1 + r/2) 2 – 1 (1 + r/4) 4 – 1 (1 + r/12) 12 – 1 (1 + r/360) 365 – 1 (1 + r/365) 365 – 1 e r- 1 number of years annual interest rate (APR) or nominal interest rate If the initial investment is $1,000 and the APR is 8%, then (a) Semi-annual compounding: Periodic interest rate = 8%/2 = 4%, & semi-annual interest = 4% x $1,000 = $40 (b) Quarterly compounding: : Periodic interest rate = 8%/4 = 2%, & quarterly interest = 2% x $1,000 = $20 (c) Etc 22 Significance of frequent compounding 1 year cash flows on a $100 investment with quarterly compounding at 8% per annum. $100 $P 0 $100(1.02) $100(1.02) 2 $100(1.02) 3 $P(1 + r/4) $P(1 + r/4)2 $P(1 + r/4)3 1st Qtr 2nd Qtr 3rd Qtr $100(1.02) 4 $P(1 + r/4)4 4th Qtr The initial investment amount is $P. This grows to $P(1 + r/4)4 by the end of the 1st year ($108.24) With annual compounding, this grows to a lower amount of $P(1+r) ($108) And to $P(1 + r/4)4x2 = $P(1 + r/4)8 by the end of the 2nd year ($117.17) With annual compounding, this grows to a lower amount of $P(1+r)2 ($116.64) FV Using Python numpy >>> numpy.fv(0.02, 4, 0, 100) -108.243216 >>> numpy.fv(rate, nper, pmt, pv) 23 EAR For Investments with 8% APR = 8%. EARAnnual EARQ = (1 + 0.08/4)4 - 1 = 8.24%. EARM = (1 + 0.08/12)12 - 1 = 8.30%. EARD(360) = (1 + 0.08/360)360 - 1 = 8.33%. EAR is higher for an instrument with higher compounding frequency 24 Day Count Convention: Selected countries Source: Textbook P 522 – 524 Instrument Day/year basis Country Money market ACT/365 UK, S’pore, Australia, NZ, Canada, Japan, HK, Malaysia, Taiwan, Thailand ACT/360 Bond markets ACT/ACT* USA, Euromarkets, France, Germany, Ireland, Italy, Switzerland US Treasuries, UK, Australia, France, Germany, Italy. 30/360 US Federal agency and corporate bonds, Switzerland ACT/365 Japan * So a year may have 365 or 366 days depending on whether it is a leap year 25 Simple interest vs compound interest – using day count convention (DCC) Day count conventions in different countries: Refer to Textbook Pages 522 – 524, 64 – 65 & 141 -142 Using simple interest for one period:Example 3 • $100 is deposited at 7% over 35 days. Assume there are 365 days in a year. FV = PV x (1 + nr) = $100 x (1 + 0.07 x 35/365) = $100.67 • If there is more than one period over which interest accumulates, we use compound interest 26 Simple interest vs compound interest – Impt formulae • Short-term investments: Simple interest FV = PV x (1 + r x days/year) This formula will be used extensively in the calculations 1 Discount factor = (1 + r x days ) year Where r = nominal interest rate Compound interest FV = PV x (1 + r)(days/year) Discount factor = 1 a year compounding (1 xfor r ) NonceNo of years Annual interest rate 1 Discount factor = for more than once a year compounding n (1 + r x α ) No of compounding periods Periodic interest rate 27 Simple interest vs compound interest – Important formulae • Simple interest (1) Nominal interest is: FV Yield = ( - 1) x 365/days PV The answer yields an interest rate expressed per annum • Compound interest (2) EAR = (1 + nom i x days/year)365/days FV Effective yield = ( ) PV -1 Where effective yield = EAR (equivalent annual rate) 365/days −1 Substituting nom i (equation 1) into EAR (equation 2), we get equation 3. (3) • To convert an interest rate from a 360-day basis to 365-day basis, • r* = interest rate on 360-day basis x 365/360 28 Compound interest – An example • A $100 loan is made for 3 years at 5% pa compounded semiannually. Find the value at the end of 3 years. Where r = nominal interest rate 1 α = fraction of year [eg ½, ¼, or (no of days Discount factor = n in period)/(no of days in year)] (1 x r x α ) n = number of compounding periods • In this case, we need to use the following: Compound factor = (1 + r x α)n FV = PV x (1 + r x α)n Periodic interest rate FV = $100 x (1 + 0.05 x ½)2x3 FV = $115.97 If the loan is based on ACT/360 convention and ACT = 182, then • FV = $100 x (1 + 0.05 x 182/360)(360/182)x3 • • • • 29 Day Count Fraction Semi-annual without day count With day count convention ACT/ACT 30 Time value of money using Excel functions = RATE (nper, pmt, pv, fv, type) = NPER (rate, pmt, pv, fv, type) = FV (rate, nper, pmt, pv, type) = PV (rate, nper, pmt, fv, type) = PMT (rate, nper, pv, fv, type) 31 Using Excel to calculate Effective Rate (EAR) B2 B3 Nominal i/r 0.08 Frequency pa 4 Qtrly cpdg EAR 0.082432 EFFECT(B2,B3) Food for thought What happens when n becomes larger and larger? Will the effective rate increase or decrease? 1 + EAR = enom r Nominal i/r 0.08 Continuous cpdg - alternative method EAR 0.083287 EXP(B2)-1 You can calculate EAR using either Excel or Python. Using Excel Calculate Effective interest rate (EAR) (a)Quarterly compounding =EFFECT(nominal rate, npery) Eg = EFFECT(0.08,4)  8.24% (b) Continuous compounding, =EXP(number)-1 Eg =EXP(0.08)-1 8.33% OR =EFFECT(nominal rate, 999999) Eg = EFFECT(0.08,9999999)  8.33% Using Python Calculate Effective interest rate (EAR) (a) Quarterly compounding Eg >>>((1+0.08/4)**4)-1 0.08243215999999998 (b) Continuous compounding >>>Import math >>>X = 0.08 >>>(math.exp(x)-1)*100 8.328706767495863 32 Using Python to calculate Effective Rate (EAR) To access Python, go to [Search] button. Type in [cmd] Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Irene Yap>python Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi n32 Type "help", "copyright", "credits" or "license" for more information. >>> ((1+0.08/4)**4)-1 0.08243215999999998 >>> import math >>> x = 0.08 >>> (math.exp(x)-1)*100 Type in 8.328706767495863 >>> 33 Using Python to calculate Effective Rate (EAR) Calculates EAR with quarterly compounding Calculates EAR with continuous compounding 34 Annuities • Annuities – Ordinary annuity (end of period cash flows) – Annuity due (beginning of period cash flows) • Geometric progression 35 default Ordinary annuity vs Annuity due • Ordinary annuity: Equal amount invested at the end of each equal time interval eg $100 invested at the end of every month for 5 years • Annuity due: Equal amount invested at the beginning of each equal time interval eg $100 invested at the beginning of every month for 5 years. • Unequal cash flows: a cash flow series where the amounts invested each period is different 36 Ordinary annuity vs Annuity due Ordinary Annuity 0 i% default Use TVM on fin calculator 1 2 3 PMT PMT PMT 1 2 3 PMT PMT Annuity Due 0 i% PMT PV FV 37 PV of annuity: Using formula • PV of ordinary annuity C PV = C C C C + + + ... + (1 + y )1 (1 + y ) 2 (1 + y ) 3 (1 + y ) n • Using geometric progression formula, can be condensed 1 into: or simply: 1-( ) n PV = C 1+y x (1 +y) 1 - ( 1 ) 1+ y PV = C 1 n x [1 - ( ) ] y 1+ y • PV of annuity due, PV = C + C C C C + + + ... + (1 + y )1 (1 + y ) 2 (1 + y ) 3 (1 + y ) n −1 • Is equivalent to: PV = C 1 n −1 (1 +y - ( ) ) y 1+y 38 PV of growing annuity: Using formula • PV of growing annuity C C C(1 + g) C(1 + g)2 C(1 + g)n -1 PV = + + + ... + 1 2 3 (1 + y ) (1 + y ) (1 + y ) (1 + y ) n • Using geometric progression formula, can be condensed into: 1+g n ) C 1+y PV = x (1 +y) 1 - ( 1 + g ) 1+ y 1-( • Which results in: PV = C 1+g n x (1 - ( ) ) (y - g) 1+ y 39 (3) Return measures • NPV NPV > 0: Accept project NPV < 0: Reject project • IRR IRR > Required return: Accept project IRR < Required return: Reject project 40 Unequal cash flows: Using formula You are embarking on a project which costs $40,000 and will deliver cash flows of $19,000 in the first year, $12,000 in the second year, $18,000 in the third year and $10,500 in the fourth year. The risk-free rate is 2%, and the market risk premium is 4%. The beta of the project is estimated as1.5. Calculate the Net Present Value of the project and make a recommendation on whether the project should be undertaken. Step 1: Use CAPM to calculate the required return. This is the discount rate to use for the project: r = rf + β(MRP) = 2% + 1.5(4) = 8% -40,000 17,592.59 10,288.07 14,288.98 7,717.81 9,887.45 19,000 1 1.08 12,000 1 (1.08) 2 18,000 10,500 1 (1.08) 3 1 (1.08) 4 NPV = PV (C1) + PV (C2) + PV (C3) + PV (C4) – C0 Where PV (Ci) = Present Value of cashflow i 41 Unequal cash flows: Calculating NPV - Steps • 1st: Calculate discount rate. Use either Your required return – CAPM:  r = rf + β(MRP) OR  r = rf + β (rm – rf) May be represented by “r” or “y” – Build-up method: r = rf + risk premium • 2nd: Calculate NPV r Rf MRP rm = discount rate = risk-free rate = market risk premium = market return 42 Unequal cash flows: Using financial calculator Use CF on fin calculator i = 8% -40,000 19,000 12,000 18,000 10,500 : Brings up the worksheet <2ND> : Clear values in worksheet Use <↓> and <↑> to enter the following values. CF0: -40,000 <↓> C01: 19,000 <↓> F01: 1 <↓> C02: 12,000 <↓> F02: 1 <↓> C03: 18,000 <↓> F03: 1 <↓> C04: 10,500 <↓> F04: 1  Sets cash flow in Year 0 = - 40,000  Sets cash flow in Year 1 (CF1) = 19,000  Sets frequency of receiving C01 = 1.  Sets cash flow in Year 2 (CF2) = 12,000  Sets frequency of receiving C02 =1  Sets cash flow in Year 3 (CF3) = 18,000  Sets frequency of receiving C03 =1  Sets cash flow in Year 4 (CF4) = 10,500  Sets frequency of receiving C04 =1 I = 8 ENTER ↓ CPT NPV  $9,887.45. Since NPV > 0, accept the project. 43 Unequal cash flows: Using Excel Worksheet If discount factor is An example of how to calculate NPV and IRR A Discount rate Year 0 Year 1 Year 2 Year 3 Year 4 1 2 3 4 5 6 7 B 0.08 -40,000 19,000 12,000 18,000 10,500 di = 1 (1 + y )ti then NPV = C1d1 + C2d2 + C3d3 + C4d4 – C0 =NPV(rate, value1, value2,…)+C0 8 9 10 NPV IRR $9,887.45 19.50% =NPV(B2,B4:B7)+B3 =IRR(B3:B7) =IRR(values) NPV = PV (C1) + PV (C2) + PV (C3) + PV (C4) – C0 Where PV (Ci) = Present Value of cashflow i If interest rate is constant, then NPV = C3 C4 C1 C2 + + + − C0 t1 t2 t3 t4 (1 + y ) (1 + y ) (1 + y ) (1 + y ) Where y = interest rate 44 Unequal cash flows: Using Python numpy Calculating NPV and IRR using Python numpy IRR Using Python numpy >>> x = (-40, 19, 12, 18, 10.5) >>> numpy.irr(x) 0.19499580297587094 >>> numpy.irr(values) NPV >>> z = (-40000, 19000, 12000, 18000, 10500) >>> numpy.npv(0.08, z) 9887.452228939801 >>> numpy.npv(rate, values) 45 Using Python numpy for TVM calculations numpy.fv(rate, nper, pmt, pv) numpy.pv(rate, nper, pmt, fv) numpy.pmt(rate, nper, pv, fv) numpy.nper(rate, pmt, pv, fv) numpy.rate (nper, pmt, pv, fv) numpy.irr(values) numpy.npv(rate, values) 46 Perpetuity This is simply an annuity which continues forever. PV of perpetuity = PMT r Where PMT = constant periodic amount r = interest rate per period Eg if payment is annual, PMT = annual $ amount, r = annual interest rate (%) Note: This formula assumes the payment is made at the end of the period, viz ordinary annuity. 47 A note on yields In general: • Yields quoted on a bond basis usually assume: – 365-day year • Yields quoted on a money market basis usually assume: – 360-day year – Except UK which assumes 365-day year 48 Exercises Question 1 If 7% is a continuously compounded interest rate, what is the total value accumulated at the end of the year at this rate, on a principal amount of $2 million, and what is the effective rate (annual equivalent)? If 9% is an effective rate, what is the equivalent continuously compounded rate? Using formula  Total value at year end: $2m x e0.07 = $2,145,016.36 Effective rate = e0.07–1 = 7.2508%  Ctsly compounded rate r er = 1 + 0.09  er = 1.09 r = ln 1.09 * 100 = 8.6178% 49 Exercises Using Python Search cmd [ENTER] Python [ENTER] Import math [ENTER]  (math.e**0.07)-1  0.07250818125421654 2*math.e**0.07 2.145016362508433  x=1.09 Math.log(x)*100  8.617769624105241 Using TI BAII Plus calculator  2nd ICONV NOM = 7 [ENTER]  C/Y = 9999999999 [ENTER]  EFF = CPT 7.2508% OR: 0.07 2nd ex  1.072508181 -1  0.072508181 $2m x (1 + 0.072508) =  $2.145016363 2nd ICONV NOM = EFF = 9 [ENTER]  C/Y = 9999999999 [ENTER] NOM = CPT 8.617769624 OR: 1.09 LN  0.086177696 x 100 = 8.617769624% 50 Exercises Question 2 If 5% is the effective annual rate, what is the nominal rate for monthly compounding and what is the continuous rate? Answer: 4.8889%; 4.8790% Question 3 If 5% is the nominal rate for monthly compounding, what is the continuous rate and what is the effective annual rate? Answer: 4.9896%; 5.1162% Question 4 If 5% is the continuous rate, what is the effective annual rate and what is the nominal rate for monthly compounding? Answer: 5.1271%; 5.0104%. 51 Exercises Question 5 July Semester 2013 Exam Chris started the year with a $15,000 portfolio. He made a $3,000 contribution at the end of the second quarter, a $5,000 withdrawal at the end of the third quarter and ended the year with a portfolio value of $20,000. Calculate the annual rate of return of Chris’s portfolio. (10 marks) Answer: 39.55% 52 Exercises Question 6 July Semester 2013 Exam Amy has just purchased a $2 million condominium. The home loan package that she accepted covers only 80% of the property’s value. The loan’s interest is fixed at 2.5% per annum and the loan tenure is 20 years. Calculate the monthly payment that Amy needs to pay. (10 marks) Answer: $8,478.45 53 Exercises Question 7 Jan Semester 2014 Exam You plan to accumulate $300,000 on 31 December 2016. On 1 January 2013, you plan to invest a constant amount at the end of each month with first payment on 31 January 2013 and last payment on December 31, 2016. If the interest rate is 4%, calculate the monthly investment. (5 marks) Answer: $5,773.72 54 Exercises Question 8 Jan Semester 2014 Exam You make a payment of $3,000 at the beginning of each year for the next 5 years at an interest rate of 8% per year compounded quarterly. Calculate the balance in the account at the end of 5 years. (5 marks) Answer: $19,143.20 55 Exercises Question 8 Solution 56
FIN201 Financial Mathematics Tutor-Marked Assignment/TMA01 January 2018 Presentation FIN201 Tutor-Marked Assignment TUTOR-MARKED ASSIGNMENT (TMA) This assignment is worth 25% of the final mark for FIN201, Financial Mathematics. The cut-off date for this assignment is 9 April 2018, 2355 hours. Question 1 Use Python to answer this question. (a) Select a stock and obtain the stock prices for a one-year period. Create a histogram of its daily returns. (10 marks) (b) Calculate the daily price volatility of the stock and explain its significance. (10 marks) (c) Find the chain of call and put options available on this stock using either Eikon or the internet. Describe what a call option is and explain the information given for each call option. (10 marks) Question 2 Use Excel in your calculations. May purchases a house for $2.5 million and makes a down payment of 40% of the purchase price. She borrows the rest from the bank on a 25-year loan, which charges her 1.2% for the first year and 1-year SIBOR + 0.35% thereafter. The monthly payment of a variable-rate loan is calculated as if it is a fixed-rate loan on the outstanding loan balance and time remaining on the loan, whenever the variable rate is changed. (a) Compute the monthly payment she has to make in the first year. What is the loan balance remaining at the end of one year? (8 marks) (b) Calculate the monthly payment she has to make in the second year assuming the 1year SIBOR is 1.7%. What is the loan balance remaining at the end of two years? How much was the interest and principal repayment made at the end of two years? (8 marks) (c) What is SIBOR? From your understanding of SIBOR, explain if the (mortgage) loan rate can ever be less than SIBOR? (4 marks) SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) Page 2 of 4 FIN201 Tutor-Marked Assignment Question 3 Use Excel in your calculations. The yield on 10 year Singapore Treasury bonds is 3% and the market return is 5%. You are studying UniSUSS stock which has a beta of 1.2. UniSUSS has just paid a dividend of 1.20 and expects dividends to grow at a rate of 4% per annum for the next 5 years, and to slow down to 2% growth per annum thereafter. (a) Calculate the discount rate you should apply to UniSUSS stock. (5 marks) (b) What is the intrinsic value of UniSUSS stock? (10 marks) (c) If dividends stop growing after the first 5 years, what is the intrinsic value of UniSUSS stock? (5 marks) Question 4 Answer the following questions using Python. Trunk Company plans to invest in Project A with the following estimated annual cash flows: Yr 1 Yr 2 Yr 3 Yr 4 Yr 5 $ $ $ $ $ 20,000 90,000 180,000 220,000 150,000 The project costs $500,000. The required return for this project is 5% compounded quarterly. Trunk Company looks at another Project B which might potentially be better than Project A. Project B has the following cash flows: Yr 1 Yr 2 Yr 3 Yr 4 Yr 5 $ $ $ $ $ 150,000 220,000 180,000 90,000 20,000 This project also costs $500,000. The required return for this project is 5% compounded quarterly, same as Project A. (a) Compute the IRR of Projects A and B, and propose whether to accept or reject each project, assuming there are unlimited funds. Explain your decision. (10 marks) SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) Page 3 of 4 FIN201 Tutor-Marked Assignment (b) Calculate the NPV of each project. Propose whether to accept or reject each project based on NPV, and choose one project, assuming the Company has funds only for one project. Explain your decision. (10 marks) (c) Explain why one of the projects is superior although the cash flows are the same except that they are received in different years. What should the cost of the inferior project be in order to make you indifferent to either project? What is the resulting annual discount rate of the inferior project? (10 marks) ---- END OF ASSIGNMENT ---- SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) Page 4 of 4

Tutor Answer

MikeToo
School: UCLA

Attached.

Running head: FIN201

1

FIN201 Financial Mathematics
Student’s Name
Institutional Affiliation

FIN201
1 a. Python can be used to draw a histogram of daily stock of the sales in wall street as shown in
the figure below drawn using python.
Figure of a histogram illustrating Wallstreet trading daily returns

2

FIN201

3

b. from the stock above established using the python, the daily can be calculated as follows

A...

flag Report DMCA
Review

Anonymous
Excellent job

Similar Questions
Hot Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors