A junior trader making $66,000 a year ended up costing one of Europe's largest banks more than $7 billion. And the scary part is no one appears to have known what he was doing until it was almost too late.

In 2008, Jerome Kerviel was a derivatives trader at Societe Generale (SCGLY) , which is often referred to as SocGen. Derivatives include futures, options, forwards and swaps, and their value is based on, or derived, from an underlying asset. The underlying asset could include a specific stock, an entire market index, a commodity and so on.

Kerviel was involved in profiting from arbitrage opportunities. Arbitrage allows traders to profit when two assets that should have the same price are mispriced.

For instance, Coca-Cola may be trading for $45 on the New York Stock Exchange but for $44.97 on the London Stock Exchange (after currency conversion). So, to profit from it, a trader might go short Coca-Cola on the NYSE (to profit if the price falls) and go long Coca-Cola on the LSE (to profit if the price rises). Then when the 3 cent difference is corrected, the trader makes money as the two prices converge.

Three cents is actually a very large spread (and it wouldn't last very long once traders got wind of it). Arbitrage price differences are normally so small that traders need to borrow money to be able to turn a sizable profit. This means they use leverage and derivatives to magnify gains.

Kerviel's Big (Unauthorized) Bet

Using futures (a type of derivative), Kerviel placed a massive bet that European stock markets would go up. Normally, he would have placed an opposite bet, like shorting U.S. markets, to hedge the bet if he was wrong. If he didn't, SocGen had a risk-surveillance system that would alert Kerviel and his supervisors that one side of the arbitrage trade was missing.

But Kerviel had learned to hack the surveillance systems at SocGen. He had figured out how to fool the system into thinking every long position he took was being offset with a short position. But those short positions didn't actually exist. So, he ended up placing massive one-sided bets without a safety net.

This unauthorized trading was immensely profitable for a while. In 2007, Kerviel made $2 billion in profits without anyone cluing in to how he was doing it.

Just how massive did his bets get? By early 2008, Kerviel had amassed a futures position worth $73 billion. To put that in perspective, a junior trader earning $66,000 had managed to create a position five times the economic output of Cambodia. Or 1.5 times more than the market cap of the major bank he worked for.

The position included 30 billion euros' worth of Eurostoxx pan-European stock index futures contracts, 18 billion euros of Germany's DAX futures and 2 billion euros of London's FTSE futures.

And here's where it gets really crazy. At the time, the U.S. subprime mortgage crisis was in its early stages. Smart traders bet markets would go down. But Kerviel did the opposite -- he bet on markets going up. And he did that on purpose ... He actually wanted to lose money.

Kerviel was apparently worried that all his unauthorized (but very profitable) 2007 trades were about to be discovered. So, he was hoping for some massive losses to hide his fraudulent gains.

It turns out his strategy worked too well. On Jan. 18, 2008, a compliance officer discovered one of Kerviel's offsetting trades did not exist. Then everything unraveled from there.

The extent of Kerviel's rogue trades was discovered that weekend. Kerviel was fired. But SocGen still had to unwind the massive position Kerviel had built up.

Bank officials decided to just get it over with and "unwound" all of Kerviel's long positions by selling them into the market. Selling $73 billion worth of anything over a couple of days drives prices down. And this made the bank's losses even higher.

Once the dust settled, Kerviel's trades ended up costing SocGen close to $7.2 billion. That made him the worst rogue trader in history.

What Went Wrong?

There's no doubt SocGen's lapse in supervision caused this problem, but part of the problem could have been the nature of traders. Kerviel came from a working-class background and wanted to prove himself at this global bank filled with co-workers with degrees from business schools.

On a number of occasions, including the 9/11 terrorist attacks and the London bombings in 2005, he managed to make enormous profits for the company. He was a rising star and was earning a reputation as a fearless money-making machine. He admitted it felt like "playing a video game" at times.

Kerviel seems to have been addicted to the massive bets he was taking. The astronomically high amounts may have triggered a sense of euphoria and unleashed dopamine that kept him hooked, much like alcohol or cocaine. His actions morphed from trading to outright gambling, and he was hooked just like any other gambler.

(For a free report about avoiding the kinds of cognitive biases that got Kerviel in trouble -- and how to keep your emotions out of your trading decisions -- click here.)

His obsession with big gains drove him to hack SocGen's system, and his emotional state made it impossible for him to stop, even when things got out of hand.

Kerviel ended up with a five-year prison sentence (with two years suspended) for breach of trust, unauthorized use of SocGen's computers and forgery. (He only ended up spending five months behind bars). Plus, he owes SocGen $6.3 billion, which of course he'll never be able to pay back.

Avoid the Same Mistakes

Emotions are a trader's worst enemy. Obsessive and reckless behavior can prove disastrous for most investors. Don't get caught up in leverage you cannot manage or emotions you cannot handle. Stay detached, objective and always cover your positions.

Part of the trick is to have a stop-loss strategy for your investments. Most important, never get overconfident with a few wins under your belt. A balanced and disciplined strategy is the only way to keep your investments on track and avoid the pitfalls most traders fall into.

(We show you how to deal with these investment pitfalls -- and how to keep emotions out of your trading decisions -- in a free report you can download here.)

Kim Iskyan is the founder of Truewealth Publishing, an independent investment research company based in Singapore. Click here to sign up to receive the Truewealth Asian Investment Daily in your inbox every day, for free.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.