A former financial analyst at Amazon has been charged with insider trading.

Federal prosecutors and securities regulators said Thursday that Brett D. Kennedy stole confidential information about Amazon’s earnings and gave it to his college friend who was a stock trader.

The scheme alleged by the government was relatively straight-forward. Kennedy had a job at Amazon that gave him access to the company’s financial results. He was only supposed to access the results of one division but managed to get the entire company’s results for the first quarter of 2015.

His friend Maziar Rezakhani had formerly run a a business that resold iPhones and other computer products. But sometime in early 2015, he became a full time stock trader. He had another friend, Sam Sadeghi, do stock research for him in exchange for 10 percent of Rezakhani’s monthly trading profits. Apparently, they planned to build up a record of successfully trading stocks and then move to New York to start a hedge fund.

Part of that plan allegedly involved using non-public information to trade Amazon stock. The SEC complaint says Kennedy looked up the quarterly results in April of 2015, wrote them down on a slip of paper, and then gave the paper to Rezakhani.

Wall Street analysts had expected Amazon to report first quarter revenue of $22.4 billion and a net loss of 14 cents. The information Kennedy obtained, however, showed Amazaon’s revenue would be $22.7 billion and the loss would be just 12 cents. Anticipating that this “beat” would push up the stock price, Rezakhani bought a bunch of shares of Amazon. To be precise, he bought 4,400 shares for $1.75 million. It’s not clear where the iPhone reseller came up with that kind of money.

In a somewhat unique twist to the case, Rezahkani decided against stealthily concealing his possession of Amazon’s non-public information. He took to online message boards and posted the figures as if they were a forecast. Maybe that was part of his plan to move to New York and start a hedge fund: he would be the guy who successfully predicted Amazon’s first quarter 2015 share price. What investor could resist?

When Amazon released its earnings, the share price jumped and Rezahkani sold out of his position. Total profits: $116,000, or a little less than a 10 percent gain. He then allegedly paid $10,000 to Kennedy for his part in the scheme.

If Rezahkani had simply bought the Amazon shares and held them, he’d be much wealthier today. The share price has risen 156 percent since Rezahkani’s trading. Simply buying and holding would have made Rezahkani $2.7 million.