Wednesday 1 July 2009

Programming for the Finance industry

The last two days, I had a training in finance. While the class was entirely about finance, the trainer mentioned quite a few times how programmers (he called us "IT professionals") had made everything very easy and transparent.

So, I thought about the various things he had taught, and realised that finance is probably the best application of textbook programming. Ok, maybe there are other fields like scientific programming, etc. to compete to that title, but finance is indeed an extremely suitable field.

If you think about it, almost all of finance is about numbers and logic. The two things computers do very well. The only two things computers do 'naturally'.

The trainer told us about one common task that was a chore to do manually until computers took over - checking a stock price every now and then, and performing an action when the price reached a certain value. You can imagine how boring and difficult a job this would have been when done manually.

I thought about it from a programmer's point of view, and couldn't help smile when I realized how easy this would be to program. Just keep fetching the value, comparing and waiting in a loop until you get to the required value. As I said, a textbook application of programming.

There were many other things, obviously - finance is full of calculations: calculating the interests, computing dividends, finding the tax taking into account all the various exemptions, etc. Every one of them is just an application of the most basic operations of current computers - number crunching and logic evaluation.

But, this is looking at only one face of finance - the part which involved tedious manual calculations which are algorithmically specifiable. However, there is another face to finance which is what makes the experts who they are. The part that involves judgement.

If you are any familiar with Artificial Intelligence, you'll know how difficult it is to teach computers to do this. Even most humans find it difficult to give a reasonably correct prediction of how a stock price will change or how an investment will turn out beforehand. How can mere computers which are just number crunching machines do it?

However, we humans are not an easily-giving-up lot. Using these mere number crunching machines, we're trying to build things that 'think'. We have things like neural networks which try to learn from previous data and project them to the future. We have Genetic Programming methods to evolve good models of the stock price variations. Of course, it's not foolproof and will probably never be. But, it's a wonder that we've even managed to even take a number-crunching-machine to the level of a (sometimes faulty) thinker. Also, as we give the system more and more data about the economics involved, it will get more and more accurate. Currently, we're giving them only numbers - previous stock prices, possibly the company's profits and losses, and such relevant data. However, we're currently mostly unable to give some important data that a human expert has access to - the news surrounding the company, the quality of the current management, etc. When we one day find a way to feed these things to the computer (or better, have the computer find those things itself), I believe we can expect much better predictions.

Finance industry has benefited a lot from the 'primitive' types of computation we are now easily able to do - extremely fast mathematical calculations and reliable logic evaluation. It appears it also stands to benefit from the 'newer generations' of computing which are coming up - where computers will cease to be mere machines and will 'understand' and 'think' about things!

No comments: