Go to Home Page

Brownian Motion and the FOREX Market

By Armando Rodriguez

 

It wouldn’t be a first that a formulation developed for phenomena in a field is successfully used in another, it even has a name, and it is called analogy. There are many examples of analogies; the formulation to solve static mechanicals structures is the same as the one used to solve electrical networks; news diffuse as ink in still water, and so many others. Here we are establishing the analogy of the FOREX market price changes to the Brownian motion.

 

Also analogies are done not just for the enjoyment of the symmetry of nature but usually after some practical purpose. In this case we want know when a trade algorithm is not likely to profit and so trading should be put on hold.

 

The Brownian motion

Brownian motion (named in honor of the botanist Robert Brown) originally referred to the random motion observed under microscope of pollen immersed in water. This was puzzling because pollen particle suspended in perfectly still water had no apparent reason to move all. Einstein pointed out that this motion was caused by the random bombardment of (heat excited) water molecules on the pollen. It was just the result of the molecular nature of matter.

 

Modern theory calls it a stochastic process and it has been proven that it can be reduced to the motion a “random walker”. A one dimensional random walker is one that is as likely to take a step forward as backward, say X axis, at any given time. A bidimentional random walker does the same in X or Y (see illustration).

 

The stock prices change slightly on every transaction, a buy will increase its value a sell will decrease it.  Subject to thousands of buy and sell transactions stock prices should show a one-dimensional Brownian movement. This was the subject of Louis Bachelier PhD thesis back in 1900, "The theory of speculation.". It presented a stochastic analysis of the stock and option markets. Currency rates should behave very much as a pollen particle in water too.

 

Brownian Spectrum

 

An interesting property of the Brownian motion is its spectrum. Any periodic function in time can be considered to be the sum of an infinite series of sine/cosine functions of frequencies multiple to the inverse of the period. This is called the Fourier series. The concept can be further extended to non periodic functions, allowing the period to go to infinite, and this would be the Fourier integral. Instead of a sequence of amplitudes for each multiple frequency you deal with a function of the frequency, this function is called spectrum. Signal representation in the frequency space is the common language in information transmission, modulation and noise. Graphic equalizers, included even in the home audio equipment or PC audio program, have brought the concept from the science community to the household

 

Present in any useful signal is noise. These are unwanted signals, random in nature, from different physical origins. The spectrum of noise relates to its origin:

·        The Johnson–Nyquist noise (thermal noise, Johnson noise, or Nyquist noise) is the electronic noise generated by the thermal agitation of the charge carriers (usually the electrons) inside an electrical conductor at equilibrium, which happens regardless of any applied voltage. Thermal noise is approximately white, meaning that the power spectral density is equal throughout the frequency spectrum.

·        Flicker noise is a type of electronic noise with a 1/f, or pink spectrum. It is therefore often referred to as 1/f noise or pink noise, though these terms have wider definitions. It occurs in almost all electronic devices, and results from a variety of effects, such as impurities in a conductive channel, generation and recombination noise in a transistor due to base current, and so on.

·        Finally Brownian noise or red noise is the kind of signal noise produced by Brownian motion. Its spectral density is proportional to 1/f2, meaning it has more energy at lower frequencies, even more so than pink noise.

 

The importance of this discussion is that when you calculate the spectrum of the FOREX rate signal it happens to have a 1/f2dependency, meaning that is also Brownian in nature.

 

Behavior in Time

 

The behavior of the FOREX market in the absence of events also behaves perfectly Brownian. This is to say that FOREX rates behave like unidimentional random walkers.  The probability density of finding a random walker at position x after a time t follows the Gaussian law.

 

                                Eq 1

 

Where s is the standard deviation, that for a random walker is a function of the square root of t and this is what the FOREX rates follow to experimental perfection as shown below for EUR/USD quotes in figure 1.

 

An analytical expression for the above figure with rates in pips and t in minutes from an initial time t0:

 

                                   Eq 2

 

In the average, there are 45  EUR/USD quotes in a minute, so the above expression can be put in terms of the Nth quote after an initial time.

 

                                       Eq 3

Drift and Random Motions

 

Motion of pollen particles can be said to have two components, one random in nature described above, but if the liquid has a flow in some direction, then a drift motion is superimposed to the Brownian. The FOREX market presents both types of motion, a higher frequency random component and a slower drift motions caused by news affecting the rates.

 

Random motion is bad for the speculation business; there is no way to average a profit on a perfectly random market. Only drift motion can render profits. Market randomness is not constant in time and neither is drift motion.  During news events, drift movements are big and it is during events that profits can be made, But there are cleaner events in which automatic algorithms work the best and there are dirty ones, with a lot of randomness, that can drive the cleverest algorithm into losing.

 

