Login     Register

        Contact Us     Search

XLeratorDB/financial Documentation

SQL Server bond cash flow schedule


BONDCF

Updated: 31 October 2014


Use the table-valued function BONDCF to return the cash flows of a bond with regular periodic coupon payments. BONDCF also supports odd first and odd last coupon bonds with up to 2 quasi-coupon periods each.
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 will 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.
Syntax
SELECT * FROM [wct].[BONDCF](
  <@Settlement, datetime,>
 ,<@Maturity, datetime,>
 ,<@Rate, float,>
 ,<@Yield, float,>
 ,<@Redemption, float,>
 ,<@Frequency, float,>
 ,<@Basis, nvarchar(4000),>
 ,<@Issue, datetime,>
 ,<@FirstCoupon, datetime,>
 ,<@LastCoupon, datetime,>)
Arguments
@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. 
@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. 
@Rate
the bond’s annual coupon rate. @Rate is an expression of type float or of a type that can be implicitly converted to float.
@Yield
the bond’s annual yield. @Yield is an expression of type float or of a type that can be implicitly converted to float.
@Redemption
the bond’s redemption value per 100 face value. @Redemption is an expression of type float or of a type that can be implicitly converted to float.
@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.
@Basis
is the type of day count to use. @Basis is an expression of the character string data type category.

@Basis
Day count basis
0, 'BOND'
US (NASD) 30/360
1, 'ACTUAL'
Actual/Actual
2, 'A360'
Actual/360
3, 'A365'
Actual/365
4, '30E/360 (ISDA)', '30E/360', 'ISDA', '30E/360 ISDA', 'EBOND'
European 30/360
5, '30/360', '30/360 ISDA', 'GERMAN'
30/360 ISDA
6, 'NL/ACT'
No Leap Year/ACT
7, 'NL/365'
No Leap Year /365
8, 'NL/360'
No Leap Year /360
9, 'A/365'
Actual/365
10, 'BOND NON-EOM'
US (NASD) 30/360 non-end-of-month
11, 'ACTUAL NON-EOM'
Actual/Actual non-end-of-month
12, 'A360 NON-EOM'
Actual/360 non-end-of-month
13, 'A365 NON-EOM'
Actual/365 non-end-of-month
14, '30E/360 NON-EOM', '30E/360 ICMA NON-EOM', 'EBOND NON-EOM'
European 30/360 non-end-of-month
15, '30/360 NON-EOM', '30/360 ISDA NON-EOM', 'GERMAN NON-EOM'
30/360 ISDA non-end-of-month
16, 'NL/ACT NON-EOM'
No Leap Year/ACT non-end-of-month
17, 'NL/365 NON-EOM'
No Leap Year/365 non-end-of-month
18, 'NL/360 NON-EOM'
No Leap Year/360 non-end-of-month
19, 'A/365 NON-EOM'
Actual/365 non-end-of-month

@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. 
@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. 
@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
RETURNS TABLE (
       [date_pmt] [datetime] NULL,
       [amt_cashflow] [float] NULL,
       [N] [float] NULL,
       [PVF] [float] NULL,
       [PVCF] [float] NULL,
       [cumPVCF] [float] NULL
)

Column
Description
date_pmt
Date of the cash flow.
amt_cashflow
Amount of the cash flow.
N
Number of coupons from the settlement date to date_pmt.
PVF
Present value factor
PVCF
Present value of the cash flow; PVF * amt_cashflow.
cumPVCF
Sum of the PVCF.

