Transcript
Page 1: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 1/36

Panos Parpas

Computational Finance

Imperial College

London

Page 2: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 2/36

Computational Finance Course

Contact

Panos Parpas (Huxley Building, Room 347)Panos Parpas (Huxley Building, Room 347)

Email: [email protected]

and tutorial helpers.

Look at the web for lecture notes and tutorials

http://www.doc.ic.ac.uk/~pp500

Course material courtesy of Nalan Gulpinar.

Page 3: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 3/36

Course will provide

to bring a level of confidence to students to the finance fieldan experience of formulating finance problems into computational problemto introduce the computational issues in financial problemsan illustration of the role of optimization in computational finance such as single period mean-variance portfolio managementan introduction to numerical techniques for valuation, pricing and hedging of financial investment instruments such as options

Page 4: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 4/36

Useful Information

The course will be mainly based on lecture notes Recommended Books

D. Duffie, Dynamic Asset Pricing Theory, Princeton University Press, 1996.

E.J., Elton, M.J. Gruber, Modern Portfolio Theory and Investment Analysis, 1995.

J. Hull, Options, Futures, and Other Derivative Securities, Prentice Hall, 2000.

D.G. Luenberger, Investment Science, 1998.

S. Pliska, Discrete Time Models in Finance, 1998.

P. Wilmott, Derivatives: The Theory and Practice of Financial Engineering, 1998.

P. Wilmott, Option Pricing: Mathematical Models and Computation, 1993.

Two course works MEng test - for MEng students Final exam - for BEng, BSci, and MSc students

Page 5: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 5/36

Contents of the Course

1. Introduction to Investment Theory

2. Bonds and Valuation

3. Stocks and Valuation

4. Single-period Markowitz Model

5. The Asset Pricing Models

6. Derivatives

7. Option Pricing Models: Binomial Lattices

Page 6: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 6/36

Panos Parpas

Introduction to

Investment Theory

381 Computational Finance

Imperial College

London

Page 7: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 7/36

Topics Covered

Basic terminology and investment problems

The basic theory of interest rates

simple interestsimple interest

compound interestcompound interest

Future Value

Present Value

Annuity and Perpetuity Valuation

Page 8: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 8/36

Terminology

Finance – commercial or government activity of managing money, debt,

credit and investment

Investment – the current commitment of resources in order to achieve later benefits

ppresent commitment of money for the purpose of receiving more money later – invest amount of money then your capital will increaseInvestor is a person or an organisation that buys shares or pays money into a bank in order to receive a profit

Investment Science – application of scientific tools to investments pprimarily mathematical tools – modelling and solving financial problem

–optimisation

–statistics

Page 9: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 9/36

Basic Investment Problems

Asset Pricing – known payoff (may be random) characteristics,

what is the price of an investment?

what price is consistent with other securities that are available?

Hedging – the process of reducing financial risks: for example an

insurance you can protect yourself against certain possible losses.

Portfolio Selection – to determine how to compose optimal

portfolio, where to invest the capital so that the profit is maximized as well as

the risk is minimized.

Page 10: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 10/36

Terminology

Cash Flows: If expenditures and receipts are denominated in cash, receipts at If expenditures and receipts are denominated in cash, receipts at any time period are termed any time period are termed cash flowcash flow..An investment is defined in terms of its resulting cash flow An investment is defined in terms of its resulting cash flow sequencesequence

–– amount of money that will flow TO and FROM an investor over time– bank interest receipts or mortgage payments – a stream is a sequence of numbers (+ or –) to occur at known time periods

A cash flow at discrete time periods t=0,1,2,…,n

Example1- Cash flow (-1, 1.20) means: investor gets £1.20 after 1 year if ash flow (-1, 1.20) means: investor gets £1.20 after 1 year if £1 is invested£1 is invested2- Cash flow (-1500,-1000,+3000)Cash flow (-1500,-1000,+3000)

300010001500 2Year1 Year0 Year

),,,( 210 naaaa

Page 11: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 11/36

Interest Rates

Interest – defined as the time value of money in financial market, it is the price for credit determined by demand and in financial market, it is the price for credit determined by demand and

supply of creditsupply of credit

summarizes the returns over the different time periods summarizes the returns over the different time periods

useful comparing investments and scales the initial amount useful comparing investments and scales the initial amount

different markets use different measures in terms of year, month, week, different markets use different measures in terms of year, month, week,

day, hour, even seconds day, hour, even seconds

Simple interest and Compound interest

Page 12: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 12/36

Simple Interest

Assume a cash flow with no risk.Invest and get back amount of after a year, at Invest and get back amount of after a year, at

Ways to describe how becomes ?Ways to describe how becomes ?

If one-period simple interest rate is then amount of money If one-period simple interest rate is then amount of money

at the end of time period isat the end of time period is

Initial amount is called principalInitial amount is called principal

A 1W 1t

A 1W

trt at time

r when 1

at )1(

2at )1(

1at )1(

21

21

212

11

nn

nn

rrrnr) A(W

ntrrrAW

trrAW

trAW

t

Page 13: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 13/36

Example: Simple interest

If an investor invest £100 in a bank account that pays 8% interest per year, then at the end of one year, he will have in the account the original amount of £100 plus the interest of 0.08.

)08.01(100108£

1at )1( 11

trAW

Page 14: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 14/36

Compound Interest

Invest amount of for n years period and one period

compound interest rate is given by

the amount of money is computed as follows;

A

ntrrr n ,,2,1at ,,, 21

r if W

)

