It's been 30 years since Trading Places came out. And, to be honest, I never really understood what happened at the end of that movie. Sure, Louis Winthorpe (Dan Aykroyd) and Billy Ray Valentine (Eddie Murphy) get rich, and the Duke brothers lose all their money. But what actually happens? How does it work?

I recently talked to Tom Peronis, a guy who has spent years trading OJ options. He walked me through every step of Winthorpe and Valentine's plan.

1. Give The Duke Brothers Bad Information

The Duke brothers — two old, rich guys — have bribed someone to get an advance copy a government report on the orange crop. This will give them inside information on what's going to happen in the market for frozen, concentrated orange juice. But Winthorpe and Valentine find out what the Dukes are up to, and they manage to steal the crop report before the Duke brothers get it.

The report says the orange crop is strong. When the rest of the world learns this, the price of OJ will fall. So Winthorpe and Valentine create a fake crop report that they put into the hands of the Duke brothers. The fake crop report says the crop was bad. The Duke brothers see this, and believe the price of OJ will rise.

2. Drive Up The Price Of Orange Juice Futures

The setting, the floor of the commodities exchange. The Duke brothers have told their trader to buy orange juice futures, and to keep buying no matter how high the price goes.

The market opens, and the Duke brothers' trader starts buying. Everybody else sees this and thinks the Dukes know something. Suddenly, everybody's buying. The price goes up and up and up, and the Dukes keep buying.

3. Sell To The Suckers

Then comes the key line for the entire movie — a line that's almost unintelligible. Standing on the floor of the exchange, Winthorpe (Dan Aykroyd) yells out:

Sell 30 April at 142!

Here's what that means: He wants to promise to sell orange juice in April for $1.42 per pound. The "30" in his line means he wants to start by selling 30 contracts. (One contract = many, many pounds of OJ.) (Also, that "30" might be some other number. It's hard to understand what he's saying. But it doesn't really matter — they sell a lot of contracts.)

All the other traders think the price in April will be higher than $1.42. The traders mob Winthorpe and Valentine, agreeing to buy lots and lots of OJ from them at $1.42 a pound.

4. Wait For The Other Shoe To Drop

A minute later, everything on the trading floor goes quiet. Everybody looks at the TV. On the TV, the secretary of agriculture walks up to a podium and reads the orange crop report. The guy tells the world that the orange crop is fine.

5. Buy Low, Get Rich And Bankrupt Your Enemies

To the traders, this means that the price of OJ is not going to go through the roof. All those traders who, a minute ago, were buying all they could, now suddenly need to sell. So the price starts falling. When the price hits 29 cents a pound, Winthorpe and Valentine start agreeing to buy orange juice in April.

In other words, Winthorpe and Valentine have contracts allowing them to buy millions of pounds of orange juice in April for 29 cents a pound, and to sell it for $1.42 a pound. They sold high and bought low. They're rich. The Dukes made the opposite bet and went broke.

Bonus: The Eddie Murphy Rule

One interesting kicker to the story: Trading commodities on inside information obtained from the government wasn't actually illegal when the movie came out, but it's illegal now. It was banned in the 2010 finance-overhaul law, under a special provision often referred to as the Eddie Murphy Rule.

Note: This story was originally posted on July 12. It was updated on July 19 to add audio from the radio version.

Imagine you could call up a friend and say, "Meet me at the bar and tell me what's going on with the economy." Now imagine that's actually a fun evening. That's what we're going for at Planet Money. Want to know more? Check out our "about" page. Want to connect with the Planet Money team? Send us an email.