FOREX Market Currency Pair Temperature

 

In a physical system the intensity of the Brownian motion of a particle can be taken as the average square of its random velocity and this found to be proportional to temperature and inversely to the particle’s mass.

 

<Vrdm2> =  3KT/m

 

The random velocity is the difference of the total velocity minus the average or drift velocity.

 

Vrdm = (V - <V>)

 

The true sense to a drift velocity would be the average velocity of a big number of particles at given time that would indicate that the whole body of liquid and suspended particles is moving as a whole. But, since the random velocity must average in time to zero, the average of the velocity of a single particle in time is also equal to the drift velocity.

 

In the FOREX market analogy the currency pair rate is the particle’s one dimensional position and so, the velocity at any time t is the quote movement since the last quote at time t0 divided by the time interval.

 

V = (ask(t) – ask(t0))/(t-t0)

 

The average velocity would be the exponential moving average of the quotes.

 

The temperature of the currency pair Tcp would then be:

 

Tcp = (m/3K) <Vrdm2>

 

The “mass” of a currency pair is a magnitude to be defined, so the Boltzman constant has no meaning here. Still, the long term average intensity of the Brownian rate motion is observed to depend on the currency pair, so they seem to show different “masses”. Finding the mass for each currency pair would allow having a common reference for temperature. If we took the EUR mass as 1, then:

GBP

EUR

CHF

JPY

AUD

CAD

 

2.870187

1

1.061082

0.74354

1.151541

1.706382

                       

 

Values for the currency pair masses could also be defined so as to make the average currency temperatures match the room temperature in the Kelvin scale or even fancier, to the Celsius or Fahrenheit.

 

GBP

EUR

CHF

JPY

AUD

CAD

 

0.029982

0.018007

0.017211

0.023983

0.035464

0.040874

                       

 

The above masses render an average temperature of similar to 300 K° which equals the room temperature in the Kelvin scale which corresponds to 27 degrees Celsius.or 80.6 Fahrenheit. But besides fanciness it doesn’t give any deeper insight into the problem.  Making (m/3K) = 1, renders a temperature that equals the variance of the velocities.  Since the square root of the variance is the standard deviation, such a temperature definition gives an idea of how intense the random motion is in pips.second.

Event Detection and Currency Temperature

A news event affecting the value of the US dollar can be detected when its rates to the rest of the main currencies change consistently. In other words, when the rate movements happen to correlate. (See Appendix A on Event Trigger calculation)

 

A numerical expression of this correlation is the average of difference to its EMA (Exponential Moving Average) over all the main currencies. The problem with this approach is that the significant currencies to consider are not that many, actually only 6 pairs can be used. An average over such a small sample is not immune against random motion and prone to render false positives.

 

The detection could be improved if the contribution to the average is inversely pondered by the pair’s temperature. More precisely: pondered by the probability of the observed rate velocity not being due to the Brownian nature of the motion.  Knowing that the velocity distribution in Brownian motions is Gaussian, in absence of an event, the probability of observing a velocity below a value V can be calculated by the area under the Gaussian probability density curve:

 

 

 

 

In words, the curve is telling us this: consider the EUR/USD pair that typically shows a Ö<Vrdm2> of 2.94 pips/second, velocities under this value are observed 68.2% of the time, beyond? Only 31.8%. So, it is fair to say that if a velocity observed is above, say 6; it is very unlikely (4.4%) that it comes from randomness.

 

The mathematical expression of the probability of a velocity V, not being random is:

 

P = erf(Ö(½V2/<Vrdm2>))

 

Where erf(x) is known as the error function.

 

The pondered correlation average will now be:

 

Corr =  Movement(GBP/USD)*P(GBP/USD) +

 Movement(EUR/USD)*P(EUR/USD) +

 Movement(AUD/USD)*P(AUD/USD) –

 Movement(USD/CAD)*P(USD/CAD) –

 Movement(USD/CHF)*P(USD/CHF) –

 Movement(USD/JPY)*P(USD/JPY)

 

If velocities go high for the current temperatures, all the P’s will go very near to one, rendering trigger values very similar to the values that would be obtained without the pondering, it is for low velocities that the trigger will be seriously attenuated, thus helping avoid false positives.

Is there a Market Temperature?

 

Going back to physics, in a chamber with a mixture of gases, the average energy of all molecules is the same, thus all the gasses have the same temperature and we can speak of the temperature of the mixture or chamber temperature. But this is so because, even if the initial temperature of the gases were different when they were added to the mixture, their molecules would eventually collide with each other until equilibrium is finally attained. If the molecules didn’t interact, each gas would have kept its original temperature and there would be no single chamber temperature. The concept of a FOREX market temperature may not have a meaning if the currencies don’t interact, or if the interaction is so mild that equilibrium is not reached in a time frame relevant to event transactions.  No such interactions have been observed so far.

 

 

 
 

