TQBTHEQUANTBATEMAN
TQB/ learn/ rates/ discount factorsEN · DARK
Rates & curves · foundation

Discount factors and present value

Making time value an observable curve object rather than a single-rate shortcut

BY THE END, YOU CAN

01Define a discount factor as the price of a unit zero-coupon payoff.

02Convert consistently between discount factors and continuously compounded zero rates.

03Value deterministic cash-flow schedules on one valuation date.

04Explain why discount factors—not rates—are the primitive linear pricing weights.

01
INTUITION

Separate the quote from the quantity inferred from it.

A curve is a collection of prices across dates. The discount factor P(0,T) is the time-zero price of one currency unit paid at T; every quoted rate is a convention-dependent transform of that price.

01

Present value is linear in cash flows but nonlinear in quoted rates.

02

P(0,0)=1 anchors the curve; positive discount factors are required even when rates are negative.

03

The valuation date, settlement calendar and collateral agreement determine which curve applies.

02
WHY MARKETS CARE

Start from executable inputs and conventions.

Every bond, swap, FRA, option and xVA exposure needs date-specific pricing weights. A flat rate can illustrate time value, but a desk marks and risks a full discount curve.

INSTRUMENTS

zero-coupon bonds

OIS-discounted cash flows

fixed-rate bonds

collateralised derivatives

QUOTE CONVENTION

Rates are decimal inputs. This track uses continuously compounded zero rates and ACT/365-like year fractions for educational examples; traded instruments retain their market-native conventions.

03
MATHEMATICS

Transform quotes without losing units or arbitrage constraints.

Formula · Definition

Zero-coupon price

P(0,T)=e−r(0,T)TP(0,T)=e^{-r(0,T)T}

A zero rate is the constant continuous rate that reproduces one maturity-specific discount factor.

Open in Analytics
Formula · Short derivation

Cash-flow present value

V0=∑i=1nCiP(0,Ti)V_0=\sum_{i=1}^{n}C_iP(0,T_i)

Each dated cash flow receives its own linear pricing weight.

Open in Analytics
Short derivation
Short derivation

From no-arbitrage unit payoffs to present value

Replicate each deterministic payment with its matching zero-coupon claim, then add the replicated positions.

  1. 01

    Define the unit payoff

    Let a zero-coupon claim pay exactly one currency unit at T. Its clean time-zero price is P(0,T).

    1T⟷P(0,T)1_{T}\longleftrightarrow P(0,T)
  2. 02

    Scale each maturity claim

    A deterministic cash flow C_i at T_i is replicated by C_i units of that zero-coupon claim.

    Ci 1Ti⟷CiP(0,Ti)C_i\,1_{T_i}\longleftrightarrow C_iP(0,T_i)
  3. 03

    Use portfolio additivity

    Summing the maturity-matched claims gives the value of the whole cash-flow schedule.

    V0=∑iCiP(0,Ti)V_0=\sum_i C_iP(0,T_i)
  4. 04

    Transform only for reporting

    Convert P(0,T) to a rate after valuation, using one explicit compounding and year-fraction convention.

    r(0,T)=−ln⁡P(0,T)/Tr(0,T)=-\ln P(0,T)/T

Discount factors are the curve’s pricing coordinates; rate conventions are reversible views only when date, basis and compounding are retained.

Inputs
  • P(t,T): discount factor from t to T
  • r(0,T): continuously compounded zero rate
  • C_i: cash flow at T_i
  • V_0: present value on the curve date
Assumptions and limits
  • A deterministic curve does not model future rate uncertainty.
  • Credit, funding and collateral terms can require different curves.
  • Calendar and settlement choices can move cash-flow dates and PV.
Formula · Short derivation

Discount-ratio return

P(0,T1)P(0,T2)=ef(0;T1,T2)(T2−T1)\frac{P(0,T_1)}{P(0,T_2)}=e^{f(0;T_1,T_2)(T_2-T_1)}

Ratios of discount factors determine forward accumulation between dates.

Open in Analytics
05
MODEL / PRICING

Invert, fit, and reprice the market instruments.

METHOD

Value cash flows directly on discount factors, then report rate-space diagnostics. Preserve valuation date, settlement date, currency and collateral regime with the curve snapshot.

CALIBRATION

Infer discount factors from liquid collateral-consistent instruments. The direct exponential conversion in this lesson is educational, not an instrument bootstrap.

Implementation with current QuantLib

Use a YieldTermStructureHandle to pass discounting consistently into instruments and engines. Keep the evaluation date, settlement conventions and observer updates explicit; do not reconstruct discounting ad hoc inside each pricer.

