Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2018 Instructor: Dr. Sateesh Mane

Similar documents
4 Homework: Forwards & Futures

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Spring 2018 Instructor: Dr. Sateesh Mane. September 16, 2018

due Saturday May 26, 2018, 12:00 noon

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 2017 Instructor: Dr. Sateesh Mane.

Interest Formulas. Simple Interest

MFE8812 Bond Portfolio Management

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Spring 2018 Instructor: Dr. Sateesh Mane.

Page Points Score Total: 100

Math 1324 Finite Mathematics Chapter 4 Finance

Chapter 10 - Term Structure of Interest Rates

Manual for SOA Exam FM/CAS Exam 2.

Day 3 Simple vs Compound Interest.notebook April 07, Simple Interest is money paid or earned on the. The Principal is the

21.1 Arithmetic Growth and Simple Interest

Sample Investment Device CD (Certificate of Deposit) Savings Account Bonds Loans for: Car House Start a business

Page Points Score Total: 100

(Refer Slide Time: 00:55)

22. Construct a bond amortization table for a $1000 two-year bond with 7% coupons paid semi-annually bought to yield 8% semi-annually.

Mathematics of Financial Derivatives

Mathematics of Financial Derivatives. Zero-coupon rates and bond pricing. Lecture 9. Zero-coupons. Notes. Notes

(Refer Slide Time: 2:20)

Lecture 20: Bond Portfolio Management. I. Reading. A. BKM, Chapter 16, Sections 16.1 and 16.2.

Lesson Exponential Models & Logarithms

Page Points Score Total: 100

Chapter 4 Interest Rate Measurement and Behavior Chapter 5 The Risk and Term Structure of Interest Rates

