All posts by raventrading

Case Study: How a schoolboy error created a rogue trader

I was working on an Oil ETRM implementation in London for a large investment bank when the Head of Commodities Trading and my Team Lead walked over to my desk, both a bit red-faced.

“Drop everything. We’re going to New York.”

They managed to fill me in on the flight. The senior US Natural Gas trader had managed to lose $400m in a single week and all sorts of alarm bells had gone off and he was under investigation. When asked what happened, he simply replied that it was the fault of IT because the ETRM system did not work and showed him the wrong exposure. That was why my boss and I were on our way over. We had to find out what had gone wrong and why IT were being blamed. No pressure then.

The trader in question had been suspended from trading duties, but still expected to be present in the office so he could answer any questions. He sat on a non-functional desk on the New York trading floor looking like a toddler who had been put on the naughty step.

The US NatGas business was the first business to be implemented using the ETRM solution that I was working on for Oil. It had been implemented the previous year by consultants who had all long gone. A few hours of investigation had revealed that the reporting side of the system was a bit of a mess, but not “wrong”. However, it was clunky, so the traders had continued to use their spreadsheets for exposure and simply used the ETRM solution for trade entry only. The trade data and market data going in was correct. The reporting coming out was not great, but it was not to blame for $400m.

So, my next port of call was the trader spreadsheet. It was big and complex. Futures, swaps, and various types of options, including compound options (vol on vol), all part of the 30,000 trade portfolio. It didn’t take me long to figure out the problem. Due to the sheer amount of trades, macros were used to move data from one place to another, manipulate and pivot the data. The trader was not technical, so that meant someone had coded it all for him. The coder had protected his code (and most of the spreadsheet) and had subsequently left the company – I keep coming across this problem! The trader had been using this spreadsheet in blind faith and no support for almost 4 months. Because it was protected, I had to recreate the spreadsheet exposures from scratch using the same input data in order to prove where the old protected spreadsheet had gone wrong. I had to do a crash course in the US NatGas market as well as advanced option theory, but it was worth it. A few days of peeling back layers and I was ready to present my findings to the Head of Trading.

Now, the one thing that every trader and trading analyst knows is that spreadsheets do not travel well through time. Almost every trader I know spends the first working day of every month meticulously going through the formulae in their spreadsheet to make sure the prices and positions are correctly calculated. There are different formulae for calendar month contracts that roll at the end of the month and futures contracts that have various expirations. Some markets price in quarters, semi annuals, and annuals, so when a month rolls off the averaging changes. There are also considerations to be made on live feeds. Some contracts use month codes (CLZ7 is Crude Light Dec 17) and some use front month codes (CLc1 is the front month for Crude Light), so there are lot of places where a spreadsheet can go wrong. It turns out that over time, this particular spreadsheet rolled on in time and incorrect calculations had snowballed. Because the sheet was protected, no one could correct any of the formulae and because the trader was not “technical”, he didn’t even know the formulae were incorrect.

A spreadsheet schoolboy error had mushroomed into a $400m loss. We had managed to prove the innocence of the ETRM platform as well as back solve the protected spreadsheet and deciphered the real exposure. We delivered the new spreadsheet to management and planned an emergency remediation so that the reporting side of the platform was usable. A lot of expensive lessons learned!

If you’re wondering, the trader was eventually sacked for the loss, went on to work for a fund and made big money for the next couple of years….. but then history happened….. and that’s another story!

Case Study: VaR problems at two very different oil clients

Client A, a physical oil trading shop, had just paid top dollar for an integrated ETRM platform. Daily MTM and PnL were fine. Delta positions were fine. Market and trade data were going in and $$$ were coming out.

However, when they pressed the VaR button, nothing happened. Arguments with the system vendor ensued and eventually the vendor left the building “under a cloud”. I was brought in to investigate what was going wrong and to implement a solution.

They were a basic crude oil trading shop, marking around 25 curves, each going out about 2 years. Oil uses monthly gridpoints, so that’s 600 data points on a daily basis. I saw the problem immediately: the historical data was patchy at best. Certain curves were only marked when there was exposure to them, so a few gridpoints marked over a couple of weeks around the delivery of a specific cargo. In fact the only complete curve in the whole set was WTI because that was a futures strip automatically brought in from the exchange.

I explained all this to the client but they were incredulous, “We don’t need historical data. We are only interested in parametric VaR, not Historical or Monte Carlo.”

I explained to them that although Parametric VaR was a relatively simple mathematical formula compared to Monte Carlo, the calculation still needed correlations. Their system was configured to use historical data from the last two years to calculate the correlation matrix used in the parametric VaR. The correlation matrix failed from lack of data and therefore the VaR calculation failed.

As no historical data was available, the solution was to reconstruct the missing data using diffs and spreads, best guesses, and a small amount of flimflam. The traders were told that every curve had to be marked properly going forward, which would over time improve the accuracy of the correlations. Also, when the real data finally replaced the fictional, they could then think about Monte Carlo and Historical VaR with a bit more confidence.

Client B, an energy trading firm, were very meticulous about, and very proud of, their historical data. However, they also had trouble with their VaR. They traded the full barrel globally, which meant about 150 curves. Most went out for two years forward, but some were only 1 year, some were 5 years. On average, around 4,000-5,000 data points every day. They had also spent top dollar on a complete front to back ETRM solution, had consultants in to implement it and had been up and running for around six months. Unfortunately, because the daily books and records of PnL and position reporting was the priority, no one had spent much time investigating the reason why VaR was not working. This one took me a while to figure out because there were two things going wrong.

  • The first was that the correlation matrix was failing. I won’t go into mathematical detail here, but there is something called Cholesky Decomposition, which makes the VaR calculations faster. Unfortunately, it can be quite sensitive when applied to large matrices of very highly correlated markets. All the gridpoints of the 150 oil curves are all highly correlated to each other; above 95% with a large proportion above 98%. Mathematically, this makes the matrix very unstable and liable to collapse. Believe it or not, in order to get the Cholesky Decomposition to work and therefore the VaR calculation to produce a number, we needed to insert a “random flutter” into the data. This was not intuitive and goes against the whole point of using historical data, but it just had to be done. The random flutter, very small though it was, was enough to stabilise the matrix and a VaR number was produced!
  • The second problem was much larger. The VaR number was wrong! The difference was small, but Parametric VaR is an exact formula, so it should be correct to the cent, every time. Any difference undermines trust in the ETRM platform, so I needed to get it right. Unfortunately, the vendor were very unhelpful – I was to find out why later – and refused to give me access to their calculations. So, I was dealing with a black box on one side, and a spreadsheet on the other. After many weeks of solid sleuthing, I had back solved the black box calculation and proved that the vendor had incorrectly hard coded the Parametric VaR formula. They had placed a log normal calculation outside of a bracket instead of inside! I wrote up a paper, included my proof and sent it off to the vendor. They implemented an emergency patch and all ended well. In a private conversation later, I found out why the vendor could not help me. Their risk developer had made a simple typing error in the code, compiled it and then left the company. No one at the vendor had the source code, so no one noticed the typo. It was a black box to the vendor as well as all their clients.

Both these examples were using the simple parametric VaR calculation. There is enough to go wrong with the basics before you even think about the 10,000 trials of a Monte Carlo simulation, and the impact of that on your grid. Every day is a new adventure in Commodity Risk!

What is Commodities Trading?


Let’s face it, Trading has got a bad reputation. Slick but arrogant Suits drinking pints of Vodka Redbulls in City wine bars. Public opinion is also clear on another point: There’s only one thing worse than a trader, and that’s a trader who works for a bank! Harsh, but sometimes, fair. Most of the time, however, traders are just normal people. Socially awkward? Yes. Arrogant? Certainly. Intelligent? Definitely. They have to be all of these things in order to succeed. It is just the nature of the beast. But why do they even exist? What’s it all about, this Trading malarkey? Well, the best way to explain Trading, and more specifically, Commodities Trading, is with a farming analogy:

A young man has just inherited a field. There is nothing on it except weeds and he has no money. He knows he can grow wheat on the field but has no finance to buy seed. Luckily, he can sell next years wheat crop now in what is known as the Futures Market. So, he sells his future crop in order to raise the money to buy the seed.

See what I did there? Not only did I give you a real world example of why the Futures Market is needed, but I also gave you a two-for-one deal by also explaining why we sometimes need to Sell Short. Selling Short confuses people because it involves selling something you don’t actually have and some even think that it is morally wrong. However, the young man who wants to start a farming business needs to start somewhere. There is no difference between selling short his future crop and asking his bank manager for a loan. Both involve risk, both involve “middle men”, and both involve getting an advance in order to buy some seed. Job done, everybody happy.