Remarks
·         If @Settlement is NULL then @Settlement = GETDATE().
·         If @Rate is NULL then @Rate = 0.
·         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 BONDCF returns an error.
·         If @Basis invalid (see above list), BONDCF 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
In this example we generate the cash flows for bond which pays regular period interest and is maturing on 2034-06-15. The settlement date is 2014-05-01, the yield is 2.76%, the coupon rate is 2.50%, the redemption value is 100, the coupon is paid twice-yearly and the day-count convention is actual/actual.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2034-06-15' --@Maturity
       ,0.025        --@Rate
       ,0.0276       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result (which has been reformatted for ease of viewing).

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-05-01
-0.940934066
0
1
-0.940934066
-0.940934066
2014-06-15
1.25
0.247252747
0.996616976
1.245771221
0.304837155
2014-12-15
1.25
1.247252747
0.983050874
1.228813593
1.533650748
2015-06-15
1.25
2.247252747
0.969669436
1.212086795
2.745737543
2015-12-15
1.25
3.247252747
0.956470148
1.195587685
3.941325228
2016-06-15
1.25
4.247252747
0.943450531
1.179313164
5.120638392
2016-12-15
1.25
5.247252747
0.930608139
1.163260173
6.283898565
2017-06-15
1.25
6.247252747
0.917940559
1.147425698
7.431324263
2017-12-15
1.25
7.247252747
0.905445412
1.131806765
8.563131028
2018-06-15
1.25
8.247252747
0.893120351
1.116400439
9.679531467
2018-12-15
1.25
9.247252747
0.880963061
1.101203826
10.78073529
2019-06-15
1.25
10.24725275
0.868971258
1.086214072
11.86694937
2019-12-15
1.25
11.24725275
0.857142689
1.071428361
12.93837773
2020-06-15
1.25
12.24725275
0.845475132
1.056843915
13.99522164
2020-12-15
1.25
13.24725275
0.833966395
1.042457994
15.03767964
2021-06-15
1.25
14.24725275
0.822614318
1.028267897
16.06594753
2021-12-15
1.25
15.24725275
0.811416767
1.014270958
17.08021849
2022-06-15
1.25
16.24725275
0.800371638
1.000464547
18.08068304
2022-12-15
1.25
17.24725275
0.789476857
0.986846072
19.06752911
2023-06-15
1.25
18.24725275
0.778730378
0.973412973
20.04094208
2023-12-15
1.25
19.24725275
0.768130182
0.960162727
21.00110481
2024-06-15
1.25
20.24725275
0.757674277
0.947092846
21.94819766
2024-12-15
1.25
21.24725275
0.747360699
0.934200874
22.88239853
2025-06-15
1.25
22.24725275
0.737187511
0.921484389
23.80388292
2025-12-15
1.25
23.24725275
0.727152803
0.908941003
24.71282392
2026-06-15
1.25
24.24725275
0.717254688
0.89656836
25.60939228
2026-12-15
1.25
25.24725275
0.707491308
0.884364135
26.49375642
2027-06-15
1.25
26.24725275
0.697860828
0.872326035
27.36608245
2027-12-15
1.25
27.24725275
0.688361441
0.860451801
28.22653425
2028-06-15
1.25
28.24725275
0.67899136
0.8487392
29.07527345
2028-12-15
1.25
29.24725275
0.669748826
0.837186032
29.91245948
2029-06-15
1.25
30.24725275
0.660632103
0.825790129
30.73824961
2029-12-15
1.25
31.24725275
0.651639478
0.814549348
31.55279896
2030-06-15
1.25
32.24725275
0.642769262
0.803461578
32.35626054
2030-12-15
1.25
33.24725275
0.634019789
0.792524737
33.14878527
2031-06-15
1.25
34.24725275
0.625389415
0.781736769
33.93052204
2031-12-15
1.25
35.24725275
0.616876519
0.771095649
34.70161769
2032-06-15
1.25
36.24725275
0.608479502
0.760599378
35.46221707
2032-12-15
1.25
37.24725275
0.600196787
0.750245983
36.21246305
2033-06-15
1.25
38.24725275
0.592026816
0.740033521
36.95249657
2033-12-15
1.25
39.24725275
0.583968057
0.729960072
37.68245665
2034-06-15
101.25
40.24725275
0.576018995
58.32192326
96.00437991

 
In this example we generate the cash flows for a zero-coupon bond
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2044-06-15' --@Maturity
       ,0.0000       --@Rate
       ,0.0301       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,NULL         --@LastCoupon
       )
WHERE
   amt_cashflow != 0
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2044-06-15
100
60.24725275
0.406583576
40.65835761
40.65835761

In this example we generate the cash flow of a bond paying regular periodic interest settling in the final coupon period.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2014-07-15' --@Maturity
       ,0.0190       --@Rate
       ,0.0005       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,0            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-05-01
-0.559444444
0
1
-0.559444444
-0.559444444
2014-07-15
100.95
0.411111111
0.999897233
100.9396256
100.3801812

Here we generate the cash flows for a bond paying regular periodic interest which matures on the 30th of September 2034, with semi-annual coupons payable on March 30th and September 30th.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2034-09-30' --@Maturity
       ,0.0257       --@Rate
       ,0.0269       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,11           --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-05-01
-0.223478261
0
1
-0.223478261
-0.223478261
2014-09-30
1.285
0.826086957
0.98902387
1.270895673
1.047417412
2015-03-30
1.285
1.826086957
0.975898041
1.254028983
2.301446395
2015-09-30
1.285
2.826086957
0.962946412
1.237386139
3.538832534
2016-03-30
1.285
3.826086957
0.95016667
1.220964171
4.759796706
2016-09-30
1.285
4.826086957
0.937556535
1.204760147
5.964556853
2017-03-30
1.285
5.826086957
0.925113755
1.188771175
7.153328028
2017-09-30
1.285
6.826086957
0.912836109
1.1729944
8.326322428
2018-03-30
1.285
7.826086957
0.900721406
1.157427007
9.483749435
2018-09-30
1.285
8.826086957
0.888767484
1.142066216
10.62581565
2019-03-30
1.285
9.826086957
0.876972207
1.126909287
11.75272494
2019-09-30
1.285
10.82608696
0.865333472
1.111953512
12.86467845
2020-03-30
1.285
11.82608696
0.853849201
1.097196223
13.96187467
2020-09-30
1.285
12.82608696
0.842517342
1.082634785
15.04450946
2021-03-30
1.285
13.82608696
0.831335875
1.068266599
16.11277606
2021-09-30
1.285
14.82608696
0.820302802
1.054089101
17.16686516
2022-03-30
1.285
15.82608696
0.809416155
1.040099759
18.20696492
2022-09-30
1.285
16.82608696
0.79867399
1.026296077
19.23326099
2023-03-30
1.285
17.82608696
0.788074389
1.01267559
20.24593658
2023-09-30
1.285
18.82608696
0.777615461
0.999235868
21.24517245
2024-03-30
1.285
19.82608696
0.767295339
0.98597451
22.23114696
2024-09-30
1.285
20.82608696
0.75711218
0.972889151
23.20403611
2025-03-30
1.285
21.82608696
0.747064167
0.959977455
24.16401357
2025-09-30
1.285
22.82608696
0.737149506
0.947237115
25.11125068
2026-03-30
1.285
23.82608696
0.727366428
0.93466586
26.04591654
2026-09-30
1.285
24.82608696
0.717713185
0.922261443
26.96817798
2027-03-30
1.285
25.82608696
0.708188056
0.910021652
27.87819964
2027-09-30
1.285
26.82608696
0.698789339
0.897944301
28.77614394
2028-03-30
1.285
27.82608696
0.689515358
0.886027235
29.66217117
2028-09-30
1.285
28.82608696
0.680364456
0.874268326
30.5364395
2029-03-30
1.285
29.82608696
0.671335
0.862665475
31.39910497
2029-09-30
1.285
30.82608696
0.662425379
0.851216612
32.25032158
2030-03-30
1.285
31.82608696
0.653634001
0.839919692
33.09024128
2030-09-30
1.285
32.82608696
0.644959299
0.828772699
33.91901398
2031-03-30
1.285
33.82608696
0.636399723
0.817773644
34.73678762
2031-09-30
1.285
34.82608696
0.627953745
0.806920562
35.54370818
2032-03-30
1.285
35.82608696
0.619619858
0.796211517
36.3399197
2032-09-30
1.285
36.82608696
0.611396574
0.785644597
37.1255643
2033-03-30
1.285
37.82608696
0.603282425
0.775217916
37.90078221
2033-09-30
1.285
38.82608696
0.595275963
0.764929613
38.66571182
2034-03-30
1.285
39.82608696
0.587375759
0.754777851
39.42048968
2034-09-30
101.285
40.82608696
0.579580403
58.70280112
98.12329079

