Every mortgage quote you have ever seen was manufactured — assembled from one deep bond market, a stack of public penalty grids, and a few private margins. This is the assembly line, end to end: from the TBA tape to your rate lock, and the quant desks that hedge what falls off the belt.
Before the machine makes sense, four ideas have to. None of them needs a finance degree — each is one honest sentence with consequences. Take the five minutes; every chapter after this one stands on them.
Lend someone $100. They promise you fixed interest payments — the coupon — and your $100 back at the end. That promise, written down and tradable, is a bond. The twist that powers everything on this page: the promise is fixed, but the world isn't. If new loans pay 7% and yours pays 6%, nobody will buy yours for the full $100 — the price falls until its return matches the market. Rates up, price down. Rates down, price up. A see-saw, always and exactly:
Your neighbor's mortgage payment doesn't stay at their bank. Lenders bundle thousands of similar loans into a pool, Fannie Mae or Freddie Mac guarantees the payments (for a fee), and the pool is sold to investors as a mortgage-backed security — a bond whose coupons are, quite literally, homeowners' monthly payments. When Chapter II talks about the "TBA market," it means the giant forward market where these pools trade before they even exist: buyers commit to a generic pool — agency, term, coupon, settlement month — with the specifics "to be announced." That market's prices are the raw material every mortgage quote is machined from.
One habit of mind before moving on: an MBS has a quirk no ordinary bond has. The homeowners inside the pool can prepay — refinance whenever rates drop — which means the bond can hand your money back at the worst possible moment. Hold that thought; it becomes Chapter V.
Everything in this trade is quoted per $100 of loan. Three words unlock every table below:
| par | a price of exactly 100 — the loan changes hands for face value, nobody pays a premium either way. |
| point | 1% of the loan amount. A price of 99.25 means the borrower is short 0.75 points — on a $420,000 loan, $3,150 due at closing. |
| basis point | one hundredth of a percent of rate. "Rates fell 50bp" means 0.50%. Prices move in points; rates move in basis points. |
Eight terms cover the rest of this page. Skim them now, come back when one bites:
A mortgage "quote" is not discovered — it is computed, nightly and on demand, by a pipeline that starts in the bond market and ends at a loan officer's screen. Watch one loan go through: a $420,000 purchase, 742 credit score, 80% loan-to-value, note rate 6.875%. Prices are in points — percent of the loan amount, where 100 is par.
| UMBS 30Y · 6.0 coupon · front-month TBA | 100.90 |
| map: 6.875% note − 0.25% svc − ~0.60% g-fee → 6.0 cpn | — |
| + servicing released premium (SRP) | +1.15 |
| − hedge, delivery & buyup/buydown | −0.45 |
| = base price | 101.60 |
| − LLPA · 740–759 FICO × 80 LTV (grid, Ch. III) | −1.000 |
| − investor overlay | −0.125 |
| − lender margin (branch + LO comp) | −1.225 |
| final borrower price @ 6.875% | 99.250 |
99.25 means this rate costs the borrower 0.75 points. Run the same ledger at every note rate and you get the rate stack — the quote is simply the rate where the final price crosses 100. That's Chapter IV. First: where does 100.90 come from?
There is exactly one market in this whole machine, and it isn't the one with the open houses. Agency mortgage-backed securities trade To-Be-Announced: a forward contract on a generic pool — agency, term, coupon, settlement month — with the specific pools "to be announced" two days before delivery. It is one of the deepest fixed-income markets on earth, trading over the counter through dealers. Every rate sheet in America hangs off this tape.
A pricing engine's first move is a lookup: which coupon bucket does this loan's note rate map into, and what does that coupon's front-month contract cost?
The borrower's rate, minus the servicing strip, minus the guarantee fee, leaves the security coupon. A 6.875% note becomes cash flow inside a 6.0-coupon pool; odd remainders are handled by interpolating between coupons.
Here is the open secret of mortgage pricing: the risk-based part is public. Fannie Mae and Freddie Mac publish their loan-level price adjustment grids — flat matrices of price hits indexed by credit score and loan-to-value, with further tables for cash-out, condos, second homes, high-balance. No model, no mystery: a lookup table anyone can download.
Our loan — 742 score, 80 LTV — takes a 1.000-point stamp. Hover the grid; the outlined cell is ours.
Now run Chapter I's ledger at every note rate. The result is the artifact loan officers live inside all day: the stack. Below par (left, rust) the borrower pays points; above par (right, teal) the lender pays the borrower — a rebate that can cover closing costs. The quoted "rate" is just the row where the final price first clears 100.
The stack itself is arithmetic. The mathematics lives around it — because a rate lock is a real position. The moment a lender locks your rate, they are short a forward they must hedge with TBA sales. But your lock is optional: if rates fall before closing, you re-shop and vanish. Hedge desks model that vanishing as pull-through — the probability a lock funds, as a function of how rates have moved since.
Short enough TBA to offset the duration of the pipeline — where every lock i is weighted by its estimated probability of actually becoming a loan.
And the namesake. Every fixed-rate borrower holds a free American option: the right to prepay — refinance — whenever rates drop. The investor who owns the mortgage is short that option. So as yields fall and an ordinary bond's price accelerates upward, the mortgage's price compresses: why pay 106 for a pool that will refinance away at 100? The price-yield curve bends the wrong way. Negative convexity.
An MBS is a bond minus a call option you sold to the homeowner. Valuing that option — prepayment modeling, OAS — is where the real quant headcount sits. One more model rounds out the room: best execution — for each closed loan, maximize the sale price over every exit: which investor, securitize vs. cash window, retain vs. release servicing.
Two platforms run this machine for most of the industry: Optimal Blue, the incumbent that touches a large share of all rate locks, and Polly, the cloud-native challenger. How hard would a rebuild be? Split the question into what is code, what is content, and what is network:
Coupon mapping, interpolation, public LLPA grids, a rules engine, margins. Table lookups and arithmetic. Some large lenders run in-house engines. One determined engineer: weeks, not years.
Hundreds of investor rate sheets and guideline overlays, ingested and normalized every morning, correctly, with liability when wrong. An operations franchise built over two decades — not a software problem at all.
Investors price where the lenders lock; lenders lock where the investors price. A two-sided marketplace with binding financial commitments flowing through it. The part money alone can't buy.
The asymmetry is the opportunity: the math is reproducible from public inputs — TBA-adjacent indices, published LLPA grids, FRED. What's locked up is distribution and content ops. So don't fight the network; serve the person it ignores.
❦ This chapter is no longer just a claim — it's a repository: github.com/s7vcengineering/convexity-machine — Layer 1 as a working, zero-dependency, test-covered pricing engine; Layers 2 and 3 as precise specifications; the whole thing run against a SOC 2-style control catalog, with exercises to rebuild each station yourself.
Every input on this page is public, and the build has begun: the open engine is on GitHub — tested, audited, and waiting for your pull request — alongside the rate-sheet machine.