Lecture 3 – Partial Differential...

16
Lecture 3 – Partial Differential Equations Prof. Massimo Guidolin Prep Course in Investments August-September 2016

Transcript of Lecture 3 – Partial Differential...

Page 1: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Lecture 3 – Partial Differential Equations

Prof. Massimo Guidolin

Prep Course in Investments

August-September 2016

Page 2: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Plan of the lecture

2Lecture 3 - Partial Differential Equations

Motivation and generalities

The heat equation and its applications in finance

Intuition for the diffusion equation

Properties of the diffusion equation

Initial and boundary conditions

Page 3: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Motivation

3Lecture 3 - Partial Differential Equations

In your studies within the Derivatives sequence, modeling efforts will culminate in the formulation of the pricing problem for a derivative product as a partial differential equation (PDE)

We need to understand what they are and how they may be handled

The study of partial differential equations in complete generality is a vast undertaking

Fortunately, however, almost all the partial differential equations encountered in financial applications belong to a much more manageable subset of the whole:

second order linear parabolic equations Four issues are considered when studying a PDE:

① Does the equation make sense mathematically?

Page 4: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Motivation

4Lecture 3 - Partial Differential Equations

② If it is to be solved in a region, what must we say about the solution on the boundary of that region in order to obtain a well-posed problem, i.e. one whose solution exists, is unique, and is, in some sense, “well-behaved”? o Such specifications of the solution on the boundary are called boundary

conditions or, if applied at a particular value of time, initial conditions or final conditions

o “Well-behaved” is usually taken to imply that the solution depends continuously on the initial and boundary conditions, so that small changes in these conditions cannot induce large changes in the solution

③ Can we develop analytical tools to solve the equation? Explicit solutions are useful both to illustrate the general behavior of the equation and for their application in practiceo Yet many explicit solutions may be so cumbersome as to be of less

practical use than a well-designed numerical approximation

④ How should we solve the equation numerically, should this be necessary?

Page 5: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

The heat (diffusion) equation

5Lecture 3 - Partial Differential Equations

This PDE has been studied for nearly two centuries as a model of the flow (or diffusion) of heat in a continuous medium• One of the most successful and widely used models of applied

mathematics, and a body of theory on its properties is availableo Use x rather than S as the spatial independent variable because all

our applications of the diffusion equation occur after a change of variable of the form S = E[ex]

o Use τ as the time variable rather than t for a similar reason• This PDE models the diffusion of heat in one space dimension,

where U(x, τ) is temperature in a long, thin, uniform bar of material whose sides are perfectly insulated so that tempera-ture varies only with distance x along the bar and with time τ

• The no-arbitrage, perfect capital market solution to Black-Scholesoption pricing problem is equivalent to solving this PDE

Page 6: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Intuition for the heat (diffusion) equation

6Lecture 3 - Partial Differential Equations

• u is the temperature, x is a spatial coordinate and t is time• This equation represents a heat balance principle: consider the

flow into and out of a small section of the baro The flow of heat along the bar is proportional to the spatial gradient

of the temperature ∂u/∂xo Thus the derivative of this, ∂2u/∂x2, is the heat retained by the small

sectiono This retained heat is seen as a rise in the temperature, represented

mathematically by ∂u/∂t• In your Derivatives I course, the Black–Scholes equation can be

interpreted as a reaction-convection diffusion equation:

o If the riskless rate were 0, the difference btw. these terms and the basic heat equation is that the diffusion coefficient is a function of S

Page 7: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Properties of the heat (diffusion) equation

7Lecture 3 - Partial Differential Equations

What are the key properties of the diffusion equation?① It is a linear equation: if u1(x) and u2(x) are solutions, then so is

c1u1(x) + c2u2(x) for any constants c1 and c2

② It is a second order PDE, since the highest order derivative occurring is the second, in the term ∂2u/∂x2