n

nn

nn

rrrrA

ntrrrrAW

trWrrAW

trAW

21

321

21212

11

)1(

)1(1)(1)(1(

2)1()1)(1(

1)1(

Page 15: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 15/36

Simple versus Compound Interest Rates

Linear growth and Geometric growth

0

200

400

600

800

1000

1200

0 2 4 6 8 10 12 14 16 18 20

Years

Va

lue

Simple Interest

Compound Interest

Page 16: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 16/36

Example: Simple & Compound Interest

If you invest £1 in a bank account that pays 8% interest per year, what will you have in your account after 5 years?

Simple interest:

Linear growth

Compound interest:

Geometric growth

5)08.008.008.008.008.01(140.1

4)08.008.008.008.01(132.1

3)08.008.008.01(124.1

2)08.008.01(116.1

1)08.01(108.1

t

t

t

t

t

for

for

for

for

for

5)08.01)(08.01)(08.01)(08.01)(08.01(14693280768.1

4)08.01)(08.01)(08.01)(08.01(136048896.1

3)08.01)(08.01)(08.01(1259712.1

2)08.01)(08.01(11664.1

1)08.01(108.1

t

t

t

t

t

for

for

for

for

for

http://www.moneychimp.com/features/simple_interest_calculator.htm

Page 17: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 17/36

Example: Compound Interest

Assume that the initial amount to invest is A=£100 and the

interest rate is constant. What is the compound interest rate and

the simple interest rate in order to have £150 after 5 years?

%4.8

1084.1

100

1501

)1(100150

)1(

5

1

5

55

r

r

r

r

rAW

%10

5.05

100

15051

)51(100150

)51(5

r

r

r

r

rAW

Compound Interest Simple Interest

Page 18: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 18/36

Compounding Continued

At various intervals – for investment of A if an interest rate for

each of m periods is r/m, then after k periods

Continuous compounding –

k

m

rAW

1

rt

tmk

tmmtk

e

m

r

m

r

m

r

m

r

m

r

1lim1lim

111

mm

rtAeW Exponential Growth

Page 19: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 19/36

The effective & nominal interest rate

The effective of compounding on yearly growth is highlighted by stating The effective of compounding on yearly growth is highlighted by stating

an an effective interest rate

yearly interest rate that would produce the same result after 1 year yearly interest rate that would produce the same result after 1 year

without compoundingwithout compounding

The basic yearly rate is called The basic yearly rate is called nominal interest rate

Example: Annual rate of 8% compounded quarterly produces an

increase

%8

%24.8

0824.1)02.1()02.01(%24

%8 44

:rate interest nominalThe

:rate interesteffective The

Page 20: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 20/36

Example: Compound Interest

i ii iii iv vPeriods Interest Ann perc. Value Effectivein year per period rate APR after 1 year interest rate

1 6 6 1.061 = 1.06 6.000

2 3 6 1.032 = 1.0609 6.090

4 1.5 6 1.0154 = 1.06136 6.136

12 0.5 6 1.00512 = 1.06168 6.168

52 0.1154 6 1.00115452 = 1.06180 6.180

365 0.0164 6 1.000164365 = 1.06183 6.183

Page 21: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London
Page 22: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 22/36

Example: Future Value

year cash inflow interest balance 0 5000.00 0.00 5,000.001 5000.00 250.00 10,250.002 0.00 512.50 10,762.50 3 0.00 538.13 11,300.63 4 0.00 565.03 11,865.665 0.00 593.28 12,458.94

Suppose you get two payments: £5000 today and £5000 exactly one year from now. Put these payments into a savings account and earn interest at a rate of 5%. What is the balance in your savings account exactly 5 years from now.

The future value of cash flow:

94.458,12£

)05.01(5000)05.01(5000 45

FV

Page 23: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 23/36

Present Value (PV) - Discounting

Investment today leads to an increased value in future as result of interest.

reversed in time to calculate the value that should be assigned now, in the

present, to money that is to be received at a later time.

The value today of a pound tomorrow: how much you have to put into your

account today, so that in one year the balance is W at a rate of r %

)10.01(110100 PV

£110 in a year = £100 deposit in a bank at 10% interest

Discounting process of evaluating future obligations as an equivalent PV the future value must be discounted to obtain PV

Page 24: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 24/36

Present Value at time k

kkk r

WWdPV

)1(

Present value of payment of W to be received k th periods in the future

krkd)1(

1

where the discount factor is

If annual interest rate r is compounded at the end of each m equal periods per year and W will be received at the end of k th period

k

m

rkd

1

1

Page 25: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London
Page 26: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 26/36

PV for Frequent Compounding

For a cash flow stream (a0, a1,…, an) if an interest rate for each of the m

periods is r/m, then PV is

PV of Continuous Compounding

n

kk

k

nn

m

r

aPV

m

r

a

m

r

a

m

r

aaPV

0

22

11

0

1

111

rtn

tteaPV

0

Page 27: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 27/36

Example 1: Present Value

You have just bought a new computer for £3,000. The payment You have just bought a new computer for £3,000. The payment terms are 2 years same as cash. If you can earn 8% on your terms are 2 years same as cash. If you can earn 8% on your money, how much money should you set aside today in order to money, how much money should you set aside today in order to make the payment when due in two years?make the payment when due in two years?

02.572,2£2)08.1(3000 PV

Page 28: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 28/36

Example 2: Present Value

Consider the cash flow stream (-2,1,1,1). Calculate the PV and Consider the cash flow stream (-2,1,1,1). Calculate the PV and FV using interest rate of 10%.FV using interest rate of 10%.

Example 3Example 3: Show that the relationship between PV and FV of a : Show that the relationship between PV and FV of a cash flow holds. cash flow holds.

487.0331.1

648.0

)1.1(

648.01)1.1(1)1.1(1)1.1(2

487.01.1

1

1.1

1

1.1

12

3

123

32

FVPV

FV

PV

nr

FVPV

)1(

Page 29: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 29/36

Net Present Value (NPV)

time value of money has an application in investment

decisions of firms

in deciding whether or not to undertake an investment

invest in any project with a positive NPV

NPV determines exact cost or benefit of investment

decision

PVCostNPV

Page 30: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 30/36

Example 1: NPV

Buying a flat in London costs £150,000 on average. Experts predict that a year from

now it will cost £175,000. You should make decision on whether you should buy a flat

or government securities with 6% interest. You should buy a flat if PV of the expected £175,000 payoff is greater than the

investment of £150,000 –

What is the value today of £175,000 to be received a year from now? Is that PV

greater than £150,000?

Rate of return on investment in the residential property is

094,15

000,150094,165

094,16506.01

000,175

NPV

VP

%7,16000,150

000,150000,175

return of Rate InvestmentProfit

Page 31: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 31/36

Example 2: NPV

Assume that cash flows from the construction and sale of an office building is as follows. Given a 7% interest rate, create a present value worksheet and show the net present value, NPV.

000,300000,100000,150

2Year 1Year 0Year

400,18£

900,261000,300873.2

500,93000,100935.1

000,150000,1500.10

207.1

1

07.11

NPV

t

PVad ttt

Page 32: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 32/36

Annuity Valuation

Cash flow stream which is equally spaced and equal

amount a1 =, …,= an =a payments per year t=1,2,…, n

An annuity pays annually at the end of each year

£250,000 mortgage at 9% per year which is paid off with a

180 month annuity of £2,535.67

rd

d

ddaPV

n

A

1

1 where

1

)1(.

Present value of n period annuity

Page 33: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 33/36

Annuity Valuation

For a cash flow a1 =, …,= an =a

d

ddaPV

rr

aPV

r

a

r

aPV

r

r

r

a

r

aPV

r

r

a

r

a

r

aPV

r

r

a

r

a

r

aPV

n

A

nA

nA

nA

nA

nA

1

1.

1

11

111

111

11

1111

1

111

1

1

132

2

Page 34: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 34/36

Annuity Valuation

For m periods per year

i

iaPVi

mr

dm

ri

n

A

11

11

1 and 1

The present value of growing annuity: payoff grows at a rate of g per year: k th payoff is a(1+g)k

n

GA r

g

gr

aPV

1

11

Page 35: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 35/36

Example: Annuity

Suppose you borrow £250,000 mortgage and repay over 15 years. The interest rate is 9% and payments are made monthly. What is the monthly payment which is needed to pay off the mortgage?

67.535,2£0.99255581

0.992555810.9925558.000,250

1

1.PV

0.9925558

120.09

1

1

1

1

000,250£%,9

,15,12,180Given

180

A

a

a

d

dda

mr

d

PVr

Tmn

n

A

Page 36: Computational Finance 1/36 Panos Parpas Computational Finance Imperial College London

Computational Finance 36/36

Perpetuity Valuation

perpetuities are assets that generate the same cash flow forever pay a coupon at the end of each year and never matures annuity is called a perpetuity when number of payments becomes

infinite

For m periods per year;

Present value of growing perpetuity at a rate of g

r

aPVP

i

a

mra

PVP

gr

aPVGP

)( n


Recommended