Wednesday, December 31, 2008

Mathematical Modelling in Finance, Sports, ....

This article first appeared in the December 2008 issue of it magazine. This is part of the Folk Technology series that I write every month.

Would the current financial crisis have occurred if objective, number-crunching machines had been taking decisions rather than human beings driven by intuition and instinct? Perhaps, it's time we took a closer look at the potential of mathematical modelling.

It may sound like something out of a school textbook, but mathematical modelling is taking the world by storm, albeit without too much fuss.

In basketball, baseball and many popular sports, suggested player salaries are arrived at using mathematical modelling.

Banks in India and abroad often use mathematical risk modelling to determine whether or not to give you the home loan you are seeking. Even Google uses mathematical models to determine auction bids on keywords. The examples don't end there -- today mathematical models are used in diverse areas.

The rise of mathematical modelling

Mathematicians have had tools in their arsenal to perform predictive modelling since the nineteenth century. But the recent adoption of mathematical modelling in the other diverse areas is the result of society's familiarity with computers and an acceptance of the fact that computers are indeed better at crunching large numbers than humans. Today people are willing to let computer programs manage their funds, but would they have been open to the idea 10 years ago, even though a computer, Deep Blue, had beaten the reigning chess champion, Gary Kasparov?

So how do these models work? In chess, given the current board position, the computer tries to make a move that will give it an advantage over the opponent. This means the computer program has to calculate all possible board positions and select the best move based on a prediction of the outcome of the game, given that move.

To predict a stock's price or a player's salary, the mathematical models used can be explained as predicting future trends based on the past scores. So a player who has consistently scored runs in the recent past would get a better price. Older scores would be damped by an appropriate scaling factor so that recent playing ability is given more weight in determining the salary. Criteria like popularity can also be factored in, based on measurements of number of mentions in blogs, news articles, etc.



Similarly, banks decide on your home loan application by predicting your repaying capacity based on current and past salaries, employment history, educational qualifications, credit history, etc. In addition to your own potential, they also model the future health of real estate markets. The model can include as many parameters as necessary and can keep evolving over time.

Why models succeed

In the 20-match world chess championship held in 1995, Vishwanathan Anand scored the first full point in the ninth match, but went on to lose against Kasparov because of the latter's intimidating tactics. Kasparov declared after the match that Anand was good at chess but was not psychologically up to the task of playing him. Interestingly, folklore has it that Kasparov lost to Deep Blue in 1997 because he couldn't stare it down. Today, it is debatable whether a computer program can beat Anand. But chess computer programs can, without doubt, play almost as well as a chess grandmaster (there are only about a 1000 grandmasters today). Deep Blue could evaluate 200,000,000 chess positions in a second. In the recently concluded world chess championship, Kramnik got into time trouble in the matches he lost against Anand precisely because he was trying to optimise his next move by trying to calculate all possibilities in his head. Deep Blue definitely wouldn't have had any such trouble.

Most chess players have an excellent memory. A player like Anand remembers thousands of chess moves. But even Anand cannot remember more moves than a computer. So though a computer may be far less intelligent than even a five-year-old child, given its number crunching abilities and enormous memory, it can give a good fight and often win against an accomplished chess grandmaster. Remember, Deep Blue didn't have much chess knowledge. It was built by a team of five computer science researchers and one international chess master, who otherwise would have been no match for Kasparov.

A program that tracks stock prices can often do much better than a human being, as it can track huge amounts of data. For example, a computer program tracking shipping stocks can keep track of quarterly reports, weather conditions and pirate movements from news articles, offshore oil drilling trends, and a host of other factors that even a large group of human analysts cannot. In stock markets, speed is crucial. Based on the evaluation of a given set of parameters, a computer program can make split second decisions that may take hours or days for human analysts.

A major weakness of computer programs is that they do not have intuition or feeling. But this is also their strength. Would the financial crisis enveloping the US have come about if computer programs had decided whom to give housing loans to? Would derivative pricing based on mathematical modelling have warned us of the impending sub prime crisis?

The current economic slump has shown the need for better mathematical modelling of the financial markets. Even the last IPL biddings were driven to a large extent by sentiment. For example, Andrew Symonds earned a premium for the bad press he had generated during the preceding India tour of Australia. In hindsight, it turns out the franchisees overpaid for a lot of the players they bought. They would have been better off doing the bidding on a more objective, mathematical basis.

There is a distinct need for practical and usable mathematical predictive models in various fields. From sports to banking, such models can aid in better decision-making and importantly, there is realisation of this fact. As the Big Blue team showed, such models can be developed by small teams comprising people who are good at mathematics, programming and have an understanding of the domain for which the model is being built. As most science and engineering graduates will probably tell us, coming up with such models is not rocket science. With Chandrayaan successfully placed in the moon's orbit, perhaps they can now get down to solving this problem.

(Part of the monthly Folk Technology Series that I write for i.t. magazine)

15 comments:

WebbieGurl said...

