After the success of Platoon (1986), Stone wanted film school friend and Los Angeles screenwriter Stanley Weiser to research and write a screenplay about quiz show scandals in the 1950s. During a story conference, Stone suggested making a film about Wall Street instead. The director pitched the premise of two investment partners getting involved in questionable financial dealings, using each other, and they are tailed by a prosecutor as in Crime and Punishment. The director had been thinking about this kind of a movie as early as 1981 and was inspired by his father, Lou Stone, a broker during the Great Depression at Hayden Stone.
The filmmaker knew a New York businessman who was making millions and working long days putting together deals all over the world. This man started making mistakes that cost him everything. Stone remembers that the "story frames what happens in my movie, which is basically a Pilgrim’s Progress of a boy who is seduced and corrupted by the allure of easy money. And in the third act, he sets out to redeem himself". Stone asked Weiser to read Crime and Punishment, but Weiser found that its story did not mix well with their own. Stone then asked Weiser to read The Great Gatsby for material that they could use, but it was not the right fit either. Weiser had no prior knowledge of the financial world and immersed himself in researching the world of stock trading, junk bonds, and corporate takeovers. He and Stone spent three weeks visiting brokerage houses and interviewing investors.
Weiser wrote the first draft, initially called Greed, with Stone writing another draft. Originally, the lead character was a young Jewish broker named Freddie Goldsmith, but Stone changed it to Bud Fox to avoid the stereotype that Wall Street was controlled by Jews. Reportedly, Gordon Gekko is said to be a composite of several people: Wall Street broker Owen Morrisey, an old friend of Stone's who was involved in a $20 million insider trading scandal in 1985, Dennis Levine, Ivan Boesky, corporate raider Carl Icahn, art collector Asher Edelman, agent Michael Ovitz, and Stone himself. For example, the famous "Greed is good" line was based on a speech by Boesky where he said, "Greed is right".
According to Edward R. Pressman, producer of the film, "Originally, there was no one individual who Gekko was modeled on", he adds, "But Gekko was partly Milken". Also, Pressman has said that the character of Sir Larry Wildman was "modeled on Jimmy Goldsmith", the famous Anglo-French billionaire and corporate-raider.
According to Weiser, Gekko's style of speaking was inspired by Stone. "When I was writing some of the dialogue I would listen to Oliver on the phone and sometimes he talks very rapid-fire, the way Gordon Gekko does". Stone cites as influences on his approach to business, the novels of Upton Sinclair, Sinclair Lewis and Victor Hugo, and the films of Paddy Chayefsky because they were able to make a complicated subject clear to the audience. Stone set the film in 1985 because insider trading scandals culminated in 1985 and 1986. This led to anachronisms in the script, including a reference to the Space Shuttle Challenger disaster, which had not yet occurred.
Stone met with Tom Cruise about playing Bud Fox, but the director had already committed to Charlie Sheen for the role. Stone liked the "stiffness" of Sheen's acting style and used it to convey Bud's naivete. Michael Douglas had just come off heroic roles like the one in Romancing the Stone and was looking for something dark and edgy. The studio wanted Warren Beatty to play Gekko, but he was not interested. Stone initially wanted Richard Gere but the actor passed, so Stone went with Douglas despite having been advised by others in Hollywood not to cast him. Stone remembers, "I was warned by everyone in Hollywood that Michael couldn't act, that he was a producer more than an actor and would spend all his time in his trailer on the phone". Nevertheless, Stone found out that "when he's acting he gives it his all". Stone said that he saw "that villain quality" in Douglas and always thought he was a smart businessman. Douglas remembers that when he first read the screenplay, "I thought it was a great part. It was a long script, and there were some incredibly long and intense monologues to open with. I’d never seen a screenplay where there were two or three pages of single-spaced type for a monologue. I thought, whoa! I mean, it was unbelievable". For research, he read profiles of corporate raiders T. Boone Pickens and Carl Icahn.
Stone gave Charlie Sheen the choice of Jack Lemmon or Martin Sheen to play his father in the film, and Sheen picked his father. The elder Sheen related to the moral sense of his character. Stone cast Daryl Hannah as Bud Fox's materialistic girlfriend Darien Taylor, but felt that she was never happy with the role and did not know why she accepted it. He tried to explain the character to Hannah repeatedly, and thought that the materialism of the character conflicted with Hannah's idealism. Stone said later that he was aware early on that she was not right for the part. "Daryl Hannah was not happy doing the role and I should have let her go. All my crew wanted to get rid of her after one day of shooting. My pride was such that I kept saying I was going to make it work". Stone also had difficulties with Sean Young, who made her opinions known that Hannah should be fired and that she should play that role instead. Young would show up to the set late and unprepared. She did not get along with Charlie Sheen, which caused further friction on the set. In retrospect, Stone felt that Young was right and he should have swapped Hannah's role with hers. Stone admits that he had "some problems" with Young, but was not willing to confirm or deny rumors that she walked off with all of her costumes when she completed filming.
Stone wanted to shoot the movie in New York City and that required a budget of at least $15 million, a moderate shooting budget by 1980s standards. The studio that backed Platoon felt that it was too risky a project to bankroll and passed. Stone and producer Edward R. Pressman took it to 20th Century Fox and filming began in April 1987 and ended on July 4 of the same year. According to Stone, he was "making a movie about sharks, about feeding frenzies. Bob [director of photography Robert Richardson] and I wanted the camera to become a predator. There is no letup until you get to the fixed world of Charlie’s father, where the stationary camera gives you a sense of immutable values". The director saw Wall Street as a battle zone and "filmed it as such" including shooting conversations like physical confrontations and in ensemble shots had the camera circle the actors "in a way that makes you feel you're in a pool with sharks".
Jeffrey "Mad Dog" Beck, a star investment banker at the time with Drexel Burnham Lambert, was one of the film's technical advisers and has a cameo appearance in the film as the man speaking at the meeting discussing the breakup of Bluestar. Kenneth Lipper, investment banker and former deputy mayor of New York for Finance and Economic Development, was also hired as chief technical adviser. At first, he turned Stone down because he felt that the film would be a one-sided attack. Stone asked him to reconsider and Lipper read the script responding with a 13-page critique. For example, he argued that it was unrealistic to have all the characters be "morally bankrupt". Lipper advised Stone on the kind of computers used on the trading floor, the accurate proportion of women at a business meeting, and the kinds of extras that should be seated at the annual shareholders meeting where Gekko delivers his "Greed is good" speech. Stone agreed with Lipper's criticism and asked him to rewrite the script. Lipper brought a balance to the film and this helped Stone get permission to shoot on the floor of the New York Stock Exchange during trading hours. Lipper and Stone disagreed over the character of Lou Mannheim. Stone shot a scene showing the honest Mannheim giving in to insider trading, but Lipper argued that audiences might conclude that everyone on Wall Street is corrupt and insisted that the film needed an unimpeachable character. Stone cut the scene.
Stone also consulted with Carl Icahn, Asher Edelman, convicted inside trader David Brown, several government prosecutors, and Wall Street investment bankers. In addition, traders were brought in to coach actors on the set on how to hold phones, write out tickets, and talk to clients. Stone asked Lipper to design a six-week course that would expose Charlie Sheen to a cross section of young Wall Street business people. The actor said, "I was impressed and very, very respectful of the fact that they could maintain that kind of aggressiveness and drive".
Douglas worked with a speech instructor on breath control in order to become better acclimatized to the fast rhythm of the film's dialogue. Early on in the shoot, Stone tested Douglas by enhancing his "repressed anger", according to the actor. At one point, Stone came into Douglas' trailer and asked him if he was doing drugs because "you look like you haven't acted before". This shocked Douglas, who did more research and worked on his lines again and again, pushing himself harder than he had before. All of this hard work culminated with the "Greed is good" speech. Stone planned to use a Fortune magazine cover in exchange for promotional advertisements, but Forbes magazine made a similar offer. Stone stuck with Fortune, which upset Forbes publisher Malcolm Forbes, who turned down a later request to use his private yacht. Stone switched from 12 to 14-hour shooting days in the last few weeks in order to finish principal photography before an impending Directors Guild of America strike and finished five days ahead of schedule. Sheen remembered that Stone was always looking at the script and at his watch.