③ It is a parabolic equation with characteristics given by τ = constant; if a change is made to u at a particular point, for example on the boundary of the solution region, its effect is felt instantaneously everywhere else (see Appendix A for details)④ Its solutions are analytic functions of x: ∀τ greater than the initial time, u(x, τ) regarded as a function of x has a convergent power series representation in terms of (x – x0) for each x0 away from the spatial boundarieso For τ > 0 we can think of a solution of the diffusion equation as being as

smooth a function of x as we could ever need, but discontinuities in time may be induced by the boundary conditions

Page 8: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Properties of the heat (diffusion) equation

8Lecture 3 - Partial Differential Equations

o An illustration of all these points is the following special solution, that you will encounter in your Derivatives courses:

o This function models the evolution of an idealized “hotspot”, a unit amount of heat initially concentrated into a single point, and it is called the fundamental solution of the PDE

o For τ > 0 this is a smooth Gaussian curve, but at τ = 0 it collapses to the delta function, ; at τ = 0, uδ(x,0) vanishes for x ≠ 0; at x = 0 uδ(x,0) is ∞, but its integral is still 1

o The picture shows the shape of this solution: note how the curve becomes taller and narrower as τ gets smaller

o The picture illustrates the instantaneous propagation speed: at τ = 0, the solution is 0 for all x ≠ 0, but for any τ > 0, and any x, however large, uδ(x,0) > 0: the heat initially concentrated at x = 0 immediately diffuses out to all values of x

τ=0.2τ=1

τ=5

See AppendixB for details

Yes! A standard normal PDF!

Page 9: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Initial and boundary conditions

9Lecture 3 - Partial Differential Equations

What initial and boundary conditions are appropriate for the solutions of the diffusion equation?

We start by considering a finite interval, i.e., we’d like to solveover the finite interval - L < x < L and for τ >

0, representing heat flow in a bar of finite length 2L• We should specify initial temperature u(x, 0) = u0(x) for - L < x < L• With the heat flow analogy in mind, it seems reasonable that we

have enough information to determine u(x, τ) uniquely if we specify either the temperatures at the ends of the bar or the heat fluxes at both ends, but not both; this turns out to be the case:

Fix the temperature at the ends of the bar

Fix the heat flux at the ends of the bar

Page 10: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Initial and boundary conditions

10Lecture 3 - Partial Differential Equations

Suppose now that we consider heat flow in a very long bar, by taking the limit L ∞• When the bar is infinitely long, it is still important to say how u

behaves at large distances, but we do not have to be as precise in our specification of u at the “boundaries” x = ±∞

• There are some technical difficulties here, associated with the notion of infinity, but roughly speaking as long as u is not allowed to grow too fast, the solution exists, is unique, and depends continuously on the initial data u0(x):

• The solution to the initial value problem where

is well-posed

_

_

_

== any fnc that has no worse than a finite number of jump

discontinuities is acceptable

These are called “growth” conditions

Page 11: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Initial and boundary conditions: Black-Scholes

11Lecture 3 - Partial Differential Equations

In finance, boundary conditions tell us how the solution must behave for all times at certain values of the asset• We usually specify the behavior of solution at S = 0 and as S → ∞• We must also tell the problem how the solution begins or ends

o Black–Scholes’ is a backward equation, meaning that the signs of the time derivative and the second S derivative in the equation are the same when written on the same side of the equality sign

• We therefore have to impose a final condition: this is usually the payoff function at expiry

A nice property of Black-Scholes is the uniqueness of its solution, under technical conditions and subject to transformations Such solution is important, but current market practice is such

that models have features which preclude the exact solution Very rarely can explicit solutions be found to realistic financial

problems Numerical methods are then employed

Page 12: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Readings

12

P. WILMOTT, Paul Wilmott introduces quantitative finance. John Wiley & Sons, 2007, chapter 7

It may be entertaining to take a look at:http://www.youtube.com/watch?v=LYsIBqjQTdIhttp://www.youtube.com/watch?v=b-LKPtGMdss

