Inputs
Exports
CSV includes the cash flow table. PDF captures the summary, chart, and tables below.
Formulas Used
Bond Pricing Equation
Price = Σt=1..N [ C / (1 + y/f)^t ] + F / (1 + y/f)^N where: C = F × coupon_rate / f F = face value y = annual yield to maturity (APR, compounded f times per year) f = payments per year N = total number of periods = years × f
Root Finding
We solve for y by finding r = y/f such that f(r) = PV(r) − Price = 0, using a robust bracketed bisection method that supports negative yields.
Duration (Macaulay)
D = ( Σ t × PV(CFt) ) / Price ÷ f (in years) Modified duration = D / (1 + y/f)
Results
All values rounded to 6 decimals where applicable
Annual YTM (APR)
—
Effective Annual Yield
—
Macaulay Duration (yrs)
—
Modified Duration
—
Price vs Yield Curve
Cash Flow Table
— periods
| Period | Coupon | Principal | Cash Flow | Discount Factor | Present Value |
|---|---|---|---|---|---|
| Total PV | — | ||||
Example Bonds
| Label | Price | Face | Coupon % | Years | Freq | YTM (APR) | EAY |
|---|---|---|---|---|---|---|---|
| Example A | 950 | 1000 | 5 | 5 | 2 | — | — |
| Example B | 1020 | 1000 | 6 | 10 | 2 | — | — |
| Example C | 800 | 1000 | 3 | 15 | 2 | — | — |
| Zero Coupon | 900 | 1000 | 0 | 3 | 2 | — | — |