Derivatives, One Step at a Time

Bootstrap discount factors from market prices

Loading Java…

Bootstrap discount factors from market prices

Earlier lessons supplied a zero curve as an input. A trading desk instead sees prices of instruments with several cash flows and must infer a consistent curve. Start with the shortest instrument, solve one new discount factor at a time, and verify that the curve actually prices what was used to build it.

Predict the result, run the standalone calculation, then make any requested edit before answering. Each exercise retains its own stated inputs. Enter numeric answers without units and round to two decimals unless four are requested. Code is provided to explore the finance; no new Java syntax is required.

How does a bootstrap recover discount factors?

A bootstrap solves the shortest available maturity first and reuses known discount factors to isolate the next unknown. All instruments here belong to the same fictional certain-payment currency/discounting model; mixing sovereign, risky and differently collateralized prices without adjustments would break that assumption.

Calibration instrumentStated quote and dated cash flows
One-year depositInvest 100 now; receive 104 at year one
Two-year annual coupon bondPrice 99; receive 4 at year one and 104 at year two
Three-year annual coupon bondPrice 100; receive 5 at years one and two, and 105 at year three
D(1)=100104D(2)=99−4D(1)104D(3)=100−5D(1)−5D(2)105\begin{aligned}D(1)&=\frac{100}{104}\\D(2)&=\frac{99-4D(1)}{104}\\D(3)&=\frac{100-5D(1)-5D(2)}{105}\end{aligned}

These factors are dimensionless. Prices are on coupon dates so no accrued-interest adjustment is needed in this simplified construction.

A useful curve must reprice each calibration instrument, not only generate smooth-looking rates. Retain precision in solved factors and inspect residuals in price units. In real data, bid/ask, noise and incompatible instruments may require a fitting objective instead of forcing exact equality.

For a point between known dates, this lesson stipulates linear interpolation of log discount factors. At 1.5 years, log⁡D(1.5)=log⁡D(1)+log⁡D(2)2\log D(1.5)=\frac{\log D(1)+\log D(2)}{2}, so D(1.5)D(1.5) is their geometric mean. This keeps factors positive and implies a constant continuous forward rate between these two points; other interpolation rules produce different intermediate prices.

Do not extrapolate beyond the last calibrated maturity without another explicit assumption. A negative discount factor cannot price a certain positive future dollar in this model. A positive factor above one, or a rise between two dates, is not automatically invalid when negative interest rates are permitted.

Scenario and assumptions

Use one currency, annual coupons, certain payments, no fees/default/taxes and dates exactly at year boundaries. Deposit interest is 4% simple over its one-year term, giving the stated 104 repayment. Instruments have the same valuation basis. The 1.5-year factor is an interpolation assumption, not a separately observed quote. Each cell writes the prior solved factors algebraically so it can run independently without hidden notebook state.

Exercise 1 — Start with the single-payment instrument

A deposit exchanges 100 today for 104 in one year. The factor D(1)D(1) must turn 104 back into 100. Use floating-point division in the provided calculation. This is simpler than guessing a zero rate and then iterating toward a known price.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is D(1), to four decimals?

Need a hint?

Keep dates, currency, quotation and units explicit. Round only the final answer to 4 decimal places.

Waiting for your answer.

Exercise 2 — Isolate the next bond’s final payment

The two-year bond price is 99. Its first coupon is already worth 4D(1)4D(1). Remove that known present value, leaving the price of the final 104 payment. Divide by 104 to obtain D(2)D(2). Do not apply the deposit’s rate unchanged for another year unless the data imply it.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is D(2), to four decimals?

Need a hint?

Keep dates, currency, quotation and units explicit. Round only the final answer to 4 decimal places.

Waiting for your answer.

Exercise 3 — Add the third maturity

The three-year bond costs 100 and pays 5, 5 and 105. Subtract the present values of the first two coupons using the already solved factors, then divide by the final 105. The year-three coupon is inside 105; do not omit it or subtract it twice.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is D(3), to four decimals?

Need a hint?

Keep dates, currency, quotation and units explicit. Round only the final answer to 4 decimal places.

