AmortFixedCouponBond_y





http://www.QuantTools.com
CapeTools Bonds (Yield) function list

Welcome | Documentation format | QuantTools Groups | QuantTools Categories | Licence

Key TAGs | Excel Index | API Index



Creates an amortised fixed coupon bond object.

The bond takes as input the Bond's yield.

This yield will be used to discount the Bond flows.

A 'BondKey' string value will be returned on a successful creation of the bond object.

This string 'Key' value can then be passed to further bond functions for pricing or querying.



This function creates an object and returns a string-key value to represent this created object.
The TAG value of the string-key returned (second part of the key) is : "AFCBND_Y"



Note: Within Excel, the function is named - CT.BOND.AmortFixedCouponBond_y




High level graphic of AmortFixedCouponBond_y() function with parameters. Blue square node is the actual function with the parameters ordered.



Parameter Description


  1. Key parameter

    Key Handle to be used for the new Bond object.
  2. Reload parameter

    When creating this object for the first time, set this parameter to a positive value. Within Excel, when re-computing a worksheet where you do not wish to recreate the object, set this parameter to zero (0).
  3. Ccy parameter

    The currency code that you want to associate with the Bond.
  4. SettleDate parameter

    Settlement date of the Bond.
  5. datedDate parameter

    Dated date of the bond. Date on which the bond begins to accrue interest. If you enter 0 for this parameter (or leave it blank within Excel) the datedDate will be computed internally based on the maturity date and the settlement date.
  6. firstCouponDate parameter

    First Coupon Date: Date that the first coupon is paid (if bond does not have an odd first period, leave blank or enter 0). If entered, this date value must be greater than the Dated Date, but less than the 'penultCouponDate' and 'matDate' parameters.
  7. penultCouponDate parameter

    Penultimate Coupon Date: Date that the penultimate coupon is paid (if bond does not have an odd last period, leave blank or enter 0). If entered, this date value must be greater than the 'datedDate' and 'firstCouponDate' parameters, but less than the 'matDate' parameter.
  8. matDate parameter

    Maturity date of the bond.
  9. exDivTenor parameter

    The ex-dividend tenor. The tenor is composed of 2 parts. The first being a positive valued numeric amount, the second, the units of the numeric amount. Possible values for the units are 'BD' (for business days - ie 3BD), 'CD' (for calendar days - ie 5CD) and 'M' (for months - ie 3M). To specify no ex-dividend treatment, enter the value ('none')
  10. couponFreq parameter

    Coupon Frequency of the bond. Can use any of the Frequency codes contained within the 'CapeTools Frequency Enums' category of functions.
  11. BondDetails parameter

    A positive valued, three column [Notional/PrincipalPayments/Coupon] array. For the 'PrincipalPayments' column (2nd), Generally in the case where the 'Notional' (1st) column has been filled with amortised Notional values you indicate, (within the 'PrincipalPayments' column), the principal amounts that are to be paid to the holder of this contract during the life of the bond. In the case of amortised periods, this should be populated. Finally the 'coupon' (3rd) column holds the bond's coupons.
  12. exactCoupon parameter

    Whether (for non short or long period periods) coupon payments are equal (false) or exact (true). Equal coupons have a constant payment schedule throughout the life of the bond, while bonds with exact coupons have a variable payment schedule which depends on the number of days within each coupon period. Government Bonds tend to have equal coupon payments and thus this parameter will take on a value of 'false'.
  13. cpnDayCount parameter

    Coupon DayCounter to use for the bond coupon payments. If you wish for the coupon payment amounts for all coupon periods to be the same (excluding long and short coupon periods and assuming the same coupon rate for each period), specify a value of 'false' for the 'exactCoupon' parameter. Setting the 'exactCoupon' parameter to 'false' essentially overrides this parameter with the value 'simple' (indicating that the SimpleDayCounter will be used - see DCsimple() ).
  14. accDayCount parameter

    Accrued interest DayCounter to use for the bond. Used only for the computation of accrued interest.
  15. calKey parameter

    Key to an already constructed Calendar object. Used to adjust dates for holidays in the case of a true yield calculation method or where the 'exactCoupon' parameter has been set to true.
  16. BusDayConv parameter

    Business Day Convention to use.
  17. BondYield parameter

    The Bond's yield value.
  18. YieldMethod parameter

    Yield calculation convention for all coupon periods except when there is only one coupon period left to bond maturity (Bond's settlement date is greater or equal to the 'penultCouponDate' date). The value of this parameter consists of three parts (broken up via the colon parameter). The first part indicates the Yield calculation method, the second (optional) part, the dayCounter that the calculation will utilise and the third (optional) part the frequency of the Yield calculation method. Possible values for the first part are : 'Simple' (same as MoneyMarket - 1+r*t), 'Discount ( 1/(1 - r*t) )', 'JGB' (Japanese Government Bond Yield), 'ISMA' (Compounded via the 'CompoundFreq' frequency parameter), 'Moosmuller' (same as ISMA but the very first coupon uses the 'Simple' method calculation), 'Continuous'
    (for continuous compounding) or 'True' (Compounded via the 'CompoundFreq' frequency parameter, but uses adjusted bond dates (adjusted for weekends and holidays)). Possible values for the second (optional) part are any of the dayCounter codes present within the 'CapeTools DayCount Enums' category of functions. Possible values for the third (optional) part are any of the Frequency codes present within the 'CapeTools Frequency Enums' category of functions. For example, to specify a Yield calculation of ISMA, Actual360, specify a value of 'ISMA:Actual360' (case-insensitive). The frequency will default to the 'couponFreq' parameter. A full specification would be 'ISMA:Actual360:S' (case-insensitive). The minimum specification is just the yield method (ie - 'ISMA'). In the latter case, the DayCounter
    will default to the 'cpnDayCount' parameter and the frequency will default to the 'couponFreq' parameter. Once this object is built, you can request for other yield calculation combinations based on this bond object via the BondYield2() function.
  19. FCYieldMethod parameter

    Final Coupon Yield calculation convention for the last coupon paying period when there is only one coupon period left to bond maturity (Bond's settlement date is greater or equal to the 'penultCouponDate' date). The value of this parameter consists of three parts (broken up via the colon parameter). For further details, refer to the description given for the 'YieldMethod' parameter.


Extended information

Function Syntax

VB Syntax


String CTBonds_y.AmortFixedCouponBond_y( _
String Key, _
Long Reload, _
CCYEnum Ccy, _
Long SettleDate, _
Long datedDate, _
Long firstCouponDate, _
Long penultCouponDate, _
Long matDate, _
String exDivTenor, _
FreqEnum couponFreq, _
Variant BondDetails, _
Boolean exactCoupon, _
DayCountEnum cpnDayCount, _
DayCountEnum accDayCount, _
String calKey, _
BDCEnum BusDayConv, _
Double BondYield, _
String YieldMethod, _
String FCYieldMethod)


Excel Spreadsheet Syntax


=CT.BOND.AmortFixedCouponBond_y(
Excel String Cell Key,
Excel Numeric Cell Reload,
Excel String Cell Ccy,
Excel Numeric Cell SettleDate,
Excel Numeric Cell datedDate,
Excel Numeric Cell firstCouponDate,
Excel Numeric Cell penultCouponDate,
Excel Numeric Cell matDate,
Excel String Cell exDivTenor,
Excel String Cell couponFreq,
XLRange BondDetails,
Excel Boolean Value Cell exactCoupon,
Excel String Cell cpnDayCount,
Excel String Cell accDayCount,
Excel String Cell calKey,
Excel String Cell BusDayConv,
Excel Numeric Cell BondYield,
Excel String Cell YieldMethod,
Excel String Cell FCYieldMethod)


C++ Syntax


static std::string AmortFixedCouponBond_y(
std::string Key,
long Reload,
CCYEnum Ccy,
long SettleDate,
long datedDate,
long firstCouponDate,
long penultCouponDate,
long matDate,
std::string exDivTenor,
FreqEnum couponFreq,
CTRangeDataCPP BondDetails,
bool exactCoupon,
DayCountEnum cpnDayCount,
DayCountEnum accDayCount,
std::string calKey,
BDCEnum BusDayConv,
double BondYield,
std::string YieldMethod,
std::string FCYieldMethod);


DotNET Syntax


System.String CTBonds_ySA.AmortFixedCouponBond_y(
System.String Key,
System.Int32 Reload,
CTIEnums.CCYEnum Ccy,
System.Int32 SettleDate,
System.Int32 datedDate,
System.Int32 firstCouponDate,
System.Int32 penultCouponDate,
System.Int32 matDate,
System.String exDivTenor,
CTIEnums.FreqEnum couponFreq,
CTRangeData BondDetails,
System.Boolean exactCoupon,
CTIEnums.DayCountEnum cpnDayCount,
CTIEnums.DayCountEnum accDayCount,
System.String calKey,
CTIEnums.BDCEnum BusDayConv,
System.Double BondYield,
System.String YieldMethod,
System.String FCYieldMethod);

Parameter data types

ArgNameArgTypeIsKey
KeyStringFALSE
ReloadLongFALSE
CcyCCYEnumFALSE
SettleDateLongFALSE
datedDateLongFALSE
firstCouponDateLongFALSE
penultCouponDateLongFALSE
matDateLongFALSE
exDivTenorStringFALSE
couponFreqFreqEnumFALSE
BondDetailsRangeFALSE
exactCouponBooleanFALSE
cpnDayCountDayCountEnumFALSE
accDayCountDayCountEnumFALSE
calKeyStringTRUE
BusDayConvBDCEnumFALSE
BondYieldDoubleFALSE
YieldMethodStringFALSE
FCYieldMethodStringFALSE


Example Inputs

The first column represents the name of the parameters. The second column specifies whether the parameters are optional or not. Finally the last column provides some sample input data.
Function call input string-keys are always in the format : "NAME.EXTTAG.TICKER" The "EXTTAG.TICKER" part is determined from the output of other, capetools, object creation functions.


ArgNameIsOptional (Excel only)Example
KeyFALSEMyAmortFixedCouponBond_y
ReloadFALSE1
CcyFALSEEUR
SettleDateFALSE19/Jul/2005 (serial date type)
datedDateTRUE21/Apr/2005 (serial date type)
firstCouponDateTRUE0
penultCouponDateTRUE0
matDateFALSE21/Apr/2015 (serial date type)
exDivTenorFALSE3BD
couponFreqFALSES
BondDetailsFALSEAmortFixedCouponBond_y_BondDetails_Range (creates a range object)
exactCouponFALSEfalse
cpnDayCountFALSE30360
accDayCountFALSE30360
calKeyFALSEcalKeyNAME.EXTTAG.TICKER (from a function call)
BusDayConvFALSEModifiedFollowing
BondYieldFALSE0.055
YieldMethodFALSEISMA:30360
FCYieldMethodFALSESimple:Actual360


Example range for parameter : BondDetails

Within Excel, a range such as this can be passed directly into the BondDetails parameter.

10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
10000.05
1001000.05

Example C# API usage for setting the range data for parameter : BondDetails



CTQL.CTRangeData AmortFixedCouponBond_y_BondDetails = new CTQL.CTRangeData();

System.Text.StringBuilder AmortFixedCouponBond_y_BondDetails_builder =
new System.Text.StringBuilder(100);

AmortFixedCouponBond_y_BondDetails_builder.Append("{");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 0	 | 0.05 ;");
AmortFixedCouponBond_y_BondDetails_builder.Append("100	 | 100	 | 0.05");
AmortFixedCouponBond_y_BondDetails_builder.Append("}");

// Parse the string into the Range object.
AmortFixedCouponBond_y_BondDetails.RangeFromStr( AmortFixedCouponBond_y_BondDetails_builder.ToString() );



Example function usage


The C# example below contains all the sub-function calls leading up to this function call. As a result, the example can contain a lot of code.

The VB.NET, J#, C++.NET, Java, Excel VBA, Visual Basic 6 (via COM) and C++ examples below contain function code stubs for the calls leading up to this function call. However, the function call for this function is displayed.
You can easily reproduce the stub functions code from the C# example.


If you are accessing this functrion via the MiniXL libraries, this function is present within the CT.QL.Bonds20 MiniXL Excel Addin.

Within our Excel Example Addin Generator, we have used the following QuantTools sub-functions in order to prepare the arguments needed to call the AmortFixedCouponBond_y() function. If you are executing this function via the MiniXL libraries, the module addin name, (in brackets, to the right of the sub-functions listed below), indicates the MiniXL library in which the sub-function is held. You will need to load this library into your Excel session (along with any other libraries that the sub-function call within the addin requires (ie - CT.QT.Utils20 addin in almost all cases) in order for the example to compute successfully.

These are the financial QuantTools sub-function calls that are used within the examples :





The objects generated by these sub-functions are inter-connected in the following way :




The following four examples demostrate calling this function within a Microsoft .NET environment

The following four examples demostrate calling this function within a non .NET environment

The following is a sample output from executing the AmortFixedCouponBond_y() function call


MyAmortFixedCouponBond_y_2.AFCBND_Y.0

Copyright (c) 2003-2007 CapeTools - All Rights Reserved.