Skip to main content

Module repo

Module repo 

Expand description

A repo: cash against a bond, returned at a far date for cash plus interest.

The desk’s trade, not a curve pillar. Its value is the cash leg on the repo curve the collateral finances on — the deposit’s three datings, with the far amount the contract fixes — and the collateral sits beside it as readings: what it is worth, what the margin ratio requires, and what the trade is worth as a package with the bond. A reverse repo is the same trade with the sign flipped.

The coupon a bond pays inside the term is the one thing the two contract forms disagree on. A classic repo (GMRA) manufactures it back to the cash borrower as it falls due, so the far amount is the cash plus interest. A buy/sell-back carries it to the far leg instead, compounded at the repo’s own rate, and nets it there.

Structs§

OpenRepo
An open repo: booked with no far date, either side able to end it on a business day’s notice. On any day it is the repo that ends on the next business day of its calendar — the cash and its interest from the start, back the day after — and is valued, risked and tabled as that repo.
Repo
A repo, reverse repo or buy/sell-back on one bond.
RepoMargin
A repo’s margin position as of a valuation date — readings beside the value, never part of it.
RepoTerms
The terms both constructors share.
SecuritiesLoan
A securities loan: a bond lent for a fee on its market value, accrued each day on the day count and paid at the end of each of the loan’s interest periods — monthly where the repo carries monthly interest dates, else once at the end — against collateral. Cash collateral is a repo at the rebate the lender pays on it — the lender of the bond is the borrower of the cash — and other bonds as collateral change hands and come back, worth nothing on the loan.
TriPartyAllocation
One bond a tri-party agent allocates against the cash, with the haircut the collateral schedule applies to it.
TriPartyRepo
A tri-party repo: cash against a basket an agent allocates under a collateral schedule. The cash leg is a repo’s, financed on the schedule’s repo curve then the currency’s general collateral; the agent manages the basket’s coupons and substitutions, so the leg carries none, and the allocation is margined at market net of its haircuts.
WindowCoupon
One coupon the cash lender is entitled to over the term, per 100 face.

Enums§

CouponTreatment
What happens to a coupon the collateral pays inside the term.
RepoAmount
How much a repo is for: the collateral’s face, the cash following at the price and margin ratio, or the cash, the face following.
RepoError
Why a repo could not be built.
RepoRate
The rate the cash accrues at.
RepoSide
Which way the cash goes.

Functions§

positive 🔒
strip 🔒
The compounding strip of index over [from, to] at unit notional, carrying spread, accruing on the repo’s day count.