Complex Dynamics in the Foreign Exchange Market

"Dr. Keith Still is a rare breed:  a creative mathematician. As such, he is one of the few pure mathematicians who I believe can actually develop applications that cross disciplines. His work in crowd flow has many similar characteristics to market trading, as well as some significant differences. Dr. Still has the ability to leverage the similarities with his earlier work, and work through the problems of the new application. I have always been impressed with his insight into new problems, and expect that he can develop workable solutions to most problems once he sets his mind to it. Edgar E. Peters Chief Investment Officer PanAgora Asset Management Author, "Chaos and Order in the Capital Markets" Any opinions expressed are my own, and not the view of PanAgora Asset Management.  (EEP 2002)

Modelling the Financial Market

Herding, going with the flow, jumping on the next wave, keeping in the pack, playing safe, betting on trends are all features of crowd dynamics and can be, in fact often are, contrary to conventional trading signals. To examine the crowd dynamics in a financial market we first consider a model of collective decision making. Why might a person, or group, base a decision on one reason rather than on a combination of reasons?

Combining information in different cues requires converting them into a common framework, a conversion that may be expensive (in time or mental effort) if not actually impossible. For instance, taking a decision on the basis of several cues combined into one assessment of each option. For example a choice of stocks/bonds/options - one may have to evaluate Value at Risk, investment, fundamentals, global economies etc.

To solve these kind of problems one typically adopts an heuristic optimization process.

Standard models of optimization, whether constrained or unbounded, assume that there is a common framework for all beliefs and desires, namely, quantitative probabilities and utilities. Although this is a mathematically convenient assumption, the way we look at the world does not always conform to it. The mind has little choice but to rely on a fast and frugal strategy it bases its decision on just one good reason for many real-life decisions.

Take driving a car as an example, the mind processes a vast array of different types of information but only acts on perception of relative potential threat (or danger). The phenomena of cars speeding up in thick fog is a result of this balance of the perception of threat. "I don't know what is ahead, but I do know that IF I slow down then the car behind me will collide with me."

We weigh risk - we don't mentally measure it and we do so using a simple heuristic approach. So how does this relate to the crowd dynamic in the financial markets?

We first examine the nature of the financial dynamic.

The following is paraphrased from "International Money and Foreign Exchange Markets" by Julian Walmsley (Wiley)

Consider a simple non-linear model of exchange rate determination. Changes in the price of foreign currency, which we can denote by St for time t. We can make the assumption thatSt has a long-run equilibrium level, which we can denote by S' determined by such factors as relative money supply, output capacity etc. and can be assumed, for the purposes of this outline to be constant. The change in the log price of foreign currency is proportional to the gap between the level in the last period and the long-run equilibrium level. That is expressed as

Equation 1

The parameter Ɵ, which measures the speed with which the system returns to equilibrium, is related toSt such that

Equation 2

The higher theSt - that is the more expensive the foreign currency becomes and the more our domestic currency is devalued - the more quickly the system returns to equilibrium.

This model is NOT an explanation of foreign exchange dynamics, but it highlights the non-linear behaviour of the Forex system in general terms. We can rewrite the above equations in the form

Equation 3

By our stated assumption (above) we have said that S' is constant. It is convenient, therefore, to specify a simplifying value for it. We can now write

Equation 4

then we can rewrite our equation for the change in the price of foreign currency as

Equation 5

which we can recognise as the logistic equation.

Logistics Equation

A logistic function or logistic curve models the S-curve of growth of some set P. The initial stage of growth is approximately exponential; then, as competition arises, the growth slows, and at maturity, growth stops. In this specific example the growth maps to a trend (either up or down) and passes through three distinct dynamic behaviours:

  • A point attractor (the crowds perceived value of the currency exchange - this phase is where the market is trending) 
  • Strange attractors (where it may oscillate between several prices) and
  • Chaotic where there is no attractor. 

The latter (chaotic) markets a.re not predictable and are identified using the XenoFractal (which has a specific application as a 0-1 chaos detector). The unrestricted growth of the logistic function can be modelled as a rate term +rKP (a percentage of P). But then, as the population grows, some members of P (modelled as − rP2) interfere with each other in competition for some critical resource (which can be called the bottleneck, modelled by K). This competition diminishes the growth rate, until the set P ceases to grow (this is called maturity).