UNIVERSITY OF TORONTO Joseph L. Rotman School of Management SOLUTIONS. C (1 + r 2. 1 (1 + r. PV = C r. we have that C = PV r = $40,000(0.10) = $4,000.

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Spring 2018 Instructor: Dr. Sateesh Mane.

Simple Interest. Compound Interest Start 10, , After 1 year 10, , After 2 years 11, ,449.00

Section 4B: The Power of Compounding

Version A. Problem 1. Let X be the continuous random variable defined by the following pdf: 1 x/2 when 0 x 2, f(x) = 0 otherwise.

Label the section where the total demand is the same as one demand and where total demand is different from both individual demand curves.

Math 441 Mathematics of Finance Fall Midterm October 24, 2006

Mathematics of Financial Derivatives

CHAPTER 8. Valuing Bonds. Chapter Synopsis

MATH 4512 Fundamentals of Mathematical Finance

Foundations of Finance

Survey of Math: Chapter 21: Consumer Finance Savings (Lecture 1) Page 1

INVESTMENTS. Instructor: Dr. Kumail Rizvi, PhD, CFA, FRM

Manual for SOA Exam FM/CAS Exam 2.

B6302 Sample Placement Exam Academic Year

Lecture on Duration and Interest Rate Risk 1 (Learning objectives at the end)

4.7 Compound Interest

Solutions For the benchmark maturity sectors in the United States Treasury bill markets,

Before How can lines on a graph show the effect of interest rates on savings accounts?

Lecture 6 An introduction to European put options. Moneyness.

ExcelBasics.pdf. Here is the URL for a very good website about Excel basics including the material covered in this primer.

MA Notes, Lesson 19 Textbook (calculus part) Section 2.4 Exponential Functions

5= /

Analyzing Accumulated Change: More Applications of Integrals & 7.1 Differences of Accumulated Changes

December 7 th December 11 th. Unit 4: Introduction to Functions

Swaps. Bjørn Eraker. January 16, Wisconsin School of Business

I. Interest Rate Sensitivity

Elementary Statistics Triola, Elementary Statistics 11/e Unit 14 The Confidence Interval for Means, σ Unknown

f ( x) a, where a 0 and a 1. (Variable is in the exponent. Base is a positive number other than 1.)

February 2 Math 2335 sec 51 Spring 2016

LESSON 7 INTERVAL ESTIMATION SAMIE L.S. LY

SECTION HANDOUT #1 : Review of Topics

Chapter 7: Interest Rates and Bond Valuation

Measuring Interest Rates

a) Calculate the value of government savings (Sg). Is the government running a budget deficit or a budget surplus? Show how you got your answer.

Measuring Interest Rates. Interest Rates Chapter 4. Continuous Compounding (Page 77) Types of Rates

Fixed-Income Analysis. Assignment 7

8. Valuation of Known Cash Flows: Bonds

[Image of Investments: Analysis and Behavior textbook]

MATH 4512 Fundamentals of Mathematical Finance

Economics 102 Fall 2015 Answers to Homework #4 Due Monday, November 9, 2015

Appendix A Financial Calculations

Derivative Instruments

8.3 Coupon Bonds, Current yield, and Yield to Maturity

Fixed-Income Options

Term Structure Lattice Models

UNIVERSITY OF TORONTO Joseph L. Rotman School of Management SOLUTIONS

ECON 214 Elements of Statistics for Economists 2016/2017

These terms are the same whether you are the borrower or the lender, but I describe the words by thinking about borrowing the money.

ECON 214 Elements of Statistics for Economists

Lesson 16: Saving for a Rainy Day

Bond and Common Share Valuation

Finance 402: Problem Set 1

INTRODUCTION TO FINANCIAL AND ACTUARIAL MATHEMATICS. Marek Šulista, Václav Nýdl, Gregory Moore

January 29. Annuities

Chapter 6 Analyzing Accumulated Change: Integrals in Action

2. I =interest (in dollars and cents, accumulated over some period)

INTEREST RATE FORWARDS AND FUTURES

Elementary Statistics

Class 16. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700

CS227-Scientific Computing. Lecture 6: Nonlinear Equations

Economics 102 Summer 2014 Answers to Homework #5 Due June 21, 2017

Feb. 4 Math 2335 sec 001 Spring 2014

Economics 101 Fall 2018 Answers to Homework #3 Due Thursday, November 8, 2018

Fixed-Income Analysis. Assignment 5

Getting Started: Defines terms that are important to know for building a yield curve.

GLOBAL EDITION. Using and Understanding Mathematics. A Quantitative Reasoning Approach SIXTH EDITION. Jeffrey Bennett William Briggs

CONTENTS CHAPTER 1 INTEREST RATE MEASUREMENT 1

Section 7C Finding the Equation of a Line

Computing compound interest and composition of functions

Notes on a Basic Business Problem MATH 104 and MATH 184 Mark Mac Lean (with assistance from Patrick Chan) 2011W

Chapter 5: Finance. Section 5.1: Basic Budgeting. Chapter 5: Finance

Solutions For all the benchmark Treasury securities shown below, compute the PVBP for $1 million

Transcription:

Queens College, CUNY, Department of Computer Science Computational Finance CSCI 365 / 765 Fall 08 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 08 Homework Please email your solution, as a file attachment, to Sateesh.Mane@qc.cuny.edu. Please submit one zip archive with all your files in it.. The zip archive should have either of the names (CS365 or CS765): StudentId first last CS365 hw.zip StudentId first last CS765 hw.zip. The archive should contain one text file named hw.[txt/docx/pdf] and one cpp file per question named Q.cpp and Q.cpp etc. 3. Note that not all homework assignments may require a text file. 4. Note that not all questions may require a cpp file.

. Future value Here is a C++ function which inputs (i) today s cashflow F 0, (ii) today s time t 0, (iii) future time t, (iv) continuously compounded interest rate r. The value of r is expressed as a percentage, if the interest rate is 5% then r = 5. double future_value(double F0, double t0, double t, double r) { double r_decimal = 0.0*r; double F = F0*exp(r_decimal*(t-t0)); return F; Compile and run this for yourself (you will need to write a main program). Try a few input values. You should be able to implement a similar calculation in Excel and get the same answers. I say future value but note that the function will work even if t < t 0. Sometimes when we need to baseline a set of cashflows to a common point in time, some cashflows may be in the past.

. Discount factor Write a function to do the inverse calculation. (This should be easy.) The inputs are (i) today s cashflow F 0, (ii) future cashflow F, (iii) today s time t 0, (iv) future time t. The outputs are (v) discount factor d, (vi) continuously compounded interest rate r. As above, the value of r should be expressed as a percentage, if the interest rate is 5% then r = 5. The function signature is int df_and_r(double F0, double F, double t0, double t, double & df, double & r); The return type is int because we want some validation checks. If t t 0 equals zero, then set d = 0 and r = 0 and exit with a return value. If F 0 0 or F 0, then set d = 0 and r = 0 and exit with a return value. If everything is fine, then exit with a return value 0. Hence your function should look like this int df_and_r(double F0, double F, double t0, double t, double & df, double & r) { if (t-t0 == 0.0) { df = 0; r = 0; return -; if ((F0 < 0.0) (F < 0.0)) { // *** you figure it out *** // *** you have to write the rest *** return 0; 3

.3 Bond price and yield Consider a newly issued bond (i.e. t 0 = 0) with a maturity of two years. Suppose the bond pays semiannual coupons (two coupons per year). Let the face be F and the annualized coupon rates be c,..., c 4 and the yield be y. The formula relating the bond price and yield is B = c + y + c ( + + c 3 y) ( + + F + c 4 y)3 ( +. (.3.) y)4 We shall solve eq. (.3.) to obtain the exact solution y ex in various scenarios. Set F = 00 and c = = c 4 = 4.. Fill in the table below with the values of B(y) (answers to two decimal places). y (%) B(y) 0 ( d.p.) ( d.p.) 4 ( d.p.) 6 ( d.p.) 8 ( d.p.). Let the market price of the bond be B market = 00.5. 3. State which pair (y, y + ) gives a lower and upper bound for y ex. 4. Call the values y low and y high, so y high = y low + and define y mid = (y low + y high )/.0. 5. Calculate the bond price B(y mid ). 6. State the updated values of y low and y high for the next iteration step. 7. Calculate the updated value of y mid and the updated bond price B(y mid ). Next set F = 00 and c =, c = 3, c 3 = 5 and c 4 = 7.. Fill in the table below with the values of B(y) (answers to two decimal places). y (%) B(y) ( d.p.) 3 ( d.p.) 5 ( d.p.) 7 ( d.p.) 9 ( d.p.). Let the market price of the bond be B market = 00. 3. State which pair (y, y + ) gives a lower and upper bound for y ex. 4. Call the values y low and y high, so y high = y low + and define y mid = (y low + y high )/.0. 5. Calculate the bond price B(y mid ). 6. State the updated values of y low and y high for the next iteration step. 7. Calculate the updated value of y mid and the updated bond price B(y mid ). 4

.4 Yield curve Consider only bonds with semiannual coupons (two coupons per year). The bonds all have face F = 00. Let us have three newly issued par bonds, with maturities of 0.5,.0,.5 years. You are given the following values for the yields: y 0.5 = 4.0 %, y.0 = 4. %, y.5 = 4. %. (.4.) Use the formulas in the lectures to compute the values of the discount factors d 0.5, d.0 and d.5. State your answers to four decimal places. Also calculate the continuously compounded spot rates r 0.5, r.0 and r.5. State your answers as percentages, to two decimal places. This is an example of a humped yield curve. The yields go up, then down. A humped yield curve is rare, but can exist. 5