API authority: upstream QuantLib reference pinned in the source registry.
06PYTHON IMPLEMENTATIONOpen the implementation and checks.
ARCHITECTURE
  • Parse dated market inputs and conventions at the boundary.
  • Build deterministic curve objects in the framework-free quant layer.
  • Return PV, repricing residuals and sensitivities together.
  • Test inversion, par conditions, monotonic dates and invalid domains.
PYTHON 3 · NUMPY / SCIPY

Discount-factor inversion and cash-flow PV

Implement the primitive price-rate transform and verify inversion.

REUSABLE EXAMPLE
01from __future__ import annotations
02
03import math
04
05def discount(rate: float, time: float) -> float:
06 if not math.isfinite(rate) or not math.isfinite(time) or time < 0:
07 raise ValueError("finite rate and non-negative time required")
08 return math.exp(-rate * time)
09
10def present_value(cashflows: list[tuple[float, float]], rate: float) -> float:
11 return sum(amount * discount(rate, time) for time, amount in cashflows)
12
13r, t = 0.0375, 7.25
14p = discount(r, t)
15assert abs(-math.log(p) / t - r) < 1e-12
16pv = present_value([(1.0, 4.0), (2.0, 4.0), (3.0, 104.0)], r)
17assert 0.0 < pv < 112.0
18print(f"P(0,{t})={p:.8f} | PV={pv:.6f}")
EXPECTED OUTPUTA reproducible discount factor and positive present value below undiscounted cash flows.
SANITY CHECKS

✓ Rate and time are finite.

✓ Time is non-negative.

✓ Rate-to-discount inversion holds to 1e-12.

07
INTERACTIVE LAB

Move the quote and inspect every linked representation.

DATED PRICE WEIGHTS AND PRESENT VALUE

Discount geometry laboratory

Shift the curve regime and horizon; compare discount factors, zero rates and PV weights.

SYNTHETIC · CONTROLLED SCENARIOS
10Y zero3.30%
10Y discount0.719041
30Y +25bp PV impact-5.11%
Discount factor by Maturity (years)

Normal curve: Positive upward zero curve.

  • discount factor
  • +25bp curve
Maturity (years): 0.0Y. discount factor: 1.00000. +25bp curve: 1.00000.

Use Left/Right or Up/Down arrows to inspect values; Home and End jump to the bounds.

ACTIVE STATE

Normal curve — Positive upward zero curve. Move the control and inspect every series with pointer or touch.

08
FRONT OFFICE

Where the model meets the book.

ON THE DESK
“The curve is a set of dated prices. Calling it ‘the rate’ hides the risk you actually own.”
VISIBLE INPUTS

valuation and settlement dates

currency and collateral regime

dated discount nodes

day-count basis

cash-flow schedule

CALIBRATION

Infer discount factors from liquid collateral-consistent instruments. The direct exponential conversion in this lesson is educational, not an instrument bootstrap.

RISK

parallel DV01

curve-shape risk

collateral-basis risk

settlement mismatch

DAILY WORKFLOW
  1. freeze curve snapshot
  2. validate dates and factors
  3. map cash flows
  4. discount by date
  5. reconcile PV and sensitivities
Production failure modes
  • stale evaluation date
  • percent/decimal mismatch
  • wrong collateral curve
  • date moved without rebuilding schedule
09MACRO CONNECTIONOpen the transmission channel.
MACRO CONNECTION

Policy transmission through discounting

Expected policy and term premia alter the price of future money, changing the present value of every distant cash flow.

01Policy pathtransmits

reprices overnight expectations

02Discount curvetransmits

moves dated pricing weights

03Present valuetransmits

revalues future cash flows

04Risk allocationoutput

shifts duration demand

10COMMON PITFALLSOpen the failure checklist.
01

Using one scalar rate for a multi-date portfolio.

02

Assuming discount factors must be below one in negative-rate regimes.

03

Mixing compounding conventions during inversion.

04

Ignoring collateral and settlement state.

11SOURCES / FURTHER READINGOpen sources and continue the track.
research

Interest-rate products, term structures and short-rate lectures

Research map for the rates progression and numerical experiments; all platform prose and code are original.

Source
Financial Engineering: Interest Rates & xVA
Author
L. A. Grzelak
Ref
main
OPEN ORIGINAL SOURCE ↗
research

Stochastic processes, Monte Carlo and model-calibration lectures

Mathematical cross-reference for stochastic dynamics and implementation checks.

Source
Computational Finance Course
Author
L. A. Grzelak
Ref
main
OPEN ORIGINAL SOURCE ↗
implementation reference

Current term structures, indexes, rate helpers, instruments, engines and tests

Implementation authority for production abstractions; Academy derives the mathematics before introducing library objects.

Source
QuantLib upstream
Author
QuantLib contributors
Ref
v1.42.1
OPEN ORIGINAL SOURCE ↗