Add a few more farmers, young and seasoned, as well as a few more participants, like bakers and breweries (the consumers) and you have yourself a market all of a sudden. All willing buyers and sellers looking to do business with each other and mitigate their risks. The problem is that because the buyers and sellers have different factors that affect their businesses – farmers are dependent on the weather, whereas bakers are dependant on sandwich consumption – they may not want to be in the market at the same time or location. So, in order to close these gaps and make sure everyone gets a fair price, market makers are used. Market Makers make their money by charging a small commission on each trade they do, but even if a farmer is busy on his tractor, the baker is guaranteed a fair price when he goes to the market. The ability to buy and sell stuff easily is known as Liquidity, and it is the Market Makers’ jobs to provide liquidity.

Over the years, our young farmer has grown his successful business and works hard tending his crops. He is so busy with his daily duties that he no longer has time to go to the market himself. Luckily the man that looks after all his finances, his banker, is happy to take the farmer’s risk and buy and sell in the market on his behalf, for a small fee of course. The farmer can get on with his job without having to worry about going to the market. As an added bonus, the banker also represents other farmers as well as a selection of bakers, so putting all the risk in one basket, the banker can trade in the market at a better price and offer a more efficient service to his clients.

While all this is going on, the price of wheat is going up and down according to various supply and demand forces and someone sees that although the price of wheat looks reasonable to anyone in the wheat market, it is very high in comparison to the price of corn. Independent traders then enter the market in order to take advantage of the price difference between wheat and corn. The more traders there are in a market, the fairer the price is as it represents a more balanced view on that commodity.

That’s the theory anyway. There are always those that try to take the easy way. Those that want to make a quick killing and those that are just downright dishonest. In my 25 plus years experience of the commodities markets, something “big” tends to happen every couple of years, some bigger than others. Regulatory rules and Compliance training do work and filter out most things. However, I have found that the market tends to police itself, by and large, especially in the smaller niche markets like commodities. If someone tries to “squeeze” the market for their own gain, it doesn’t take long for the market to find out who it is and then retribution awaits. A storm in a teacup follows and then the market calms down again and we can all get on with our jobs again. Remember, there is no conspiracy. The last thing anyone wants is an unfair market. An unfair market will simply die, and everyone loses their jobs, including the farmers and bakers.

So, what have we learned?

  • Normal people trade in the Futures Markets
  • Normal people Sell Short
  • Traders are needed in order to provide liquidity
  • Bankers are not evil
  • The more market participants there are, the fairer the price: it’s called Democracy
  • Bad stuff happens but it gets sorted

Yes, it is a simplistic view, but that is what the Internet Generation is about. If you disagree, drop me a line.

Traders’ Pay

570449_60267300In writing this piece, I did not intend to glamourise trading in any way. I just thought that it would be a good idea to use my experience of over 25 years to objectively go through the numbers, because I have yet to see a trader light a Cuban cigar with a fifty pound note – but maybe all the traders I know are nonsmoking loyalists…

Please do not ask me to prove any of these numbers. They are what I feel is an average. I have worked at investment banks, trading houses, hedge funds and oil companies and they are all as different as the traders that work for them. I will mix and match between USD and GBP because all my experience is based in London and the Commodities markets are denominated in USD. Even with all these caveats and fuzzy logic, I think it is still an interesting read. Let me know what you think.


Firstly, let’s tackle the cost of trading. The components vary but the result is quite similar across the board. It costs roughly $1m per trader per year. This figure hasn’t changed much in 15 years because where we have saved money in technology, we have spent in Risk Control, Legal, and Compliance due to the changes in regulation and a general increase in regulatory nervousness. For every trader, you need roughly 10 support staff. You need specialised (and therefore premium) office space with raised floors for cabling and contingency measures like an uninterrupted power supply (UPS) and recorded telephone lines connected to an atomic clock. Like the fact that it is legally enforced for bank vault walls to be made of steel of a certain thickness, if you want to trade commercially, all these things are audit and legal requirements. There is also the cost of capital. When you trade, you are effectively borrowing money from the Company in order to place your positions. Some companies charge more than others for this “internal haircut” but those that charge less tend to spend more on Control (either Risk or IT), so in the end, it amounts to roughly the same figure; $1m per trader per year.


Traders can be roughly split into three categories

  • Junior Traders: 1-3 years experience, usually graduates cutting their teeth.
  • Senior Traders: 3 years experience upwards.
  • Desk Heads: Managers who run the desk.

Salaries can be considered pre and post the Lehmans collapse, as that is when banks had to start capping their bonuses and of course basic salaries shot up as a consequence. Pre Lehmans, most salaries were just under £100k per year because it was all about the bonus. Nowadays, a Junior Trader looks for around £150-175k and a Senior Trader £200k. Desk Heads get paid around £250k.