Here's an example with a negative yield.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2014-09-30' --@Maturity
       ,0.0257       --@Rate
       ,-0.046219    --@Yield
       ,98           --@Redemption
       ,2            --@Frequency
       ,0            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-05-01
-0.221305556
0
1
-0.221305556
-0.221305556
2014-09-30
99.285
0.827777778
1.019502606
101.2213163
101.0000107

This is an example of bond paying interest every 26 weeks.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-10-01' --@Settlement
       ,'2023-03-13' --@Maturity
       ,0.1250       --@Rate
       ,0.1100       --@Yield
       ,100          --@Redemption
       ,182          --@Frequency
       ,9            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-10-01
-0.309065934
0
1
-0.309065934
-0.309065934
2015-03-23
6.25
0.950549451
0.950380216
5.939876353
5.630810419
2015-09-21
6.25
1.950549451
0.900834328
5.630214553
11.26102497
2016-03-21
6.25
2.950549451
0.853871401
5.336696258
16.59772123
2016-09-19
6.25
3.950549451
0.809356779
5.058479866
21.6562011
2017-03-20
6.25
4.950549451
0.767162823
4.794767645
26.45096874
2017-09-18
6.25
5.950549451
0.727168553
4.544803455
30.9957722
2018-03-19
6.25
6.950549451
0.689259292
4.307870574
35.30364277
2018-09-17
6.25
7.950549451
0.653326343
4.083289643
39.38693241
2019-03-18
6.25
8.950549451
0.619266676
3.870416724
43.25734914
2019-09-16
6.25
9.950549451
0.586982631
3.668641444
46.92599058
2020-03-16
6.25
10.95054945
0.556381641
3.477385255
50.40337584
2020-09-14
6.25
11.95054945
0.527375963
3.296099768
53.6994756
2021-03-15
6.25
12.95054945
0.499882429
3.124265183
56.82374079
2021-09-13
6.25
13.95054945
0.473822208
2.961388799
59.78512959
2022-03-14
6.25
14.95054945
0.449120576
2.807003601
62.59213319
2022-09-12
6.25
15.95054945
0.425706707
2.66066692
65.25280011
2023-03-13
106.25
16.95054945
0.403513467
42.87330582
108.1261059

Here's an example of a bond with odd short first coupon settling on the issue date of the bond.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2034-06-15' --@Maturity
       ,0.0250       --@Rate
       ,0.0276       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,'2014-05-01' --@Issue
       ,'2014-06-15' --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

2014-05-01
0
0
1
0
0
2014-06-15
0.309065934
0.247252747
0.996616976
0.308020357
0.308020357
2014-12-15
1.25
1.247252747
0.983050874
1.228813593
1.53683395
2015-06-15
1.25
2.247252747
0.969669436
1.212086795
2.748920745
2015-12-15
1.25
3.247252747
0.956470148
1.195587685
3.94450843
2016-06-15
1.25
4.247252747
0.943450531
1.179313164
5.123821594
2016-12-15
1.25
5.247252747
0.930608139
1.163260173
6.287081767
2017-06-15
1.25
6.247252747
0.917940559
1.147425698
7.434507465
2017-12-15
1.25
7.247252747
0.905445412
1.131806765
8.56631423
2018-06-15
1.25
8.247252747
0.893120351
1.116400439
9.68271467
2018-12-15
1.25
9.247252747
0.880963061
1.101203826
10.7839185
2019-06-15
1.25
10.24725275
0.868971258
1.086214072
11.87013257
2019-12-15
1.25
11.24725275
0.857142689
1.071428361
12.94156093
2020-06-15
1.25
12.24725275
0.845475132
1.056843915
13.99840484
2020-12-15
1.25
13.24725275
0.833966395
1.042457994
15.04086284
2021-06-15
1.25
14.24725275
0.822614318
1.028267897
16.06913074
2021-12-15
1.25
15.24725275
0.811416767
1.014270958
17.08340169
2022-06-15
1.25
16.24725275
0.800371638
1.000464547
18.08386624
2022-12-15
1.25
17.24725275
0.789476857
0.986846072
19.07071231
2023-06-15
1.25
18.24725275
0.778730378
0.973412973
20.04412528
2023-12-15
1.25
19.24725275
0.768130182
0.960162727
21.00428801
2024-06-15
1.25
20.24725275
0.757674277
0.947092846
21.95138086
2024-12-15
1.25
21.24725275
0.747360699
0.934200874
22.88558173
2025-06-15
1.25
22.24725275
0.737187511
0.921484389
23.80706612
2025-12-15
1.25
23.24725275
0.727152803
0.908941003
24.71600712
2026-06-15
1.25
24.24725275
0.717254688
0.89656836
25.61257548
2026-12-15
1.25
25.24725275
0.707491308
0.884364135
26.49693962
2027-06-15
1.25
26.24725275
0.697860828
0.872326035
27.36926565
2027-12-15
1.25
27.24725275
0.688361441
0.860451801
28.22971745
2028-06-15
1.25
28.24725275
0.67899136
0.8487392
29.07845665
2028-12-15
1.25
29.24725275
0.669748826
0.837186032
29.91564269
2029-06-15
1.25
30.24725275
0.660632103
0.825790129
30.74143281
2029-12-15
1.25
31.24725275
0.651639478
0.814549348
31.55598216
2030-06-15
1.25
32.24725275
0.642769262
0.803461578
32.35944374
2030-12-15
1.25
33.24725275
0.634019789
0.792524737
33.15196848
2031-06-15
1.25
34.24725275
0.625389415
0.781736769
33.93370525
2031-12-15
1.25
35.24725275
0.616876519
0.771095649
34.7048009
2032-06-15
1.25
36.24725275
0.608479502
0.760599378
35.46540027
2032-12-15
1.25
37.24725275
0.600196787
0.750245983
36.21564626
2033-06-15
1.25
38.24725275
0.592026816
0.740033521
36.95567978
2033-12-15
1.25
39.24725275
0.583968057
0.729960072
37.68563985
2034-06-15
101.25
40.24725275
0.576018995
58.32192326
96.00756311