Relating this to the FX market this represents the end of a trend where the resources (counter parties) in the trading pool are satisfied with their position and trading activities change. Of course this can be immediately followed by trending to another attractor.

The key element in the XenoFractal analysis is to identify which phase (point, strange or chaotic) the market is in NOW. We do this by using a phase diagram - however the XenoFractal mapping isn't a simple phase plot - we're plotting the non-linear coupled output against an agonic product of a noise filtered input. This produces a unique type of phase diagram.

Phase Diagram

Below is a diagram of the standard map, it shows areas of chaos, strange attractors and point attractors. By mapping the price data to a phase diagram we can determine the current state of the system and determine it internal state.

Forex.2

If we have a system of two variables, X and Y, we can plot each variable against the other at a given point in time on a standard XY graph. This is called a "phase portrait/diagram" of the system, and is plotted in phase space. The dimensionality of the phase space depends on the number of variables in the system. As an example of the concept of a phase portrait, let us consider a simple pendulum. and plot its speed (X) against its position (Y). When we set the pendulum swinging it will, due to frictional forces, return to the centre of the phase portrait, where velocity is zero and position is zero. See diagram below.

Forex.1

We get a spiralling line that ends at the origin, where the pendulum has stopped. We can say that the pendulum is attracted to the origin. The origin, where velocity is zero and position is zero is a "point attractor" in this system.

Phase diagrams of the FX data

By using a nonlinear coupled oscillator I discovered that the Forex data could be manipulated to show the internal dynamics. This uses the XenoFractal algorithm and the phase diagrams are shown below.

image002image004

Above are a consecutive series of attractors in the Dollar/Yen data from 1994 showing the internal dynamics of the market. Note: The nature of the strange attractor changes indicating a change in the internal dynamics of the time series.


Screen shot 2011-06-02 at 21.15.13

Strange Attractors

Suppose we pushed a pendulum every so often and threw it out of orbit, the pendulum would continually tend to return towards the origin, but not from the same angle and it would seek a region around the origin. The system is attracted to a region in phase space. System which are attracted back to places which vary over time are called "Chaotic" or "Strange" attractors. Many apparent  "chaotic" systems have an infinite number of solutions contained in a finite space. By plotting the phase diagram (note: this isn't a data difference phase plot - it's a phase diagram of a coupled non-linear oscillator) we can determine the dynamics of the system under scrutiny.

The reason to introduce the above is NOT to pretend that this has any real-life application to the foreign exchange market as a phase diagram. The purpose is to show that a very simple equation, apparently deterministic, can in fact produce complex, unpredictable and chaotic results. It illustrates that under reasonable assumptions the way that speculators processes information, chaotic behaviour in the market is possible. QED.Therefore if the analysis of exchange rate dynamics focuses on seeking to detect whether chaotic patterns exist NOW, namely - at this time, and until the system changes, the market is unpredictable. This is the fundamental principal of the exit signal in the system. Furthermore any trading system will NOT produced a reliable trading signal IF the underlying dynamic is chaotic. Putting this simply - don't trade in a chaotic dynamic.

Applying this to the development and testing of a trading system - we go through our data set classifying it into chaotic and non-chaotic. Remove the chaotic data and train a system on the non-chaotic data. The system switches off trading when chaos is detected and only trades in the non-chaotic market dynamics. Thus the chaotic detector can be coupled to any existing trading system. A further analysis technique acts as a predictor exploring the attractors and projecting a cumulative trend using a superposition technique that emulates the crowd dynamics.

Click here for the projected graphs of Dollar/Yen data.

There are several potential applications to this research:

  • Trading System Indicator                Ignore trading signals if the data is chaotic
  • VaR (Value at Risk) Analysis          Assess the underlying dynamics of the instrument
  • Market Analysis Tools                     Which markets to trade today

Forex Capital Markets offers a free forex practice account, so you can practice trading in the forex market today (click on the link to take you to their site).

©  Prof. Dr. G. Keith Still.  All rights reserved. You may not copy, modify or use any content of this website, including videos, images and text, in whole or in part, for any commercial or non-commercial purpose without permission - contact GKStill@me.com