QuantLib American‑option guide
- A QuantLib tutorial showed how to price American options in Python, covering term structures, dividends and pricing engines. - PyQuant News shared the hands‑on guide aimed at derivatives portfolio projects. - The walkthrough is positioned as a practical resource for students building pricing, calibration and validation notebooks (x.com).
An option is a contract on a stock price, and an American option can be exercised any day before it expires. A new PyQuant News walkthrough shows how to price that kind of contract in Python with QuantLib. (pyquantnews.com) PyQuant News published the guide on June 8, 2024, and framed it around American call options, implied volatility, and Python code built with QuantLib. The site says its audience uses Python for quant finance, algorithmic trading, and derivatives work. (pyquantnews.com 1) (pyquantnews.com 2) The tutorial starts with market inputs a student would recognize from a pricing notebook: spot price, strike, volatility, risk-free rate, dividend yield, days to maturity, and a market option price. In the example, those inputs include a $188.64 stock price, a $190 strike, 20% volatility, a 5.25% risk-free rate, a 0.52% dividend yield, 148 days to expiry, and an $11.05 option price. (pyquantnews.com) That setup matters because American options are harder to price than European options, which can be exercised only at expiration. PyQuant News says Black-Scholes is not enough for American options and points readers to binomial trees, finite-difference methods, and Monte Carlo simulation instead. (pyquantnews.com) QuantLib is the engine room in that workflow. Its Python documentation lists pricing tools for vanilla options, including `FdBlackScholesVanillaEngine`, which can handle European and American payoffs, and `MCAmericanEngine` for Monte Carlo-based American pricing. (quantlib-python-docs.readthedocs.io) The guide also leans on term structures, which are just curves for how interest rates, dividends, and volatility change over time rather than single fixed numbers. QuantLib’s examples build those inputs with yield-term-structure handles, dividend-term-structure handles, and volatility-term-structure handles inside a Black-Scholes-Merton process. (quantlib-python-docs.readthedocs.io) That is the same pattern older QuantLib examples use when they compare European and American contracts side by side. In a 2017 tutorial, Goutham Balaraman built an American option with `AmericanExercise`, modeled dividends with a flat dividend-yield term structure, and priced the trade with a 200-step Cox-Ross-Rubinstein binomial engine. (gouthamanbalaraman.com) PyQuant News has been building out that options-and-Python catalog beyond one post. Its options section includes explainers on Black-Scholes, theta, volatility term structure, skew, and American-option implied volatility, all aimed at readers writing code rather than reading theory alone. (pyquantnews.com 1) (pyquantnews.com 2) The pitch is practical: take the math that usually lives in textbooks and turn it into reusable notebooks for pricing, calibration, and validation. For students and junior quants, the value of the guide is not a new model but a worked example that shows how the pieces fit together in code. (pyquantnews.com 1) (pyquantnews.com 2)