Python user guide

A Python valuation begins with a contract, a position and a market. The contract defines the payments, the trade records the position held, and the market supplies quotes, curves and historical observations. A pricer combines these inputs to calculate the requested results.

This guide builds that workflow using explicit dates and small in-memory markets. It explains the conventions needed to interpret prices and sensitivities, then develops product-specific valuation and risk calculations. The computational studies provide larger examples, and the API reference describes individual classes, methods and accepted argument types.

Reading path

Begin with A position, a market, and a valuation for installation, position direction, result units and context lifetime. Continue with Constructing and selecting a market before changing curve or calibration assumptions. Valuation, quotation, and model choice distinguishes instrument-specific quotation and model choices; Risk, netting, and extensibility develops scenario checks, netting, and extension interfaces.

Python 3.9 or later is required by the package. The documentation build uses Python 3.11 or later and does not need the native binding. Running the examples does need the binding and pandas; simulation studies additionally use the dependencies described with their canonical notebooks.