STEPCF
Updated 2023-10-05 16:11:00.287000
Syntax
SELECT * FROM [westclintech].[wct].[STEPCF](
<@Settlement, datetime,>
,<@Maturity, datetime,>
,<@Steps, nvarchar(max),>
,<@Yield, float,>
,<@Redemption, float,>
,<@Frequency, float,>
,<@Basis, nvarchar(4000),>
,<@Issue, datetime,>
,<@FirstCoupon, datetime,>
,<@LastCoupon, datetime,>)
Description
Use the table-valued function STEPCF to return the cash flows of a stepped-rate bond. Stepped-rate bonds have different interest rates for different coupon periods and may even have a zero-rate period, usually at the commencement of the bond.
The first row in the resultant table is dated with settlement date passed into the function and is for the amount of the accrued interest. All the remaining rows are dated for the subsequent coupon dates and the amounts are the coupon amount. The row for the maturity date includes the coupon amount and the redemption amount.
The resultant table also includes the discount factor for each period as well as the discounted cash flow value for each period. The sum of the discounted cash flow values across all the periods is equal to the clean price of the bond.
Arguments
@FirstCoupon
the first coupon date of the bond. The period from the issue date until the first coupon date defines the odd interest period. All subsequent coupon dates are assumed to occur at regular periodic intervals as defined by @Frequency. @FirstCoupon is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Basis
is the type of day count to use. @Basis is an expression of the character string data type category.
{"columns":[{"field":"@Basis","width":305},{"field":"Day count basis","width":270}],"rows":[{"@Basis":"0 , 'BOND'","Day count basis":"US (NASD) 30/360"},{"@Basis":"1 , 'ACTUAL'","Day count basis":"Actual/Actual"},{"@Basis":"2 , 'A360'","Day count basis":"Actual/360"},{"@Basis":"3 , 'A365'","Day count basis":"Actual/365"},{"@Basis":"4 , '30E/360 (ISDA)' , '30E/360' , 'ISDA' , '30E/360 ISDA' , 'EBOND'","Day count basis":"European 30/360"},{"@Basis":"5 , '30/360' , '30/360 ISDA' , 'GERMAN'","Day count basis":"30/360 ISDA"},{"@Basis":"6 , 'NL/ACT'","Day count basis":"No Leap Year/ACT"},{"@Basis":"7 , 'NL/365'","Day count basis":"No Leap Year /365"},{"@Basis":"8 , 'NL/360'","Day count basis":"No Leap Year /360"},{"@Basis":"9 , 'A/365'","Day count basis":"Actual/364"},{"@Basis":"10 , 'BOND NON-EOM'","Day count basis":"US (NASD) 30/360 non-end-of-month"},{"@Basis":"11 , 'ACTUAL NON-EOM'","Day count basis":"Actual/Actual non-end-of-month"},{"@Basis":"12 , 'A360 NON-EOM'","Day count basis":"Actual/360 non-end-of-month"},{"@Basis":"13 , 'A365 NON-EOM'","Day count basis":"Actual/365 non-end-of-month"},{"@Basis":"14 , '30E/360 NON-EOM' , '30E/360 ICMA NON-EOM' , 'EBOND NON-EOM'","Day count basis":"European 30/360 non-end-of-month"},{"@Basis":"15 , '30/360 NON-EOM' , '30/360 ISDA NON-EOM' , 'GERMAN NON-EOM'","Day count basis":"30/360 ISDA non-end-of-month"},{"@Basis":"16 , 'NL/ACT NON-EOM'","Day count basis":"No Leap Year/ACT non-end-of-month"},{"@Basis":"17 , 'NL/365 NON-EOM'","Day count basis":"No Leap Year/365 non-end-of-month"},{"@Basis":"18 , 'NL/360 NON-EOM'","Day count basis":"No Leap Year/360 non-end-of-month"},{"@Basis":"19 , 'A/365 NON-EOM'","Day count basis":"Actual/364 non-end-of-month"}]}
@Frequency
the number of coupon payments per year. For annual payments, @Frequency = 1; for semi-annual, @Frequency = 2; for quarterly, @Frequency = 4; for bi-monthly, @Frequency = 6; for monthly, @Frequency = 12. For bonds with @Basis = 'A/364' or 9, you can enter 364 for payments made every 52 weeks, 182 for payments made every 26 weeks, 91 for payments made every 13 weeks, 28 for payments made every 4 weeks, 14 for payments made every 2 weeks, and 7 for weekly payments. @Frequency is an expression of type float or of a type that can be implicitly converted to float.
@Yield
the bond’s yield. @Yield is an expression of type float or of a type that can be implicitly converted to float.
@Issue
the issue date of the bond; the date from which the bond starts accruing interest. @Issue is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Settlement
the settlement date of the bond. @Settlement is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Steps
an SQL statement which when executed will return the dates and rates associated with the step periods. The dates are the beginning of the coupon period is which the rate becomes effective. The rates are the annual coupon rates.
@Maturity
the maturity date of the bond. @Maturity is an expression that returns a datetime or smalldatetime value, or a character string in date format.
@Redemption
the bond’s redemption value. Since the coupon amounts are calculation using a face amount of 100 the redemption value should be entered in relation to a 100 face value. @Redemption is an expression of type float or of a type that can be implicitly converted to float.
@LastCoupon
the last coupon date of the bond prior to the maturity. The period from the last interest date until the maturity date defines the odd interest period. All coupon dates from @FirstCoupon to @LastCoupon are assumed to occur at regular periodic intervals as defined by @Frequency. @LastCoupon is an expression that returns a datetime or smalldatetime value, or a character string in date format.
Return Type
table
{"columns": [{"field": "colName", "headerName": "Name", "header": "name"}, {"field": "colDatatype", "headerName": "Type", "header": "type"}, {"field": "colDesc", "headerName": "Description", "header": "description", "minWidth": 1000}], "rows": [{"id": "c4c10b59-75ed-4d6e-bd29-4dd6e2b30f37", "colName": "date_pmt", "colDatatype": "datetime", "colDesc": "Date of the cash flow."}, {"id": "711d8d6b-9a2b-4ae3-ad3b-f5ed5e742971", "colName": "amt_cashflow", "colDatatype": "float", "colDesc": "Amount of the cash flow."}, {"id": "08c3dd58-af6c-4824-bcd7-3dc219b8a941", "colName": "N", "colDatatype": "float", "colDesc": "\t Number of coupons from the settlement date to date_pmt."}, {"id": "5c52692a-208a-41f2-a133-9560aeb64398", "colName": "PVF", "colDatatype": "float", "colDesc": "Present value factor"}, {"id": "17e70fd1-b034-4940-ac84-fda85518df5d", "colName": "PVCF", "colDatatype": "float", "colDesc": "\t Present value of the cash flow; PVF * amt_cashflow."}, {"id": "e238ee5d-a9d7-43c1-b90d-4adca56ea9bd", "colName": "cumPVCF", "colDatatype": "float", "colDesc": "Sum of the PVCF."}]}
Remarks
If @Settlement is NULL then @Settlement = GETDATE().
If @Step is NULL or returns no rows then0 is used.
If @Redemption is NULL then @Redemption = 100.
If @Frequency is NULL then @Frequency = 2.
If @Basis is NULL then @Basis = 1.
If @Maturity <= @Settlement then no rows are returned.
If @Frequency invalid STEPCF returns an error.
If @Basis invalid (see above list), STEPCF returns an error.
If @Maturity is NULL then no rows are returned.
To calculate the cash flows for a bond paying regular periodic interest just enter @Maturity and @Settlement.
To calculate the cash flows for bond with an odd first coupon where the settlement date is before the first coupon date, enter @Issue, @FirstCoupon, @Settlement, and @Maturity. If the settlement date is on or after the first coupon date just enter @Maturity and @Settlement.
To calculate the cash flows for a bond with an odd last coupon enter @LastCoupon, @Settlement, and @Maturity.
To calculate the cash flows for bond with an odd first coupon and an odd last coupon where the settlement date is before the first coupon date, enter @Issue, @FirstCoupon, @LastCoupon, @Settlement, and @Maturity. If the settlement date is on or after the first coupon date just enter @LastCoupon, @Maturity and @Settlement.
Examples
Example #1
In this example we generate the cash flows for bond maturing on 2034-06-15. The settlement date is 2014-05-01, the yield is 2.76%. The coupon is paid twice-yearly, the redemption value is 100 and the day-count convention is actual/actual. The step-rate schedule is passed in using a derived table.
SELECT *
FROM wct.STEPCF( '2014-05-01', --@Settlement
'2034-06-15', --@Maturity
'SELECT
*
FROM (VALUES
(''2029-12-15''' + ', .015),
(''2024-12-15''' + ', .014),
(''2020-12-15''' + ', .013),
(''2016-12-15''' + ', .012),
(''2012-12-15''' + ', .011)
)n(date_step, rate_step)',
--@Step
0.0276, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
NULL, --@Issue
NULL, --@FirstCoupon
NULL --@LastCoupon
);
This produces the following result.
{"columns":[{"field":"date_pmt","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"amt_cashflow","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"N","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"cumPVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"date_pmt":"2014-05-01 00:00:00.000","amt_cashflow":"-0.414010989010989","N":"0","PVF":"1","PVCF":"-0.414010989010989","cumPVCF":"-0.414010989010989"},{"date_pmt":"2014-06-15 00:00:00.000","amt_cashflow":"0.55","N":"0.247252747252747","PVF":"0.996616976475482","PVCF":"0.548139337061515","cumPVCF":"0.134128348050526"},{"date_pmt":"2014-12-15 00:00:00.000","amt_cashflow":"0.55","N":"1.24725274725275","PVF":"0.983050874408643","PVCF":"0.540677980924754","cumPVCF":"0.67480632897528"},{"date_pmt":"2015-06-15 00:00:00.000","amt_cashflow":"0.55","N":"2.24725274725275","PVF":"0.969669436189231","PVCF":"0.533318189904077","cumPVCF":"1.20812451887936"},{"date_pmt":"2015-12-15 00:00:00.000","amt_cashflow":"0.55","N":"3.24725274725275","PVF":"0.956470148144833","PVCF":"0.526058581479658","cumPVCF":"1.73418310035901"},{"date_pmt":"2016-06-15 00:00:00.000","amt_cashflow":"0.55","N":"4.24725274725275","PVF":"0.943450530819523","PVCF":"0.518897791950738","cumPVCF":"2.25308089230975"},{"date_pmt":"2016-12-15 00:00:00.000","amt_cashflow":"0.55","N":"5.24725274725275","PVF":"0.930608138508111","PVCF":"0.511834476179461","cumPVCF":"2.76491536848921"},{"date_pmt":"2017-06-15 00:00:00.000","amt_cashflow":"0.6","N":"6.24725274725275","PVF":"0.917940558796717","PVCF":"0.55076433527803","cumPVCF":"3.31567970376724"},{"date_pmt":"2017-12-15 00:00:00.000","amt_cashflow":"0.6","N":"7.24725274725275","PVF":"0.905445412109604","PVCF":"0.543267247265762","cumPVCF":"3.85894695103301"},{"date_pmt":"2018-06-15 00:00:00.000","amt_cashflow":"0.6","N":"8.24725274725275","PVF":"0.893120351262186","PVCF":"0.535872210757311","cumPVCF":"4.39481916179032"},{"date_pmt":"2018-12-15 00:00:00.000","amt_cashflow":"0.6","N":"9.24725274725275","PVF":"0.880963061020108","PVCF":"0.528577836612065","cumPVCF":"4.92339699840238"},{"date_pmt":"2019-06-15 00:00:00.000","amt_cashflow":"0.6","N":"10.2472527472527","PVF":"0.86897125766434","PVCF":"0.521382754598604","cumPVCF":"5.44477975300099"},{"date_pmt":"2019-12-15 00:00:00.000","amt_cashflow":"0.6","N":"11.2472527472527","PVF":"0.857142688562182","PVCF":"0.514285613137309","cumPVCF":"5.95906536613829"},{"date_pmt":"2020-06-15 00:00:00.000","amt_cashflow":"0.6","N":"12.2472527472527","PVF":"0.845475131744113","PVCF":"0.507285079046468","cumPVCF":"6.46635044518476"},{"date_pmt":"2020-12-15 00:00:00.000","amt_cashflow":"0.6","N":"13.2472527472527","PVF":"0.833966395486401","PVCF":"0.500379837291841","cumPVCF":"6.9667302824766"},{"date_pmt":"2021-06-15 00:00:00.000","amt_cashflow":"0.65","N":"14.2472527472527","PVF":"0.822614317899389","PVCF":"0.534699306634603","cumPVCF":"7.50142958911121"},{"date_pmt":"2021-12-15 00:00:00.000","amt_cashflow":"0.65","N":"15.2472527472527","PVF":"0.811416766521394","PVCF":"0.527420898238906","cumPVCF":"8.02885048735011"},{"date_pmt":"2022-06-15 00:00:00.000","amt_cashflow":"0.65","N":"16.2472527472527","PVF":"0.800371637918124","PVCF":"0.520241564646781","cumPVCF":"8.54909205199689"},{"date_pmt":"2022-12-15 00:00:00.000","amt_cashflow":"0.65","N":"17.2472527472527","PVF":"0.789476857287556","PVCF":"0.513159957236911","cumPVCF":"9.06225200923381"},{"date_pmt":"2023-06-15 00:00:00.000","amt_cashflow":"0.65","N":"18.2472527472527","PVF":"0.778730378070187","PVCF":"0.506174745745622","cumPVCF":"9.56842675497943"},{"date_pmt":"2023-12-15 00:00:00.000","amt_cashflow":"0.65","N":"19.2472527472527","PVF":"0.768130181564596","PVCF":"0.499284618016987","cumPVCF":"10.0677113729964"},{"date_pmt":"2024-06-15 00:00:00.000","amt_cashflow":"0.65","N":"20.2472527472527","PVF":"0.75767427654823","PVCF":"0.49248827975635","cumPVCF":"10.5601996527528"},{"date_pmt":"2024-12-15 00:00:00.000","amt_cashflow":"0.65","N":"21.2472527472527","PVF":"0.747360698903364","PVCF":"0.485784454287186","cumPVCF":"11.04598410704"},{"date_pmt":"2025-06-15 00:00:00.000","amt_cashflow":"0.7","N":"22.2472527472527","PVF":"0.737187511248139","PVCF":"0.516031257873698","cumPVCF":"11.5620153649136"},{"date_pmt":"2025-12-15 00:00:00.000","amt_cashflow":"0.7","N":"23.2472527472527","PVF":"0.727152802572637","PVCF":"0.509006961800846","cumPVCF":"12.0710223267145"},{"date_pmt":"2026-06-15 00:00:00.000","amt_cashflow":"0.7","N":"24.2472527472527","PVF":"0.717254687879894","PVCF":"0.502078281515926","cumPVCF":"12.5731006082304"},{"date_pmt":"2026-12-15 00:00:00.000","amt_cashflow":"0.7","N":"25.2472527472527","PVF":"0.707491307831815","PVCF":"0.495243915482271","cumPVCF":"13.0683445237127"},{"date_pmt":"2027-06-15 00:00:00.000","amt_cashflow":"0.7","N":"26.2472527472527","PVF":"0.697860828399897","PVCF":"0.488502579879928","cumPVCF":"13.5568471035926"},{"date_pmt":"2027-12-15 00:00:00.000","amt_cashflow":"0.7","N":"27.2472527472527","PVF":"0.688361440520711","PVCF":"0.481853008364498","cumPVCF":"14.0387001119571"},{"date_pmt":"2028-06-15 00:00:00.000","amt_cashflow":"0.7","N":"28.2472527472527","PVF":"0.678991359756077","PVCF":"0.475293951829254","cumPVCF":"14.5139940637864"},{"date_pmt":"2028-12-15 00:00:00.000","amt_cashflow":"0.7","N":"29.2472527472527","PVF":"0.669748825957859","PVCF":"0.468824178170501","cumPVCF":"14.9828182419569"},{"date_pmt":"2029-06-15 00:00:00.000","amt_cashflow":"0.7","N":"30.2472527472527","PVF":"0.660632102937323","PVCF":"0.462442472056126","cumPVCF":"15.445260714013"},{"date_pmt":"2029-12-15 00:00:00.000","amt_cashflow":"0.7","N":"31.2472527472527","PVF":"0.651639478139005","PVCF":"0.456147634697304","cumPVCF":"15.9014083487103"},{"date_pmt":"2030-06-15 00:00:00.000","amt_cashflow":"0.75","N":"32.2472527472527","PVF":"0.642769262319003","PVCF":"0.482076946739252","cumPVCF":"16.3834852954496"},{"date_pmt":"2030-12-15 00:00:00.000","amt_cashflow":"0.75","N":"33.2472527472527","PVF":"0.634019789227661","PVCF":"0.475514841920746","cumPVCF":"16.8590001373703"},{"date_pmt":"2031-06-15 00:00:00.000","amt_cashflow":"0.75","N":"34.2472527472527","PVF":"0.625389415296568","PVCF":"0.469042061472426","cumPVCF":"17.3280421988427"},{"date_pmt":"2031-12-15 00:00:00.000","amt_cashflow":"0.75","N":"35.2472527472527","PVF":"0.616876519329817","PVCF":"0.462657389497363","cumPVCF":"17.7906995883401"},{"date_pmt":"2032-06-15 00:00:00.000","amt_cashflow":"0.75","N":"36.2472527472527","PVF":"0.608479502199464","PVCF":"0.456359626649598","cumPVCF":"18.2470592149897"},{"date_pmt":"2032-12-15 00:00:00.000","amt_cashflow":"0.75","N":"37.2472527472527","PVF":"0.600196786545141","PVCF":"0.450147589908856","cumPVCF":"18.6972068048985"},{"date_pmt":"2033-06-15 00:00:00.000","amt_cashflow":"0.75","N":"38.2472527472527","PVF":"0.592026816477748","PVCF":"0.444020112358311","cumPVCF":"19.1412269172569"},{"date_pmt":"2033-12-15 00:00:00.000","amt_cashflow":"0.75","N":"39.2472527472527","PVF":"0.583968057287185","PVCF":"0.437976042965389","cumPVCF":"19.5792029602222"},{"date_pmt":"2034-06-15 00:00:00.000","amt_cashflow":"100.75","N":"40.2472527472527","PVF":"0.576018995154059","PVCF":"58.0339137617715","cumPVCF":"77.6131167219937"}]}
Example #2
In this example we use the same data but select the step rate data from a temporary table rather than a derived table.
SELECT *
INTO #t
FROM
(
VALUES
('2029-12-15', .015),
('2024-12-15', .014),
('2020-12-15', .013),
('2016-12-15', .012),
('2012-12-15', .011)
) n (date_step, rate_step);
SELECT *
FROM wct.STEPCF( '2014-05-01', --@Settlement
'2034-06-15', --@Maturity
'SELECT * FROM #t', --@Step
0.0276, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
NULL, --@Issue
NULL, --@FirstCoupon
NULL --@LastCoupon
);
This produces the following result.
{"columns":[{"field":"date_pmt","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"amt_cashflow","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"N","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"cumPVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"date_pmt":"2014-05-01 00:00:00.000","amt_cashflow":"-0.414010989010989","N":"0","PVF":"1","PVCF":"-0.414010989010989","cumPVCF":"-0.414010989010989"},{"date_pmt":"2014-06-15 00:00:00.000","amt_cashflow":"0.55","N":"0.247252747252747","PVF":"0.996616976475482","PVCF":"0.548139337061515","cumPVCF":"0.134128348050526"},{"date_pmt":"2014-12-15 00:00:00.000","amt_cashflow":"0.55","N":"1.24725274725275","PVF":"0.983050874408643","PVCF":"0.540677980924754","cumPVCF":"0.67480632897528"},{"date_pmt":"2015-06-15 00:00:00.000","amt_cashflow":"0.55","N":"2.24725274725275","PVF":"0.969669436189231","PVCF":"0.533318189904077","cumPVCF":"1.20812451887936"},{"date_pmt":"2015-12-15 00:00:00.000","amt_cashflow":"0.55","N":"3.24725274725275","PVF":"0.956470148144833","PVCF":"0.526058581479658","cumPVCF":"1.73418310035901"},{"date_pmt":"2016-06-15 00:00:00.000","amt_cashflow":"0.55","N":"4.24725274725275","PVF":"0.943450530819523","PVCF":"0.518897791950738","cumPVCF":"2.25308089230975"},{"date_pmt":"2016-12-15 00:00:00.000","amt_cashflow":"0.55","N":"5.24725274725275","PVF":"0.930608138508111","PVCF":"0.511834476179461","cumPVCF":"2.76491536848921"},{"date_pmt":"2017-06-15 00:00:00.000","amt_cashflow":"0.6","N":"6.24725274725275","PVF":"0.917940558796717","PVCF":"0.55076433527803","cumPVCF":"3.31567970376724"},{"date_pmt":"2017-12-15 00:00:00.000","amt_cashflow":"0.6","N":"7.24725274725275","PVF":"0.905445412109604","PVCF":"0.543267247265762","cumPVCF":"3.85894695103301"},{"date_pmt":"2018-06-15 00:00:00.000","amt_cashflow":"0.6","N":"8.24725274725275","PVF":"0.893120351262186","PVCF":"0.535872210757311","cumPVCF":"4.39481916179032"},{"date_pmt":"2018-12-15 00:00:00.000","amt_cashflow":"0.6","N":"9.24725274725275","PVF":"0.880963061020108","PVCF":"0.528577836612065","cumPVCF":"4.92339699840238"},{"date_pmt":"2019-06-15 00:00:00.000","amt_cashflow":"0.6","N":"10.2472527472527","PVF":"0.86897125766434","PVCF":"0.521382754598604","cumPVCF":"5.44477975300099"},{"date_pmt":"2019-12-15 00:00:00.000","amt_cashflow":"0.6","N":"11.2472527472527","PVF":"0.857142688562182","PVCF":"0.514285613137309","cumPVCF":"5.95906536613829"},{"date_pmt":"2020-06-15 00:00:00.000","amt_cashflow":"0.6","N":"12.2472527472527","PVF":"0.845475131744113","PVCF":"0.507285079046468","cumPVCF":"6.46635044518476"},{"date_pmt":"2020-12-15 00:00:00.000","amt_cashflow":"0.6","N":"13.2472527472527","PVF":"0.833966395486401","PVCF":"0.500379837291841","cumPVCF":"6.9667302824766"},{"date_pmt":"2021-06-15 00:00:00.000","amt_cashflow":"0.65","N":"14.2472527472527","PVF":"0.822614317899389","PVCF":"0.534699306634603","cumPVCF":"7.50142958911121"},{"date_pmt":"2021-12-15 00:00:00.000","amt_cashflow":"0.65","N":"15.2472527472527","PVF":"0.811416766521394","PVCF":"0.527420898238906","cumPVCF":"8.02885048735011"},{"date_pmt":"2022-06-15 00:00:00.000","amt_cashflow":"0.65","N":"16.2472527472527","PVF":"0.800371637918124","PVCF":"0.520241564646781","cumPVCF":"8.54909205199689"},{"date_pmt":"2022-12-15 00:00:00.000","amt_cashflow":"0.65","N":"17.2472527472527","PVF":"0.789476857287556","PVCF":"0.513159957236911","cumPVCF":"9.06225200923381"},{"date_pmt":"2023-06-15 00:00:00.000","amt_cashflow":"0.65","N":"18.2472527472527","PVF":"0.778730378070187","PVCF":"0.506174745745622","cumPVCF":"9.56842675497943"},{"date_pmt":"2023-12-15 00:00:00.000","amt_cashflow":"0.65","N":"19.2472527472527","PVF":"0.768130181564596","PVCF":"0.499284618016987","cumPVCF":"10.0677113729964"},{"date_pmt":"2024-06-15 00:00:00.000","amt_cashflow":"0.65","N":"20.2472527472527","PVF":"0.75767427654823","PVCF":"0.49248827975635","cumPVCF":"10.5601996527528"},{"date_pmt":"2024-12-15 00:00:00.000","amt_cashflow":"0.65","N":"21.2472527472527","PVF":"0.747360698903364","PVCF":"0.485784454287186","cumPVCF":"11.04598410704"},{"date_pmt":"2025-06-15 00:00:00.000","amt_cashflow":"0.7","N":"22.2472527472527","PVF":"0.737187511248139","PVCF":"0.516031257873698","cumPVCF":"11.5620153649136"},{"date_pmt":"2025-12-15 00:00:00.000","amt_cashflow":"0.7","N":"23.2472527472527","PVF":"0.727152802572637","PVCF":"0.509006961800846","cumPVCF":"12.0710223267145"},{"date_pmt":"2026-06-15 00:00:00.000","amt_cashflow":"0.7","N":"24.2472527472527","PVF":"0.717254687879894","PVCF":"0.502078281515926","cumPVCF":"12.5731006082304"},{"date_pmt":"2026-12-15 00:00:00.000","amt_cashflow":"0.7","N":"25.2472527472527","PVF":"0.707491307831815","PVCF":"0.495243915482271","cumPVCF":"13.0683445237127"},{"date_pmt":"2027-06-15 00:00:00.000","amt_cashflow":"0.7","N":"26.2472527472527","PVF":"0.697860828399897","PVCF":"0.488502579879928","cumPVCF":"13.5568471035926"},{"date_pmt":"2027-12-15 00:00:00.000","amt_cashflow":"0.7","N":"27.2472527472527","PVF":"0.688361440520711","PVCF":"0.481853008364498","cumPVCF":"14.0387001119571"},{"date_pmt":"2028-06-15 00:00:00.000","amt_cashflow":"0.7","N":"28.2472527472527","PVF":"0.678991359756077","PVCF":"0.475293951829254","cumPVCF":"14.5139940637864"},{"date_pmt":"2028-12-15 00:00:00.000","amt_cashflow":"0.7","N":"29.2472527472527","PVF":"0.669748825957859","PVCF":"0.468824178170501","cumPVCF":"14.9828182419569"},{"date_pmt":"2029-06-15 00:00:00.000","amt_cashflow":"0.7","N":"30.2472527472527","PVF":"0.660632102937323","PVCF":"0.462442472056126","cumPVCF":"15.445260714013"},{"date_pmt":"2029-12-15 00:00:00.000","amt_cashflow":"0.7","N":"31.2472527472527","PVF":"0.651639478139005","PVCF":"0.456147634697304","cumPVCF":"15.9014083487103"},{"date_pmt":"2030-06-15 00:00:00.000","amt_cashflow":"0.75","N":"32.2472527472527","PVF":"0.642769262319003","PVCF":"0.482076946739252","cumPVCF":"16.3834852954496"},{"date_pmt":"2030-12-15 00:00:00.000","amt_cashflow":"0.75","N":"33.2472527472527","PVF":"0.634019789227661","PVCF":"0.475514841920746","cumPVCF":"16.8590001373703"},{"date_pmt":"2031-06-15 00:00:00.000","amt_cashflow":"0.75","N":"34.2472527472527","PVF":"0.625389415296568","PVCF":"0.469042061472426","cumPVCF":"17.3280421988427"},{"date_pmt":"2031-12-15 00:00:00.000","amt_cashflow":"0.75","N":"35.2472527472527","PVF":"0.616876519329817","PVCF":"0.462657389497363","cumPVCF":"17.7906995883401"},{"date_pmt":"2032-06-15 00:00:00.000","amt_cashflow":"0.75","N":"36.2472527472527","PVF":"0.608479502199464","PVCF":"0.456359626649598","cumPVCF":"18.2470592149897"},{"date_pmt":"2032-12-15 00:00:00.000","amt_cashflow":"0.75","N":"37.2472527472527","PVF":"0.600196786545141","PVCF":"0.450147589908856","cumPVCF":"18.6972068048985"},{"date_pmt":"2033-06-15 00:00:00.000","amt_cashflow":"0.75","N":"38.2472527472527","PVF":"0.592026816477748","PVCF":"0.444020112358311","cumPVCF":"19.1412269172569"},{"date_pmt":"2033-12-15 00:00:00.000","amt_cashflow":"0.75","N":"39.2472527472527","PVF":"0.583968057287185","PVCF":"0.437976042965389","cumPVCF":"19.5792029602222"},{"date_pmt":"2034-06-15 00:00:00.000","amt_cashflow":"100.75","N":"40.2472527472527","PVF":"0.576018995154059","PVCF":"58.0339137617715","cumPVCF":"77.6131167219937"}]}
Example #3
In this example, we have a bond with zero first step.
SELECT *
INTO #t
FROM
(
VALUES
('2040-12-15', .018),
('2036-12-15', .017),
('2032-12-15', .016),
('2028-12-15', .015),
('2024-12-15', .014)
) n (date_step, rate_step);
SELECT *
FROM wct.STEPCF( '2016-07-01', --@Settlement
'2044-06-15', --@Maturity
'SELECT * FROM #t', --@Step
0.0290, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
NULL, --@Issue
NULL, --@FirstCoupon
NULL --@LastCoupon
);
This produces the following result.
{"columns":[{"field":"date_pmt","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"amt_cashflow","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"N","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"cumPVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"date_pmt":"2016-07-01 00:00:00.000","amt_cashflow":"0","N":"0","PVF":"1","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2016-12-15 00:00:00.000","amt_cashflow":"0","N":"0.912568306010929","PVF":"0.986948692597161","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2017-06-15 00:00:00.000","amt_cashflow":"0","N":"1.91256830601093","PVF":"0.972842476685226","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2017-12-15 00:00:00.000","amt_cashflow":"0","N":"2.91256830601093","PVF":"0.958937877462026","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2018-06-15 00:00:00.000","amt_cashflow":"0","N":"3.91256830601093","PVF":"0.945232013269617","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2018-12-15 00:00:00.000","amt_cashflow":"0","N":"4.91256830601093","PVF":"0.931722043636882","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2019-06-15 00:00:00.000","amt_cashflow":"0","N":"5.91256830601093","PVF":"0.918405168690865","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2019-12-15 00:00:00.000","amt_cashflow":"0","N":"6.91256830601093","PVF":"0.905278628576506","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2020-06-15 00:00:00.000","amt_cashflow":"0","N":"7.91256830601093","PVF":"0.892339702884678","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2020-12-15 00:00:00.000","amt_cashflow":"0","N":"8.91256830601093","PVF":"0.879585710088396","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2021-06-15 00:00:00.000","amt_cashflow":"0","N":"9.91256830601093","PVF":"0.867014006987084","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2021-12-15 00:00:00.000","amt_cashflow":"0","N":"10.9125683060109","PVF":"0.854621988158781","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2022-06-15 00:00:00.000","amt_cashflow":"0","N":"11.9125683060109","PVF":"0.842407085420189","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2022-12-15 00:00:00.000","amt_cashflow":"0","N":"12.9125683060109","PVF":"0.83036676729442","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2023-06-15 00:00:00.000","amt_cashflow":"0","N":"13.9125683060109","PVF":"0.818498538486368","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2023-12-15 00:00:00.000","amt_cashflow":"0","N":"14.9125683060109","PVF":"0.806799939365567","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2024-06-15 00:00:00.000","amt_cashflow":"0","N":"15.9125683060109","PVF":"0.795268545456449","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2024-12-15 00:00:00.000","amt_cashflow":"0","N":"16.9125683060109","PVF":"0.783901966935878","PVCF":"0","cumPVCF":"0"},{"date_pmt":"2025-06-15 00:00:00.000","amt_cashflow":"0.7","N":"17.9125683060109","PVF":"0.772697848137879","PVCF":"0.540888493696515","cumPVCF":"0.540888493696515"},{"date_pmt":"2025-12-15 00:00:00.000","amt_cashflow":"0.7","N":"18.9125683060109","PVF":"0.76165386706543","PVCF":"0.533157706945801","cumPVCF":"1.07404620064232"},{"date_pmt":"2026-06-15 00:00:00.000","amt_cashflow":"0.7","N":"19.9125683060109","PVF":"0.750767734909246","PVCF":"0.525537414436473","cumPVCF":"1.59958361507879"},{"date_pmt":"2026-12-15 00:00:00.000","amt_cashflow":"0.7","N":"20.9125683060109","PVF":"0.740037195573432","PVCF":"0.518026036901402","cumPVCF":"2.11760965198019"},{"date_pmt":"2027-06-15 00:00:00.000","amt_cashflow":"0.7","N":"21.9125683060109","PVF":"0.729460025207917","PVCF":"0.510622017645542","cumPVCF":"2.62823166962573"},{"date_pmt":"2027-12-15 00:00:00.000","amt_cashflow":"0.7","N":"22.9125683060109","PVF":"0.719034031747577","PVCF":"0.503323822223304","cumPVCF":"3.13155549184904"},{"date_pmt":"2028-06-15 00:00:00.000","amt_cashflow":"0.7","N":"23.9125683060109","PVF":"0.708757054457937","PVCF":"0.496129938120556","cumPVCF":"3.62768542996959"},{"date_pmt":"2028-12-15 00:00:00.000","amt_cashflow":"0.7","N":"24.9125683060109","PVF":"0.69862696348737","PVCF":"0.489038874441159","cumPVCF":"4.11672430441075"},{"date_pmt":"2029-06-15 00:00:00.000","amt_cashflow":"0.75","N":"25.9125683060109","PVF":"0.688641659425698","PVCF":"0.516481244569273","cumPVCF":"4.63320554898003"},{"date_pmt":"2029-12-15 00:00:00.000","amt_cashflow":"0.75","N":"26.9125683060109","PVF":"0.678799072869096","PVCF":"0.509099304651822","cumPVCF":"5.14230485363185"},{"date_pmt":"2030-06-15 00:00:00.000","amt_cashflow":"0.75","N":"27.9125683060109","PVF":"0.669097163991223","PVCF":"0.501822872993417","cumPVCF":"5.64412772662527"},{"date_pmt":"2030-12-15 00:00:00.000","amt_cashflow":"0.75","N":"28.9125683060109","PVF":"0.659533922120476","PVCF":"0.494650441590357","cumPVCF":"6.13877816821562"},{"date_pmt":"2031-06-15 00:00:00.000","amt_cashflow":"0.75","N":"29.9125683060109","PVF":"0.650107365323289","PVCF":"0.487580523992467","cumPVCF":"6.62635869220809"},{"date_pmt":"2031-12-15 00:00:00.000","amt_cashflow":"0.75","N":"30.9125683060109","PVF":"0.640815539993385","PVCF":"0.480611654995039","cumPVCF":"7.10697034720313"},{"date_pmt":"2032-06-15 00:00:00.000","amt_cashflow":"0.75","N":"31.9125683060109","PVF":"0.631656520446905","PVCF":"0.473742390335179","cumPVCF":"7.58071273753831"},{"date_pmt":"2032-12-15 00:00:00.000","amt_cashflow":"0.75","N":"32.9125683060109","PVF":"0.622628408523317","PVCF":"0.466971306392488","cumPVCF":"8.04768404393079"},{"date_pmt":"2033-06-15 00:00:00.000","amt_cashflow":"0.8","N":"33.9125683060109","PVF":"0.613729333192032","PVCF":"0.490983466553626","cumPVCF":"8.53866751048442"},{"date_pmt":"2033-12-15 00:00:00.000","amt_cashflow":"0.8","N":"34.9125683060109","PVF":"0.604957450164645","PVCF":"0.483965960131716","cumPVCF":"9.02263347061614"},{"date_pmt":"2034-06-15 00:00:00.000","amt_cashflow":"0.8","N":"35.9125683060109","PVF":"0.596310941512711","PVCF":"0.477048753210169","cumPVCF":"9.4996822238263"},{"date_pmt":"2034-12-15 00:00:00.000","amt_cashflow":"0.8","N":"36.9125683060109","PVF":"0.587788015290991","PVCF":"0.470230412232793","cumPVCF":"9.9699126360591"},{"date_pmt":"2035-06-15 00:00:00.000","amt_cashflow":"0.8","N":"37.9125683060109","PVF":"0.579386905166083","PVCF":"0.463509524132867","cumPVCF":"10.433422160192"},{"date_pmt":"2035-12-15 00:00:00.000","amt_cashflow":"0.8","N":"38.9125683060109","PVF":"0.571105870050353","PVCF":"0.456884696040282","cumPVCF":"10.8903068562322"},{"date_pmt":"2036-06-15 00:00:00.000","amt_cashflow":"0.8","N":"39.9125683060109","PVF":"0.562943193741107","PVCF":"0.450354554992886","cumPVCF":"11.3406614112251"},{"date_pmt":"2036-12-15 00:00:00.000","amt_cashflow":"0.8","N":"40.9125683060109","PVF":"0.554897184564916","PVCF":"0.443917747651933","cumPVCF":"11.7845791588771"},{"date_pmt":"2037-06-15 00:00:00.000","amt_cashflow":"0.85","N":"41.9125683060109","PVF":"0.546966175027024","PVCF":"0.46492124877297","cumPVCF":"12.24950040765"},{"date_pmt":"2037-12-15 00:00:00.000","amt_cashflow":"0.85","N":"42.9125683060109","PVF":"0.53914852146577","PVCF":"0.458276243245905","cumPVCF":"12.7077766508959"},{"date_pmt":"2038-06-15 00:00:00.000","amt_cashflow":"0.85","N":"43.9125683060109","PVF":"0.531442603711947","PVCF":"0.451726213155155","cumPVCF":"13.1595028640511"},{"date_pmt":"2038-12-15 00:00:00.000","amt_cashflow":"0.85","N":"44.9125683060109","PVF":"0.523846824753028","PVCF":"0.445269801040074","cumPVCF":"13.6047726650912"},{"date_pmt":"2039-06-15 00:00:00.000","amt_cashflow":"0.85","N":"45.9125683060109","PVF":"0.516359610402196","PVCF":"0.438905668841867","cumPVCF":"14.043678333933"},{"date_pmt":"2039-12-15 00:00:00.000","amt_cashflow":"0.85","N":"46.9125683060109","PVF":"0.508979408972101","PVCF":"0.432632497626286","cumPVCF":"14.4763108315593"},{"date_pmt":"2040-06-15 00:00:00.000","amt_cashflow":"0.85","N":"47.9125683060109","PVF":"0.501704690953279","PVCF":"0.426448987310287","cumPVCF":"14.9027598188696"},{"date_pmt":"2040-12-15 00:00:00.000","amt_cashflow":"0.85","N":"48.9125683060109","PVF":"0.49453394869717","PVCF":"0.420353856392594","cumPVCF":"15.3231136752622"},{"date_pmt":"2041-06-15 00:00:00.000","amt_cashflow":"0.9","N":"49.9125683060109","PVF":"0.487465696103666","PVCF":"0.4387191264933","cumPVCF":"15.7618328017555"},{"date_pmt":"2041-12-15 00:00:00.000","amt_cashflow":"0.9","N":"50.9125683060109","PVF":"0.480498468313126","PVCF":"0.432448621481814","cumPVCF":"16.1942814232373"},{"date_pmt":"2042-06-15 00:00:00.000","amt_cashflow":"0.9","N":"51.9125683060109","PVF":"0.473630821402786","PVCF":"0.426267739262507","cumPVCF":"16.6205491624998"},{"date_pmt":"2042-12-15 00:00:00.000","amt_cashflow":"0.9","N":"52.9125683060109","PVF":"0.466861332087517","PVCF":"0.420175198878765","cumPVCF":"17.0407243613786"},{"date_pmt":"2043-06-15 00:00:00.000","amt_cashflow":"0.9","N":"53.9125683060109","PVF":"0.460188597424857","PVCF":"0.414169737682371","cumPVCF":"17.454894099061"},{"date_pmt":"2043-12-15 00:00:00.000","amt_cashflow":"0.9","N":"54.9125683060109","PVF":"0.453611234524255","PVCF":"0.408250111071829","cumPVCF":"17.8631442101328"},{"date_pmt":"2044-06-15 00:00:00.000","amt_cashflow":"100.9","N":"55.9125683060109","PVF":"0.447127880260478","PVCF":"45.1152031182822","cumPVCF":"62.978347328415"}]}
Example #4
In this example we use the same bond but the settlement is in the final coupon period.
SELECT *
INTO #t
FROM
(
VALUES
('2040-12-15', .018),
('2036-12-15', .017),
('2032-12-15', .016),
('2028-12-15', .015),
('2024-12-15', .014)
) n (date_step, rate_step);
SELECT *
FROM wct.STEPCF( '2044-04-01', --@Settlement
'2044-06-15', --@Maturity
'SELECT * FROM #t', --@Step
0.0290, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
NULL, --@Issue
NULL, --@FirstCoupon
NULL --@LastCoupon
);
This produces the following result.
{"columns":[{"field":"date_pmt","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"amt_cashflow","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"N","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"cumPVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"date_pmt":"2044-04-01 00:00:00.000","amt_cashflow":"-0.531147540983607","N":"0","PVF":"1","PVCF":"-0.531147540983607","cumPVCF":"-0.531147540983607"},{"date_pmt":"2044-06-15 00:00:00.000","amt_cashflow":"100.9","N":"0.409836065573771","PVF":"0.994092483194133","PVCF":"100.303931554288","cumPVCF":"99.7727840133044"}]}
Example #5
In this example we have a bond with an odd first coupon period.
SELECT *
INTO #t
FROM
(
VALUES
('2040-12-15', .018),
('2035-12-15', .016),
('2030-12-15', .015),
('2025-12-15', .014),
('2020-12-15', .013),
('2015-12-01', .012)
) n (date_step, rate_step);
SELECT *
FROM wct.STEPCF( '2016-04-01', --@Settlement
'2044-06-15', --@Maturity
'SELECT * FROM #t', --@Step
0.03125, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
'2015-12-01', --@Issue
'2016-06-15', --@FirstCoupon
NULL --@LastCoupon
);
This produces the following result.
{"columns":[{"field":"date_pmt","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"amt_cashflow","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"N","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"PVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"},{"field":"cumPVCF","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"date_pmt":"2016-04-01 00:00:00.000","amt_cashflow":"-0.4","N":"0","PVF":"1","PVCF":"-0.4","cumPVCF":"-0.4"},{"date_pmt":"2016-06-15 00:00:00.000","amt_cashflow":"0.645901639344262","N":"0.409836065573771","PVF":"0.993665970267903","PVCF":"0.641810479156645","cumPVCF":"0.241810479156645"},{"date_pmt":"2016-12-15 00:00:00.000","amt_cashflow":"0.6","N":"1.40983606557377","PVF":"0.97837880149455","PVCF":"0.58702728089673","cumPVCF":"0.828837760053376"},{"date_pmt":"2017-06-15 00:00:00.000","amt_cashflow":"0.6","N":"2.40983606557377","PVF":"0.963326819933096","PVCF":"0.577996091959857","cumPVCF":"1.40683385201323"},{"date_pmt":"2017-12-15 00:00:00.000","amt_cashflow":"0.6","N":"3.40983606557377","PVF":"0.94850640731874","PVCF":"0.569103844391244","cumPVCF":"1.97593769640448"},{"date_pmt":"2018-06-15 00:00:00.000","amt_cashflow":"0.6","N":"4.40983606557377","PVF":"0.933914001052298","PVCF":"0.560348400631379","cumPVCF":"2.53628609703586"},{"date_pmt":"2018-12-15 00:00:00.000","amt_cashflow":"0.6","N":"5.40983606557377","PVF":"0.919546093343802","PVCF":"0.551727656006281","cumPVCF":"3.08801375304214"},{"date_pmt":"2019-06-15 00:00:00.000","amt_cashflow":"0.6","N":"6.40983606557377","PVF":"0.905399230369282","PVCF":"0.543239538221569","cumPVCF":"3.63125329126371"},{"date_pmt":"2019-12-15 00:00:00.000","amt_cashflow":"0.6","N":"7.40983606557377","PVF":"0.891470011440524","PVCF":"0.534882006864314","cumPVCF":"4.16613529812802"},{"date_pmt":"2020-06-15 00:00:00.000","amt_cashflow":"0.6","N":"8.40983606557377","PVF":"0.877755088187592","PVCF":"0.526653052912555","cumPVCF":"4.69278835104058"},{"date_pmt":"2020-12-15 00:00:00.000","amt_cashflow":"0.6","N":"9.40983606557377","PVF":"0.864251163753937","PVCF":"0.518550698252362","cumPVCF":"5.21133904929294"},{"date_pmt":"2021-06-15 00:00:00.000","amt_cashflow":"0.65","N":"10.4098360655738","PVF":"0.850954992003877","PVCF":"0.55312074480252","cumPVCF":"5.76445979409546"},{"date_pmt":"2021-12-15 00:00:00.000","amt_cashflow":"0.65","N":"11.4098360655738","PVF":"0.837863376742279","PVCF":"0.544611194882481","cumPVCF":"6.30907098897794"},{"date_pmt":"2022-06-15 00:00:00.000","amt_cashflow":"0.65","N":"12.4098360655738","PVF":"0.824973170946244","PVCF":"0.536232561115058","cumPVCF":"6.845303550093"},{"date_pmt":"2022-12-15 00:00:00.000","amt_cashflow":"0.65","N":"13.4098360655738","PVF":"0.812281276008609","PVCF":"0.527982829405596","cumPVCF":"7.37328637949859"},{"date_pmt":"2023-06-15 00:00:00.000","amt_cashflow":"0.65","N":"14.4098360655738","PVF":"0.799784640993092","PVCF":"0.51986001664551","cumPVCF":"7.8931463961441"},{"date_pmt":"2023-12-15 00:00:00.000","amt_cashflow":"0.65","N":"15.4098360655738","PVF":"0.787480261900891","PVCF":"0.511862170235579","cumPVCF":"8.40500856637968"},{"date_pmt":"2024-06-15 00:00:00.000","amt_cashflow":"0.65","N":"16.4098360655738","PVF":"0.775365180948569","PVCF":"0.50398736761657","cumPVCF":"8.90899593399625"},{"date_pmt":"2024-12-15 00:00:00.000","amt_cashflow":"0.65","N":"17.4098360655738","PVF":"0.763436485857053","PVCF":"0.496233715807084","cumPVCF":"9.40522964980334"},{"date_pmt":"2025-06-15 00:00:00.000","amt_cashflow":"0.65","N":"18.4098360655738","PVF":"0.75169130915156","PVCF":"0.488599350948514","cumPVCF":"9.89382900075185"},{"date_pmt":"2025-12-15 00:00:00.000","amt_cashflow":"0.65","N":"19.4098360655738","PVF":"0.740126827472305","PVCF":"0.481082437856998","cumPVCF":"10.3749114386088"},{"date_pmt":"2026-06-15 00:00:00.000","amt_cashflow":"0.7","N":"20.4098360655738","PVF":"0.728740260895808","PVCF":"0.510118182627066","cumPVCF":"10.8850296212359"},{"date_pmt":"2026-12-15 00:00:00.000","amt_cashflow":"0.7","N":"21.4098360655738","PVF":"0.717528872266642","PVCF":"0.502270210586649","cumPVCF":"11.3872998318226"},{"date_pmt":"2027-06-15 00:00:00.000","amt_cashflow":"0.7","N":"22.4098360655738","PVF":"0.706489966539463","PVCF":"0.494542976577624","cumPVCF":"11.8818428084002"},{"date_pmt":"2027-12-15 00:00:00.000","amt_cashflow":"0.7","N":"23.4098360655738","PVF":"0.695620890131163","PVCF":"0.486934623091814","cumPVCF":"12.368777431492"},{"date_pmt":"2028-06-15 00:00:00.000","amt_cashflow":"0.7","N":"24.4098360655738","PVF":"0.684919030282992","PVCF":"0.479443321198094","cumPVCF":"12.8482207526901"},{"date_pmt":"2028-12-15 00:00:00.000","amt_cashflow":"0.7","N":"25.4098360655738","PVF":"0.674381814432484","PVCF":"0.472067270102739","cumPVCF":"13.3202880227928"},{"date_pmt":"2029-06-15 00:00:00.000","amt_cashflow":"0.7","N":"26.4098360655738","PVF":"0.664006709595061","PVCF":"0.464804696716543","cumPVCF":"13.7850927195094"},{"date_pmt":"2029-12-15 00:00:00.000","amt_cashflow":"0.7","N":"27.4098360655738","PVF":"0.653791221755137","PVCF":"0.457653855228596","cumPVCF":"14.242746574738"},{"date_pmt":"2030-06-15 00:00:00.000","amt_cashflow":"0.7","N":"28.4098360655738","PVF":"0.643732895266597","PVCF":"0.450613026686618","cumPVCF":"14.6933596014246"},{"date_pmt":"2030-12-15 00:00:00.000","amt_cashflow":"0.7","N":"29.4098360655738","PVF":"0.633829312262496","PVCF":"0.443680518583747","cumPVCF":"15.1370401200083"},{"date_pmt":"2031-06-15 00:00:00.000","amt_cashflow":"0.75","N":"30.4098360655738","PVF":"0.624078092073842","PVCF":"0.468058569055381","cumPVCF":"15.6050986890637"},{"date_pmt":"2031-12-15 00:00:00.000","amt_cashflow":"0.75","N":"31.4098360655738","PVF":"0.614476890657321","PVCF":"0.460857667992991","cumPVCF":"16.0659563570567"},{"date_pmt":"2032-06-15 00:00:00.000","amt_cashflow":"0.75","N":"32.4098360655738","PVF":"0.605023400031824","PVCF":"0.453767550023868","cumPVCF":"16.5197239070806"},{"date_pmt":"2032-12-15 00:00:00.000","amt_cashflow":"0.75","N":"33.4098360655738","PVF":"0.595715347723642","PVCF":"0.446786510792732","cumPVCF":"16.9665104178733"},{"date_pmt":"2033-06-15 00:00:00.000","amt_cashflow":"0.75","N":"34.4098360655738","PVF":"0.586550496220202","PVCF":"0.439912872165151","cumPVCF":"17.4064232900385"},{"date_pmt":"2033-12-15 00:00:00.000","amt_cashflow":"0.75","N":"35.4098360655738","PVF":"0.577526642432198","PVCF":"0.433144981824149","cumPVCF":"17.8395682718626"},{"date_pmt":"2034-06-15 00:00:00.000","amt_cashflow":"0.75","N":"36.4098360655738","PVF":"0.568641617164011","PVCF":"0.426481212873008","cumPVCF":"18.2660494847356"},{"date_pmt":"2034-12-15 00:00:00.000","amt_cashflow":"0.75","N":"37.4098360655738","PVF":"0.559893284592257","PVCF":"0.419919963444193","cumPVCF":"18.6859694481798"},{"date_pmt":"2035-06-15 00:00:00.000","amt_cashflow":"0.75","N":"38.4098360655738","PVF":"0.551279541752376","PVCF":"0.413459656314282","cumPVCF":"19.0994291044941"},{"date_pmt":"2035-12-15 00:00:00.000","amt_cashflow":"0.75","N":"39.4098360655738","PVF":"0.542798318033109","PVCF":"0.407098738524831","cumPVCF":"19.5065278430189"},{"date_pmt":"2036-06-15 00:00:00.000","amt_cashflow":"0.8","N":"40.4098360655738","PVF":"0.534447574678753","PVCF":"0.427558059743003","cumPVCF":"19.9340859027619"},{"date_pmt":"2036-12-15 00:00:00.000","amt_cashflow":"0.8","N":"41.4098360655738","PVF":"0.52622530429908","PVCF":"0.420980243439264","cumPVCF":"20.3550661462012"},{"date_pmt":"2037-06-15 00:00:00.000","amt_cashflow":"0.8","N":"42.4098360655738","PVF":"0.518129530386787","PVCF":"0.414503624309429","cumPVCF":"20.7695697705106"},{"date_pmt":"2037-12-15 00:00:00.000","amt_cashflow":"0.8","N":"43.4098360655738","PVF":"0.510158306842375","PVCF":"0.4081266454739","cumPVCF":"21.1776964159845"},{"date_pmt":"2038-06-15 00:00:00.000","amt_cashflow":"0.8","N":"44.4098360655738","PVF":"0.502309717506338","PVCF":"0.40184777400507","cumPVCF":"21.5795441899896"},{"date_pmt":"2038-12-15 00:00:00.000","amt_cashflow":"0.8","N":"45.4098360655738","PVF":"0.494581875698548","PVCF":"0.395665500558839","cumPVCF":"21.9752096905484"},{"date_pmt":"2039-06-15 00:00:00.000","amt_cashflow":"0.8","N":"46.4098360655738","PVF":"0.486972923764724","PVCF":"0.38957833901178","cumPVCF":"22.3647880295602"},{"date_pmt":"2039-12-15 00:00:00.000","amt_cashflow":"0.8","N":"47.4098360655738","PVF":"0.479481032629883","PVCF":"0.383584826103906","cumPVCF":"22.7483728556641"},{"date_pmt":"2040-06-15 00:00:00.000","amt_cashflow":"0.8","N":"48.4098360655738","PVF":"0.472104401358654","PVCF":"0.377683521086923","cumPVCF":"23.126056376751"},{"date_pmt":"2040-12-15 00:00:00.000","amt_cashflow":"0.8","N":"49.4098360655738","PVF":"0.464841256722367","PVCF":"0.371873005377893","cumPVCF":"23.4979293821289"},{"date_pmt":"2041-06-15 00:00:00.000","amt_cashflow":"0.9","N":"50.4098360655738","PVF":"0.457689852772792","PVCF":"0.411920867495513","cumPVCF":"23.9098502496244"},{"date_pmt":"2041-12-15 00:00:00.000","amt_cashflow":"0.9","N":"51.4098360655738","PVF":"0.450648470422441","PVCF":"0.405583623380197","cumPVCF":"24.3154338730046"},{"date_pmt":"2042-06-15 00:00:00.000","amt_cashflow":"0.9","N":"52.4098360655738","PVF":"0.443715417031327","PVCF":"0.399343875328194","cumPVCF":"24.7147777483328"},{"date_pmt":"2042-12-15 00:00:00.000","amt_cashflow":"0.9","N":"53.4098360655738","PVF":"0.436889026000076","PVCF":"0.393200123400068","cumPVCF":"25.1079778717329"},{"date_pmt":"2043-06-15 00:00:00.000","amt_cashflow":"0.9","N":"54.4098360655738","PVF":"0.430167656369305","PVCF":"0.387150890732375","cumPVCF":"25.4951287624653"},{"date_pmt":"2043-12-15 00:00:00.000","amt_cashflow":"0.9","N":"55.4098360655738","PVF":"0.423549692425162","PVCF":"0.381194723182646","cumPVCF":"25.8763234856479"},{"date_pmt":"2044-06-15 00:00:00.000","amt_cashflow":"100.9","N":"56.4098360655738","PVF":"0.417033543310929","PVCF":"42.0786845200727","cumPVCF":"67.9550080057206"}]}
Example #6
In this example we have a bond with an odd last coupon period.
SELECT *
INTO #t
FROM
(
VALUES
('2040-12-01', .018),
('2035-12-01', .016),
('2030-12-01', .015),
('2025-12-01', .014),
('2020-12-01', .013),
('2015-12-01', .012)
) n (date_step, rate_step);
SELECT *
FROM wct.STEPCF( '2016-04-01', --@Settlement
'2044-06-15', --@Maturity
'SELECT * FROM #t', --@Step
0.02125, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
NULL, --@Issue
NULL, --@FirstCoupon
'2043-12-01' --@LastCoupon
);
This produces the following result.
date_pmt amt_cashflow N PVF PVCF cumPVCF
----------------------- ---------------------- ---------------------- ---------------------- ---------------------- ----------------------
2016-04-01 00:00:00.000 -0.4 0 1 -0.4 -0.4
2016-06-01 00:00:00.000 0.6 0.333333333333333 0.996483214643168 0.597889928785901 0.197889928785901
2016-12-01 00:00:00.000 0.6 1.33333333333333 0.986006891421812 0.591604134853087 0.789494063638988
2017-06-01 00:00:00.000 0.6 2.33333333333333 0.975640708889857 0.585384425333914 1.3748784889729
2017-12-01 00:00:00.000 0.6 3.33333333333333 0.96538350910561 0.579230105463366 1.95410859443627
2018-06-01 00:00:00.000 0.6 4.33333333333333 0.95523414630116 0.573140487780696 2.52724908221696
2018-12-01 00:00:00.000 0.6 5.33333333333333 0.945191486754394 0.567114892052636 3.0943639742696
2019-06-01 00:00:00.000 0.6 6.33333333333333 0.935254408662357 0.561152645197414 3.65551661946701
2019-12-01 00:00:00.000 0.6 7.33333333333333 0.925421802015937 0.555253081209562 4.21076970067658
2020-06-01 00:00:00.000 0.6 8.33333333333333 0.915692568475881 0.549415541085528 4.7601852417621
2020-12-01 00:00:00.000 0.6 9.33333333333333 0.906065621250098 0.543639372750059 5.30382461451216
2021-06-01 00:00:00.000 0.65 10.3333333333333 0.896539884972268 0.582750925231974 5.88657553974414
2021-12-01 00:00:00.000 0.65 11.3333333333333 0.887114295581712 0.576624292128113 6.46319983187225
2022-06-01 00:00:00.000 0.65 12.3333333333333 0.877787800204539 0.57056207013295 7.0337619020052
2022-12-01 00:00:00.000 0.65 13.3333333333333 0.868559357036031 0.56456358207342 7.59832548407862
2023-06-01 00:00:00.000 0.65 14.3333333333333 0.859427935224273 0.558628157895778 8.1569536419744
2023-12-01 00:00:00.000 0.65 15.3333333333333 0.850392514755001 0.552755134590751 8.70970877656515
2024-06-01 00:00:00.000 0.65 16.3333333333333 0.841452086337663 0.546943856119481 9.25665263268463
2024-12-01 00:00:00.000 0.65 17.3333333333333 0.832605651292679 0.541193673340241 9.79784630602487
2025-06-01 00:00:00.000 0.65 18.3333333333333 0.82385222143988 0.535503943935922 10.3333502499608
2025-12-01 00:00:00.000 0.65 19.3333333333333 0.815190818988131 0.529874032342285 10.8632242823031
2026-06-01 00:00:00.000 0.7 20.3333333333333 0.806620476426104 0.564634333498273 11.4278586158014
2026-12-01 00:00:00.000 0.7 21.3333333333333 0.798140236414203 0.558698165489942 11.9865567812913
2027-06-01 00:00:00.000 0.7 22.3333333333333 0.789749151677628 0.552824406174339 12.5393811874656
2027-12-01 00:00:00.000 0.7 23.3333333333333 0.781446284900559 0.547012399430391 13.086393586896
2028-06-01 00:00:00.000 0.7 24.3333333333333 0.773230708621456 0.541261496035019 13.627655082931
2028-12-01 00:00:00.000 0.7 25.3333333333333 0.765101505129456 0.535571053590619 14.1632261365217
2029-06-01 00:00:00.000 0.7 26.3333333333333 0.757057766361861 0.529940436453303 14.693166572975
2029-12-01 00:00:00.000 0.7 27.3333333333333 0.749098593802707 0.524369015661895 15.2175355886369
2030-06-01 00:00:00.000 0.7 28.3333333333333 0.741223098382394 0.518856168867676 15.7363917575045
2030-12-01 00:00:00.000 0.7 29.3333333333333 0.733430400378374 0.513401280264862 16.2497930377694
2031-06-01 00:00:00.000 0.75 30.3333333333333 0.725719629316882 0.544289721987661 16.7940827597571
2031-12-01 00:00:00.000 0.75 31.3333333333333 0.718089923875703 0.538567442906777 17.3326502026638
2032-06-01 00:00:00.000 0.75 32.3333333333333 0.710540431787955 0.532905323840967 17.8655555265048
2032-12-01 00:00:00.000 0.75 33.3333333333333 0.703070309746895 0.527302732310171 18.392858258815
2033-06-01 00:00:00.000 0.75 34.3333333333333 0.695678723311708 0.521759042483781 18.9146173012988
2033-12-01 00:00:00.000 0.75 35.3333333333333 0.688364846814306 0.516273635110729 19.4308909364095
2034-06-01 00:00:00.000 0.75 36.3333333333333 0.681127863267093 0.51084589745032 19.9417368338598
2034-12-01 00:00:00.000 0.75 37.3333333333333 0.673966964271706 0.505475223203779 20.4472120570636
2035-06-01 00:00:00.000 0.75 38.3333333333333 0.666881349928713 0.500161012446535 20.9473730695101
2035-12-01 00:00:00.000 0.75 39.3333333333333 0.659870228748263 0.494902671561197 21.4422757410713
2036-06-01 00:00:00.000 0.8 40.3333333333333 0.65293281756167 0.522346254049336 21.9646219951207
2036-12-01 00:00:00.000 0.8 41.3333333333333 0.646068341433935 0.516854673147148 22.4814766682678
2037-06-01 00:00:00.000 0.8 42.3333333333333 0.639276033577177 0.511420826861742 22.9928974951295
2037-12-01 00:00:00.000 0.8 43.3333333333333 0.632555135264987 0.506044108211989 23.4989416033415
2038-06-01 00:00:00.000 0.8 44.3333333333333 0.625904895747668 0.500723916598134 23.9996655199397
2038-12-01 00:00:00.000 0.8 45.3333333333333 0.619324572168378 0.495459657734703 24.4951251776744
2039-06-01 00:00:00.000 0.8 46.3333333333333 0.612813429480152 0.490250743584121 24.9853759212585
2039-12-01 00:00:00.000 0.8 47.3333333333333 0.606370740363787 0.485096592291029 25.4704725135495
2040-06-01 00:00:00.000 0.8 48.3333333333333 0.599995785146604 0.479996628117283 25.9504691416668
2040-12-01 00:00:00.000 0.8 49.3333333333333 0.593687851722057 0.474950281377646 26.4254194230444
2041-06-01 00:00:00.000 0.9 50.3333333333333 0.587446235470186 0.528701611923167 26.9541210349676
2041-12-01 00:00:00.000 0.9 51.3333333333333 0.58127023917891 0.523143215261019 27.4772642502286
2042-06-01 00:00:00.000 0.9 52.3333333333333 0.575159172966145 0.51764325566953 27.9949075058982
2042-12-01 00:00:00.000 0.9 53.3333333333333 0.569112354202741 0.512201118782467 28.5071086246806
2043-06-01 00:00:00.000 0.9 54.3333333333333 0.563129107436231 0.506816196692608 29.0139248213732
2043-12-01 00:00:00.000 0.9 55.3333333333333 0.55720876431538 0.501487887883842 29.5154127092571
2044-06-15 00:00:00.000 100.968852459016 56.4098360655738 0.55090504709795 55.6242504193603 85.1396631286174
Example #7
In this example we have a bond with odd first coupon and an odd last coupon period.
SELECT *
INTO #t
FROM
(
VALUES
('2040-12-01', .018),
('2035-12-01', .016),
('2030-12-01', .015),
('2025-12-01', .014),
('2020-12-01', .013),
('2015-12-01', .012)
) n (date_step, rate_step);
SELECT *
FROM wct.STEPCF( '2016-04-01', --@Settlement
'2044-06-15', --@Maturity
'SELECT * FROM #t', --@Step
0.02125, --@Yield
100, --@Redemption
2, --@Frequency
1, --@Basis
'2015-11-14', --@Issue
'2016-06-01', --@FirstCoupon
'2043-12-01' --@LastCoupon
);
This produces the following result.
{"columns":[{"field":"date_pmt"},{"field":"amt_cashflow"},{"field":"N"},{"field":"PVF"},{"field":"PVCF"},{"field":"cumPVCF"}],"rows":[{"date_pmt":"2016-04-01 00:00:00.000","amt_cashflow":"-0.455737704918033","N":"0","PVF":"1","PVCF":"-0.455737704918033","cumPVCF":"-0.455737704918033"},{"date_pmt":"2016-06-01 00:00:00.000","amt_cashflow":"0.655737704918033","N":"0.333333333333333","PVF":"0.996483214643168","PVCF":"0.653431616159455","cumPVCF":"0.197693911241422"},{"date_pmt":"2016-12-01 00:00:00.000","amt_cashflow":"0.6","N":"1.33333333333333","PVF":"0.986006891421812","PVCF":"0.591604134853087","cumPVCF":"0.789298046094509"},{"date_pmt":"2017-06-01 00:00:00.000","amt_cashflow":"0.6","N":"2.33333333333333","PVF":"0.975640708889857","PVCF":"0.585384425333914","cumPVCF":"1.37468247142842"},{"date_pmt":"2017-12-01 00:00:00.000","amt_cashflow":"0.6","N":"3.33333333333333","PVF":"0.96538350910561","PVCF":"0.579230105463366","cumPVCF":"1.95391257689179"},{"date_pmt":"2018-06-01 00:00:00.000","amt_cashflow":"0.6","N":"4.33333333333333","PVF":"0.95523414630116","PVCF":"0.573140487780696","cumPVCF":"2.52705306467248"},{"date_pmt":"2018-12-01 00:00:00.000","amt_cashflow":"0.6","N":"5.33333333333333","PVF":"0.945191486754394","PVCF":"0.567114892052636","cumPVCF":"3.09416795672512"},{"date_pmt":"2019-06-01 00:00:00.000","amt_cashflow":"0.6","N":"6.33333333333333","PVF":"0.935254408662357","PVCF":"0.561152645197414","cumPVCF":"3.65532060192254"},{"date_pmt":"2019-12-01 00:00:00.000","amt_cashflow":"0.6","N":"7.33333333333333","PVF":"0.925421802015937","PVCF":"0.555253081209562","cumPVCF":"4.2105736831321"},{"date_pmt":"2020-06-01 00:00:00.000","amt_cashflow":"0.6","N":"8.33333333333333","PVF":"0.915692568475881","PVCF":"0.549415541085528","cumPVCF":"4.75998922421763"},{"date_pmt":"2020-12-01 00:00:00.000","amt_cashflow":"0.6","N":"9.33333333333333","PVF":"0.906065621250098","PVCF":"0.543639372750059","cumPVCF":"5.30362859696768"},{"date_pmt":"2021-06-01 00:00:00.000","amt_cashflow":"0.65","N":"10.3333333333333","PVF":"0.896539884972268","PVCF":"0.582750925231974","cumPVCF":"5.88637952219966"},{"date_pmt":"2021-12-01 00:00:00.000","amt_cashflow":"0.65","N":"11.3333333333333","PVF":"0.887114295581712","PVCF":"0.576624292128113","cumPVCF":"6.46300381432777"},{"date_pmt":"2022-06-01 00:00:00.000","amt_cashflow":"0.65","N":"12.3333333333333","PVF":"0.877787800204539","PVCF":"0.57056207013295","cumPVCF":"7.03356588446072"},{"date_pmt":"2022-12-01 00:00:00.000","amt_cashflow":"0.65","N":"13.3333333333333","PVF":"0.868559357036031","PVCF":"0.56456358207342","cumPVCF":"7.59812946653414"},{"date_pmt":"2023-06-01 00:00:00.000","amt_cashflow":"0.65","N":"14.3333333333333","PVF":"0.859427935224273","PVCF":"0.558628157895778","cumPVCF":"8.15675762442992"},{"date_pmt":"2023-12-01 00:00:00.000","amt_cashflow":"0.65","N":"15.3333333333333","PVF":"0.850392514755001","PVCF":"0.552755134590751","cumPVCF":"8.70951275902067"},{"date_pmt":"2024-06-01 00:00:00.000","amt_cashflow":"0.65","N":"16.3333333333333","PVF":"0.841452086337663","PVCF":"0.546943856119481","cumPVCF":"9.25645661514015"},{"date_pmt":"2024-12-01 00:00:00.000","amt_cashflow":"0.65","N":"17.3333333333333","PVF":"0.832605651292679","PVCF":"0.541193673340241","cumPVCF":"9.79765028848039"},{"date_pmt":"2025-06-01 00:00:00.000","amt_cashflow":"0.65","N":"18.3333333333333","PVF":"0.82385222143988","PVCF":"0.535503943935922","cumPVCF":"10.3331542324163"},{"date_pmt":"2025-12-01 00:00:00.000","amt_cashflow":"0.65","N":"19.3333333333333","PVF":"0.815190818988131","PVCF":"0.529874032342285","cumPVCF":"10.8630282647586"},{"date_pmt":"2026-06-01 00:00:00.000","amt_cashflow":"0.7","N":"20.3333333333333","PVF":"0.806620476426104","PVCF":"0.564634333498273","cumPVCF":"11.4276625982569"},{"date_pmt":"2026-12-01 00:00:00.000","amt_cashflow":"0.7","N":"21.3333333333333","PVF":"0.798140236414203","PVCF":"0.558698165489942","cumPVCF":"11.9863607637468"},{"date_pmt":"2027-06-01 00:00:00.000","amt_cashflow":"0.7","N":"22.3333333333333","PVF":"0.789749151677628","PVCF":"0.552824406174339","cumPVCF":"12.5391851699212"},{"date_pmt":"2027-12-01 00:00:00.000","amt_cashflow":"0.7","N":"23.3333333333333","PVF":"0.781446284900559","PVCF":"0.547012399430391","cumPVCF":"13.0861975693515"},{"date_pmt":"2028-06-01 00:00:00.000","amt_cashflow":"0.7","N":"24.3333333333333","PVF":"0.773230708621456","PVCF":"0.541261496035019","cumPVCF":"13.6274590653866"},{"date_pmt":"2028-12-01 00:00:00.000","amt_cashflow":"0.7","N":"25.3333333333333","PVF":"0.765101505129456","PVCF":"0.535571053590619","cumPVCF":"14.1630301189772"},{"date_pmt":"2029-06-01 00:00:00.000","amt_cashflow":"0.7","N":"26.3333333333333","PVF":"0.757057766361861","PVCF":"0.529940436453303","cumPVCF":"14.6929705554305"},{"date_pmt":"2029-12-01 00:00:00.000","amt_cashflow":"0.7","N":"27.3333333333333","PVF":"0.749098593802707","PVCF":"0.524369015661895","cumPVCF":"15.2173395710924"},{"date_pmt":"2030-06-01 00:00:00.000","amt_cashflow":"0.7","N":"28.3333333333333","PVF":"0.741223098382394","PVCF":"0.518856168867676","cumPVCF":"15.7361957399601"},{"date_pmt":"2030-12-01 00:00:00.000","amt_cashflow":"0.7","N":"29.3333333333333","PVF":"0.733430400378374","PVCF":"0.513401280264862","cumPVCF":"16.2495970202249"},{"date_pmt":"2031-06-01 00:00:00.000","amt_cashflow":"0.75","N":"30.3333333333333","PVF":"0.725719629316882","PVCF":"0.544289721987661","cumPVCF":"16.7938867422126"},{"date_pmt":"2031-12-01 00:00:00.000","amt_cashflow":"0.75","N":"31.3333333333333","PVF":"0.718089923875703","PVCF":"0.538567442906777","cumPVCF":"17.3324541851194"},{"date_pmt":"2032-06-01 00:00:00.000","amt_cashflow":"0.75","N":"32.3333333333333","PVF":"0.710540431787955","PVCF":"0.532905323840967","cumPVCF":"17.8653595089603"},{"date_pmt":"2032-12-01 00:00:00.000","amt_cashflow":"0.75","N":"33.3333333333333","PVF":"0.703070309746895","PVCF":"0.527302732310171","cumPVCF":"18.3926622412705"},{"date_pmt":"2033-06-01 00:00:00.000","amt_cashflow":"0.75","N":"34.3333333333333","PVF":"0.695678723311708","PVCF":"0.521759042483781","cumPVCF":"18.9144212837543"},{"date_pmt":"2033-12-01 00:00:00.000","amt_cashflow":"0.75","N":"35.3333333333333","PVF":"0.688364846814306","PVCF":"0.516273635110729","cumPVCF":"19.430694918865"},{"date_pmt":"2034-06-01 00:00:00.000","amt_cashflow":"0.75","N":"36.3333333333333","PVF":"0.681127863267093","PVCF":"0.51084589745032","cumPVCF":"19.9415408163153"},{"date_pmt":"2034-12-01 00:00:00.000","amt_cashflow":"0.75","N":"37.3333333333333","PVF":"0.673966964271706","PVCF":"0.505475223203779","cumPVCF":"20.4470160395191"},{"date_pmt":"2035-06-01 00:00:00.000","amt_cashflow":"0.75","N":"38.3333333333333","PVF":"0.666881349928713","PVCF":"0.500161012446535","cumPVCF":"20.9471770519656"},{"date_pmt":"2035-12-01 00:00:00.000","amt_cashflow":"0.75","N":"39.3333333333333","PVF":"0.659870228748263","PVCF":"0.494902671561197","cumPVCF":"21.4420797235268"},{"date_pmt":"2036-06-01 00:00:00.000","amt_cashflow":"0.8","N":"40.3333333333333","PVF":"0.65293281756167","PVCF":"0.522346254049336","cumPVCF":"21.9644259775762"},{"date_pmt":"2036-12-01 00:00:00.000","amt_cashflow":"0.8","N":"41.3333333333333","PVF":"0.646068341433935","PVCF":"0.516854673147148","cumPVCF":"22.4812806507233"},{"date_pmt":"2037-06-01 00:00:00.000","amt_cashflow":"0.8","N":"42.3333333333333","PVF":"0.639276033577177","PVCF":"0.511420826861742","cumPVCF":"22.9927014775851"},{"date_pmt":"2037-12-01 00:00:00.000","amt_cashflow":"0.8","N":"43.3333333333333","PVF":"0.632555135264987","PVCF":"0.506044108211989","cumPVCF":"23.4987455857971"},{"date_pmt":"2038-06-01 00:00:00.000","amt_cashflow":"0.8","N":"44.3333333333333","PVF":"0.625904895747668","PVCF":"0.500723916598134","cumPVCF":"23.9994695023952"},{"date_pmt":"2038-12-01 00:00:00.000","amt_cashflow":"0.8","N":"45.3333333333333","PVF":"0.619324572168378","PVCF":"0.495459657734703","cumPVCF":"24.4949291601299"},{"date_pmt":"2039-06-01 00:00:00.000","amt_cashflow":"0.8","N":"46.3333333333333","PVF":"0.612813429480152","PVCF":"0.490250743584121","cumPVCF":"24.985179903714"},{"date_pmt":"2039-12-01 00:00:00.000","amt_cashflow":"0.8","N":"47.3333333333333","PVF":"0.606370740363787","PVCF":"0.485096592291029","cumPVCF":"25.470276496005"},{"date_pmt":"2040-06-01 00:00:00.000","amt_cashflow":"0.8","N":"48.3333333333333","PVF":"0.599995785146604","PVCF":"0.479996628117283","cumPVCF":"25.9502731241223"},{"date_pmt":"2040-12-01 00:00:00.000","amt_cashflow":"0.8","N":"49.3333333333333","PVF":"0.593687851722057","PVCF":"0.474950281377646","cumPVCF":"26.4252234055"},{"date_pmt":"2041-06-01 00:00:00.000","amt_cashflow":"0.9","N":"50.3333333333333","PVF":"0.587446235470186","PVCF":"0.528701611923167","cumPVCF":"26.9539250174231"},{"date_pmt":"2041-12-01 00:00:00.000","amt_cashflow":"0.9","N":"51.3333333333333","PVF":"0.58127023917891","PVCF":"0.523143215261019","cumPVCF":"27.4770682326842"},{"date_pmt":"2042-06-01 00:00:00.000","amt_cashflow":"0.9","N":"52.3333333333333","PVF":"0.575159172966145","PVCF":"0.51764325566953","cumPVCF":"27.9947114883537"},{"date_pmt":"2042-12-01 00:00:00.000","amt_cashflow":"0.9","N":"53.3333333333333","PVF":"0.569112354202741","PVCF":"0.512201118782467","cumPVCF":"28.5069126071361"},{"date_pmt":"2043-06-01 00:00:00.000","amt_cashflow":"0.9","N":"54.3333333333333","PVF":"0.563129107436231","PVCF":"0.506816196692608","cumPVCF":"29.0137288038288"},{"date_pmt":"2043-12-01 00:00:00.000","amt_cashflow":"0.900000000000006","N":"55.3333333333333","PVF":"0.55720876431538","PVCF":"0.501487887883847","cumPVCF":"29.5152166917126"},{"date_pmt":"2044-06-15 00:00:00.000","amt_cashflow":"100.968852459016","N":"56.4098360655738","PVF":"0.55090504709795","PVCF":"55.6242504193603","cumPVCF":"85.1394671110729"},{"date_pmt":"date_pmt","amt_cashflow":"amt_cashflow","N":"N","PVF":"PVF","PVCF":"PVCF","cumPVCF":"cumPVCF"},{"date_pmt":"-----------------------","amt_cashflow":"----------------------","N":"----------------------","PVF":"----------------------","PVCF":"----------------------","cumPVCF":"----------------------"},{"date_pmt":"2016-04-01 00:00:00.000","amt_cashflow":"-0.455737704918033","N":"0","PVF":"1","PVCF":"-0.455737704918033","cumPVCF":"-0.455737704918033"},{"date_pmt":"2016-06-01 00:00:00.000","amt_cashflow":"0.655737704918033","N":"0.333333333333333","PVF":"0.996483214643168","PVCF":"0.653431616159455","cumPVCF":"0.197693911241422"},{"date_pmt":"2016-12-01 00:00:00.000","amt_cashflow":"0.6","N":"1.33333333333333","PVF":"0.986006891421812","PVCF":"0.591604134853087","cumPVCF":"0.789298046094509"},{"date_pmt":"2017-06-01 00:00:00.000","amt_cashflow":"0.6","N":"2.33333333333333","PVF":"0.975640708889857","PVCF":"0.585384425333914","cumPVCF":"1.37468247142842"},{"date_pmt":"2017-12-01 00:00:00.000","amt_cashflow":"0.6","N":"3.33333333333333","PVF":"0.96538350910561","PVCF":"0.579230105463366","cumPVCF":"1.95391257689179"},{"date_pmt":"2018-06-01 00:00:00.000","amt_cashflow":"0.6","N":"4.33333333333333","PVF":"0.95523414630116","PVCF":"0.573140487780696","cumPVCF":"2.52705306467248"},{"date_pmt":"2018-12-01 00:00:00.000","amt_cashflow":"0.6","N":"5.33333333333333","PVF":"0.945191486754394","PVCF":"0.567114892052636","cumPVCF":"3.09416795672512"},{"date_pmt":"2019-06-01 00:00:00.000","amt_cashflow":"0.6","N":"6.33333333333333","PVF":"0.935254408662357","PVCF":"0.561152645197414","cumPVCF":"3.65532060192254"},{"date_pmt":"2019-12-01 00:00:00.000","amt_cashflow":"0.6","N":"7.33333333333333","PVF":"0.925421802015937","PVCF":"0.555253081209562","cumPVCF":"4.2105736831321"},{"date_pmt":"2020-06-01 00:00:00.000","amt_cashflow":"0.6","N":"8.33333333333333","PVF":"0.915692568475881","PVCF":"0.549415541085528","cumPVCF":"4.75998922421763"},{"date_pmt":"2020-12-01 00:00:00.000","amt_cashflow":"0.6","N":"9.33333333333333","PVF":"0.906065621250098","PVCF":"0.543639372750059","cumPVCF":"5.30362859696768"},{"date_pmt":"2021-06-01 00:00:00.000","amt_cashflow":"0.65","N":"10.3333333333333","PVF":"0.896539884972268","PVCF":"0.582750925231974","cumPVCF":"5.88637952219966"},{"date_pmt":"2021-12-01 00:00:00.000","amt_cashflow":"0.65","N":"11.3333333333333","PVF":"0.887114295581712","PVCF":"0.576624292128113","cumPVCF":"6.46300381432777"},{"date_pmt":"2022-06-01 00:00:00.000","amt_cashflow":"0.65","N":"12.3333333333333","PVF":"0.877787800204539","PVCF":"0.57056207013295","cumPVCF":"7.03356588446072"},{"date_pmt":"2022-12-01 00:00:00.000","amt_cashflow":"0.65","N":"13.3333333333333","PVF":"0.868559357036031","PVCF":"0.56456358207342","cumPVCF":"7.59812946653414"},{"date_pmt":"2023-06-01 00:00:00.000","amt_cashflow":"0.65","N":"14.3333333333333","PVF":"0.859427935224273","PVCF":"0.558628157895778","cumPVCF":"8.15675762442992"},{"date_pmt":"2023-12-01 00:00:00.000","amt_cashflow":"0.65","N":"15.3333333333333","PVF":"0.850392514755001","PVCF":"0.552755134590751","cumPVCF":"8.70951275902067"},{"date_pmt":"2024-06-01 00:00:00.000","amt_cashflow":"0.65","N":"16.3333333333333","PVF":"0.841452086337663","PVCF":"0.546943856119481","cumPVCF":"9.25645661514015"},{"date_pmt":"2024-12-01 00:00:00.000","amt_cashflow":"0.65","N":"17.3333333333333","PVF":"0.832605651292679","PVCF":"0.541193673340241","cumPVCF":"9.79765028848039"},{"date_pmt":"2025-06-01 00:00:00.000","amt_cashflow":"0.65","N":"18.3333333333333","PVF":"0.82385222143988","PVCF":"0.535503943935922","cumPVCF":"10.3331542324163"},{"date_pmt":"2025-12-01 00:00:00.000","amt_cashflow":"0.65","N":"19.3333333333333","PVF":"0.815190818988131","PVCF":"0.529874032342285","cumPVCF":"10.8630282647586"},{"date_pmt":"2026-06-01 00:00:00.000","amt_cashflow":"0.7","N":"20.3333333333333","PVF":"0.806620476426104","PVCF":"0.564634333498273","cumPVCF":"11.4276625982569"},{"date_pmt":"2026-12-01 00:00:00.000","amt_cashflow":"0.7","N":"21.3333333333333","PVF":"0.798140236414203","PVCF":"0.558698165489942","cumPVCF":"11.9863607637468"},{"date_pmt":"2027-06-01 00:00:00.000","amt_cashflow":"0.7","N":"22.3333333333333","PVF":"0.789749151677628","PVCF":"0.552824406174339","cumPVCF":"12.5391851699212"},{"date_pmt":"2027-12-01 00:00:00.000","amt_cashflow":"0.7","N":"23.3333333333333","PVF":"0.781446284900559","PVCF":"0.547012399430391","cumPVCF":"13.0861975693515"},{"date_pmt":"2028-06-01 00:00:00.000","amt_cashflow":"0.7","N":"24.3333333333333","PVF":"0.773230708621456","PVCF":"0.541261496035019","cumPVCF":"13.6274590653866"},{"date_pmt":"2028-12-01 00:00:00.000","amt_cashflow":"0.7","N":"25.3333333333333","PVF":"0.765101505129456","PVCF":"0.535571053590619","cumPVCF":"14.1630301189772"},{"date_pmt":"2029-06-01 00:00:00.000","amt_cashflow":"0.7","N":"26.3333333333333","PVF":"0.757057766361861","PVCF":"0.529940436453303","cumPVCF":"14.6929705554305"},{"date_pmt":"2029-12-01 00:00:00.000","amt_cashflow":"0.7","N":"27.3333333333333","PVF":"0.749098593802707","PVCF":"0.524369015661895","cumPVCF":"15.2173395710924"},{"date_pmt":"2030-06-01 00:00:00.000","amt_cashflow":"0.7","N":"28.3333333333333","PVF":"0.741223098382394","PVCF":"0.518856168867676","cumPVCF":"15.7361957399601"},{"date_pmt":"2030-12-01 00:00:00.000","amt_cashflow":"0.7","N":"29.3333333333333","PVF":"0.733430400378374","PVCF":"0.513401280264862","cumPVCF":"16.2495970202249"},{"date_pmt":"2031-06-01 00:00:00.000","amt_cashflow":"0.75","N":"30.3333333333333","PVF":"0.725719629316882","PVCF":"0.544289721987661","cumPVCF":"16.7938867422126"},{"date_pmt":"2031-12-01 00:00:00.000","amt_cashflow":"0.75","N":"31.3333333333333","PVF":"0.718089923875703","PVCF":"0.538567442906777","cumPVCF":"17.3324541851194"},{"date_pmt":"2032-06-01 00:00:00.000","amt_cashflow":"0.75","N":"32.3333333333333","PVF":"0.710540431787955","PVCF":"0.532905323840967","cumPVCF":"17.8653595089603"},{"date_pmt":"2032-12-01 00:00:00.000","amt_cashflow":"0.75","N":"33.3333333333333","PVF":"0.703070309746895","PVCF":"0.527302732310171","cumPVCF":"18.3926622412705"},{"date_pmt":"2033-06-01 00:00:00.000","amt_cashflow":"0.75","N":"34.3333333333333","PVF":"0.695678723311708","PVCF":"0.521759042483781","cumPVCF":"18.9144212837543"},{"date_pmt":"2033-12-01 00:00:00.000","amt_cashflow":"0.75","N":"35.3333333333333","PVF":"0.688364846814306","PVCF":"0.516273635110729","cumPVCF":"19.430694918865"},{"date_pmt":"2034-06-01 00:00:00.000","amt_cashflow":"0.75","N":"36.3333333333333","PVF":"0.681127863267093","PVCF":"0.51084589745032","cumPVCF":"19.9415408163153"},{"date_pmt":"2034-12-01 00:00:00.000","amt_cashflow":"0.75","N":"37.3333333333333","PVF":"0.673966964271706","PVCF":"0.505475223203779","cumPVCF":"20.4470160395191"},{"date_pmt":"2035-06-01 00:00:00.000","amt_cashflow":"0.75","N":"38.3333333333333","PVF":"0.666881349928713","PVCF":"0.500161012446535","cumPVCF":"20.9471770519656"},{"date_pmt":"2035-12-01 00:00:00.000","amt_cashflow":"0.75","N":"39.3333333333333","PVF":"0.659870228748263","PVCF":"0.494902671561197","cumPVCF":"21.4420797235268"},{"date_pmt":"2036-06-01 00:00:00.000","amt_cashflow":"0.8","N":"40.3333333333333","PVF":"0.65293281756167","PVCF":"0.522346254049336","cumPVCF":"21.9644259775762"},{"date_pmt":"2036-12-01 00:00:00.000","amt_cashflow":"0.8","N":"41.3333333333333","PVF":"0.646068341433935","PVCF":"0.516854673147148","cumPVCF":"22.4812806507233"},{"date_pmt":"2037-06-01 00:00:00.000","amt_cashflow":"0.8","N":"42.3333333333333","PVF":"0.639276033577177","PVCF":"0.511420826861742","cumPVCF":"22.9927014775851"},{"date_pmt":"2037-12-01 00:00:00.000","amt_cashflow":"0.8","N":"43.3333333333333","PVF":"0.632555135264987","PVCF":"0.506044108211989","cumPVCF":"23.4987455857971"},{"date_pmt":"2038-06-01 00:00:00.000","amt_cashflow":"0.8","N":"44.3333333333333","PVF":"0.625904895747668","PVCF":"0.500723916598134","cumPVCF":"23.9994695023952"},{"date_pmt":"2038-12-01 00:00:00.000","amt_cashflow":"0.8","N":"45.3333333333333","PVF":"0.619324572168378","PVCF":"0.495459657734703","cumPVCF":"24.4949291601299"},{"date_pmt":"2039-06-01 00:00:00.000","amt_cashflow":"0.8","N":"46.3333333333333","PVF":"0.612813429480152","PVCF":"0.490250743584121","cumPVCF":"24.985179903714"},{"date_pmt":"2039-12-01 00:00:00.000","amt_cashflow":"0.8","N":"47.3333333333333","PVF":"0.606370740363787","PVCF":"0.485096592291029","cumPVCF":"25.470276496005"},{"date_pmt":"2040-06-01 00:00:00.000","amt_cashflow":"0.8","N":"48.3333333333333","PVF":"0.599995785146604","PVCF":"0.479996628117283","cumPVCF":"25.9502731241223"},{"date_pmt":"2040-12-01 00:00:00.000","amt_cashflow":"0.8","N":"49.3333333333333","PVF":"0.593687851722057","PVCF":"0.474950281377646","cumPVCF":"26.4252234055"},{"date_pmt":"2041-06-01 00:00:00.000","amt_cashflow":"0.9","N":"50.3333333333333","PVF":"0.587446235470186","PVCF":"0.528701611923167","cumPVCF":"26.9539250174231"},{"date_pmt":"2041-12-01 00:00:00.000","amt_cashflow":"0.9","N":"51.3333333333333","PVF":"0.58127023917891","PVCF":"0.523143215261019","cumPVCF":"27.4770682326842"},{"date_pmt":"2042-06-01 00:00:00.000","amt_cashflow":"0.9","N":"52.3333333333333","PVF":"0.575159172966145","PVCF":"0.51764325566953","cumPVCF":"27.9947114883537"},{"date_pmt":"2042-12-01 00:00:00.000","amt_cashflow":"0.9","N":"53.3333333333333","PVF":"0.569112354202741","PVCF":"0.512201118782467","cumPVCF":"28.5069126071361"},{"date_pmt":"2043-06-01 00:00:00.000","amt_cashflow":"0.9","N":"54.3333333333333","PVF":"0.563129107436231","PVCF":"0.506816196692608","cumPVCF":"29.0137288038288"},{"date_pmt":"2043-12-01 00:00:00.000","amt_cashflow":"0.900000000000006","N":"55.3333333333333","PVF":"0.55720876431538","PVCF":"0.501487887883847","cumPVCF":"29.5152166917126"},{"date_pmt":"2044-06-15 00:00:00.000","amt_cashflow":"100.968852459016","N":"56.4098360655738","PVF":"0.55090504709795","PVCF":"55.6242504193603","cumPVCF":"85.1394671110729"}]}
See Also
BONDCF - Cash flows for a bond paying regular periodic interest