American options are harder to price than European ones for a single reason. With a European option you can only exercise at expiry, so there is one decision to value. With an American option you can exercise on any day before then, so to price it you need to know the best possible exercise strategy, and that strategy is the thing you are trying to find. The value depends on the rule, and the rule depends on the value.
The usual way around this is a method from Longstaff and Schwartz (2001). You simulate a large number of possible price paths for the underlying stock, then walk backward from expiry. At each step you look at the paths where exercising is currently worth something, and ask whether it is better to exercise now or hold on. You estimate the value of holding by fitting a small regression against the current price, using the cash flows further along each path. Do that at every step and you get an exercise rule and a price out the other side.
There is a quiet problem in the simple version of this. The same simulated paths get used twice, once to fit the exercise rule and again to compute the final price. When you fit a rule and then score it on the exact data you fit it on, the score comes out flattering. The regression finds coefficients that happen to work well on those particular paths, and then you reward it for working well on those paths. The price comes out biased upward, and you have no easy way to see by how much.
Most of the time the effect is small and you might never notice it. I noticed because of one contract that broke. An out-of-the-money put on TCS came out priced about 4.78 below its European equivalent. That is not a rounding error, it is impossible. An American option can never be worth less than the matching European one, because if you hold an American option and simply choose never to exercise early, you get the European payoff anyway. A negative early-exercise premium means the math has gone wrong somewhere, and in this case the somewhere was the rule scoring itself on its own paths.
The fix is the sort of thing you would do to test any model. Build the exercise rule on one set of simulated paths, then throw those paths away and price the option on a completely fresh set the rule has never seen. Now the rule has to perform on data it was not fitted to, which is the only honest check of whether it is any good. This is the out-of-sample scheme from Rasmussen (2005). With it, the TCS put went from 4.78 below its European value to about 0.14 below, which is close enough to zero to be simulation noise. The impossible answer went away.
The fix is not completely free. For some well-behaved contracts the simple version has two opposite errors that partly cancel each other, and removing one of them slightly widens the average error. I think that is a good trade. I would rather have a number I can trust to be a sensible lower bound than a number that is closer on average but occasionally returns something that cannot be true.
The other half of being honest about this pricer is the data. I wanted to price contracts on real Indian stocks, but NSE blocks automated access to its live option chain. You can send the request, but it comes back with an empty record, and that holds whether you use the common Python libraries or send the request yourself with ordinary browser headers. Rather than build a heavy headless-browser scraper to get around that, I used what I could get cleanly. The spot prices are real, pulled from Yahoo Finance. The volatility is real, computed from each stock’s own recent daily returns. The expiry dates are real, following NSE’s last-Thursday convention. The one piece I generate myself is the ladder of strike prices, built from NSE’s published rules for how far apart strikes sit at a given price level. So the pricing runs on real inputs, against a strike grid that matches what NSE would actually list, even though I had to construct that grid rather than read it off the exchange.
The pricer validates against the original Longstaff-Schwartz paper and against a separate finite-difference calculation, and the numbers agree. But the part I care about more is that when it is wrong, it tends to be wrong in a direction I understand, rather than confidently handing back something that cannot happen.