Calculates the bond prices for different coupon rates and years to maturity. The bond price is the present value of the bond’s future cash flows, which includes the coupon payments and the par value of the bond at maturity. The bond price is calculated using the following formula:

\[\text{Bond Price} = (C / r) \cdot (1 - (1 + r) ^{-n}) + F / (1 + r) ^{n}\]

where:

  • C = Coupon payment per period
  • r = Yield to maturity per period
  • n = Number of periods
  • F = Face value of the bond

The bond price is used to determine the fair value of the bond and to compare the bond’s price to its market price to determine if the bond is overvalued or undervalued.

Also known as: PV, bond pricing, discounted cash flows.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Present Value for you. Just ask in plain English.

Calculate the Present Value in Python

The Present Value is available in the Fixed Income module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_present_value as shown below.

from financetoolkit import FixedIncome

fixedincome = FixedIncome()

fixedincome.get_present_value(
    coupon_rate=[0.03, 0.05, 0.07],
    years_to_maturity=[5, 10, 15],
    show_input_info=False,
)

Which returns:

Coupon Rate 5 10 15
0.03 80.04 66.45 57.2
0.05 88.02 79.87 74.32
0.07 96.01 93.29 91.44

Parameters

get_present_value accepts the following parameters:

  • par_value (float): The par value (face value) of the bond.
  • coupon_rate (float, optional): The coupon rate of the bond. If not provided, a range of coupon rates will be used.
  • years_to_maturity (float, optional): The years to maturity of the bond in years. If not provided, a range of years to maturity will be used.
  • yield_to_maturity (float, optional): The yield to maturity of the bond. Defaults to 0.08.
  • frequency (int, optional): The frequency of coupon payments per year. Defaults to 1.
  • show_input_info (bool, optional): Whether to display input information. Defaults to True.

The Fixed Income module page introduces the module, and the sidebar lists all of its functions.

Share