The brilliant and hilarious 1983 comedy Trading Places is one of those movies, like Die Hard, that takes place around Christmas, and therefore qualifies as a Christmas movie by virtue of the season. On that score, then, Trading Places is one of my all-time favorite Christmas movies. It was Eddie Murphy, Dan Aykroyd, and Jamie Lee Curtis all at the peaks of their careers, creatively, and Ralph Bellamy and Don Ameche with absolutely brilliant turns as Randolph and Mortimer Duke, i.e., the Waldorf and Statler of of Trading Places.

However, there’s an extra layer that makes me appreciate Trading Places even more, and that’s the fact that — despite seeming like a 80s movie made-up ending — the finance behind the rousing finale is actually fairly sound. I didn’t understand that the first time I saw it as a kid; all I understood was that Louis and Billy Ray won, and Duke and Duke lost. However, after a securities class in law school, it began to make more sense, which made the ending was even more satisfying.

In short: Louis Winthrop (Aykroyd) and later, Billy Ray (Murphy), were commodities traders, which basically meant that they gambled on how much agricultural products would be sold for. One of those agricultural products was frozen concentrated orange juice, which is a real thing that is really traded on commodities exchanges. At the end of the movie, Billy Ray and Louis conspired to steal the crop report on oranges that was being leaked to the Duke Brothers by an employee within the Department of Agriculture. The Dukes were going to use that insider information to corner the market on frozen concentrate. The twist, however, was that Billy Ray and Louis swapped it out with a fake agricultural report, which suggested that the orange crops were failing and, therefore, the price of oranges would skyrocket (the real report had actually said that the orange crops were having a normal, healthy year).

In the end, using the fake insider information they believed they received from the Department of Agriculture, the Duke Brothers essentially gambled it all on the belief that the price of frozen concentrate would skyrocket. As they bought into frozen concentrate futures, everyone else on the trading floor followed suit, driving up the price even higher. Then, at its highest point, Louis and Billy Ray “short-sold” frozen concentrate futures, which meant basically that they’d make money if the price of frozen concentrate went down. They short sold at $1.41, and by the end, the price of frozen concentrate was about $.30, which meant that they pocketed the difference (about $1.12 per share). They made a fortune while the Duke Brothers lost around $400 million and their seats on the exchange.

Obviously, dramatic liberties were taken (the Secretary of Agriculture doesn’t announce the crop report on television, for instance) but for the purposes of this story, the actual details of the trade aren’t as important as the fact that both the Duke Brothers and Louis and Billy Ray based their trades on leaked insider information (the difference being, of course, that Billy Ray and Louis’ insider information was real, while the Duke Brothers received a fake report).

Here’s the funny thing about that, however: In 1983, when Trading Places was set, using insider information in the commodities futures market was not illegal. Indeed, the ability to use insider information in the commodities market continued to remain legal until 2010 when President Obama signed the Dodd–Frank Wall Street Reform and Consumer Protection Act into law. It was the most sweeping piece of Wall Street reform in the United States since the Great Depression.