Excel workbook · Catalog edition 2016
Bond Price and Yield Calculator — National Taiwan University (Prof. Jr-Yan Wang)
National Taiwan University (Prof. Jr-Yan Wang)
Prices a fixed-coupon bond from maturity, coupon rate, yield, par value and payment frequency, or solves the yield that matches a given price.
- Inputs
- 6
- Outputs
- 4
- File size
- 8 KB
- Verification
- Independent scenario check
Try it
Try it loads a copy of this file from formualizer.com.
Saved workbook valuesInputOutput
| Row | A | B |
|---|---|---|
| 1 | time to maturity (in 0.5 years) | 10 |
| 2 | annual coupon rate | 8.00% |
| 3 | discount interest rate | 43.47% |
| 4 | par value | 100 |
| 5 | number of coupon payments per year (1 or 2) | 2 |
| 6 | Bond Price | 20 |
Worked example
Sample calculation from bundle scenario par_bond (flow price_with_check_table).
| Example input | Value |
|---|---|
| Time to maturity years | 10 |
| Annual coupon rate | 6.00% |
| Discount interest rate | 6.00% |
| Par value | 1,000 |
| Payment frequency | 2 |
| Calculated output | Result |
|---|---|
| Bond price | 1,000 |
| Periodic coupon payment | 30 |
| Check sheet price 20 payments | 1,000 |
Edition and parity provenance
Changed-input scenarios match an independent calculation.
- Catalog edition
- 2016
- Workbook scope
- 41 formulas across 2 sheets
- Parity verification
- Independent scenario check · 8 checked scenarios · Runs in browser
- Source and parity checked
- 2026-11-22
Scope and limitations
Catalog calculations, not certification.
Try it uses Formualizer’s JavaScript port of the workbook’s VBA macro to calculate price and yield.
The edition is the file's last-modified year, not a confirmed publication date.
The file properties give a last-modified date of 2016-09-18.
- The yield search covers 0 to 1 (0% to 100%) and stops when the bracket is narrower than 0.00000001; a price outside that range returns an error.
- The check-table price assumes exactly 20 coupon payments.
- The sheet labels maturity as “in 0.5 years”; the macro multiplies it by payments per year, so the catalog treats it as years.
- The workbook calculates price and yield in a VBA macro behind a button. The runtime runs a JavaScript port of that macro, which writes the price or the solved yield to the cell the macro writes.
- Price and yield come from Formualizer’s JavaScript port of the workbook’s VBA macro; the macro itself does not run.
What it computes
Ports for the compact flow: price_bond. The full port contract includes all 10 ports.
Inputs (5)
| Port / description | Type / constraints / default |
|---|---|
time_to_maturity_yearsTime to maturity in years | Type: number Constraints: min: 0.5; max: 100 Default: 10 |
annual_coupon_rateAnnual coupon rate as a decimal (0.08 is 8%) | Type: number Constraints: min: 0; max: 1 Default: 0.08 |
discount_interest_rateAnnual discount rate (yield) as a decimal | Type: number Constraints: min: 0; max: 1 Default: 0.4347129575908184 |
par_valuePar (face) value | Type: number Constraints: min: 0 Default: 100 |
payment_frequencyCoupon payments per year (1 or 2) | Type: integer Constraints: min: 1; max: 2 Default: 2 |
Outputs (1)
| Port / description | Type / constraints / default |
|---|---|
bond_priceBond price: discounted coupons plus discounted par | Type: number |
Questions this workbook answers
- What is the price of a 10-year semiannual 6% coupon bond at a 6% yield?
- What yield to maturity does a bond price imply?
- How does payment frequency change a bond's price?
Questions and answers
How is the bond price calculated?
Each coupon is discounted at the yield divided by the payments per year, and the par value is discounted over the full number of payments; the price is the sum.
How is the yield solved?
By bisection: the search starts between 0 and 1 and halves the bracket until it is narrower than 0.00000001.
Does the original macro run?
No. The workbook computes these results in a VBA macro behind a button; the catalog runs a JavaScript port of that macro on a copy of the file with the macro and button removed.
For agents
Connect an MCP client to the catalog endpoint:
https://catalog.formualizer.com/v1/mcpSlug: bond-price-yield · Edition: 2016
- search_workbooks
- Optional arguments: query (string), theme (string), tag (string).
- inspect_workbook
- Required: slug (string). Optional: edition (string), flow (string).
- evaluate_workbook
- Required: slug (string), inputs (object). Optional: edition (string), flow (string), cellOverrides (object), selectCells (array of strings), trace (boolean).
{
"name": "evaluate_workbook",
"arguments": {
"slug": "bond-price-yield",
"edition": "2016",
"flow": "price_with_check_table",
"inputs": {
"time_to_maturity_years": 10,
"annual_coupon_rate": 0.06,
"discount_interest_rate": 0.06,
"par_value": 1000,
"payment_frequency": 2
}
}
}cellOverrides sets individual cells. selectCells reads at most 256 cells per request. trace requests formula lineage.
Flows
price_bond
Price a bond from its yield
Discount the coupons and par value at the given yield.
5 input ports · 1 output ports. Full membership in the port contract.
price_with_check_table
Price a bond and compare with the check table
Price the bond and also return the coupon per period and the workbook's 20-payment check-table price.
5 input ports · 3 output ports. Full membership in the port contract.
solve_yield
Solve the yield from a price
Find the yield between 0 and 1 that reproduces the given price.
5 input ports · 1 output ports. Full membership in the port contract.
REST example
Bundle scenario: par_bond · Flow: price_with_check_table
curl 'https://catalog.formualizer.com/v1/models/bond-price-yield/2016/evaluate?flow=price_with_check_table' \
-H 'Content-Type: application/json' \
--data '{"inputs":{"time_to_maturity_years":10,"annual_coupon_rate":0.06,"discount_interest_rate":0.06,"par_value":1000,"payment_frequency":2}}'Expected response
Expected values from the bundle, subject to the check level above.
{
"outputs": {
"bond_price": 1000,
"periodic_coupon_payment": 30,
"check_sheet_price_20_payments": 1000
}
}Looking for another spreadsheet? Request a workbook.