Waiting for your answer.

Read the picture

A one-year deposit gives D(1) = 0.961538; coupon-bond prices then isolate D(2) = 0.914941 and D(3) = 0.863025.

A one-year deposit gives D(1)=0.961538D(1)=0.961538; coupon-bond prices then isolate D(2)=0.914941D(2)=0.914941 and D(3)=0.863025D(3)=0.863025.

The illustration is a fixed worked example. Editing a calculation does not update it.

Exercise 4 — Measure the error from premature rounding

Suppose someone stores D(1)D(1) as 0.9615 and D(2)D(2) as 0.9149 rather than keeping their exact solved values. Reprice the two-year bond with those rounded factors and subtract its 99 input price. A two-decimal display can hide the residual, so report four decimals.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is the rounded-input repricing residual, to four decimals?

Need a hint?

Keep dates, currency, quotation and units explicit. Round only the final answer to 4 decimal places.

Waiting for your answer.

Exercise 5 — Interpolate a factor between observed maturities

At 1.5 years, use the midpoint of log⁡D(1)\log D(1) and log⁡D(2)\log D(2). Exponentiating gives their geometric mean. The factor is positive and between its endpoints in this particular positive-rate example. Interpolating zero yields or discount factors directly would be a different assumption.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

What is the interpolated D(1.5), to four decimals?

Need a hint?

Keep dates, currency, quotation and units explicit. Round only the final answer to 4 decimal places.

Waiting for your answer.

Exercise 6 — Rebuild when a calibration price changes

Price a certain 1,000 payment at 1.5 years using that interpolated factor. Run the baseline, then change the two-year bond’s price from 99 to 98 inside the expression. Keep the deposit quote fixed. This changes D(2)D(2) and the interpolated factor; a complete rebuilt curve would also recompute later D(3)D(3).

In [ ]:
Java
CHECK YOUR UNDERSTANDING · WRITE AN ANSWER

After changing the two-year price to 98, what is the 1.5-year payment worth?

Need a hint?

Keep dates, currency, quotation and units explicit. Round only the final answer to 2 decimal places.

Waiting for your answer.

Read the picture

The exact curve reprices the deposit and both bonds; log-linear interpolation gives D(1.5) = 0.937950, while rounded factors leave a price residual.

The exact curve reprices the deposit and both bonds; log-linear interpolation gives D(1.5)=0.937950D(1.5)=0.937950, while rounded factors leave a price residual.

The illustration is a fixed worked example. Editing a calculation does not update it.

Exercise 7 — Reject an impossible solved factor for this model

For a separate bad-input diagnostic, set the two-year bond price to just 3 while keeping its positive 4/104 cash flows and the same D(1)D(1). Its first coupon alone is worth more than 3, leaving a negative implied D(2)D(2). Distinguish this failure from a positive factor rising because of a negative forward rate.

In [ ]:
Java
CHECK YOUR UNDERSTANDING · CHOOSE ONE

What is the appropriate diagnosis?

Need a hint?

Choose the statement consistent with the stated instrument, date convention and valuation assumptions.

Waiting for your answer.

Remember

Bootstrap known cash flows in maturity order and reprice every input. Keep full precision, declare interpolation and avoid silent extrapolation. Distinguish impossible negative discount factors from valid negative-rate behavior. A smooth curve is not enough if it cannot reproduce its calibration prices on a consistent valuation basis.

Keyboard shortcuts

Press Esc to enter cell command mode. Then use the keys below. Press Enter to edit again.

A
In command mode: insert a Java cell above the selected cell.
B
In command mode: insert a Java cell below the selected cell.
D, D
In command mode: press D twice within one second to delete the selected cell. Runtime variables remain until kernel restart.
Z
In command mode: undo the last cell deletion.
Shift + Enter
Run code, check a quiz answer, or advance past Markdown; then select the next cell.
Tab
Move focus to the next control or cell.
Shift + Tab
Move focus to the previous control or cell.
Enter
Edit the selected cell in command mode; check an answer when a quiz input is focused, or activate a focused button.
Esc
Enter cell command mode, or close this popup when it is open.