8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
1/68
AMATH 460: Mathematical Methods for
Quantitative Finance
1. Limits and Derivatives
Kjell KonisActing Assistant Professor, Applied Mathematics
University of Washington
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 1 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
2/68
Outline
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 2 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
3/68
Outline
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 3 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
4/68
Course Information
Instructors:
Lecturer: Kjell Konis
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 4 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
5/68
Recommended Texts
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 5 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
6/68
Recommended Texts
Calculus, Early TranscendentalsJames Stewart
Any Edition
(Or equivalent big, fat calculus textbook)Kjell Konis (Copyright 2013) 1. Limits and Derivatives 6 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
7/68
Quarter Overview
Topics
1 Limits and Derivatives
2 Integration
3/4 Multivariable Calculus
5/6 Vectors, Matrices, Linear Algebra
7 Lagranges Method, Taylor Series
8 Numerical Methods
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 7 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
8/68
Outline
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 8 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
9/68
Simple and Compound Interest Rules
Simple Interest
Money accumulates interest proportional to the total time of the
investment.V = (1+rn) A0
Compound Interest
Interest is paid regularly.V = [. . . (1+r)[(1+r) A0]] = [. . . (1+r)A1] = (1+r)
n A0
Compounding at Various Intervals
Interest rate ris yearly but interest is paid more often (e.g., monthly).
V = [1+ (r/m)]k A0
A0 =Principal, r=rate, n=# years, m=periods/year, k=# periodsKjell Konis (Copyright 2013) 1. Limits and Derivatives 9 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
10/68
Present and Future Value
Suppose the interest rate r=4%.
In one years time, the future value (FV) of$100 will be $104.Conversely, the present value (PV) of a $104 payment in one yearstime is $100.
SinceFV= (1+r) PV,
an expression for the present value is
PV= 1
1+rFV= d1FV
where d1 is the 1-year discount factor.More generally,
dk= 1
[1+ (r/m)]k
the present value of a payment Akreceived after kperiods is dkAk.
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 10 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
11/68
Annuities
An annuity is a contract that pays money regularly over a period oftime.
Question: suppose we would like to buy an annuity that pays $100 atthe end of the year for each of the next 10 years. At an interest rateof 4%, how much should we expect to pay?
Solution: appropriately discount each of the 10 future payments and
take the sum.The present value of the kth payment is
PVk=dkAk= 100
(1+0.04)k
The value of the annuity is then
V =PV1+PV2+ +PV10=10k=1
100
(1+0.04)k
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 11 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
12/68
Annuities (continued)
Recall: V =10k=1
100
(1+0.04)k
(1+0.04) V = 100+9
k=1
100
(1+0.04)k
V = 9k=1
100
(1+0.04)k +
100
(1+0.04)10
0.04V = 100 100
(1+0.04)10
= V = 10.04
100 100
(1+0.04)10
= 811.09
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 12 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
13/68
Perpetual Annuities
A perpetual annuity or perpetuity pays a fixed amount periodicallyforever.
Actually exist: instruments exist in the UK called consols.
(1+0.04) V = 100+
k=1
100
(1+0.04)k
V =k=1
100
(1+0.04)k
0.04V = 100
= V = 1000.04
=2500
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 13 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
14/68
Summary: Present Value
Discount factor dk for a payment received after k periods, annual
interest rate r
, interest paidm
times per year.
dk= 1
[1+ (r/m)]k
Value Vof an annuity that pays an amount Aannually, annualinterest rate r, n total payments.
V = A
r
1 1
(1+r)n
Value Vof a perpetual annuity that pays an amount A annually,annual interest rate r.
V = A
r
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 14 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
15/68
Outline
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 15 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
16/68
A Diverging Example
CalculateV =1
1+1
1+1 . . .
Rewrite as
V ?=
k=1
(+1 1) ?=k=1
0= 0
Also could rewrite as
V ?=
k=1
1 k=1
1 ?=0
But
k=11 ?
=1+1+1+
k=41= 1+1+1+
j=11
V ?=
k=1
1 k=1
1 ?=1+1+1+
j=1
1 k=1
1 ?=3
Can make V any integer value.Kjell Konis (Copyright 2013) 1. Limits and Derivatives 16 / 68
N
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
17/68
Notation
R the set of real numbers
Z the set of integers
in: indicator of set membership for all
there exists goes tog : R R a real-valued function with a real argument
x floor: the largest integer less than or equal toxx ceiling: the smallest integer greater than or equal tox
not (e.g. not inwould be x Z)
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 17 / 68
D fi i i f li i
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
18/68
Definition of limit
Let g : R R.The limit ofg(x) as x
x0 exists and is finite and equal to l if and
only if for any >0 there exists >0 such that|g(x) l|< for allx(x0 , x0+).Alternatively,
limxx0
g(x) =l iff
>0,
>0 s.t.
|g(x)
l
|< ,
|x
x0
|<
Similarly,
limxx0
g(x) = iff C>0, >0 s.t. g(x)> C,
|x x0|< limxx0
g(x) = iff C0 s.t. g(x)
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
19/68
Modification for x
How to make sense of
|x
|< ?
limx
g(x) =l iff >0,b s.t. |g(x) l|< , x>b
Example, recall pricing formulas:
Annuity: Vn = A
r
1 1
(1+r)n
Perpetuity: V = A
r
Question: is limn
Vn equal to V?
Strategy: given >0, find N such that|Vn V|< forn>N.
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 19 / 68
E l
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
20/68
Example
Given >0, find N such that|Vn V|< forn>N
|Vn V| =Ar
1 1
(1+r)n
A
r
=
A
r A
r(1+r)n A
r
= A
r(1+r)n
Next, solve for N such that
A
r(1+r)n
2
forn
>N
.Kjell Konis (Copyright 2013) 1. Limits and Derivatives 20 / 68
E l ( ti d)
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
21/68
Example (continued)
A
r(1+r)n =
2
(1+r)n = 2A
r
n log(1+r) = log2A
r
n = log(2A) log(r)
log(1+r)
Choose N=
log(2A) log(r)
log(1+r)
then for n>N
|Vn V| Ar(1+r)n
2
<
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 21 / 68
Summary: Limits
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
22/68
Summary: Limits
Given >0, can find N such that|Vn V|< forn>N, thuslimn
Vn =V
Definition of a limit
limxx0
g(x) =l iff >0, >0 s.t. |g(x) l|< , |x x0|<
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 22 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
23/68
Outline
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 23 / 68
Evaluating Limits
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
24/68
Evaluating Limits
Observation: working with the definition = not fun!
Suppose that c is a real constant and the limits
limxa
f(x) and limxa
g(x)
exist. Then
(i) limxa
[f(x) +g(x)] = limxa
f(x) + limxa
g(x)
(ii) limxa
cf(x) =c limxa
f(x)
(iii) limxa
[f(x)g(x)] = limxa
f(x) limxa
g(x)
(iv) limxa
f(x)
g(x)=
limxa
f(x)
limxa
g(x) if lim
xag(x)=0
(v) limxa
n
f(x) = nlimxa f(x)Kjell Konis (Copyright 2013) 1. Limits and Derivatives 24 / 68
Evaluating Limits
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
25/68
Evaluating Limits
IfP(x) and Q(x) are polynomials and c>1 is a real constant then
(a) limx
P(x)
cx = lim
xP(x) cx =0
(b) limx
log |Q(x)|P(x)
=0
Examples
(a) limx
x2ex =0
(b) limx
log(x3)
x =0
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 25 / 68
Evaluating Limits
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
26/68
Evaluating Limits
Notation: x0 means x0 with x>0; k! =k (k 1) 2 1
Let c>0 be a positive constant, then
(a) limx
c 1x =1
(b) limx
x 1x =1
(c) limx0
xx =1
Ifk is a positive integer and ifc>0 is a positive constant, then
(a) limk
k 1k =1
(b) limk
c 1k =1
(c) limk
ck
k! =0
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 26 / 68
Example
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
27/68
Example
limx
1x2 4x+1 x
= limx
1x2 4x+1 x x
2
4x+1+xx2 4x+1+x
= limx
x2 4x+1+x
x2
4x+1
x2
= limx
x2 4x+1+x1 4x
1x1x
= limx1
4x
+ 1x2
+1
1x 4
=
limx
1 4
x + 1
x2
+1
limx 1x 4
=1+1
4
=12
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 27 / 68
Example
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
28/68
Example
limx1
x2 4x+1 x+2
= limx
1x2 4x+1 (x 2)
x2 4x+1+ (x 2)x2 4x+1+ (x 2)
= limx
x2 4x+1+x 2x2 4x+1 (x 2)2
= limx
x2 4x+1+x 2
x
2
4x+1 [x2
4x+4]= lim
x
x2 4x+1+x 2
3
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 28 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
29/68
Outline
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 29 / 68
Continuity
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
30/68
Continuity
Most of the time: limxa
f(x) =f(a)
x
y
f(x)
a
f(a)
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 30 / 68
Continuity Definitions
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
31/68
Continuity Definitions
A function f is continuous at a if
limxa f(x) =f(a)
A function is right-continuous at a if
limxa f(x) =f(a)
A function is left-continuous at a if
limxa f(x) =f(a)
A function is continuous on an interval (c, d) if it is continuous atevery number a
(c, d).
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 31 / 68
(Dis)continuity
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
32/68
( ) y
x
yf(x)
a
Is f(x) continuous at a?
Is f(x) right-continuous at a?
Is f(x) left-continuous at a?
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 32 / 68
Continuity Theorems
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
33/68
y
Let f and gbe continuous at aand cbe a real-valued constant. Then
1. f +g 2. f g 3. cf4. fg 5. fg
(g(a)=0)are continuous at a.
Any polynomial is continuous on R.
The following functions are continuous on their domains:
polynomials trigonometric functionsrational functions inverse trigonometric functionsroot functions exponential functions logarithmic functions
Ifg is continuous at a, and f is continuous at g(a), thenf
g(x) =fg(x) is continuous at a.
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 33 / 68
Example
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
34/68
p
Where is the following function continuous?
f(x) = log(x) +tan1(x)x2 1
tan1(x) means arctan(x), not 1tan(x) = cos(x)
sin(x) =cot(x)
log(x) is continuous for x>0 and arctan(x) forx Rthus log(x) +arctan(x) is continuous for x(0, )
x2
1 is a polynomial =
continuous everywhere
f(x) is continuous on (0, ) except where x2 1= 0= f(x) is continuous on the intervals (0, 1) and (1, )
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 34 / 68
Horizontal Asymptotes
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
35/68
y p
What happens to f(x) = x2 1x2 +1
as xbecomes large?
x
y
The line y=L is called a horizontal asymptote if
limx
f(x) =L or limx
f(x) =L
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 35 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
36/68
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes
6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 36 / 68
Tangent Line
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
37/68
Goal: find the slope of the line tangent to y=f(x) at a point a.
a
f(a)
x
f(x)
A line y=l(x) is tangent to the curve y=f(x) at a point aif thereis >0 such that
f(x)> l(x) on (a , a) and(a, a+) orf(x)< l(x) on (a , a) and(a, a+)
and f(a) =l(a).Kjell Konis (Copyright 2013) 1. Limits and Derivatives 37 / 68
Strategy
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
38/68
x
f(x)
x + h
f
(x + h
)rise
run
x
f(x)
Use the slope of a line connecting a nearby point as an estimate ofthe slope of the tangent line.
slope= rise
run =
f(x+h) f(x)h
Get successively better estimates by letting h0Kjell Konis (Copyright 2013) 1. Limits and Derivatives 38 / 68
Definition of Derivative
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
39/68
A function f : R R is differentiable at a point x R if
limh0
f(x+h) f(x)h
exists.
When this limit exists, the derivative off(x), denoted by f(x), isdefined as
f(x) = limh0
f(x+h) f(x)h
A function f(x) is differentiable on an open interval (a, b) if it isdifferentiable at every point x(a, b).
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 39 / 68
Example
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
40/68
Compute the derivative off(x) =3x2 +5x+1
f(x) = limh0
f(x+h) f(x)h
= limh0
3(x+h)2 +5(x+h) +1 [3x2 +5x+1]h
= limh0
3x2 +6xh+3h2 +5x+5h+1 3x2 5x 1h
= limh0
6xh+3h2 +5h
h
= limh0
6x+3h+5
= 6x+5
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 40 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
41/68
Section Summary: Differentiation
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
42/68
Summary
Definition: f(x) = limh0
f(x+h) f(x)h
Derivative of a constant: iff(x) =c then f(x) =0.
Linearity:
a f(x) +b g(x)
=a f
(x) +b g
(x)
Power Rule: (xc) =c xc1 forc=0.
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 42 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
43/68
1 Course Organization
2 Present Value
3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 43 / 68
Product Rule
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
44/68
Suppose f(x) and g(x) are differentiable functions.
Let p(x) =f(x) g(x)
Then p(x) is differentiable, and
p
(x) =
f(x) g(x)
=f
(x) g(x) +f(x) g
(x)
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 44 / 68
Examples
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
45/68
Recall: p(x) =
f(x) g(x)
=f(x) g(x) +f(x) g(x)
p(x) =x ex
f(x) = x, g(x) =ex
p(x) = 1 ex +x ex
= (x+1)ex
p(t) =
t(1 t)f(t) =
t=t
12 , g(t) = (1 t)
p(x) = 12
t 12 (1 t) +t12 (1)
= (1 t)
2
t t= 1 3t
2
t
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 45 / 68
Chain Rule
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
46/68
Suppose f(x) and g(x) are differentiable functions.
The composite function (g f)(x) =g(f(x)) is differentiable, and
(g f)(x) =g(f(x))f(x)
Alternative notation: let u=f(x) and g=g(u) =g(f(x)), then
dg
dx =
dg
du
du
dx
(Leibniz notation)
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 46 / 68
Examples
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
47/68
Recall:
(g f)(x) =g(f(x))f(x)
(g f)(x) = x2 +1= (x2 +1) 12
(g f)(x) = 12
(x2 +1)12 2x
= xx2 +1
(g f)(x) = (x3 1)100
(g f)(x) = 100(x3 1)99 3x2= 300x2 (x3 1)99
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 47 / 68
Substitution Method
d d d
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
48/68
Recall Leibniz notation: dg
dx =
dg
du
du
dx
Compute d
dxsin(x2
); let u=x2
, g(u) =sin(u) and du
dx =2x
d
dx sin(u) =
d
dusin(u) du
dx
= cos(u)
2x
= 2xcos(x2)
Compute dd
esin(); let u=sin(), g(u) =eu and dud
=cos()
ddx
esin() = ddu
eu dud
= eu cos()
= cos()esin()
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 48 / 68
Derivative of the Inverse Function
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
49/68
The inverse function off(x) is the function such that f1(f(x)) =x
Let f : [a, b][c, d] be a differentiable functionLet f1 : [c, d][a, b] be the inverse function off(x)f1(x) is differentiable for x[c, d] where f(f1(x))=0 and
f1(x)
= 1
f(f1(x))
Example
log(ex) =x =
f(x) =ex , f(x) =ex , and f1(x) =log(x)
log(x)
=
f1(x)
= 1
elog(x) =
1
x
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 49 / 68
Summary: Product Rule and Chain Rule
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
50/68
Product Rule f(x) g(x)
=f(x) g(x) +f(x) g(x)
Chain Rule (g f)(x) =g(f(x))f(x)
dg
dx =
dg
du
du
dx
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 50 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
51/68
1 Course Organization
2 Present Value3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 51 / 68
Utility Functions
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
52/68
A utility function is a real-valued function U(x) defined on the realnumbers.
Used to compare wealth levels: ifU(x)>U(y) then U(x) ispreferred.
Exponential U(x) =eax
(a>0)
Logarithmic U(x) =log(x)
Power U(x) =bxb
b
(0, 1]
Quadratic U(x) =x bx2(b>0)
x
U(x)
Exponential
Logarithmic
Power
Quadratic
What is the derivative telling us?
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 52 / 68
Critical Points
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
53/68
A critical point of a function f(x) is a number a in the domain off(x) where either f(a) =0 orf(a) does not exist.
Iffhas a local min or max at a, then a is a critical point.
xa
U(x)
U'(x)
xa
f(x)
f'(x)
local max iff(x) decreasing at a, local min if increasing
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 53 / 68
Higher Derivatives
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
54/68
Iff(x) is a differentiable function, f(x) is also a function.
Iff(x) is also differentiable, its derivative is denoted by
f(x) =
f(x)
f(x) is called the second derivative off(x)
In Leibniz notation:
d
dx
d
dxf(x)
=
d2
dx2f(x) =
d2f
dx2
Alternative notation: f(x) =D2f(x)
No reason to stop at 2:
f(n)(x) = dn
dxnf(x) =
dnf
dxn =Dnf(x)
providedf(n1)(x) differentiable
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 54 / 68
First and Second Order Conditions
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
55/68
xa
U(x)
U'(x)
U''(x)
xa
f(x)
f'(x)
f''(x)
f(x) =0 and f(x)< 0 = local maximumf(x) =0 and f(x)> 0 = local minimum
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 55 / 68
Absolute Minimum and Maximum Values
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
56/68
Want to invest a fixed sum in 2 assets to maximize expected return.
Find the absolute maximum value off(x) on the interval [0, 1]More generally, on a closed interval [a, b]
1 Evaluate f(x) at the criticalpoints in (a, b)
2 Evaluate f(x) at aand b
3 The global max is the max ofthe values in steps 1 & 2.
4 The global min is the min of thevalues in steps 1 & 2.
ExpectedReturn
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 56 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
57/68
1 Course Organization
2 Present Value3 Limits
4 Evaluating Limits
5 Continuity and Asymptotes6 Differentiation
7 Product Rule and Chain Rule
8
Higher Derivatives9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 57 / 68
Bond Pricing Formula
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
58/68
Price
0 5% 10% 15% 20%0
100
200
300
400
The price Pof a bond is
P = F
[1+]n +
nk=1
C
1+k = F
[1+]n +C
1 1
[1+]n
where: C= coupon payment n= # coupon periods remainingF = face value = yield to maturity
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 58 / 68
Duration and Sensitivity
cn n
c
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
59/68
Let PVk= ck
[1+]k, P=
k=1
PVk=k=1
ck
[1+]k
The duration of a bond is a weighted average of times that paymentsare made.
D=n
k=1
PVk
P k or D P=
nk=1
k PVk
Sensitivity: how is price affected by a change in yield?
PVk = ck
[1+]k =ck[1+]
k
d PVk
d = k ck[1+]k1 = k ck
[1+]k+1 = k
1+PVk
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 59 / 68
Duration and Sensitivityn
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
60/68
P =k=1
PVk
d
dP =
d
d
nk=1
PVk=n
k=1
d PVk
d
=
n
k=1
k
1+PV
k
= 11+
nk=1
k PVk
= 11+
D P DMP
DMis called the modified duration
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 60 / 68
Duration
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
61/68
Price Sensitivity Formula
dPd
=DMP
Since1
P
dP
d =DMDMmeasures the relative change in price as changes.
Duration measures interest rate sensitivity.
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 61 / 68
Linear Approximation
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
62/68
Price
0 5% 10% 15% 20%0
100
200
300
400
The tangent line can be used to approximate the price.
The approximation can be improved by adding a quadratic termbased on the convexity of the price-yield curve.More on this later
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 62 / 68
Summary: Bond Duration
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
63/68
Duration
D=n
k=1
PVk
P k or D P=
nk=1
k PVk
Modified Duration
DM= 1
1+D
Price Sensitivity Formula
dP
d =DMP
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 63 / 68
Outline
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
64/68
1 Course Organization
2 Present Value3 Limits
4 Evaluating Limits
5
Continuity and Asymptotes6 Differentiation
7 Product Rule and Chain Rule
8 Higher Derivatives
9 Bond Duration
10 lHopitals Rule
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 64 / 68
lHopitals Rule
i ( )
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
65/68
Problem: how to evaluate limx0
sin(x)
x ?
4 3 2 2 3 4
1
limx0
sin(x)x
=limx0
sin(x)
limx0
x = 0
0
Not allowed since limx0
denominator=0
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 65 / 68
lHopitals Rule
Let x0 be a real number (including ) and let f (x ) and g (x ) be
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
66/68
Let x0 be a real number (including) and let f(x) and g(x) bedifferentiable functions.
(i) Suppose limxx0f(x) =0 and limxx0g(x) =0. If limxx0f (x)g(x) exists
and there is an interval (a, b) containing x0 such that g(x)=0 for all
x(a, b)\ 0, then limxx0 f(x)g(x) exists and
limxx0
f(x)
g(x)
= limxx0
f(x)
g
(x)
(ii) Suppose limxx0f(x) = and limxx0g(x) =. If limxx0 f (x)g(x)
exists and there is an interval (a, b) containing x0 such that g(x)=0
for all x(a, b)\ 0, then limxx0 f(x)g(x) exists and
limxx0
f(x)
g(x)= lim
xx0
f(x)
g(x)
When x0 =, intervals are of the form (, b) and (a, ).Kjell Konis (Copyright 2013) 1. Limits and Derivatives 66 / 68
Examples
lisin(x)
i li i ( ) 0 d li 0
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
67/68
limx0
( )
x since lim
x0sin(x) =0 and lim
x0x=0
limx0
sin(x)x
= limx0
ddxsin(x)
ddx
x= lim
x0
cos x1
=1
limx
x2 1x
2
+1
since limx
x2
1=
and lim
x
x2 +1=
limx
x2 1x2 +1
= limx
ddx
x2 1ddx
x2 +1= lim
x
2x
2x =?
Since limx
2x=
have to use lHopitals rule again:
limx
x2 1x2 +1
= limx
ddx
x2 1ddx
x2 +1= lim
x
2x
2x = lim
x
ddx
2xddx
2x= lim
x
2
2=1
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 67 / 68
8/13/2019 Mathematicalmethods Lecture Slides Week1 LimitsAndDerivatives
68/68
http://computational-finance.uw.edu
Kjell Konis (Copyright 2013) 1. Limits and Derivatives 68 / 68
http://computational-finance.uw.edu/http://computational-finance.uw.edu/Top Related