This is a bond with an odd long first coupon, also settling on the issue date.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-05-01' --@Settlement
       ,'2034-06-15' --@Maturity
       ,0.0250       --@Rate
       ,0.0276       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,'2014-05-01' --@Issue
       ,'2014-12-15' --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-05-01
0
0
1
0
0
2014-12-15
1.559065934
1.247252747
0.983050874
1.53264113
1.53264113
2015-06-15
1.25
2.247252747
0.969669436
1.212086795
2.744727925
2015-12-15
1.25
3.247252747
0.956470148
1.195587685
3.94031561
2016-06-15
1.25
4.247252747
0.943450531
1.179313164
5.119628774
2016-12-15
1.25
5.247252747
0.930608139
1.163260173
6.282888947
2017-06-15
1.25
6.247252747
0.917940559
1.147425698
7.430314645
2017-12-15
1.25
7.247252747
0.905445412
1.131806765
8.56212141
2018-06-15
1.25
8.247252747
0.893120351
1.116400439
9.67852185
2018-12-15
1.25
9.247252747
0.880963061
1.101203826
10.77972568
2019-06-15
1.25
10.24725275
0.868971258
1.086214072
11.86593975
2019-12-15
1.25
11.24725275
0.857142689
1.071428361
12.93736811
2020-06-15
1.25
12.24725275
0.845475132
1.056843915
13.99421202
2020-12-15
1.25
13.24725275
0.833966395
1.042457994
15.03667002
2021-06-15
1.25
14.24725275
0.822614318
1.028267897
16.06493792
2021-12-15
1.25
15.24725275
0.811416767
1.014270958
17.07920887
2022-06-15
1.25
16.24725275
0.800371638
1.000464547
18.07967342
2022-12-15
1.25
17.24725275
0.789476857
0.986846072
19.06651949
2023-06-15
1.25
18.24725275
0.778730378
0.973412973
20.03993246
2023-12-15
1.25
19.24725275
0.768130182
0.960162727
21.00009519
2024-06-15
1.25
20.24725275
0.757674277
0.947092846
21.94718804
2024-12-15
1.25
21.24725275
0.747360699
0.934200874
22.88138891
2025-06-15
1.25
22.24725275
0.737187511
0.921484389
23.8028733
2025-12-15
1.25
23.24725275
0.727152803
0.908941003
24.7118143
2026-06-15
1.25
24.24725275
0.717254688
0.89656836
25.60838266
2026-12-15
1.25
25.24725275
0.707491308
0.884364135
26.4927468
2027-06-15
1.25
26.24725275
0.697860828
0.872326035
27.36507283
2027-12-15
1.25
27.24725275
0.688361441
0.860451801
28.22552463
2028-06-15
1.25
28.24725275
0.67899136
0.8487392
29.07426383
2028-12-15
1.25
29.24725275
0.669748826
0.837186032
29.91144987
2029-06-15
1.25
30.24725275
0.660632103
0.825790129
30.73723999
2029-12-15
1.25
31.24725275
0.651639478
0.814549348
31.55178934
2030-06-15
1.25
32.24725275
0.642769262
0.803461578
32.35525092
2030-12-15
1.25
33.24725275
0.634019789
0.792524737
33.14777566
2031-06-15
1.25
34.24725275
0.625389415
0.781736769
33.92951243
2031-12-15
1.25
35.24725275
0.616876519
0.771095649
34.70060808
2032-06-15
1.25
36.24725275
0.608479502
0.760599378
35.46120745
2032-12-15
1.25
37.24725275
0.600196787
0.750245983
36.21145344
2033-06-15
1.25
38.24725275
0.592026816
0.740033521
36.95148696
2033-12-15
1.25
39.24725275
0.583968057
0.729960072
37.68144703
2034-06-15
101.25
40.24725275
0.576018995
58.32192326
96.00337029

In this example, the settlement date of the bond is after the issue date and the coupon payments are due on the 30th of March and the 30th of September.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-03-15' --@Settlement
       ,'2034-09-30' --@Maturity
       ,0.0257       --@Rate
       ,0.0269       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,11           --@Basis
       ,'2014-03-01' --@Issue
       ,'2014-03-30' --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