In the part of chess, that makes the game more of a cheat and i think it defeats the real purpose why such game exists. It saddens me when I think that there are things that can happen at the advantage of one but to the demise of the many. I mean, where the challenge would go if all moves were predestined/are known already? Technology is supposed to improve life and yes,make it easier but i think there are limitations to that... and if there are no limitations? Humans should at least PUT that limitation as everything can be controlled by humans whether we accept this truth or not.

Rogue said...

Indeed, computer programs are heartless. That might be full of brains but it still can fail. Similar to a human being, if all that function is the nervous system where the brain belongs, naturally that person fails in the long run.

manju said...

"Would the current financial crisis have occurred if objective, number-crunching machines had been taking decisions rather than human beings driven by intuition and instinct?"

Good question. But in this case, I think the humans did not follow their instincts. They disregarded good economic practices (for example, gave housing loans without verifying the ability of the borrower to pay back).

I think using technology ( to assess all the options fast) with- not instead of- human decision making, may be the answer.

BTW, interesting aricle, and written so that a layperson like myself could understand most of it!

iWalk said...

According to chinese tradition, 2009 is OX(牛)year, OX means growing, Yeah! A growing year!

So Happy 牛 Year to you!

☆╭┐┌╮☆°.﹒
╭┘└┘└╮∴°☆°
└┐..┌┘───╮∴°
╭┴──┤Happy ├╮
│o o│牛year │●°
╰┬──╯    │ ∴°﹒
☆ | / /∴☆

Jenai said...

Wishing you a wonderful and prosperous 2009.

Sandy said...

Not entire true, if every1 uses the same model or similar models, wudn't every1 b taking the same decision. There have been crashes in the past due to program trading.

L. Venkata Subramaniam said...

@Sandy

Thats an interesting thought.

Well there is still no consensus on THE model to use. So people use different models (often proprietary), therefore, giving different decisions.

Program trading is here to stay. There could still be crashes but no broker today wants to return to the manual trading days.

Maya said...

mathematical models can be used for other things but not for predicting stock markets. Stock market depends on too many factors in particular a thing called "market sentiment" which ofcourse the machines wont able to understand. The sentiment of the people plays a vital role in the stock movements.

as far as i think its not possible atall, its like predicting a man's future using a mathematical model it not possible because there are too many factors associated.

David said...

There's plenty of program trading in the USA markets, and the programs do what they were designed to do. When the market goes down sharply they sell, and when it goes up sharply they buy, contributing to bubbles and crashes.

If we understood how markets worked completely people could act rationally, and make rational laws which would cause rational actions to benefit society. If we don't understand, the models we construct and the programs based on them will be no improvement.

qiwoman said...

I used to be good at chess but not sure now if that side of my brain functions anymore lol.

Karthik said...

There is no doubt that machines can do better than humans and would take most of the part,in the coming future years.But,I do think that humans would be still needed in more complex analysis where the outcome is dependent on more number of persons.

Americymru said...

Financial mathematical modelling may work on the micro level but it can never work on a macro level for two reason:-

1. The market is not a mechanical or otherwise rationally comprehensible system but the sum total of human economic interactions based on acquisitiveness and greed. The anarchic nature of human economic activity renders global planing impossible. No two nations or corporations would benefit from, or agree to collaborate, on the same plan. They would all demand competing plans which gave them the most advantage.

2. Deciding who gets what resources and when, involves making normative ethical judgements. To do this you have to have the notions of "right" and "wrong". Computers are precluded from such knowledge because they are incapable of receiving injury or of intentional maliciousness.

Nice dream though.

Shubhendu said...

I agree with the person above.

Can you predict the motion of an molecule undergoing Brownian motion? I mean can you really predict the next direction it would move on to?
Whenever you consider such a complex system, it i easy to understand it backwards. While moving forward though, seemingly unimportant decisions or events can have a very large impact on the final outcome.

Chess is different, it goes by a set of rules and the number of possibilities etc are still limited, so a brute force system will work, but the real world is unstructured and the possibilities are endless.

I'd say such modelling is still a dream. People (read models) keep arriving at different conclusions with almost similar starting points (similar is the key).

Mavin said...

Program trading is taking baby steps in India and I am involved in this.

Complex quants may be preserve of just a handful of them but automated order pushing based on one / two variables is definitely getting popular.

The early bird will make money before the entire universe descends and everybody is fighting for a small loaf.

Inspite of all this, I am a little wary of trying to predict the future of an unstable and random series of occurances.

Fooled by Randomness by Nassim Nicholas Taleb is a great book that puts things in perspective.

Spin Doctor said...

Well I am probably a bit late with my comment on this one. The present financial crisis has been caused by mathematical modelling as much as bad decisions. Over the last 2 decades quantitative finance has grown to a huge extent that it almost dominates the market now - the unravelling of a lot of the models has been one of the reasons for the current market crisis.

Post a Comment

Share your thoughts on this topic, they are valuable to me and to other visitors on this site.