It was designed as a clever tool to allow JP Morgan Chase Bank to make money even when markets were moving against it.
In May 2006, the US investment bank gave the green light to a new business, labelled the synthetic credit portfolio (SCP), managed from its London office.
It would deal in complex financial credit instruments such as those which bet on the risk of default on loans.
And it appeared to work. In 2011, the SCP earned 400 million US dollars (£249 million at today's rates) alone on American Airlines filing for bankruptcy. By the end of that year, the SCP was worth around 51 billion US dollars (£32 billion), raking in two billion US dollars (£1.24 billion) in revenues.
But in 2012 the tide began to turn, and the collapse of camera firm Eastman Kodak triggered losses of 50 million US dollars (£31 million) for the SCP. By the end of January, SCP traders reckoned losses could be 100 million US dollars (£62 million).
They ploughed on, taking bigger bets and growing the size of the book in a bid to counter rising losses. By the end of March the SCP was worth around 157 billion dollars (£97 million).
Meanwhile, traders were tasked with marking the portfolio to market, or valuing it, on a daily basis. But one manager described using the mid or average market price as "pressing F9 like a monkey".
Instead, staff were told to use their own judgement to value a book of complex derivatives worth billions, and told to ignore losses.
But as losses grew, the gulf between the traders' marks and the mid-market price widened significantly, as traders used increasingly flattering valuations. By March the gap was so wide it was giving traders a "headache".
And by the end of that month, traders were asked to stay late in the office to look at New York prices in the hope of getting "any better numbers".
On April 10, 2012, traders realised losses on that day alone could total 700 million US dollars (£435 million). But after speaking to management, a loss of just five million US dollars (£3.1 million) was initially reported.
Both inside and outside the bank, doubts were growing about the size of its exposure, as markets realised even small moves could trigger massive losses for the SCP. Attention turned to a mysterious trader, dubbed the London Whale for his huge trades.
One senior JP Morgan manager shrugged off the growing attention, describing it as "a tempest in (a) teapot driven by sour grape hedge funds and some former baby employees".
However, in just eight days in April 2012 the portfolio racked up losses of almost 800 million US dollars (£497 million).
By the end of the year the bank revealed trading losses in the SCP had ballooned to 6.2 billion US dollars (£3.86 billion).