2014-03-15
-0.099392265
0
1
-0.099392265
-0.099392265
2014-03-30
0.205883978
0.082872928
0.998893401
0.205656147
0.106263882
2014-09-30
1.285
1.082872928
0.985636589
1.266543017
1.372806899
2015-03-30
1.285
2.082872928
0.972555715
1.249734093
2.622540992
2015-09-30
1.285
3.082872928
0.959648443
1.23314825
3.855689242
2016-03-30
1.285
4.082872928
0.94691247
1.216782525
5.072471766
2016-09-30
1.285
5.082872928
0.934345523
1.200633997
6.273105764
2017-03-30
1.285
6.082872928
0.921945358
1.184699785
7.457805549
2017-09-30
1.285
7.082872928
0.909709762
1.168977044
8.626782593
2018-03-30
1.285
8.082872928
0.89763655
1.153462967
9.78024556
2018-09-30
1.285
9.082872928
0.885723568
1.138154785
10.91840035
2019-03-30
1.285
10.08287293
0.873968689
1.123049766
12.04145011
2019-09-30
1.285
11.08287293
0.862369815
1.108145213
13.14959532
2020-03-30
1.285
12.08287293
0.850924876
1.093438465
14.24303379
2020-09-30
1.285
13.08287293
0.839631828
1.078926899
15.32196069
2021-03-30
1.285
14.08287293
0.828488655
1.064607922
16.38656861
2021-09-30
1.285
15.08287293
0.817493369
1.05047898
17.43704759
2022-03-30
1.285
16.08287293
0.806644008
1.03653755
18.47358514
2022-09-30
1.285
17.08287293
0.795938633
1.022781143
19.49636628
2023-03-30
1.285
18.08287293
0.785375335
1.009207305
20.50557359
2023-09-30
1.285
19.08287293
0.774952227
0.995813612
21.5013872
2024-03-30
1.285
20.08287293
0.76466745
0.982597673
22.48398487
2024-09-30
1.285
21.08287293
0.754519167
0.96955713
23.453542
2025-03-30
1.285
22.08287293
0.744505567
0.956689654
24.41023166
2025-09-30
1.285
23.08287293
0.734624863
0.943992949
25.35422461
2026-03-30
1.285
24.08287293
0.72487529
0.931464748
26.28568935
2026-09-30
1.285
25.08287293
0.715255109
0.919102815
27.20479217
2027-03-30
1.285
26.08287293
0.705762602
0.906904944
28.11169711
2027-09-30
1.285
27.08287293
0.696396075
0.894868956
29.00656607
2028-03-30
1.285
28.08287293
0.687153856
0.882992704
29.88955877
2028-09-30
1.285
29.08287293
0.678034294
0.871274068
30.76083284
2029-03-30
1.285
30.08287293
0.669035763
0.859710956
31.6205438
2029-09-30
1.285
31.08287293
0.660156656
0.848301303
32.4688451
2030-03-30
1.285
32.08287293
0.651395388
0.837043074
33.30588817
2030-09-30
1.285
33.08287293
0.642750395
0.825934258
34.13182243
2031-03-30
1.285
34.08287293
0.634220135
0.814972873
34.94679531
2031-09-30
1.285
35.08287293
0.625803083
0.804156962
35.75095227
2032-03-30
1.285
36.08287293
0.617497739
0.793484594
36.54443686
2032-09-30
1.285
37.08287293
0.609302618
0.782953865
37.32739073
2033-03-30
1.285
38.08287293
0.60121626
0.772562894
38.09995362
2033-09-30
1.285
39.08287293
0.593237219
0.762309826
38.86226345
2034-03-30
1.285
40.08287293
0.585364072
0.752192833
39.61445628
2034-09-30
101.285
41.08287293
0.577595414
58.5017515
98.11620778

This is an example of bond paying interest every 26 weeks.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-10-04' --@Settlement
       ,'2029-12-12' --@Maturity
       ,0.1250       --@Rate
       ,0.1100       --@Yield
       ,100          --@Redemption
       ,182          --@Frequency
       ,9            --@Basis
       ,'2014-03-26' --@Issue
       ,'2014-12-31' --@FirstCoupon
       ,NULL         --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-10-04
-6.593406593
0
1
-6.593406593
-6.593406593
2014-12-31
9.615384615
0.483516484
0.974444374
9.369657441
2.776250848
2015-07-01
6.25
1.483516484
0.923643956
5.772774727
8.549025575
2015-12-30
6.25
2.483516484
0.875491902
5.471824386
14.02084996
2016-06-29
6.25
3.483516484
0.829850144
5.186563399
19.20741336
2016-12-28
6.25
4.483516484
0.786587814
4.916173838
24.1235872
2017-06-28
6.25
5.483516484
0.745580866
4.659880415
28.78346761
2017-12-27
6.25
6.483516484
0.706711722
4.416948261
33.20041587
2018-06-27
6.25
7.483516484
0.669868931
4.186680816
37.38709669
2018-12-26
6.25
8.483516484
0.634946854
3.968417835
41.35551452
2019-06-26
6.25
9.483516484
0.601845359
3.761533493
45.11704802
2019-12-25
6.25
10.48351648
0.570469534
3.56543459
48.68248261
2020-06-24
6.25
11.48351648
0.540729417
3.379558853
52.06204146
2020-12-23
6.25
12.48351648
0.512539731
3.203373321
55.26541478
2021-06-23
6.25
13.48351648
0.485819651
3.036372816
58.3017876
2021-12-22
6.25
14.48351648
0.46049256
2.878078498
61.17986609
2022-06-22
6.25
15.48351648
0.436485839
2.728036491
63.90790258
2022-12-21
6.25
16.48351648
0.413730653
2.585816579
66.49371916
2023-06-21
6.25
17.48351648
0.392161756
2.451010976
68.94473014
2023-12-20
6.25
18.48351648
0.371717304
2.323233152
71.26796329
2024-06-19
6.25
19.48351648
0.352338677
2.202116732
73.47008002
2024-12-18
6.25
20.48351648
0.33397031
2.087314438
75.55739446
2025-06-18
6.25
21.48351648
0.316559536
1.978497098
77.53589156
2025-12-17
6.25
22.48351648
0.300056432
1.875352699
79.41124426
2026-06-17
6.25
23.48351648
0.28441368
1.777585497
81.18882976
2026-12-16
6.25
24.48351648
0.269586426
1.684915163
82.87374492
2027-06-16
6.25
25.48351648
0.255532157
1.597075984
84.4708209
2027-12-15
6.25
26.48351648
0.242210576
1.513816098
85.984637
2028-06-14
6.25
27.48351648
0.229583484
1.434896776
87.41953378
2028-12-13
6.25
28.48351648
0.217614677
1.360091731
88.77962551
2029-06-13
6.25
29.48351648
0.206269836
1.289186474
90.06881198
2029-12-12
106.25
30.48351648
0.195516432
20.77362092
110.8424329

