Rounding Errors in your Stock Market

As we have been learning in class, rounding errors can cause many problems.

I had just thought that egregious round off errors in real life would be few and far in between. However it seems that there is no shortage of them as I searched online.

In a situation reminiscent of the movie Office Space (where a program is created to embezzle money by “truncating” balances), the Vancouver Stock Index is a poster child for rounding error gone wild.

The Background

Starting in January 1982, the Vancouver Stock Exchange created an index. This index was a weighted average of all the stock prices, which was initially calibrated to 1000. By November 1983, the index was down to 520, yet the individual stock prices had gone up.

The Math

The index calculated the averages with a precision of 8 digits. However, the final result was had the last 2 digits removed. So 123.45678 would become 123.456.

For calculating averages, the index used the following formula.

New Index Average = Old Index Average + 1/(# of stocks) x (New Stock Price - Old Stock Price)

The index was recalculated with this formula every time one of the stocks changed prices. However, you can see that there would be problems with using the truncated average. This average value had an error ranging from 0.00000-0.00099.

The average error should be equal to 100/2 x (0+0.00099) / 100, which is the sum from 0.00000 + 0.00001+0.00002+…+0.00099 all divided by 100. This is equal to about 0.000495.

The stock prices were recalculated an average of about 2800 times a day, so this error accumulated to 1.386 per day. Multiply this by 480 days later, and you get a total error of 665.28. And there you have the reason why the index dropped, while the stocks went up.

More details on this disaster:


http://www5.in.tum.de/~huckle/Vancouv.pdf


http://www.jstor.org/view/0025570x/di021213/02p0065p/0?frame=noframe

Posted in Topics: Uncategorized

Jump down to leave a comment.

Leave a Comment

You must be logged in to post a comment.



* You can follow any responses to this entry through the RSS 2.0 feed.