A City trader who allegedly gambled away £1.4bn thought he had "the magic touch" but caused "chaos and disaster", a court has heard.
Kweku Adoboli, 32, exceeded his trading limits to try to get a bigger bonus and boost his ego, Southwark Crown Court was told.
Adoboli denies the charges, which relate to the period between October 2008 and last September.
Prosecutor Sasha Wass QC said: "He is on trial because he lost his bank $2.3bn. He fraudulently gambled it away.
"He also in doing so wiped around 10% or about $4.5bn 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 carrying out Britain's biggest alleged banking fraud.
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 major loss, and "his fraud had unravelled", the court was told.
Wearing a grey suit with a white shirt and purple tie, he was given permission to sit outside the dock with his legal team.
The public school-educated former head boy worked his way up from a graduate job at the bank that he started in 2003.
He became a trader in December 2005, was promoted to associate director in March 2008 and then director in March 2010.
Moving into trading meant he had the chance to earn million-pound bonuses, Ms Wass said.