APPENDIX A

 

The Event Trigger

 

The trigger is a calculated number designed to detect USD events. A US dollar event is a surge in the USD rates to other main currency caused by some piece of news on America's economy perceived as having relevance. The ideal trigger should have the following qualities:

During a USD event the six main rates (GBP/USD, EUR/USD, AUD/USD, USD/CAD, CHF/USD and USD/JPY) should move consistently with an increase or decrease of the USD value. So, the trigger should be some sort of average movement over the six currencies.

 

The movement

 

Let's start defining "movement". Quantifying movement always requires a reference, in other words to state precisely how much something has moved, you must specify an origin or a former position.  A trivial definition of movement for a FOREX rate could be the last quote before the present one, but would such a movement definition be helpful for event detection? Consider the following case:

According that movement definition, movement for T1 and T2 would be both one pip and for T3 it would be 0 pips. That definition is not telling the story at all, it seems rather obvious that the rate at T0 made a better reference. The problem is that back at T0, there was no way of knowing an event was coming.

 

Even if, by some illumination, we had known and took the rate at T0 as reference, by T4 the event would be gone, yet the movement respect T0 would still computes as a big one. A better reference at T4 would be rate at T3, respect to which the movement would be 0 pips indicating the end of the event; but again…if we only had know at T3 that the event was almost over.

 

A better definition for movement is one that uses a moving average as reference:

This way, the movements at T2 and T3 will compute as big, while the ones for T0, T1 and T4 will compute as little. The chart shows a very convenient moving average for that event. A moving average can be regarded as a low pass digital filter for the FOREX rate signal. Digital filters, that is a pretty complex subject; there are two big categories FIR’s filters (Finite Impulse Response) and IIR’s (Infinite Impulse Response), then there’s the order of the filter and the cutting frequency. Of all the possibilities we selected a simple pole IIR also known as the EMA for Exponential Moving Average because IIR’s have a better smoothing power with lesser delays. As all IIR’s, the EMA has a recurring formula (recurring: uses the last result to calculate the next):

 

EMAnew = EMAlast + (Ratenew – EMAlast)/K

 

A greater value of K makes a slower, average while a smaller value allows following the signal more. It was empirically determined that for most events, 40 made a good value for K.

 

Correlations

 

Currencies move up and down all the time, but it is unlikely to see a rate wander more than 4 pips in a minute. During events, rates could surge 10 or more pips. It is easy to tell when an event has occurred, but not easy to make a profit on it. For that, you can not wait until it is obvious that there is an event, because by then, most of the movement will be over and may not even cover the spread and fees involved in the transaction. So events must be detected early, when movements are still comparable to their normal randomness.

 

Averaging over the six mentioned currencies can help tell when movements are consistent with a USD event. Now comes which rates to average; each pair has two rates: the ask and the bid, the first is relevant to a buy trade and the later to a sell. In an event where the dollar weakens, you want to buy GBP, EUR and AUD with USD’s and sell USD for CAD, CHF and JPY.  We arbitrarily call this a “Plus” event. In a positive event the relevant rates are the ask, for the first three pairs and the bid, for the last three, so the movements of interest would the on those rates and the average of those movement will be called CorrP (correlation of a “Plus” event).

 

CorrP = (askGBP – askEmaGBP)*10000 + (askEUR – askEmaEUR)*10000 + (askAUD – askEmaAUD)*10000

            - (bidCAD – bidEmaCAD)*10000 - (bidCHF – bidEmaCFH)*10000 - (bidJPY – bidEmaJPY)*100

 

If the dollar strengthens, that would me a “Minus” event, then you want to do the opposite you would sell GBP, EUR and AUD for USD’s and buy USD with CAD, CHF and JPY.  Now you must average other rates, this would be CorrM.

 

CorrM = (bidGBP – bidEmaGBP)*10000 + (bidEUR – bidEmaEUR)*10000 + (bidAUD – bidEmaAUD)*10000

            - (askCAD – askEmaCAD)*10000 - (askCHF – askEmaCFH)*10000 - (askJPY – askEmaJPY)*100

 

When CorrP goes positive and above an empirically determined threshold, it is likely that we are having a “Plus” event. Whereas, if CorrM becomes negative and below this negative empirically determined threshold, then we are probably having a “Minus” event.

 

Once a position is opened because of, say a “Plus”event, then CorrM become a factor in the criteria for closing. It tells the likelihood of rates becoming more favorable of a trade in the opposite side of the market, the opposite goes for a “Minus” event.

 

                                                                    Go to Home Page