A City trader recklessly gambled with illicit trades to boost his bonus, and ran up potential losses of more than £7bn at one point, a sum big enough to sink his employer, the global bank UBS, a court has heard.

Kweku Adoboli, a trusted and experienced member of UBS's exchange traded fund (ETF) desk in London, risked ever-greater sums in an attempt to conceal his losses over two and a half years before he was caught in September 2011, Southwark crown court was told.

Sasha Wass QC, prosecuting, said the 32-year-old took his bank's money and "fraudulently gambled it away" in an attempt to boost his status and become one of the elite circle of City traders who earn vast annual sums.

She said: "Mr Adoboli's motive was to increase his bonus, his status, his job prospects and 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."

The total losses to UBS were eventually calculated at $2.3bn, or just over £1.4bn. Wass told the jury: "This colossal loss rose purely as a result of Mr Adoboli's fraudulent deal making, which amounted to naked gambling."

However, she added, at one point the scale of Adoboli's liabilities to the bank through vast trades, which were not properly hedged to mitigate the risk, reached almost $12bn.

"Make no mistake, the scale of Mr Adoboli's gambling was so large and unchecked he could quite easily have approached and even exceeded the limits of the bank's resources," she said.

By "risking the very existence of the bank" through the scale of his activities, and in the deliberate and calculated way he carried out the scam, Wass said, Adoboli amounted to something quite different to the usual rogue trader.

The court was told that the former public schoolboy joined UBS as a graduate trainee in 2003 after completing his degree at Nottingham University. He initially worked in the back office, which maintains records, analyses trades and makes sure accounts are balanced and correct, Wass said.

"He became intimately aware of how the bank's accounting controls worked and would have seen their strengths and weaknesses. He would have known what events triggered the alarms and how to avoid this happening," she told the jury.

Two years later he moved to the trading floor and in a rapid ascent became a director on the ETF desk. His salary rose to match: beginning at £33,000 with a bonus of £7,500, by 2008 Adoboli was earning a combined sum of £65,000. Just two years later this was £360,000 – a basic salary of £110,000 and a bonus of £250,000 based partly on the bank's wider performance but also on how much profit an employee brings in.

This gave a false picture of his skills, Wass said: "Mr Adobli's income had risen exponentially during 2009 and 2010 not because he was a genuine top trader but because, as he later admitted, it was during this period that he began to fraudulently gamble the bank's money."

Adoboli racked up the giant losses undetected through three means, Wass said. First, he often exceeded the official daily trading limit per employee of $100m. He also failed to hedge trades by making balancing trades to mitigate potential losses, an insurance method that also caps potential profits. By doing so Adoboli hoped to maximise profits and thus his bonus, she said. Finally, he falsified data so as not to record his trades properly, often inventing false clients and trades for hedges.

Adoboli's reckless manner was like that of a "martingale" gambler, a reckless system of betting in which a loss on a position is followed up by a double-sized punt on the same outcome, on the assumption it will eventually recoup losses.

Wass said: "He was certain his prediction of the way the market was moving was correct and when the market moved the opposite way and his bets lost, he simply increased his bets."

In the summer of last year, Wass told the jury, colleagues started to ask questions about his trading account, particularly one accountant in the UBS back office. "Each time that Mr Adoboli was questioned he gave a plausible explanation for his trades," she said. "Mr Adoboli was able to draw on his experience of working within the control system to sidestep the questions."

But on 14 September, under intense scrutiny and aware a number of trades were "about to hit the buffers", Adoboli panicked and walked out of the UBS office, saying he had to see a doctor. Using his home email account he sent his bosses a message which, Wass argued, admitted his guilt.

In the email, read to the court, Adoboli said he had tried to suppress losses from "off book" trades, a number of which were, he warned, still "live". It continued: "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 was wise to stay on the desk this afternoon."

Saying he took full responsibility for what happened, he ended: "I am deeply sorry to have left this mess for everyone and to have put my bank and my colleagues at risk."

Wass told the jury: "You will see, Mr Adoboli's dishonest practices had a measure of success in the early days. He was cheating the system and he appeared to be getting away with it for years.

"On 14 September last year his system crashed like a car hitting a wall at high speed. Due to a series of events that had been building up over the previous few weeks, Mr Adoboli's pyramid of fraud collapsed. He was left with no choice but to admit exactly what he had been up to."

Adoboli, from Whitechapel, east London, denies four counts of fraud and false accounting between October 2008 and September 2011.

The case continues.