Mathematical Preparation for FinanceA wild ride through mathematicsKaisa Taipale
https://www.softcover.io/read/bf34ea25/math_for_finance/differential_equations
Chapter 12Differential equations
Goals of this chapter
- find equilibrium solutions of basic differential equations
- classify equilibrium points of systems of first-order equations, at least roughly!
Chapter 12Differential equations
Goals of this chapter
- find equilibrium solutions of basic differential equations
- classify equilibrium points of systems of first-order equations, at least roughly!
This topic is mostly qualitative, but involves elements of review from earlier topics as well. Keep an eye out for:
- short-term prediction
- long-term prediction
- Euler’s method
- a possible application of Newton’s method
- optimization
- eigenvalues and eigenvectors
12.1 Equilibrium: the concept
Differential equations allow us to study how quantities change in relation to each other, as they’re equations that set out the relationships between given derivatives. Equilibrium is a useful concept to group our exploration: it’s defined as “a state in which opposing forces or influences are balanced” according to Google’s source on August 27, 2018. In the world of differential equations, think of equilibrium as a solution to a differential equation in which quantities are not increasing or decreasing, but instead are constant... a solution in which derivatives are zero!
12.2 A single ordinary differential equation
Consider a basic differential equation like
This is the sort of equation we considered at the beginning of the semester: we were able to solve such an equation using the method of long-term approximation or using analytical methods:
so
and thus
In general, humans are more interested in gaining or losing money than keeping it the same, but it’s actually extraordinarily useful for mathematicians and analysts to understand equilibria, points at which the rate of change of a quantity is zero. For this equation under consideration, the equilibrium solution would be when , which is when (by the design of the equation), which occurs only when the function .
Equilibrium analysis is useful because if we consider a smoothly-changing , then can’t change signs without passing through zero! (When I say “smoothly-changing” I mean that in is a continuous and differentiable function. This is stricter than necessary but will serve our purposes.) In fact, for a single differential equation like this which depends only on , we can draw a phase line that illustrates the behavior of by looking at the sign of .
Example 2.1 Consider the example
For what values of is the system at equilibrium? That is, when is ? Draw a phase line and indicate where is positive and where it is negative.
The equation above is an example of a logistic differential equation. The logistic equation is very useful in population ecology, and there is written
In this situation is population as a function of time, is the growth rate of the population, and is the carrying capacity of the environment.
Example 2.2 Practice reading the differential equation: change in population is proportional to the rate parameter times the population times one minus the ratio of population to carrying capacity. What are the equilibrium values for the differential equation? Draw a phase line and characterize the behavior of the population with various initial conditions. redReview: Remember initial value problems were introduced in September.
To carry out heuristic analysis of these differential equations, another great graphical tool is the slope field or direction field. Slope fields can be generated by computer or drawn by hand. To draw a slope field for a single differential equation of the form , draw the - and -axes and then for every point draw a small tick mark with slope .
Here is an example: the slope field for is
To use a slope field for qualitative analysis of solutions to a differential equation, start at an initial value of your choice and simply follow the arrows! This traces a solution curve, and this curve is the graph of a solution to the differential equation.
Recall that we discussed Euler’s method for numerically solving these differential equations. Euler’s method puts together many short-term predictions to make a long-term prediction. How does that work again? Review!
Example 2.3 Use Euler’s method or the method of long-term predictions to estimate if you know and you start at . Use two steps.
Example 2.4 (Challenge) Solve analytically.
12.3 So I can model a caribou population: what about money?
A good qualitative understanding of differential equations is essential to progressing toward the Ito calculus and Black-Scholes equation. Let’s take a look at the Black-Scholes equation for a moment:
Here is the price, when the stock price is and time is , of a European call option struck at price with an expiration date of . The parameter is the volatility of the stock’s returns. This equation is a partial differential equation (PDE) as opposed to the ordinary differential equations (ODEs) we’re considering in this document. But the principles of “reading” a differential equation remain the same! A very first analysis can go as follows:
- If we considered a simplified under some extraordinary condition in which did not vary according to at all (imagine simply holding constant but letting time run) we’d end up with the equation
Look familiar? Yes, it’s just the exponential growth from the first page of this document!
- If we let stay constant and just let vary, as a thought experiment, we’d get
This is a second-degree differential equation, as it has those second derivatives. Ordinary autonomous second-degree differential equations can be split into two ordinary first-degree differential equations; check out this concept in the next chapter.
Understanding the uses and pitfalls of the Black-Scholes equation is a significant endeavor in financial math! Having an acquaintance with ordinary differential equations gives a mental context for dealing with Black-Scholes.
12.4 Systems of Differential Equations
Systems of differential equations: use everything you know about linear algebra and transfer it to the differential equation setting! Let’s start with something simple to get an idea of why this might work.
Example 4.1 Consider the system of equations dxdt = 3xdydt = -2y. Alone, you’d be happy to solve either of these equations. You would get and . This is still perfectly reasonable.
We can rewrite the system of differential equations using the language of matrices:
Then the solution is
Solutions to this differential equation, then, are curves in xy-space: they depend on (they are parametrized by ).
To draw a slope field or phase plane for a two-dimensional system of equations, take a point in the plane and draw a tiny vector in the direction of
***Notice something: no equation I write today has a appearing explicitly on the right-hand side. Instead, they are of the form . These are called autonomous differential equations. It is possible in math to deal with non-autonomous systems
but that is definitely outside the scope of this class!!
Example 4.2 Systems of differential equations can be linear (the functions describing the derivatives are linear and of form , for and real numbers at least for today) or non-linear. Here’s an example of a linear system:
Here is a phase plane with some solutions included (for positive only):
By contrast, here’s a nonlinear system:
Notice that I can’t write it using the matrix format! Here’s the slope field, with some solutions sketched. Which solution is wrong? Why is it wrong? Where are common sources of error when using Euler’s method?
12.5 Equilibria
We can find “equilibrium points” (we now call them fixed points instead) for these differential equations just as we found equilibrium solutions for single differential equations. Just solve for the points where and are both zero! For a linear system of differential equations, the origin will always be an/the only fixed point. (Why?) For nonlinear systems you’ve got to use whatever techniques you can to find these solutions.
Example 5.1 For
solve
and get the curve
(A whole curve…! Can you see this on the slope field? What would it mean?) Then solve
to get
Put these together: if both are true,
This has many solutions, but is one of them and fits into our picture. If that is true, then and that gives us our fixed point. Messy! This is just one of many fixed points since is periodic.
Look at this fixed point in the picture: how do the solutions relate to the fixed points? How do they behave together? It looks like solutions “tend toward’’ the fixed point. When solutions tend toward a fixed point, the fixed point is called a sink. When solutions tend away from a fixed point, the fixed point is called a source. When nearby solutions zoom past a fixed point, careening toward it and then rushing away, the fixed point is called a saddle.1
Let’s deal with a simpler situation:
Example 5.2 Consider
This has two equilibria. Solve to get , and to get . Then , so . This has the solutions of and . That means is an equilibrium point and is also an equilibrium point.
12.6 Straight-line solutions
Looking at phase planes of systems of linear first-order differential equations, you can see that there are often straight-line solutions – solution curves that follow a straight line into or out of the origin. This is no accident. Turns out they run along eigenvectors. In fact, the solutions to a system of two linear DEs
where has real eigenvalues with corresponding eigenvectors are completely classified by
(Actually, we can do the same if the eigenvectors are complex, but we have to pick off the real parts of the solution by using the identity
and combining this with the complex eigenvectors.)
Example 6.1 Consider the system
The matrix has eigenvalues , : (2-) (-6-) +7 = 02+4 -5 = 0(+5) (-1) =0 . It’s got eigenvectors
and
(check yourself!). So the straight-line solutions are
and
Look at the phase plane:
Here I did not draw the whole straight line solution in either situation: I drew only the solution starting (with ) at an initial value and continuing for positive . I did this because then you can see that the solutions associated with go “in” toward the origin (as decreases when increases) and the solutions associated with go “out” from the origin (as increases when increases).
12.7 Back to Black-Scholes for a minute
In the first chapter I mentioned that second-degree differential equations can often be split into two first-degree differential equations. The most classic example of this is the motion of a spring with a mass on the end, possibly with some external forcing. Back to physics for a moment!
The equation for the displacement of a spring in this situation is
where is the mass at the end of the spring, is some damping coefficient (is your spring moving through air, oil, peanut butter?), is the spring constant ( stiffness), and describes the external forcing.2 Use a very simple trick to rewrite this second-order equation as two first-order equations:
Look: I made up a variable name for ! Now we get
This is not quite linear, but there are standard mathematical tools to deal with this. Moreover, if (in other words, there’s no external forcing) you’ve got all the information you need to solve
- How does this remind you of minima, maxima, and saddles when we look at optimizing functions like ? ↑
Compare it to Black-Scholes:
There are some similarities; the big difference is that Black-Scholes has derivatives with respect to time and stock price.
No hay comentarios:
Publicar un comentario