Chapter 29. Derivatives Valuation
Simulating risk-factor paths is only the first half of the story. Once you have
scenarios, you still need to turn them into option values and risk measures in a way
that is reproducible, testable, and easy to extend. This chapter implements the
“valuation layer” of dxlib and uses it to price a European option and, as the main
focus, an American put option via the Longstaff-Schwartz least-squares Monte Carlo (LSM)
algorithm.
This chapter extends dxlib from “model simulation” to “derivatives valuation”. You
implement terminal payoff classes, deterministic discounting for year-fraction time
grids, a small European Monte Carlo pricer, and an LSM pricer for an American put option
on an equity index. The chapter also adds diagnostic visualizations that help you reason
about Monte Carlo noise and early-exercise behavior. The examples assume numpy,
Matplotlib, and the simulation layer from Chapter
28.
From Paths to Values
The risk-neutral pricing relationship introduced ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access