Fixed Income Bond Related Functions
About 2 min
Fixed Income Bond Related Functions
Visit the Mathema Option Pricing System for foreign exchange options and structured product valuation!
Construction Functions
Excel: =McpFixedRateBond(args1, args2, args3, args4, args5, fmt='VP')
Python: McpFixedRateBond(*args)
- Function: Constructs a fixed-rate bond object.
- Parameters:
args1-args5 or *args: Parameter groups, including the following specific parameters:SettlementDate: Settlement date (data type: date).MaturityDate: Maturity date (data type: date).Frequency: Payment frequency (data type: enumeration).Coupon: Coupon rate (data type: float).CouponType: Coupon type (data type: enumeration).ValueDate: Value date (data type: date).IssuePrice: Issue price (data type: float).
fmt: Parameter group format (default is'VP'),Excel-specific parameters.
- Returns: FixedRateBond object.
Server-side functions
Excel: =McpFixedRateBonds2(identifiers, settlement_date)
- Function: Constructor for server-side bond objects.
- Parameters:
identifiers: Bond identifier code(s).settlement_date: Settlement date.
- Returns: A bond object for subsequent calculations.
Excel: =McpGet1(identifiers, key)
- Function: Retrieves the latest transaction price of bonds by their codes on the server side.
- Parameters:
identifiers: Bond codes.key: The value for the latest transaction price islastest.
- Returns: The latest transaction price of the specified bonds.
Utility Functions
Excel: =FrbCleanPriceFromYieldCHN(bond, yld, compounding, settleDateAdjust)
- Function: Calculates the clean price (theoretical price) of the bond based on the yield (YTM).
- Parameters:
bond: FixedRateBond object.yld: Yield.compounding: Whether to use continuous compounding (truefor continuous, otherwise discrete).settleDateAdjust: Purpose not explicitly stated.
- Returns: Clean price.
Excel: =FrbDirtyPriceFromYieldCHN(bond, yld, compounding)
- Function: Calculates the dirty price (theoretical price) of the bond based on the yield (YTM).
- Parameters:
bond: FixedRateBond object.yld: Yield.compounding: Whether to use continuous compounding (truefor continuous, otherwise discrete).
- Returns: Dirty price.
Excel: =FrbPrice(bond, curve)
- Function: Calculates the dirty price (theoretical price) of the bond based on the yield curve.
- Parameters:
bond: FixedRateBond object.curve: Yield curve.
- Returns: Dirty price.
Excel: =FrbDurationCHN(bond, yld)
- Function: Calculates the Macaulay duration of the bond based on the yield (YTM).
- Parameters:
bond: FixedRateBond object.yld: Yield.
- Returns: Macaulay duration.
Excel: =FrbMDurationCHN(bond, yld)
- Function: Calculates the modified duration of the bond based on the yield (YTM).
- Parameters:
bond: FixedRateBond object.yld: Yield.
- Returns: Modified duration.
Excel: =FrbConvexityCHN(bond, yld)
- Function: Calculates the convexity of the bond based on the yield (YTM).
- Parameters:
bond: FixedRateBond object.yld: Yield.
- Returns: Convexity.
Excel: =FrbPVBPCHN(bond, yld)
- Function: Calculates the PVBP (Price Value of a Basis Point) of the bond based on the yield (YTM).
- Parameters:
bond: FixedRateBond object.yld: Yield.
- Returns: PVBP.
Excel: =FrbYieldFromDirtyPriceCHN(bond, dirtyPrice, compounding)
- Function: Calculates the yield of the bond based on its dirty price.
- Parameters:
bond: FixedRateBond object.dirtyPrice: Dirty price.compounding: Whether to use continuous compounding (truefor continuous, otherwise discrete).
- Returns: Yield.
Excel: =FrbFairValue(bond, curve)
- Function: Calculates the fair yield of the bond based on the yield curve.
- Parameters:
bond: FixedRateBond object.curve: Yield curve.
- Returns: Fair yield.
Excel: =FrbGSpread(bond, yld, curve)
- Function: Calculates the G-Spread of the bond based on the yield curve.
- Parameters:
bond: FixedRateBond object.yld: YTM yield.curve: Yield curve.
- Returns: G-Spread.
Excel: =FrbZSpread(bond, yld, curve)
- Function: Calculates the Z-Spread of the bond based on the yield curve.
- Parameters:
bond: FixedRateBond object.yld: YTM yield.curve: Yield curve.
- Returns: Z-Spread.