This is a bond with an odd short last coupon settling in the last coupon period.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-10-01' --@Settlement
       ,'2014-12-15' --@Maturity
       ,0.0225       --@Rate
       ,0.0010       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,'2014-09-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-10-01
-0.099447514
0
1
-0.099447514
-0.099447514
2014-12-15
100.5656077
0.414364641
0.999792861
100.5447766
100.4453291

This is a bond with an odd long last coupon settling in the final period.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-10-01' --@Settlement
       ,'2014-12-15' --@Maturity
       ,0.0225       --@Rate
       ,0.0010       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,'2014-03-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-10-01
-1.224447514
0
1
-1.224447514
-1.224447514
2014-12-15
101.6906077
0.414364641
0.999792861
101.6695436
100.4450961

This is a bond with an odd short last coupon settling before the last coupon date.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-10-01' --@Settlement
       ,'2034-12-15' --@Maturity
       ,0.0425       --@Rate
       ,0.0400       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,'2034-09-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-10-01
-0.187845304
0
1
-0.187845304
-0.187845304
2015-03-15
2.125
0.91160221
0.982109845
2.08698342
1.899138116
2015-09-15
2.125
1.91160221
0.962852789
2.046062176
3.945200292
2016-03-15
2.125
2.91160221
0.943973322
2.00594331
5.951143602
2016-09-15
2.125
3.91160221
0.925464042
1.966611088
7.917754691
2017-03-15
2.125
4.91160221
0.907317688
1.928050087
9.845804777
2017-09-15
2.125
5.91160221
0.889527145
1.890245183
11.73604996
2018-03-15
2.125
6.91160221
0.872085436
1.853181552
13.58923151
2018-09-15
2.125
7.91160221
0.854985722
1.816844659
15.40607617
2019-03-15
2.125
8.91160221
0.838221296
1.781220254
17.18729642
2019-09-15
2.125
9.91160221
0.821785584
1.746294366
18.93359079
2020-03-15
2.125
10.91160221
0.805672141
1.7120533
20.64564409
2020-09-15
2.125
11.91160221
0.789874648
1.678483628
22.32412772
2021-03-15
2.125
12.91160221
0.77438691
1.645572184
23.9696999
2021-09-15
2.125
13.91160221
0.759202853
1.613306063
25.58300597
2022-03-15
2.125
14.91160221
0.744316523
1.581672611
27.16467858
2022-09-15
2.125
15.91160221
0.729722081
1.550659422
28.715338
2023-03-15
2.125
16.91160221
0.715413805
1.520254335
30.23559233
2023-09-15
2.125
17.91160221
0.701386083
1.490445427
31.72603776
2024-03-15
2.125
18.91160221
0.687633415
1.461221007
33.18725877
2024-09-15
2.125
19.91160221
0.674150407
1.432569615
34.61982838
2025-03-15
2.125
20.91160221
0.660931771
1.404480014
36.0243084
2025-09-15
2.125
21.91160221
0.647972325
1.37694119
37.40124959
2026-03-15
2.125
22.91160221
0.635266985
1.349942344
38.75119193
2026-09-15
2.125
23.91160221
0.62281077
1.323472886
40.07466482
2027-03-15
2.125
24.91160221
0.610598794
1.297522437
41.37218725
2027-09-15
2.125
25.91160221
0.598626269
1.272080821
42.64426807
2028-03-15
2.125
26.91160221
0.586888499
1.247138059
43.89140613
2028-09-15
2.125
27.91160221
0.575380881
1.222684372
45.11409051
2029-03-15
2.125
28.91160221
0.564098903
1.198710169
46.31280067
2029-09-15
2.125
29.91160221
0.55303814
1.175206048
47.48800672
2030-03-15
2.125
30.91160221
0.542194255
1.152162792
48.64016951
2030-09-15
2.125
31.91160221
0.531562995
1.129571365
49.76974088
2031-03-15
2.125
32.91160221
0.521140191
1.107422906
50.87716379
2031-09-15
2.125
33.91160221
0.510921756
1.085708732
51.96287252
2032-03-15
2.125
34.91160221
0.500903683
1.064420325
53.02729284
2032-09-15
2.125
35.91160221
0.491082042
1.043549339
54.07084218
2033-03-15
2.125
36.91160221
0.481452982
1.023087587
55.09392977
2033-09-15
2.125
37.91160221
0.472012727
1.003027046
56.09695681
2034-03-15
2.125
38.91160221
0.462757576
0.983359849
57.08031666
2034-09-15
2.125
39.91160221
0.453683898
0.964078283
58.04439495
2034-12-15
101.0683702
40.41436464
0.449189424
45.39884298
103.4432379