Lecture 3 - Partial Differential Equations

Page 13: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Appendix A: Characteristics of Second-Order Linear PDEs

13

― We can think of the characteristics of a 2nd order linear PDE as curves alongwhich information can propagate, or as curves across which discontinuities in the second derivatives of u(x, τ) can occur

― Suppose that u(x, τ) satisfies the general second order linear equation

― The idea is to see whether the derivative terms can be written in terms of directional derivatives, so that the equation is partly like an ODE along curves with these vectors as tangents

― These curves are the characteristics― If we write them as x = x(ξ), τ = τ(ξ), where ξ is a parameter along the curves,

then x(ξ) and τ(ξ) satisfy

― As in all ODEs, there now arises the question whether this equation, regarded as quadratic in (dx/dξ) and (dτ/dξ), has two distinct real roots, two equal real roots, or no real roots at all

Lecture 3 - Partial Differential Equations

Compare to

Page 14: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Appendix A: Characteristics of Second-Order Linear PDEs

14

― These cases correspond to the discriminant [b(x, τ)]2 – 4a(x, τ)c(x, τ) being greater than zero, zero, or less than zero

― The first case, two real families of characteristics, is called hyperbolic, and is typical of wave propagation problems; these do not often occur in finance

― The second case, an exact square, is called parabolic― The diffusion equation, which has b(x, τ) = c(x, τ) = 0, is the simplest example

and it is therefore parabolic― The final case, with no real characteristics, is called elliptic, and is typical of

steady-state problems such as perpetual options in multi-factor models― Note that the definitions given here are pointwise: the hyperbolic/

parabolic/elliptic distinction is specified at each point― It is possible for an equation to change type as a(x, τ), b(x, τ), and c(x, τ) vary, if

the discriminant changes sign― In particular, the Black-Scholes PDE will turn out to be parabolic only for

positive values of the underlying spot price, while it is hyperbolic at S = 0, where it reduces to an ODE with characteristic S = 0

― This means that the line S = 0 is a barrier across which information cannot cross

Lecture 3 - Partial Differential Equations

Page 15: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Appendix B: The Dirac delta function

15

― The Dirac delta function, written δ(x), is not in fact a function in the normal sense of the word, but is rather a “generalised function”

― Suppose, for example, that I receive money at the rate f(t) dt in a time dt where fis equal to the following function:

― As 𝜖𝜖 gets smaller the graph becomes taller and narrower― The total payment is: and is equal to 1 independently of 𝜖𝜖

but that for all t ≠ 0, f(t) 0 as 𝜖𝜖 0― As 𝜖𝜖 0, the limiting function is zero for all nonzero t, yet its integral is 1― Formally, a delta function, δ(t), is the limit as 𝜖𝜖 0

of any family of functions δ𝜖𝜖(t) , with the following properties:

Lecture 3 - Partial Differential Equations

_

_

_

Page 16: Lecture 3 – Partial Differential Equationsdidattica.unibocconi.it/mypage/dwload.php?nomefile=Lec_3_Partial... · Lecture 3 - Partial Differential Equations. 3 In your studies within

Appendix B: The Dirac delta function

16

― One classical example of Dirac delta function is:

― With 𝜖𝜖 replaced by t, this is the fundamental solution of the diffusion equation― This “pointwise” view of the delta function is hard to work with because the

function become increasingly badly behaved near the origin as 𝜖𝜖 0― Indeed, the resulting limiting “function” is not a normal function at all― The idea is then to exploit the fact that integration smooths out the bad

behaviour; the integral of any member of a delta sequence is well-behaved, being equal to 1

― This idea motivates the definition of the delta function via its integral action― For any smooth function (x), called a test function,

defines the delta function as the continuous linear map from smooth functions (x) to real numbers that has the value (0)

Lecture 3 - Partial Differential Equations