Title: Honours Finance (Advanced Topics in Finance: Nonlinear Analysis)
1Honours Finance (Advanced Topics in Finance
Nonlinear Analysis)
- Lecture 2 Introduction to OrdinaryDifferential
Equations
2Why bother?
- Last week we considered Minskys Financial
Instability Hypothesis as an expression of the
endogenous instability explanation of
volatility in finance (and economics) - The FIH claims that expectations will rise during
periods of economic stability (or stable
profits). - That can be expressed as
- rate of change of expectations f(rate of
growth), or in symbols
This is an ordinary differential equation (ODE)
exploring this model mathematically (in order to
model it) thus requires knowledge of ODEs
3Why bother?
- In general, ODEs (and PDEs) are used to model
real-life dynamic processes - the decay of radioactive particles
- the growth of biological populations
- the spread of diseases
- the propagation of an electric signal through a
circuit - Equilibrium methods (simultaneous algebraic
equations using matrices etc.) only tell us the
resting point of a real-life process if the
process converges to equilibrium (i.e., if the
dynamic process is stable) - Is the economy static?
4Economies and economic methodology
- Economy clearly dynamic, economic methodology
primarily static.Why the difference? - Historically the KISS principle
- If we wished to have a complete solution ... we
should have to treat it as a problem of dynamics.
But it would surely be absurd to attempt the more
difficult question when the more easy one is yet
so imperfectly within our power. (Jevons 1871
1911 93) - ...dynamics includes statics... But the statical
solution is simpler... it may afford useful
preparation and training for the more difficult
dynamical solution and it may be the first step
towards a provisional and partial solution in
problems so complex that a complete dynamical
solution is beyond our attainment. (Marshall,
1907 in Groenewegen 1996 432)
5Economies and economic methodology
- A century on, Jevons/Marshall attitude still
dominates most schools of economic thought, from
textbook to journal - Taslim Chowdhury, Macroeconomic Analysis for
Australian Students the examination of the
process of moving from one equilibrium to another
is important and is known as dynamic analysis.
Throughout this book we will assume that the
economic system is stable and most of the
analysis will be conducted in the comparative
static mode. (1995 28) - Steedman, Questions for Kaleckians The general
point which is illustrated by the above examples
is, of course, that our previous 'static'
analysis does not 'ignore' time. To the contrary,
that analysis allows enough time for changes in
prime costs, markups, etc., to have their full
effects. (Steedman 1992 146)
6Economies and economic methodology
- Is this valid?
- Yes, if equilibrium exists and is stable
- No, if equilibrium does not exist, is not stable,
or is one of many... - Economists assume the former. For example, Hicks
on Harrod - In a sense he welcomes the instability of his
system, because he believes it to be an
explanation of the tendency to fluctuation which
exists in the real world. I think, as I shall
proceed to show, that something of this sort may
well have much to do with the tendency to
fluctuation. But mathematical instability does
not in itself elucidate fluctuation. A
mathematically unstable system does not
fluctuate it just breaks down. The unstable
position is one in which it will not tend to
remain. (Hicks 1949)
7Lorenzs Butterfly
- So, do unstable situations just break down?
- An example Lorenzs stylised model of 2D fluid
flow under a temperature gradient - Lorenzs model derived by 2nd order Taylor
expansion of Navier-Stokes general equations of
fluid flow. The result
x displacement
y displacement
temperature gradient
- Looks pretty simple, just a semi-quadratic
- First step, work out equilibrium
8Lorenzs Butterfly
- Three equilibria result (for bgt1)
- Not so simple after all! But hopefully, one is
stable and the other two unstable - Eigenvalue analysis gives the formal answer (sort
of ) - But lets try a simulation first
9Simulating a dynamic system
- Many modern tools exist to simulate a dynamic
system - All use variants (of varying accuracy) of
approximation methods used to find roots in
calculus - Most sophisticated is 5th order Runge-Kutta
simplest Euler - The most sophisticated packages let you see
simulation dynamically - Well try simulations with realistic parameter
values, starting a small distance from each
equilibrium
So that the equilibria are
Over to Vissim...
10Lorenzs Butterfly
- Now you know where the butterfly effect came
from - Aesthetic shape and, more crucially
- All 3 equilibria are unstable (shown later)
- Probability zero that a system will be in an
equilibrium state (Calculus Lebesgue measure) - Before analysing why, review economists
definitions of dynamics in light of Lorenz - Textbook the process of moving from one
equilibrium to another. Wrong - system starts in a non-equilibrium state, and
moves to a non-equilibrium state - not equilibrium dynamics but far-from equilibrium
dynamics
11Lorenzs Butterfly
- Founding father mathematical instability does
not in itself elucidate fluctuation. A
mathematically unstable system does not
fluctuate it just breaks down. Wrong - System with unstable equilibria does not break
down but demonstrates complex behaviour even
with apparently simple structure - Not breakdown but complexity
- Researcher static analysis allows enough time
for changes in prime costs, markups, etc., to
have their full effects. Wrong - Complex system will remain far from equilibrium
even if run for infinite time - Conditions of equilibrium never relevant to
systemic behaviour
12When economists are right
- Economist attitudes garnered from understanding
of linear dynamic systems - Stable linear systems do move from one
equilibrium to another - Unstable linear dynamic systems do break down
- Statics is the end point of dynamics in linear
systems - So economics correct to ignore dynamics if
economic system is - linear, or
- nonlinearities are minor
- one equilibrium is an attractor and
- system always within orbit of stable equilibrium
- Who are we kidding?Nonlinearity rules
13Nonlinearities in economics
- Structural
- monetary value of output the product of price and
quantity - both are variables and product is quasi-quadratic
- Behavioural
- Phillips curve relation
- wrongly maligned in literature
- clearly a curve, yet conventionally treated as
linear - Dimensions
- massively open-multidimensional, therefore
numerous potential nonlinear interactions - Evolution
- Clearly evolving system, therefore even more
complex than simple nonlinear dynamics
So Economists "have to" do dynamics
14Why bother?
15Why Bother?
- Lorenzs bizarre graphs indicate
- Highly volatile nonlinear system could still be
systemically stable - cycles continue forever but system never exceeds
sensible bounds - e.g., in economics, never get negative prices
- linear models however do exceed sensible bounds
- linear cobweb model eventually generates negative
prices - Extremely complex patterns could be generated by
relatively simple models - The kiss principle again perhaps complex
systems could be explained by relatively simple
nonlinear interactions
16Why Bother?
- But some problems (and opportunities)
- systems extremely sensitive to initial conditions
and parameter values - entirely new notion of equilibrium
- Strange attractors
- system attracted to region in space, not a point
- Multiple equilibria
- two or more strange attractors generate very
complex dynamics - Explanation for volatility of weather
- El Nino, etc.
17Why bother?
Tiny errorin initialreadingsleads
toenormousdifferencein time pathof
system.And behindthe chaos,strangeattractors..
.
18Why bother?
19Why Bother?
- Lorenz showed that real world processes could
have unstable equilibria but not break down in
the long run because - system necessarily diverges from equilibrium but
does not continue divergence far from equilibrium - cycles are complex but remain within realistic
bounds because of impact of nonlinearities - Dynamics (ODEs/PDEs) therefore valid for
processes with endogenous factors as well as
those subject to an external force - electric circuit, bridge under wind and shear
stress, population infected with a virus as
before and also - global weather, economics, population dynamics
with interacting species, etc.
20Why Bother?
- To understand systems like Lorenzs, first have
to understand the basics - Differential equations
- Linear, first order
- Linear, second (and higher) order
- Some nonlinear first order
- Interacting systems of equations
- Initial examples non-economic (typical maths
ones) - Later well consider some economic/finance
applications before building full finance model
21Maths and the real world
- Much of mathematics education makes it seem
irrelevant to the real world - In fact the purpose of much mathematics is to
understand the real world at a deep level - Prior to Poincare, mathematicians (such as
Laplace) believed that mathematics could one day
completely describe the universes future - After Poincare (and Lorenz) it became apparent
that to describe the future accurately required
infinitely accurate knowledge of the present - Godel had also proved that some things cannot be
proven mathematically
22Maths and the real world
- Today mathematics is much less ambitious
- Limitations of mathematics accepted by most
mathematicians - Mathematical models
- seen as first pass to real world
- regarded as less general than simulation models
- but maths helps calibrate and characterise
behaviour of such models - ODEs and PDEs have their own limitations
- most ODEs/PDEs cannot be solved
- however techniques used for those that can are
used to analyse behaviour of those that cannot
23Maths and the real world
- Summarising solvability of mathematical models
(from Costanza 1993 33)
24Maths and the real world
- To model the vast majority of real world systems
that fall into the bottom right-hand corner of
that table, we - numerically simulate systems of ODEs/PDEs
- develop computer simulations of the relevant
process - But an understanding of the basic maths of the
solvable class of equations is still necessary to
know whats going on in the insoluble set - Hence, a crash course in ODEs, with some
refreshers on elementary calculus and algebra...
25From Differentiation to Differential
- In Maths 1.3, you learnt to handle equations of
the form
Independent variable
Dependent variable
- Where f is some function. For example
- On the other hand, differential equations are of
the form
- The rate of change of y is a function of its
value y both independent dependent
- So how do we handle them? Make them look like the
stuff we know
26From Differentiation to Differential
- The simplest differential equation is
(we tend to use t to signify time, rather than
xfor displacement as in simple differentiation)
- Try solving this for yourself
Continued...
27From Differentiation to Differential
Because log of a negative number is not defined
Because an exponential is always positive
- Another approach isnt quite so formal
28From Differentiation to Differential
- Treat dt as a small quantity
- Move it around like a variable
- Integrate both sides w.r.t the relevant d(x)
term - dy on LHS
- dt on RHS
- Some problems with generality of this approach
versus previous method, but OK for economists
modelling issues
- So whats the relevance of this to economics and
finance? How about compound interest?
29From Differential Equations to Finance
- Consider a moneylender charging interest rate i
with outstanding loans of y. - Who saves s of his income from borrowers
- Whose borrowers repay p of their outstanding
principal each year - Then the increment to bank balances each period
dt will be dx
Divide by y Collect terms
Integrate
Take exponentials
30From Differential Equations to Finance
- Under what circumstances will our moneylenders
assets grow? - C equals his/her initial assets
Known as eigenvaluetells how much the
equationis stretching space
- The moneylender will accumulate if the power of
the exponential is greater than zero
- The moneylender will blow the lot if the power of
the exponential is less than zero
31Back to Differential Equations!
- The form of the preceding equation is the
simplest possible how about a more general form
Same basic idea applies
- f(t) can take many forms, and all your
integration knowledge from Maths 1.3 can be used
A few examples
32Back to Differential Equations!
- But firstly a few words from our sponsor
- These examples are just rote exercises
- most of them dont represent any real world
system - However the ultimate objective is to be able to
comprehend complex nonlinear models of finance
that do purport to model the real world - so put up with the rote and well get to the
final objective eventually!
33Back to Calculus!
Try the following
- Wont pursue the last one because
- Not a course in integration
- Most differential equations analytically
insoluble anyway - Programs exist which can do most (but not all!)
integrations a human can do - But a quick reminder of what is done to solve
such ODEs - Also of relevance to work well do later on
systems of ODEs
34Back to Calculus!
- Some useful rules from differentiation and
integration - Product rule
- Simple to derive from first principles consider
a function which is the product of two other
functions
35Back to Calculus!
- These rules then reworked to give us integration
by parts for complex integrals
36Back to Calculus!
Treat integration as a multiplication operator
- Convert difficult integration into an easier one
by either - reducing u component to zero by repeated
differentiation - repeating u and solving algebraically
37Back to Calculus!
- Practically
- choose for u something which either
- gets simpler when integrated or
- cycles back to itself when integrated more than
once - For our example
- Try sin
- cycles back
- formulas exist for expansion
These dont get any simpler, but do cycle
38Back to Calculus!
Reproduces this
Next differentiation of this
39Back to Calculus!
- Finally, Stage Three we were trying to solve the
ODE
40Back to Differential Equations!
- We got to the point where the equation was in
soluble form
- Then we solved the integral
- Now we solve the LHS and take exponentials
41Back to Differential Equations!
- So far, we can solve (some) ordinary differential
equations of the form
- These are known as
- First order
- because only a first differential is involved
- Linear
- Because there are no functions of y such as
sin(y) - Homogeneous
- Because the RHS of the equation is zero
42Back to Differential Equations!
- Next stage is to consider non-homogeneous
equations
- g(t) can be thought of as a force acting on a
system - We can no longer divide through by y as before,
since this yields
- which still has y on both sides of the equals
sign, and if anything looks harder than the
initial equation - So we apply the three fundamental rules of
mathematics
43The three fundamental rules of mathematics J
- (1) What have you got that you dont want?
- Get rid of it
- (2) What havent you got that you do want?
- Put it in
- (3) Keep things balanced
- Take a look at the equation again
What does this look almost like?
The product rule
44Non-Homogeneous First Order Linear ODEs
- The LHS of the expression
is almost in product rule form
- Can we do anything to put it exactly in that
form? - Multiply both sides by an expression m(t) so that
- Now we have to find a m(t) such that
45The Integrating Factor Approach
- This is a first order linear homogeneous ODE,
which we already know how to solve (the only
thing that makes it apparently messy is the
explicit statement of a dependence on t in m(t),
which we can drop for a while)
This is known as the integrating factor
46The Integrating Factor Approach
by
we get
- Anybody dizzy yet?
- Its complicated, but there is a light at the end
of the tunnel - Next, we solve the equation by taking integrals
of both sides
47The Integrating Factor Approach
- And finally the solution is
- This is a bit like line dancing it looks worse
than it really is. - Lets try a couple of examples firstly, try
- (Actually, line dancing probably is as bad as it
looks, and so is this)...
48The Integrating Factor Approach
becomes
using the integrating factor
- Now we need a m such that
- Which is only possible if
- This is a first order homogeneous DE piece of
cake!
49The Integrating Factor Approach
to yield
by
Back to basics 2the Chain Rule inreverse
Next problem how to integrate this?
50The Chain Rule
- That integral is elementary
- Now substituting for u and taking account of the
constant
51The Integrating Factor Approach
is the solution to
- Before we try another example, the general
principle behind the technique above is the chain
rule in reverse
52The Chain Rule
Rate of change of composite function is rate of
change of one times the other
Slope of one
slope of other
- In reverse, the substitution method of
integration
slope of composite
53Back to Differential Equations!
54Linear First Order Non-Homogeneous
- Stage Three integrating RHS
- there is no known integral! (common situation in
ODEs) - Completing the maths as best we can
This can only be estimated numerically