When the UK Government issue their annual salary statistics, they do not include bonuses or the self employed, and always at the number one spot are the nation’s CEOs or Captains Of Industry. Now, look a little deeper into the definition and you will see that Directors are also included. Most traders, with the exception of Junior Traders, are at a Director level or higher. So, traders are at the top of the PAYE charts. Well done, but it does mean something more. Being in the higher tax bracket means that any bonus, even a single pound coin is then taxed at 50%.


The Company expects a certain level of performance for its investment. A Junior Trader may get away with a flat year to begin with but will then be expected to make around $2m a year, thus doubling the Company’s investment. A Senior Trader is expected to make a minimum of $5m and a Desk Head is expected to contribute to the overall desk goal. Of course, you can’t make money every year and the Company needs to squirrel away some funds for lean years, but a trading desk’s lifespan can be as short as two years. Also, it must be remembered that for every $1 made in a trade, your counterpart loses $1. By definition, 50% of the market will be losing money at any one point. I have seen Senior Traders with good track records cashed out in a matter of months, never to be seen again. In my experience, a trader starts getting heavily monitored at -$1m to -$2m and is finally “removed” if the years profit and loss (PnL) goes to -$4m. For the record, I have also seen a single trader lose $400m in a week, but that’s another story!


Here we come to the interesting part, and we need to be a bit philosophical. When the newspaper headline says “Fat Cat Traders get $1m Bonus Each”, that’s not strictly correct. Yes, the Company sends a letter saying “Well done, you’ve earned a $1m bonus”, but the first thing the trader reads is the small print. Firstly, in order to get $1m in the first place, the trader must have generated between $20m and $35m in pure profit for the Company. This is because, in general, most banks and trading companies pay out 3-5% of net profit to the trader – after costs, remember – and it’s “discretionary” (more of that in a moment). The high-end hedge funds pay more; about 12-15%, and because these traders are usually hand picked seasoned professionals, this percentage is usually stated in their contracts.

Discretionary – this is the worst word in any trader’s contract, but they don’t really have much choice about it. It means that the bonus payment is purely an option on the Company’s part. An individual trader may make $50m in a particular year, but if the guy sitting next to him loses money, or even if that loss occurs in a completely different market in a completely different country, the Company can pull the “One Team, One Dream” card and not pay anyone. Post Lehmans, this happened a lot and is another reason why basic salaries went up.

So, we’ve ascertained the amount of money needed in order to justify a possible bonus. Next is the way it is paid. As a general rule of thumb, a bonus is paid half up front and then the other half is spread over the next 2 or 3 years. The deferred part is usually paid in Company shares and is therefore performance linked. Again, One Team One Dream. Also, if the trader leaves within that deferred period, they lose it. That is why traders get “sign on” bonuses when they join a new company; the new company needs to cover the loss of deferred bonus from leaving the old company.


Let’s recap: The trader makes $26m ($25m after costs) and the company issues a $1m bonus. $500k is deferred over three years and is in the form of company shares. $500k is paid up front, but $250k goes straight to the tax man. What happens to the other $24m? Well, don’t forget the bonuses for the Desk Head and all the other Management above. Also, although considerably smaller, the 10 support staff are paid bonuses. When everyone has taken their share, the Company accountants do their magic and after various machinations the company will pay 30% corporation tax on whatever is left, which is generally very little.

So, what have I learned? Well, despite the sensationalist headlines that the media print, I feel that it is far better for society in general if traders were paid bigger bonuses. After all, 50% of any bonus goes to society in the form of tax. Controversial, I know, and I’m aware that this is an oversimplified view of a complex subject, but 50% Income Tax is better than 30% Corporation Tax any day of the week.


The Tale Of Two Commodities

Like most people who work for a living, I need my coffee in the morning. I get to the City and I am constantly surprised by the amount of fellow addicts queuing up to get the first of many daily fixes. I wait in line, pay my £2.50 and get on with my day. The other morning was slightly different; I wasn’t in my usual zombiefied state, half asleep and pining for my bed. The other morning I was alert and fresh, looking around me and observing my surroundings, and I realised that £2.50 was a lot of money for a cup of steamed milk with an added dash of bitter flavouring that had been squeezed from some crushed beans. As I walked to the office sipping my newly acquired drug, my mind started doing the calculations.

A medium latte is 16 fluid ounces, which is about 450ml. My initial thought was wow, that’s over a fiver per litre. It’s actually £5.55 per litre. Let’s just pause there for a moment. £5.55. How much was petrol the last time you looked?

This needed more research, I decided.