This blog is highly personal, makes no attempt at being politically correct, will occasionaly offend your sensibility, and certainly does not represent the opinions of the people I work with or for.
What's the weather like in London ?
avatar
A couple of days ago I decided to create my own trading platform. Not only to practice what I have learnt at work but also because Aubrey claims that she is a better trader than me (which might be true actually...).

So I have spent last two days php-coding and I have just finished version 0.001 of the platform which seems to run without problems. Aubrey and I will be beta testing it for a little while and then I will migrate it to alseyn.net for you, our beloved weblog readers, who might want to register as traders as well... (and might wonder "what took him so long ?..")

But before any migration let us do a bit of theory so people know a bit about derivative trading.

----- Introduction
Let us assume a Market where people can buy and sell widgets. For simplicity we will assume that the currency used by those people is the "credit". Some of the people who sell those widgets might do so because they are widget producers and some of the people who buy those widgets might use them for industrial purposes. We will assume that the market price is freely determined by market forces (i.e. it moves up and down by the law of supply and demand).

We are not going to be widget producers or consumers, because we do not really care about widgets. We are going to be speculators who are only interested in money. The first and most basic form of speculative trading that we could do would be to buy widgets when the market price is low and sell them when the market price is high. In such cases we would have made some money.

Some people like such trading, but it poses at least the two following problems

1. It might cost (lots of) money to store the widgets.

2. The widgets might be perishable (live stock, vegetable etc...) and they often would no longer be suitable for selling (or alive) by the time the market prices rise again.

Are we going to stop trading because of those problems ? Well, something called "Future contracts" will come handy to us.

----- Forward Contracts
Some people who know that they will have to buy or sell widget at some point in the future but who are worried about possible market prices moves, might want to lock the price they will have to pay. Sellers might wish to do so because they are afraid that the market price will drop, and buyers might be worried that the market price will rise. So let us consider the following discussion between Aubrey (a buyer of widgets) and Pascal (a greedy speculator).

Aubrey: In two months I will have to buy some 100 widgets (that I cannot buy now), but the market price might go up.

Pascal: Don't worry. Let me propose a deal to you. In two months I will sell the 100 widgets to you 12 credits per unit, no matter what the market price at that time will be.

Aubrey: hum...let me think. If the market price is higher than 12, I will pay 12 only, and if the market is lower than 12, I will pay a more than the market price but that fine because I prefer the security of locking the price now rather than the possible surprise of a high market price. Ok! deal!

Two month later the market price is 9. On the morning of the agreed date, Pascal buys the widgets for a total price of 9 * 100 = 900 and sell them to Aubrey for a total price of 12 * 100 = 1200. Aubrey is still happy because the deal is exactly what was agreed two months earlier and Pascal is very happy because he had made 1200 - 900 = 300 credits in one day.

Of course if the market price was higher than 12, then Pascal would have to buy the widgets higher than the price he would sell them to Aubrey and he would loose some money.

Definition: A forward contract is a binding commitment between two persons by which one agrees to sell some products to the other person at a determined price and at a determined date in the future.

Vocabulary: A forward contract is called a "derivative" contract because its value depends (or derive from) the value of the underlying product. In the example above, the forward contract was more and more valuable for Pascal as the market price of widget was dropping ...

----- Weather derivatives
The first contract that I have configured on the coming trading platform is related to weather derivatives. I have chosen this because I am amused by taxi drivers in London always talking about the weather. There is a small read about weather derivatives on the wikipedia page.

But how will weather derivatives exactly work for us ? Simple. First of all, the first product that we will trade will be the "LondonMidDayTemperature". This will be the exact temperature in London at lunch time eveyday. If Aubrey agrees to sell me 20 of those "LondonMidDayTemperature" for 12 credits each for tomorrow's contract, and if the temperature in London tomorrow at lunch time turns out to be 15 degrees, she will have lost 20 * (15 - 12) = 60 credits, which will be automatically redraw from her account and added to mine in the database.

If you have understood that, then you are one username and password away from becoming a star trader... when I will release the thing... soon...


Now, my only problem is to find a reliable source of temperature archives for the city of London. There must be something like that on the web...

[ add a comment ]

Archives