This is a bond with an odd long last coupon settling before the last coupon date.
SELECT
   *
FROM
   wct.BONDCF(
        '2014-10-01' --@Settlement
       ,'2034-12-15' --@Maturity
       ,0.0425       --@Rate
       ,0.0400       --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,NULL         --@Issue
       ,NULL         --@FirstCoupon
       ,'2034-03-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2014-10-01
-0.187845304
0
1
-0.187845304
-0.187845304
2015-03-15
2.125
0.91160221
0.982109845
2.08698342
1.899138116
2015-09-15
2.125
1.91160221
0.962852789
2.046062176
3.945200292
2016-03-15
2.125
2.91160221
0.943973322
2.00594331
5.951143602
2016-09-15
2.125
3.91160221
0.925464042
1.966611088
7.917754691
2017-03-15
2.125
4.91160221
0.907317688
1.928050087
9.845804777
2017-09-15
2.125
5.91160221
0.889527145
1.890245183
11.73604996
2018-03-15
2.125
6.91160221
0.872085436
1.853181552
13.58923151
2018-09-15
2.125
7.91160221
0.854985722
1.816844659
15.40607617
2019-03-15
2.125
8.91160221
0.838221296
1.781220254
17.18729642
2019-09-15
2.125
9.91160221
0.821785584
1.746294366
18.93359079
2020-03-15
2.125
10.91160221
0.805672141
1.7120533
20.64564409
2020-09-15
2.125
11.91160221
0.789874648
1.678483628
22.32412772
2021-03-15
2.125
12.91160221
0.77438691
1.645572184
23.9696999
2021-09-15
2.125
13.91160221
0.759202853
1.613306063
25.58300597
2022-03-15
2.125
14.91160221
0.744316523
1.581672611
27.16467858
2022-09-15
2.125
15.91160221
0.729722081
1.550659422
28.715338
2023-03-15
2.125
16.91160221
0.715413805
1.520254335
30.23559233
2023-09-15
2.125
17.91160221
0.701386083
1.490445427
31.72603776
2024-03-15
2.125
18.91160221
0.687633415
1.461221007
33.18725877
2024-09-15
2.125
19.91160221
0.674150407
1.432569615
34.61982838
2025-03-15
2.125
20.91160221
0.660931771
1.404480014
36.0243084
2025-09-15
2.125
21.91160221
0.647972325
1.37694119
37.40124959
2026-03-15
2.125
22.91160221
0.635266985
1.349942344
38.75119193
2026-09-15
2.125
23.91160221
0.62281077
1.323472886
40.07466482
2027-03-15
2.125
24.91160221
0.610598794
1.297522437
41.37218725
2027-09-15
2.125
25.91160221
0.598626269
1.272080821
42.64426807
2028-03-15
2.125
26.91160221
0.586888499
1.247138059
43.89140613
2028-09-15
2.125
27.91160221
0.575380881
1.222684372
45.11409051
2029-03-15
2.125
28.91160221
0.564098903
1.198710169
46.31280067
2029-09-15
2.125
29.91160221
0.55303814
1.175206048
47.48800672
2030-03-15
2.125
30.91160221
0.542194255
1.152162792
48.64016951
2030-09-15
2.125
31.91160221
0.531562995
1.129571365
49.76974088
2031-03-15
2.125
32.91160221
0.521140191
1.107422906
50.87716379
2031-09-15
2.125
33.91160221
0.510921756
1.085708732
51.96287252
2032-03-15
2.125
34.91160221
0.500903683
1.064420325
53.02729284
2032-09-15
2.125
35.91160221
0.491082042
1.043549339
54.07084218
2033-03-15
2.125
36.91160221
0.481452982
1.023087587
55.09392977
2033-09-15
2.125
37.91160221
0.472012727
1.003027046
56.09695681
2034-03-15
2.125
38.91160221
0.462757576
0.983359849
57.08031666
2034-12-15
103.1933702
40.41436464
0.449189424
46.35337051
103.4336872

This is a bond with an odd long first coupon and an odd long last coupon.
SELECT
   *
FROM
   wct.BONDCF(
        '2013-03-04' --@Settlement
       ,'2022-11-28' --@Maturity
       ,0.03125      --@Rate
       ,0.02875      --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,'2012-06-07' --@Issue
       ,'2013-03-15' --@FirstCoupon
       ,'2022-03-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2013-03-04
-2.316726219
0
1
-2.316726219
-2.316726219
2013-03-15
2.411684783
0.060773481
0.999132977
2.409593796
0.092867577
2013-09-15
1.5625
1.060773481
0.984973976
1.539021837
1.631889415
2014-03-15
1.5625
2.060773481
0.971015626
1.517211916
3.149101331
2014-09-15
1.5625
3.060773481
0.957255085
1.49571107
4.6448124
2015-03-15
1.5625
4.060773481
0.943689547
1.474514918
6.119327318
2015-09-15
1.5625
5.060773481
0.930316251
1.453619142
7.57294646
2016-03-15
1.5625
6.060773481
0.917132472
1.433019487
9.005965948
2016-09-15
1.5625
7.060773481
0.904135524
1.412711756
10.4186777
2017-03-15
1.5625
8.060773481
0.891322759
1.392691811
11.81136951
2017-09-15
1.5625
9.060773481
0.878691568
1.372955575
13.18432509
2018-03-15
1.5625
10.06077348
0.866239377
1.353499026
14.53782412
2018-09-15
1.5625
11.06077348
0.853963649
1.334318202
15.87214232
2019-03-15
1.5625
12.06077348
0.841861885
1.315409195
17.18755151
2019-09-15
1.5625
13.06077348
0.829931618
1.296768153
18.48431966
2020-03-15
1.5625
14.06077348
0.818170418
1.278391278
19.76271094
2020-09-15
1.5625
15.06077348
0.80657589
1.260274827
21.02298577
2021-03-15
1.5625
16.06077348
0.795145671
1.24241511
22.26540088
2021-09-15
1.5625
17.06077348
0.783877432
1.224808488
23.49020937
2022-03-15
1.5625
18.06077348
0.77276888
1.207451375
24.69766074
2022-11-28
102.2013122
19.46961326
0.757385312
77.40577268
102.1034334

This is a bond with an odd long first coupon and an odd short last coupon.
SELECT
   *
FROM
   wct.BONDCF(
        '2013-03-04' --@Settlement
       ,'2022-04-28' --@Maturity
       ,0.03125      --@Rate
       ,0.02875      --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,'2012-06-07' --@Issue
       ,'2013-03-15' --@FirstCoupon
       ,'2022-03-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2013-03-04
-2.316726219
0
1
-2.316726219
-2.316726219
2013-03-15
2.411684783
0.060773481
0.999132977
2.409593796
0.092867577
2013-09-15
1.5625
1.060773481
0.984973976
1.539021837
1.631889415
2014-03-15
1.5625
2.060773481
0.971015626
1.517211916
3.149101331
2014-09-15
1.5625
3.060773481
0.957255085
1.49571107
4.6448124
2015-03-15
1.5625
4.060773481
0.943689547
1.474514918
6.119327318
2015-09-15
1.5625
5.060773481
0.930316251
1.453619142
7.57294646
2016-03-15
1.5625
6.060773481
0.917132472
1.433019487
9.005965948
2016-09-15
1.5625
7.060773481
0.904135524
1.412711756
10.4186777
2017-03-15
1.5625
8.060773481
0.891322759
1.392691811
11.81136951
2017-09-15
1.5625
9.060773481
0.878691568
1.372955575
13.18432509
2018-03-15
1.5625
10.06077348
0.866239377
1.353499026
14.53782412
2018-09-15
1.5625
11.06077348
0.853963649
1.334318202
15.87214232
2019-03-15
1.5625
12.06077348
0.841861885
1.315409195
17.18755151
2019-09-15
1.5625
13.06077348
0.829931618
1.296768153
18.48431966
2020-03-15
1.5625
14.06077348
0.818170418
1.278391278
19.76271094
2020-09-15
1.5625
15.06077348
0.80657589
1.260274827
21.02298577
2021-03-15
1.5625
16.06077348
0.795145671
1.24241511
22.26540088
2021-09-15
1.5625
17.06077348
0.783877432
1.224808488
23.49020937
2022-03-15
1.5625
18.06077348
0.77276888
1.207451375
24.69766074
2022-04-28
100.3736413
18.29990392
0.770135894
77.30134401
101.9990048

This is a bond with an odd short first coupon and an odd long last coupon.
SELECT
   *
FROM
   wct.BONDCF(
        '2013-03-04' --@Settlement
       ,'2022-11-28' --@Maturity
       ,0.03125      --@Rate
       ,0.02875      --@Yield
       ,100          --@Redemption
       ,2            --@Frequency
       ,1            --@Basis
       ,'2012-12-07' --@Issue
       ,'2013-03-15' --@FirstCoupon
       ,'2022-03-15' --@LastCoupon
       )
This produces the following result.

date_pmt
amt_cashflow
N
PVF
PVCF
cumPVCF
2013-03-04
-0.751035912
0
1
-0.751035912
-0.751035912
2013-03-15
0.845994475
0.060773481
0.999132977
0.845260978
0.094225067
2013-09-15
1.5625
1.060773481
0.984973976
1.539021837
1.633246904
2014-03-15
1.5625
2.060773481
0.971015626
1.517211916
3.15045882
2014-09-15
1.5625
3.060773481
0.957255085
1.49571107
4.64616989
2015-03-15
1.5625
4.060773481
0.943689547
1.474514918
6.120684808
2015-09-15
1.5625
5.060773481
0.930316251
1.453619142
7.57430395
2016-03-15
1.5625
6.060773481
0.917132472
1.433019487
9.007323437
2016-09-15
1.5625
7.060773481
0.904135524
1.412711756
10.42003519
2017-03-15
1.5625
8.060773481
0.891322759
1.392691811
11.812727
2017-09-15
1.5625
9.060773481
0.878691568
1.372955575
13.18568258
2018-03-15
1.5625
10.06077348
0.866239377
1.353499026
14.53918161
2018-09-15
1.5625
11.06077348
0.853963649
1.334318202
15.87349981
2019-03-15
1.5625
12.06077348
0.841861885
1.315409195
17.188909
2019-09-15
1.5625
13.06077348
0.829931618
1.296768153
18.48567715
2020-03-15
1.5625
14.06077348
0.818170418
1.278391278
19.76406843
2020-09-15
1.5625
15.06077348
0.80657589
1.260274827
21.02434326
2021-03-15
1.5625
16.06077348
0.795145671
1.24241511
22.26675837
2021-09-15
1.5625
17.06077348
0.783877432
1.224808488
23.49156686
2022-03-15
1.5625
18.06077348
0.77276888
1.207451375
24.69901823
2022-11-28
102.2013122
19.46961326
0.757385312
77.40577268
102.1047909

 

See Also

 



Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service