Skip to content

The Middle Game-3

February 24, 2010

In the last two blog posts, The Basics and The Next Level I introduced random variables,discrete ones and moved on to continuous random variables and then touched upon simple normal distributions.

So, in this blog post, we will be trying to explore the entire area a bit more thoroughly and try to work around with tools which will give us a better edge in trading.

The General Principles

I would like to raise a question, over here. Say, I tell you, the relative value of a particular instance of a random variable with respect to its, mean and standard deviation, will you be able to tell me the probability of that r.v. having that value.

That is, in layman English, I tell you, I have conducted a random experiment with normal distribution. Mean is \mu and deviation is \sigma . Now, I am gonna ask you, what is the probability of an observation in this experiment, having a value of \mu+2* \sigma ?

Is it possible, to find this probability for any given observation?

Seems like, yes, it is possible. And this is given by its probability distribution function. PDF is nothing but the function, which shows the distribution of probability with respect to various observations/occurences in a random experiment.

So as of now, lets just name the pdf as a generic pdf, f(x) and work on certain properties of it.

Area under the curve, i.e sum of all probabilities of all occurrences is 1.

i.e \int_{-\infty}^{\infty}f(x) =1

Mean is the first moment of a distribution


and Standard Deviation is the second moment of a distribution


You have higher moments as well, like Skew, Kurtosis and others. But we will keep things simple as of now.

P.S: To keep things simple, replace the integral sign as simple sigma in your mind’s eye and think the zeroth moment as the sum of all probabilities across all outcomes, which naturally sums upto 1. The First Moment that is, the mean is nothing but weighted average, weighted by the probability of its occurence. We usually weight it by the frequency of occurrence, so the mean looks something of the kind like:

Alternate Rendering of Weighted Average

And since,  p_{i}=\frac{f_{i}}{\sum_{k} f_{k}}

Hence, x_{1}p_{1}+x_{2}p_{2}+... =\mu

Implications of a Normal Distribution

The concept of mean reversion

A general random variable having normal distribution follows mean reversion. That is, such a random variable has a tendency to revert back to its historical mean.

Take a look at this. This is a normally distributed random variable generated via the randn() function of Matlab. The mean is zero and deviation is 1.

Mean Reversion of a Random Generated Variable

Notice, how it snaps back to zero each time,it strays away? This, my dear friend is called mean reversion.

Now, consider the price series of BAJAJAUTO, from 2002 to 2009.

Stock Market Price series are actually non-stationary processes. Or lets just say, in other words, they are not mean reverting processes in general. “But, my dear friend, the pretenses might refuse to yield yet the muse desires to be tamed.”  That is, if not this way, then surely that way.

That is, alright, prices are not stationary; what about the daily returns? Are they?

You decide and tell me, are they?

Daily Returns Analysis of BAJAJAUTO looks fairly random

Daily Returns Analysis of BAJAJAUTO looks fairly random

Though, this appears quite naive, but our human eye is often one of the best judges of randomness. At least a visual inspection looks “random-like” characteristics.

(As we will later see, there are significance tests to check, if a particular real life distribution matches a theoretical distribution or not)

And yes, I hope, you do get this fact, that there are umpteen number of distributions and we have just touched upon one of them.

If scratching the mere surface of one of the distributions is yielding so much about price series, isnt it a wonder, how other tools will work.

I had planned to talk about another sweet and sexy distribution called Bernoulli’s Distribution and its use in trading and other work, but I am drained, Sachin has just surpassed Saeed Anwar’s highest score of 194 and I would love to catch up on some other reading.

So moving ahead, we will work with Bernoulli’s Distribution and then see how we can use it for our trading purposes,esp risk management and stuff like that, perhaps touch upon some stastical significance tests, like Chi-Squared, t-tests, their relevence etc and the basics in order to build the necessary work.

So having done that, which I expect will be say 3-4 more posts, we will work on how to use these tools which we worked on for building a trading system.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: