Chapter 27. Valuation Framework
Derivatives analytics starts with a surprisingly “unsexy” problem: you need a consistent way to represent time, discounting, and market inputs before you can simulate anything or value any payoff. This chapter introduces a compact valuation framework that turns the risk-neutral pricing idea into a small set of reusable Python building blocks that are used throughout Part VI.
This chapter develops the foundation of a small derivatives analytics library called
dxlib. It implements time-axis helpers that turn maturities into year fractions,
discount curves that turn future cashflows into present values, and a market environment
container that bundles valuation inputs into a single object. These components keep
later simulation and valuation code small, explicit, and testable. The examples assume a
working Python environment with numpy, basic familiarity with dataclasses and type
hints, and the ability to run scripts from the directory that contains code/ so it ...
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