A City trader who gambled away £1.4 billion thought he had "the magic touch" but caused "chaos and disaster".
Kweku Adoboli, 32, exceeded his trading limits to try to get a bigger bonus and boost his ego, Southwark Crown Court was told.
Prosecutors said that Kweku Adoboli's losses could pay a year's salary for nearly 70,000 new nurses
He is accused of two counts of fraud and two counts of false accounting while working for Swiss bank UBS.
The charges relate to the period between October 2008 and last September, the Press Association reported.
Prosecuting, Sasha Wass QC said: "He is on trial because he lost his bank $2.3bn (£1.4bn). He fraudulently gambled it away. He also in doing so wiped around 10% or about $4.5 billion (£2.8bn) off the bank's share price.
"He did all of this by exceeding his trading limits, by inventing fictitious deals to conceal this and then he lied to his bosses.
"Mr Adoboli's motive for this behaviour was to increase his bonus, his status within the bank, his job prospects and of course his ego.
"Like most gamblers, he believed he had the magic touch. Like most gamblers, when he lost, he caused chaos and disaster to himself and all of those around him."
Adoboli from Clark Street, Whitechapel, east London, is accused of losing the money in Britain's biggest alleged banking fraud.
Wearing a grey suit with a white shirt and purple tie, he was given permission to sit outside the dock with his legal team.
He worked for UBS's global synthetic equities division, buying and selling exchange traded funds (ETFs), which track different types of stocks, bonds or commodities such as metals.
UBS discovered in September last year that Adoboli's deals had caused the bank a loss of $2.3bn (£1.4bn), and "his fraud had unravelled", the court was told.
Adoboli faked records at UBS for more than two years, the trial has been told
Ms Wass said: "To put the huge trading loss in some sort of perspective, $2.3bn is enough to pay a year's salary for nearly 70,000 new nurses or two Wembley stadiums or perhaps even six new hospitals.
"This colossal loss arose purely as a result of Mr Adoboli's fraudulent deal making, which amounted as you will see, to nothing more than gambling."
She told the jury that Adoboli had "fraudulently side-stepped" the bank's rules that banned high risk and unauthorised investments.
"He was lying to the bank, both to his senior managers, his risk control department, and the accounts department.
"In effect he was risking the very existence of the bank by gambling its resources, ultimately for his own benefit.
"Mr Adoboli had ceased to act as a professional investment banker and had begun to approach his work as a naked gambler. He had become what is sometimes referred to as a rogue trader."
But he had gone beyond the behaviour of a "mere rogue trader", faking records over a two and a half year period, she said.
"He faked bookings, he created false accounts and conducted himself as a master fraudster, deliberately and systematically deceiving and defrauding the bank which was employing him.
"As Mr Adoboli was later to admit, he had been cooking the books and deceiving the bank since 2008: two and a half years before he was caught."
Prosecutor Sasha Wass said Adoboli's trading system 'crashed like a car hitting a wall at high speed'
Ms Wass also claimed that: "At one stage Mr Adoboli was in danger of losing the bank nearly 12 billion US dollars (£7.4 billion) of unhedged investments."
The public school-educated former head boy got a job at UBS in 2003 as a graduate trainee and worked his way up, reaching director level in 2010.
Moving into trading meant he had the chance to earn million-pound bonuses, Ms Wass said.
She told the jury there was a "fundamental difference" between a gambler and an investment banker - with a trader taking "extreme care" to reduce risk.
Ms Wass said: "When you put your life savings in a pension fund you do not expect an investment banker to gamble it on the toss of a coin. You expect him to limit the downside and maximise the growth of the investment for your old age."
Adoboli fell into a "gambling mindset" and very quickly the losses he was causing grew into billions, the court heard.
On 14 September last year, Adoboli was approaching a cut-off date for settlement of his trades.
Ms Wass said: "You will see, in the early days, Mr Adoboli's dishonest practices had a measure of success. He was cheating the system, and he appeared to be getting away with it.
"On 14 September of last year, his system crashed like a car hitting a wall at high speed.
"He was left with no choice but to admit exactly what he had been up to."
On that day, William Steward, a chartered accountant working in the back office at UBS, "must have felt that he had been hit by a steam roller" after he had been previously reassured that the books were balanced.
But on that day, Mr Steward received a "devastating" email from Adoboli that revealed that the bank had been exposed to a colossal loss because of Adoboli's dealings, Ms Wass added.
Jurors were taken through the run-up to that day, including hearing phone calls in which Adoboli apparently tried to conceal what he had done.
Mr Steward repeatedly raised questions about Adoboli's trades and was "struggling to make sense of any of Mr Adoboli's explanations", Ms Wass said.
On 14 September, the trader walked out of the bank at 1.30pm saying he was going to the doctor's.
In it he admitted that trades he had entered in the ledger were not real and some were "off-book", which Ms Wass said meant they were "illegally conducted and hidden trades".
Adoboli said he had hoped to make his losses back, but had "clearly failed".
The message read: "I have now left the office for the sake of discretion. I will need to come back in to discuss the positions and explain face to face, but for reasons that are obvious, I did not think it wise to stay on the desk this afternoon."
Adoboli went on: "I take full responsibility for my actions and the stilt storm that will now ensue. I am deeply sorry to have left this mess for everyone and to have put my bank and my colleagues at risk."