Treasury Forward Prices
Calculates the forward price of every US Treasury bill, note and bond: the price for delivery at a later date at which buying the security today with money borrowed in the repo market and selling it forward breaks even (Tuckman and Serrat, 2022, Fixed Income Securities, ch. 13). The difference with today’s price is the carry: the coupon income less the cost of financing the position.
The formula is as follows:
\[\text{Forward Price} = (P + \text{AI}_{0}) \cdot \left(1 + \frac{r \cdot d}{360}\right) - \Sigma_{k} c_{k} \cdot \left(1 + \frac{r \cdot (d - d_{k})}{360}\right) - \text{AI}_{T}\] \[\text{Carry} = \text{Price} - \text{Forward Price}\]- Forward Yield: the yield to maturity, compounded semi-annually, at the forward price on the forward date (see
get_yield_to_maturity; for a bill its bond-equivalent yield)
where P is the clean price, \(\text{AI}_{0}\) and \(\text{AI}_{T}\) the accrued interest (actual/actual) on the price date and the forward date, r the repo rate (simple interest, actual/360), d the days to the forward date and \(c_{k}\) the coupons paid \(d_{k}\) days from the price date, which earn the repo rate until the forward date. A positive carry (coupon income above the repo cost) makes the forward price lower than the price. The implied repo rate of a quoted forward price inverts this formula (see bond_futures_model.get_implied_repo_rate).
QuantLib’s BondForward is equal without a coupon in between and within 0.0001 per 100 with one, as QuantLib discounts the coupon on the repo curve rather than reinvesting it at simple interest.
Also known as: bond forward price, repo carry, forward drop, cost of carry, forward yield, bond forward.
Example
Install the Finance Toolkit with pip install financetoolkit -U, then call get_treasury_forward_prices:
from financetoolkit import FixedIncome
fixedincome = FixedIncome()
forwards = fixedincome.get_treasury_forward_prices(
forward_date="2027-02-19", date="2026-11-19", security_type="Note"
)
forwards.loc[
forwards["Maturity"].between("2036-01-01", "2036-12-31"),
["Maturity", "Price", "Forward Price", "Carry", "Forward Yield", "Repo Rate"],
]
Which returns:
| CUSIP | Maturity | Price | Forward Price | Carry | Forward Yield | Repo Rate |
|---|---|---|---|---|---|---|
| 91282CPZ8 | 2036-02-15 | 93.3438 | 93.2471 | 0.0967 | 0.0507 | 0.0388 |
| 91282CQQ7 | 2036-05-15 | 95.0312 | 94.8621 | 0.1691 | 0.0508 | 0.0388 |
| 91282CRF0 | 2036-08-15 | 96.8125 | 96.6263 | 0.1862 | 0.0508 | 0.0388 |
| 91282CRX1 | 2036-11-15 | 99.6562 | 99.3742 | 0.2820 | 0.0508 | 0.0388 |
4 rows
Parameters
get_treasury_forward_prices accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
forward_date | str | None | The forward (delivery) date (YYYY-MM-DD). Defaults to None, three months after the price date. | None, three months after the price date |
repo_rate | float | None | The repo rate (decimal, simple interest on actual/360) to the forward date. Defaults to None, which uses the tri-party general collateral rate (TGCR) of the price date, the overnight rate of repo against Treasuries, held for the whole term. | None, which uses the tri-party general collateral rate (TGCR) of the price date, the overnight rate of repo against Treasuries, held for the whole term |
date | str | None | The day of the FedInvest prices (YYYY-MM-DD); a weekend or holiday uses the business day before it. Defaults to None, the latest day with prices. | "2025-03-31" |
security_type | list[str] | str | None | The kind of security, or several. Options are: “Bill”, “Note”, “Bond”, None (all three). Defaults to None. | None |
bonds | list[str] | str | None | Keeps the securities with these CUSIPs (or their US ISINs). Defaults to None, every security. | None, every security |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the class. | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
References
- Library Referenced against QuantLib’s BondForward
- Library Shares similar logic as rateslib’s FixedRateBond.fwd_from_repo