Logo

SQL Server SMMAmort Function

Updated 2023-10-11 14:34:45.087000

Description

Use the table-valued function SMMAmort to return a cash-flow schedule for a loan with a fixed periodic payment with Conditional Prepayment Rates (CPR) and Constant Default Rates (CDR) applied. SMMAmort potentially reduces the number of scheduled payments through the application of the prepayment and default rates.

Syntax

SELECT * FROM [wct].[SMMAmort](
  <@PrinAmt, float,>
 ,<@InterestRate, float,>
 ,<@NumPmts, int,>
 ,<@LastPmtNum, int,>
 ,<@PmtPerYr, int,>
 ,<@LSRatesQuery, nvarchar(max),>
 ,<@CPRRatesQuery, nvarchar(max),>
 ,<@CDRRatesQuery, nvarchar(max),>
 ,<@InterestOnly, bit,>
 ,<@PrinPaymentMultiple, int,>
 ,<@FirstPrinPayNo, int,>
 ,<@PmtPayPct, float,>)

Arguments

@PrinAmt

the principal amount to be amortized. @PrinAmt is an expression of type float or of a type that can be implicitly converted to float.

@InterestRate

the annual rate of interest used to calculate the periodic payment. @InterestRate is an expression of type float or of a type that can be implicitly converted to float.

@NumPmts

the number of periods to be used in the calculation of the periodic payment. @NumPmts is an expression of type int or of a type that can be implicitly converted to int.

@LastPmtNum

the number of the last payment. Use @LastPmtNum for case where the number of payments for the annuity calculation is different than the actual number of payments. For example, an annuity based on 300 monthly payment which will be paid off at the end of 120 months. @LastPmtNum is an expression of type int or of a type that can be implicitly converted to int.

@PmtPerYr

the number of payments per year. @PmtPerYr is an expression of type int or of a type that can be implicitly converted to int.

@LSRatesQuery

a SELECT statement, as a string, which returns the month and loss severity rates to be used in the calculation of the loss severity amounts. @LSRatesQuery should return 2 columns, month and rate, where 1% = .01.

@CPRRatesQuery

a SELECT statement, as a string, which returns the month and prepayment rates to be used in the calculation of the principal prepayments. @CPRratesQuery should return 2 columns, month and rate, where 1% = .01.

@CDRRatesQuery

a SELECT statement, as a string, which returns the month and default rate to be used in the calculation of the default amounts. @CDRRatesQuery should return 2 columns, month and rate, where 1% = .01.

@InterestOnly

a bit value, which when true, identifies that the principal amount is scheduled to be repaid at the end of the loan.

@PrinPaymentMultiple

the ratio of the frequency of the interest payments to the frequency of the interest payments. For example, a loan with monthly payments of interest and quarterly payments of principal would have a @PrinPaymentMultiple of 3. @PrinPaymentMultiple is an expression of type int or of a type that can be implicitly converted to int.

@FirstPrinPayNo

the payment number of the first principal payment. @FirstPrinPayNo is an expression of type int or of a type that can be implicitly converted to int.

@PmtPayPct

a fixed percentage which is applied to the projected principal balance to calculate the projected principal payment. @PmtPayPct is of a type float or of a type that can be implicitly converted to float.

Return Type

table

colNamecolDatatypecolDesc
num_pmtint payment number
CPRfloatthe Conditional Prepayment Rate
CDRfloatthe Constant Default Rate
LSfloatthe Loss Severity Rate
cont_prin_beginfloatWhen num_pmt = 1 then @PrinAmt else cont_prin_end from the previous row
cont_pmtfloatthe contractual periodic payment
cont_int_payfloatthe contractual interest payment; @InterestRate / @PmtPerYr * cont_prin_begin
cont_prin_payfloatthe contractual principal payment
proj_prin_beginfloatWhen num_pmt = 1 then @PrinAmt else proj_prin_end from the previous row
proj_pmtfloatthe projected periodic payment. For interest-only payments, the proj_pmt is @InterestRate / @PmtPerYr * proj_prin_begin. For annuity type loans, the proj_pmt is the cont_pmt. For loans with a principal grace period at inception, the proj_pmt is recalculated using the proj_prin_begin at the time of the first amortizing payment.
proj_int_payfloatthe projected interest payment; @InterestRate / @PmtPerYr * proj_prin_begin
proj_prin_payfloatthe projected principal payment; proj_pmt – proj_int_pay
prin_prepayfloat(1- POWER(1-CPR,1 / @PmtPerYr) * (proj_prin_begin – proj_prin_pay)
amt_defaultfloat(proj_prin_begin – proj_prin_pay) * (1 - POWER(1 - CDR, 1 / @PmtPerYr))
amt_loss_severityfloatamt_default * @LossSeverity
proj_prin_endfloatthe projected principal ending balance; proj_prin_begin – proj_prin_pay - prin_prepay - amt_default
proj_amt_cashflowfloatthe projected cash flow amount; proj_pmt + prin_prepay + amt_default - amt_loss_severity

Remarks

If @FirstPrinPayNo is NULL then @FirstPrinPayNo = 1.

If @PrinAmt is NULL then @PrinAmt = 0.

If @InterestRate is NULL then @InterestRate = 0.

If @NumPmts is NULL then @NumPmts = 0.

If @LastPmtNum is NULL then @LastPmtNum = @NumPmts.

If @InterestOnly is NULL then @InterestOnly = FALSE.

If @PrinPaymentMultiple is NULL then @PrinPaymentMultiple = 1.

If @FirstPrinPayNo is NULL then @FirstPrinPayNo = @PrinPaymentMultiple.

If @NumPmts < 1 then no rows are returned.

If @PrinPaymentMultiple < 1 then no rows are returned.

If @FirstPrinPayNo < 1 then no rows are returned.

@PmtPerYr must be 1, 2, 3, 4, 6 or 12.

If @LSRatesQuery returns NULL or no rows then LS is set to zero.

If @CDRRatesQuery returns NULL or no rows then CDR is set to zero.

If @CPRRatesQuery returns NULL or no rows then CPR is set to zero.

Examples

Use the following CPR rates, which have been inserted into the #cpr table, for all of the examples.

SELECT *
INTO #cpr
FROM
(
    VALUES
        (1, 0.002),
        (25, 0.012),
        (61, 0.02),
        (181, 0.06)
) n (mth, rate);

Use the following CDR rates, which have been inserted into the #cdr table, for all of the examples.

SELECT *
INTO #cdr
FROM
(
    VALUES
        (1, 0.1),
        (61, 0.08),
        (181, 0.05)
) n (mth, rate);

Use the following Loss Severity rates, which have been inserted into the #ls table, for all the examples.

SELECT *
INTO #ls
FROM
(
    VALUES
        (1, 0.15),
        (91, 0.16),
        (181, 0.14),
        (271, 0.17),
        (361, 0.13)
) n (mth, rate);

Example #1

In this example we amortize a 100,000,000 loan with a 5% interest rate over 360 months using the data from the #ls, #cpr, and #cdr tables without modification.

SELECT *
FROM wct.SMMAmort(   100000000,            --@PrinAmt
                     0.05,                 --@InterestRate
                     360,                  --@NumPmts
                     NULL,                 --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     NULL,                 --@InterestOnly
                     NULL,                 --@PrinPaymentMultiple
                     NULL,                 --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.15100000000536821.62301214416666.666666667120154.95634547399879845.0436545100000000536821.62301214416666.666666667120154.95634547316661.9197880029873110.747587021130966.61213805398990072.37627951295627.67824911
20.0020.10.1599879845.0436545536821.62301214416166.021015227120655.60199691399759189.441657698990072.3762795536821.62301214412458.634901165124362.98811097516492.7420430987864245.568231476129636.83523472197984971.0778941287923.09805199
30.0020.10.1599759189.4416576536821.62301214415663.28934024121158.333671999638031.107985797984971.077894536821.62301214408270.712824558128550.91018758216324.3727787403855422.754525427128313.41317881496984673.04040221280255.33713749
40.0020.10.1599638031.1079857536821.62301214415158.46294994121663.16006219999516367.947923596984673.0404022536821.62301214404102.804335009132718.81867713116156.8081312941846642.104008417126996.31560126395989155.30958541272624.21955059
50.0020.10.1599516367.9479235536821.62301214414651.533116348122170.08989579299394197.858027795989155.3095854536821.62301214399954.813789939136866.80922220115990.0442555906837903.415187525125685.51227812994998395.040921265029.57017713
60.0020.10.1599394197.8580277536821.62301214414142.491075116122679.13193702499271518.726090794998395.04092536821.62301214395826.646003834140994.97700830615824.0773248357829206.48753274124380.97312991194012369.49905421257471.2147398
70.0020.10.1599271518.7260907536821.62301214413631.328025378123190.29498676299148328.43110494012369.4990542536821.62301214391718.206246059145103.41676608115658.9035305234820551.121472362123082.66822085493031056.05728521249948.97979417
80.0020.10.1599148328.431104536821.62301214413118.0351296123703.5878825499024624.843221493031056.0572852536821.62301214387629.400238688149192.22277345115494.5190823478811937.118388417121790.56775826392054432.1970411242462.69272464
90.0020.10.1599024624.8432214536821.62301214412602.603513423124219.01949871798900405.823722792054432.197041536821.62301214383560.134154337153261.48885780215330.9202081165803364.280612108120504.64209181691082475.5073631235012.18174055
100.0020.10.1598900405.8237227536821.62301214412085.024265511124736.59874662998775669.224976191082475.507363536821.62301214379510.314614012157311.30839812715168.1031536642794832.411419269119224.8617128990115163.68439191227597.27587218
110.0020.10.1598775669.2249761536821.62301214411565.2884374125256.3345747498650412.890401390115163.6843919536821.62301214375479.848684966161341.77432717415006.0641827659786341.31502586117951.19725387989152474.53085611220217.80496689
120.0020.10.1598650412.8904013536821.62301214411043.387043339125778.23596880198524634.654432589152474.5308561536821.62301214371468.643878567165352.97913357314844.799577052777890.796583466116683.6194875288194385.9555621212873.59968514
130.0020.10.1598524634.6544325536821.62301214410519.311060136126302.31195200498398332.342480588194385.955562536821.62301214367476.608148175169345.01486396514684.3056359223769480.662174833115422.09932622587240875.97288731205564.49149667
140.0020.10.1598398332.3424805536821.62301214409993.051427002126828.57158513898271503.770895487240875.9728873536821.62301214363503.64988703173317.9731251114524.5786764613761110.718809413114166.60782141286291922.70227631198290.3126766
150.0020.10.1598271503.7708954536821.62301214409464.599045397127357.02396674298144146.746928686291922.7022763536821.62301214359549.677926151177271.94508598914365.615033354752780.774418937112917.11616284185347504.3677381191050.89630159
160.0020.10.1598144146.7469286536821.62301214408933.944778869127887.6782332798016259.068695485347504.367738536821.62301214355614.601532242181207.02147989814207.4110588011744490.637853008111673.59567795184407599.29734631183846.076246
170.0020.10.1598016259.0686954536821.62301214408401.079452897128420.54355924297887838.525136184407599.2973463536821.62301214351698.33040561185123.2926065314049.963122436736240.118874715110436.01783120783472185.92274261176675.68717808
180.0020.10.1597887838.5251361536821.62301214407865.993854734128955.62915740697758882.895978783472185.9227426536821.62301214347800.774678094189020.84833404613893.2676112412728029.028156265109204.3542234482541242.7786411169539.56455621
190.0020.10.1597758882.8959787536821.62301214407328.678733245129492.94427889597629389.951699882541242.778641536821.62301214343921.844911004192899.77810113513737.3209294653719857.177274643107978.57659119681614748.50233581162437.54462505
200.0020.10.1597629389.9516998536821.62301214406789.124798749130032.4982133997499357.453486481614748.5023358536821.62301214340061.452093066196760.17091907413582.1194985405711724.378707282106758.65680609280692681.83321091155369.46441187
210.0020.10.1597499357.4534864536821.62301214406247.32272286130574.3002892897368783.153197280692681.8332109536821.62301214336219.507638379200602.11537376113427.6597570006703630.445827767105544.56687416579775021.61225241148335.16172274
220.0020.10.1597368783.1531972536821.62301214405703.263138322131118.35987381897237664.793323479775021.6122524536821.62301214332395.923384385204425.69962775513273.9381603994695575.192901546104336.27893523278861746.78156271141334.47513885
230.0020.10.1597237664.7933234536821.62301214405156.936638847131664.68637329397106000.106950178861746.7815627536821.62301214328590.611589844208231.01142229513120.9511812289687558.435081671103133.76526225177952836.38387751134367.24401279
240.0020.10.1597106000.1069501536821.62301214404608.333778959132213.28923318196973786.817716977952836.3838775536821.62301214324803.484932823212018.13807931712968.6953088389679579.988404556101936.99826068377048269.56208481127433.30846485
250.0120.10.1596973786.8177169536821.62301214404057.44507382132764.17793831996841022.639778677048269.5620848536821.62301214321034.456508687215787.16650345377258.3294355339671639.669785757100745.95046786376083584.396361184973.67176557
260.0120.10.1596841022.6397786536821.62301214403504.260999077133317.36201306296707705.277765576083584.39636536821.62301214317014.934984833219806.68802730676284.2556646531663171.63027983899475.744541975775124321.82238821176801.76441466
270.0120.10.1596707705.2777655536821.62301214402948.77199069133872.8510214596573832.426744175124321.8223882536821.62301214313018.007593284223803.61541885675315.6572598133654751.19047050598212.678570575774170451.35923911168675.79217188
280.0120.10.1596573832.4267441536821.62301214402390.968444767134430.65456737396439401.772176774170451.3592391536821.62301214309043.547330163227778.07568197774352.5034434348646378.08279510396956.712419265573221942.69731861160595.49683141
290.0120.10.1596439401.7721767536821.62301214401830.840717403134990.78229473796304410.989881973221942.6973186536821.62301214305091.427905494231730.19510664673394.7636109414638052.04119497795707.806179246672278765.6974061152560.62163881
300.0120.10.1596304410.9898819536821.62301214401268.379124508135553.24388763296168857.745994372278765.697406536821.62301214301161.523739192235660.09927294872442.4073297887629772.80110701394465.920166051971340890.38969621144570.91128289
310.0120.10.1596168857.7459943536821.62301214400703.573941643136118.04907049796032739.696923871340890.3896962536821.62301214297253.709957068239567.91305507271495.4043384961621540.09945523193231.014918284670408286.97284741136626.11188758
320.0120.10.1596032739.6969238536821.62301214400136.415403849136685.20760829195896054.489315570408286.9728474536821.62301214293367.862386864243453.76062527570553.7245456864613353.6746424392003.051196364469480925.8130341128725.97100389
330.0120.10.1595896054.4893155536821.62301214399566.893705481137254.72930665895758799.760008969480925.813034536821.62301214289503.857554308247317.76545783169617.3380291288605213.26654187190781.989981280768558777.44300521120870.23760186
340.0120.10.1595758799.7600089536821.62301214398994.999000037137826.62401210395620973.135996868558777.4430052536821.62301214285661.572679188251160.05033295168686.2150347882597118.61648901689567.792473352467641812.56114851113058.66206259
350.0120.10.1595620973.1359968536821.62301214398420.721399987138400.90161215395482572.234384667641812.5611485536821.62301214281840.885671452254980.73734068867760.3259758801589069.46727330488360.420090995566730002.03055861105290.99617033
360.0120.10.1595482572.2343846536821.62301214397844.050976603138977.57203553795343594.662349166730002.0305586536821.62301214278041.675127327258779.94788481266839.6414319302581065.5631299887159.83446949765823316.87811191097566.99310455
370.0120.10.1595343594.6623491536821.62301214397264.977759788139556.64525235295204038.017096765823316.8781119536821.62301214274263.820325466262557.80268667465924.1321478397573106.64973196985965.997459795464921728.29354541089886.40743215
380.0120.10.1595204038.0170967536821.62301214396683.491737903140138.13127423795063899.885822564921728.2935454536821.62301214270507.201223106266314.42178903465013.7690329554565192.47418179684778.871127269464025207.62854161082248.99509962
390.0120.10.1595063899.8858225536821.62301214396099.582857594140722.04015454694923177.84566864025207.6285416536821.62301214266771.698452257270049.92455988364108.523160146557322.78500354483598.417750531663133726.3958181074654.5134253
400.0120.10.1594923177.845668536821.62301214395513.241023617141308.38198852394781869.463679463133726.395818536821.62301214263057.193315908273764.42969623163208.3657648821549497.3321348782424.599820230462247256.2682221067102.72109166
410.0120.10.1594781869.4636794536821.62301214394924.456098664141897.16691347594639972.29676662247256.268222536821.62301214259363.567784259277458.05522788162313.2682443227541715.86691905581257.380037858361365769.07783081059593.37813766
420.0120.10.1594639972.296766536821.62301214394333.217903191142488.40510894894497483.89165761365769.0778308536821.62301214255690.704490962281130.91852117861423.2021564064533978.14209710680096.721314565960489236.81505611052126.24595109
430.0120.10.1594497483.891657536821.62301214393739.516215238143082.10679690294354401.784860160489236.8150561536821.62301214252038.4867294284783.13628273960538.1392189472526283.91179989678942.586769984559617631.62775451044701.087261
440.0120.10.1594354401.7848601536821.62301214393143.34077025143678.28224188994210723.502618259617631.6277545536821.62301214248406.798448977288414.82456316359658.0513087363518632.93154035477794.939731053158750925.82034231037317.66613018
450.0120.10.1594210723.5026182536821.62301214392544.681260909144276.94175123194066446.56086758750925.8203423536821.62301214244795.524251426292026.09876071458782.9104606482511024.95820569476653.743730854157889091.85291521029975.74794763
460.0120.10.1594066446.560867536821.62301214391943.527336946144878.09567519493921568.465191857889091.8529152536821.62301214241204.549387147295617.07362499357912.6888667522503459.75004969375518.962507453957032102.34037381022675.09942113
470.0120.10.1593921568.4651918536821.62301214391339.868604966145481.75440717493776086.710784657032102.3403738536821.62301214237633.759751557299187.86326058357047.3588754286495937.06668500574390.560002750756179930.05155271015415.48856982
480.0120.10.1593776086.7107846536821.62301214390733.694628269146087.92838387193629998.782400756179930.0515527536821.62301214234083.04188147302738.5811306756186.8929904905488456.66907552873268.500361329255332547.9083561008196.68471683
490.0120.10.1593629998.7824007536821.62301214390124.99492667146696.6280854793483302.154315355332547.908356536821.62301214230552.282951484306269.34006065655331.2638703095481018.31952880472152.747929320754489928.98489631001018.45848193
500.0120.10.1593483302.1543153536821.62301214389513.758976314147307.86403582693335994.290279454489928.9848963536821.62301214227041.370770401309780.25224173954480.4443269476473621.78168847171043.267253270653652046.5066391993880.581774287
510.0120.10.1593335994.2902794536821.62301214388899.976209498147921.64680264293188072.643476853652046.5066391536821.62301214223550.193777663313271.42923447753634.4073252925466266.82052674569940.023079011752818873.8495526986782.827785165
520.0120.10.1593188072.6434768536821.62301214388283.636014487148537.98699765393039534.656479252818873.8495526536821.62301214220078.641039803316742.98197233752793.1259821992458953.20233696168842.980350544151990384.5392611979724.970980756
530.0120.10.1593039534.6564792536821.62301214387664.72773533149156.8952768192890377.761202351990384.5392611536821.62301214216626.602246921320195.02076521951956.5735656356451680.69472613967752.104208920951166552.2502041972706.787094994
540.0120.10.1592890377.7612023536821.62301214387043.240671676149778.38234046392740599.378861951166552.2502041536821.62301214213193.967709184323627.65530295651124.7234938329444449.06660760766667.359991141150347350.8047997965728.053122439
550.0120.10.1592740599.3788619536821.62301214386419.164078591150402.45893354992590196.919928350347350.8047997536821.62301214209780.628353332327040.99465880850297.5493344412437258.08819365265588.713229047849532754.1726128958788.547311185
560.0120.10.1592590196.9199283536821.62301214385792.487166368151029.13584577292439167.784082649532754.1726128536821.62301214206386.47571922330435.1472929249475.0248036892430107.53098821964516.129648232948722736.469528951888.049155816
570.0120.10.1592439167.7840826536821.62301214385163.199100344151658.42391179692287509.360170848722736.469528536821.62301214203011.401956367333810.22105577348657.1237655497422997.16777965763449.575166948547917271.956927945026.339390398
580.0120.10.1592287509.3601708536821.62301214384531.289000712152290.33401142892135219.026159347917271.956927536821.62301214199655.299820529337166.32319161147843.8202309085415926.77263348962389.015895023347116335.040871938203.199981514
590.0120.10.1592135219.0261593536821.62301214383896.745942331152924.87706980991982294.149089547116335.040871536821.62301214196318.062670296340503.56034184447035.0883567387408896.12088524261334.418132786246319900.2712872931418.414121334
600.0120.10.1591982294.1490895536821.62301214383259.55895454153562.064057691828732.085031946319900.2712872536821.62301214192999.584463697343822.03854844346230.9024452799401904.98913330360285.748369995445527942.3411602924671.766220727
610.020.080.1591828732.0850319536821.62301214382619.717020966154201.90599117491674530.179040745527942.3411602536821.62301214189699.759754834347121.86325730676000.5806935679312849.28844950546927.393267425844791970.6087598878744.098887787
620.020.080.1591674530.1790407536821.62301214381977.209079336154844.41393280391519685.765107944791970.6087598536821.62301214186633.210869832350188.41214230774757.4129525143307731.90461292546159.785691938744059292.8790521873151.15488564
630.020.080.1591519685.7651079536821.62301214381332.024021283155489.59899085791364196.166117144059292.8790521536821.62301214183580.38699605353241.2360160973519.8092809842302637.42474859645395.613712289343329894.4090064867583.24332943
640.020.080.1591364196.1661171536821.62301214380684.150692155156137.47231998591208058.693797143329894.4090064536821.62301214180541.226704193356280.39630794772287.7447757657297565.74634477444634.86195171642603760.5215779862040.252180963
650.020.080.1591208058.6937971536821.62301214380033.577890821156788.04512131991051270.648675842603760.5215779536821.62301214177515.668839908359305.95417223271061.1946451067292516.76734852843877.515102279241880876.605412856522.069903495
660.020.080.1591051270.6486758536821.62301214379380.294369482157441.32864265790893829.320033141880876.605412536821.62301214174503.65252255362317.9704895969840.1342082161287490.38616368843123.557924553241161228.1145505851028.585459491
670.020.080.1590893829.3200331536821.62301214378724.288833471158097.33417866890735731.985854541161228.1145505536821.62301214171505.117143961365316.50586817968624.538894767282486.50164879942372.975247319840444800.5681388845559.688308386
680.020.080.1590735731.9858545536821.62301214378065.54994106158756.0730710890576975.912783440444800.5681388536821.62301214168520.002367245368301.62064489567414.3842444022277505.01311508741625.75196726339731579.5501344840115.268404366
690.020.080.1590576975.9127834536821.62301214377404.066303264159417.55670887690417558.356074539731579.5501344536821.62301214165548.24812556371273.3748865866209.6459062426272545.82032443240881.873048664939021550.7090172834695.21619415
700.020.080.1590417558.3560745536821.62301214376739.826483644160081.79652849690257476.55954639021550.7090172536821.62301214162589.794620905374231.82839123565010.2996383964267608.82348735440141.323523103238314699.7575002829299.422614787
710.020.080.1590257476.559546536821.62301214376072.818998108160748.80401403190096727.75553238314699.7575002536821.62301214159644.582322917377177.04068922263816.3213074719262693.92326139404.0884891537611012.4722425823927.779091462
720.020.080.1590096727.755532536821.62301214375403.032314717161418.59069742389935309.164834637611012.4722425536821.62301214156712.551967677380109.07104446362627.6868880917257801.02074714938670.153112072436910474.6935628818580.177535308
730.020.080.1589935309.1648346536821.62301214374730.454853477162091.16815866389773217.996675936910474.6935628536821.62301214153793.644556512383027.97845562861444.3724624091252930.01749022137939.502623533136213072.3251545813256.510341236
740.020.080.1589773217.9966759536821.62301214374055.07498615162766.5480259989610451.448649936213072.3251545536821.62301214150887.801354811385933.82165732960266.354219627248080.81547529337212.12232129435518791.3338023807956.670385766
750.020.080.1589610451.4486499536821.62301214373376.881036041163444.74197609989447006.706673835518791.3338023536821.62301214147994.963890843388826.65912129759093.6084555189243253.31712613336487.9975689234827617.7490993802680.551024872
760.020.080.1589447006.7066738536821.62301214372695.861277808164125.76173433289282880.944939534827617.7490993536821.62301214145115.07395458391706.54905755957926.1115719515238447.42530323135767.113795484634139537.6631666797428.046091837
770.020.080.1589282880.9449395536821.62301214372012.003937248164809.61907489289118071.325864634139537.6631666536821.62301214142248.073596527394573.54941561256763.8400764104233663.04330184535049.456495276733454537.2303727792199.049895118
780.020.080.1589118071.3258646536821.62301214371325.297191102165496.32582103788952575.000043533454537.2303727536821.62301214139393.905126553397427.71788558755606.7705815268228900.07485005734335.011227508632772602.6670555786993.457216215
790.020.080.1588952575.0000435536821.62301214370635.729166848166185.89384529288786389.106198232772602.6670555536821.62301214136552.511112731400269.11189940854454.8798046073224158.42410683833623.763616025632093720.2512447781811.163307559
800.020.080.1588786389.1061982536821.62301214369943.287942493166878.33506964788619510.771128632093720.2512447536821.62301214133723.834380186403097.78863195453308.1445671655219437.99566011132915.699349016731417876.3223855776652.0638904
810.020.080.1588619510.7711286536821.62301214369247.961546369167573.66146577188451937.109662831417876.3223855536821.62301214130907.818009939405913.805002252166.5417944551214738.69452484132210.804178726230745057.281064771516.05515271
820.020.080.1588451937.1096628536821.62301214368549.737956928168271.88505521188283665.224607630745057.281064536821.62301214128104.405337767408717.21767437351030.048515006210060.42614111931509.063921167830075249.5887335766403.033747097
830.020.080.1588283665.2246076536821.62301214367848.605102532168973.01790960888114692.20669830075249.5887335536821.62301214125313.539953056411508.08305908449898.641860162205403.09637225630810.464455838429408439.767442761312.896788719
840.020.080.1588114692.206698536821.62301214367144.550861242169677.07215089887945015.134547129408439.767442536821.62301214122535.165697675414286.45731446548772.2990636204200766.61150289730114.991725434528744614.399561756245.541853223
850.020.080.1587945015.1345471536821.62301214366437.563060613170384.05995152787774631.074595628744614.399561536821.62301214119769.226664837417052.39634730247650.9974609744196150.87823712829422.631735569128083760.1275156751200.866974673
860.020.080.1587774631.0745956536821.62301214365727.629477482171093.99353465887603537.081060928083760.1275156536821.62301214117015.667197982419805.95581415846534.7144892564191555.80369660128733.370554490127425863.6535156746178.770643507
870.020.080.1587603537.0810609536821.62301214365014.737837754171806.88517438687431730.195886627425863.6535156536821.62301214114274.431889648422547.19112249245423.4276864845186981.29541866628047.194312799926770911.7392879741179.151804491
880.020.080.1587431730.1958866536821.62301214364298.875816194172522.74719594687259207.448690626770911.7392879536821.62301214111545.465580366425276.15743177344317.1146912101182427.26135451227364.089203176826118891.2058104736201.909854685
890.020.080.1587259207.4486906536821.62301214363580.031036211173241.59197592987085965.856714726118891.2058104536821.62301214108828.713357543427992.90965459643215.7532420683177893.60986730926684.041480096325469788.9330465731246.944641421
900.020.080.1587085965.8567147536821.62301214362858.191069645173963.43194249586912002.424772225469788.9330465536821.62301214106124.12055436430697.5024577842119.32117733173380.24973036926007.037459555424823591.859681726314.156460284
910.020.080.1686912002.4247722536821.62301214362133.343436551174688.27957558986737314.145196624823591.859681536821.62301214103431.632748671433389.99026346941027.7964344555168887.09012531127021.934420049724180286.9828577719714.575151856
920.020.080.1686737314.1451966536821.62301214361405.475604986175416.14740715486561897.997789424180286.9828577536821.62301214100751.195761907436070.42725023339941.1570496509164414.04064022826306.246502436523539861.3579176714870.574199582
930.020.080.1686561897.9977894536821.62301214360674.574990789176147.0480213586385750.949768123539861.3579176536821.6230121498082.7556579901438738.8673541538859.381157426159961.01126787525593.7618028622902302.0981382710048.253634581
940.020.080.1686385750.9497681536821.62301214359940.628957367176880.99405477386208869.955713322902302.0981382536821.6230121495426.2587422424441395.36426989737782.4469901547155527.91240385124884.465984616222267596.3744743705247.516421529
950.020.080.1686208869.9557133536821.62301214359203.624815472177617.99819666886031251.957516722267596.3744743536821.6230121492781.6515603095444039.9714518336710.3328776363151114.65484480124178.344775168221635731.4153700468.265959409
960.020.080.1686031251.9575167536821.62301214358463.549822986178358.07318915485852893.884327521635731.4153536821.6230121490148.8808970834446672.74211505635643.0172466599146721.14978661923475.38396585921006694.5061517695710.40607956
970.020.080.1685852893.8843275536821.62301214357720.391184698179101.23182744285673792.652500121006694.5061517536821.6230121487527.893775632449293.72923650834580.4786205706142347.3088226622775.569411625720380472.9894719690973.841043745
980.020.080.1685673792.6525001536821.62301214356974.136052084179847.48696005685493945.1655420380472.9894719536821.6230121484918.6374561331451902.98555600733522.6956188364137993.04394196422078.887030714319757054.2643551686258.475542226
990.020.080.1685493945.16554536821.62301214356224.771523083180596.85148905685313348.31405119757054.2643551536821.6230121482321.059434813454500.56357732732469.6469566191133658.26752748221385.322804397219136425.7862937681564.214691844
1000.020.080.1685313348.314051536821.62301214355472.284641879181349.33837026185131998.975680719136425.7862937536821.6230121479735.1074428904457086.51556924931421.311444345129342.89235431520694.862776690518518575.0669258676890.96403411
1010.020.080.1685131998.9756807536821.62301214354716.66239867182104.9606134784949894.015067218518575.0669258536821.6230121477160.7294455241459660.89356661630377.6679872793125046.83158795820007.493054073317903489.6737839672238.629533304
1020.020.080.1684949894.0150672536821.62301214353957.891729447182863.73128269384767030.283784517903489.6737839536821.6230121474597.8736407664462223.74937137329338.6955851011120769.99878255319323.199805208517291157.2300449667607.117574585
1030.020.080.1684767030.2837845536821.62301214353195.959515769183625.66349637184583404.620288117291157.2300449536821.6230121472046.4884585204464775.13455361928304.3733314812116512.30787914818641.969260663716681565.4142807662996.334962105
1040.020.080.1684583404.6202881536821.62301214352430.852584534184390.77042760684399013.849860516681565.4142807536821.6230121469506.5225595027467315.10045263727274.6804136611112273.67320396917963.787712635116074701.9602104658406.188917135
1050.020.080.1684399013.8498605536821.62301214351662.557707752185159.06530438884213854.784556216074701.9602104536821.6230121466977.9248342099469843.6981779326249.5961120345108054.00946669217288.641514670815470554.6564537653836.587076196
1060.020.080.1684213854.7845562536821.62301214350891.061602317185930.56140982284027924.223146315470554.6564537536821.6230121464460.6444018905472360.97861024925229.0997997302103853.2317587316616.517081396714869111.346285649287.437489203
1070.020.080.1684027924.2231463536821.62301214350116.350929776186705.27208236383841218.95106414869111.346285536821.6230121461954.6306095209474866.99240261924213.170942196999671.255551520315947.400888243214270359.9273887644758.648617614
1080.020.080.1683841218.951064536821.62301214349338.4122961187483.2107160483653735.74034814270359.9273887536821.6230121459459.8330307862477361.78998135423201.789096790695507.996694829515281.279471172713674288.3516157640250.129332587
1090.020.080.1683653735.740348536821.62301214348557.23225145188264.3907606983465471.349587313674288.3516157536821.6230121456976.2014650655479845.42154707422194.933912362391363.371415055314618.139426408913080884.6247412635761.788913149
1100.020.080.1683465471.3495873536821.62301214347772.797289947189048.82572219383276422.523865113080884.6247412536821.6230121454503.6859364217482317.93707571821192.585128849487237.296313542713957.967410166812490136.8062231631293.537044365
1110.020.080.1683276422.5238651536821.62301214346985.093849438189836.52916270283086585.994702412490136.8062231536821.6230121452042.2366925963484779.38631954420194.722576867683129.688364905813300.750138384911902033.0089618626845.283815528
1120.020.080.1683086585.9947024536821.62301214346194.10831126190627.5147008882895958.480001511902033.0089618536821.6230121449591.8042040075487229.81880813219201.326177304979040.464915356812646.474386457111316561.399061622416.939718344
1130.020.080.1682895958.4800015536821.62301214345399.827000006191421.79601213482704536.683989411316561.399061536821.6230121447152.3391627541489669.28384938618212.37594091874969.543681043211995.126988966910733710.1955896618008.415645134
1140.020.080.1682704536.6839894536821.62301214344602.236183289192219.38682885182512317.297160510733710.1955896536821.6230121444723.7924816235492097.83053051617227.851967929770916.84274639211346.694839422710153467.6703448613619.622887039
1150.020.080.1682512317.2971605536821.62301214343801.322071502193020.30094063882319296.996219910153467.6703448536821.6230121442306.1152931034494515.50771903616247.734447628766882.28056246110701.16488999389575822.14761568609250.473132236
1160.020.080.1682319296.9962199536821.62301214342997.070817583193824.55219455782125472.44402539575822.14761568536821.6230121439899.2589483987496922.36406374115272.003657970862865.775945298410058.52415124779000762.00394867604900.878464161
1170.020.080.1682125472.4440253536821.62301214342189.468516772194632.15449536881930840.28952999000762.00394867536821.6230121437503.1750164528499318.44799568714300.639965182258867.24807430899418.759691889428428275.66791349600570.751359741
1180.020.080.1681930840.2895299536821.62301214341378.501206375195443.12180576581735397.16772428428275.66791349536821.6230121435117.8152829729501703.80772916713333.623823364154886.61649062748781.858638500387858351.61987034596260.004687631
1190.020.080.1681735397.1677242536821.62301214340564.154865517196257.46814662281539139.69957767858351.61987034536821.6230121432743.1317494597504078.4912626812370.935774100150923.80109550018147.808175280017290978.39173806591968.55170646
1200.020.080.1681539139.6995776536821.62301214339746.415414906197075.20759723381342064.49198037290978.39173806536821.6230121430379.0766322419506442.54637989811412.556446063946978.72214867287516.595543787646726144.56676342587696.306063089
1210.020.080.1681342064.4919803536821.62301214338925.268716585197896.35429555581144168.13768486726144.56676342536821.6230121428025.6023615143508796.02065062610458.466554629943051.30026678616888.208042685786163838.77929138583443.18179087
1220.020.080.1681144168.1376848536821.62301214338100.700573687198720.92243845380945447.21524636163838.77929138536821.6230121425682.6615803808511138.9614317599508.6469014849139141.45642177856262.633027484555604049.71453636579209.093307919
1230.020.080.1680945447.2152463536821.62301214337272.696730193199548.92628194780745898.28896445604049.71453636536821.6230121423350.2071439015513471.4158682388563.0783742422735249.11193929555639.857910287295046766.10835458574993.95541539
1240.020.080.1680745898.2889644536821.62301214336441.242870685200380.38014145580545517.90882295046766.10835458536821.6230121421028.1921181441515793.4308939967621.7419460568131374.18849710745019.870159537184491976.74701742570797.683295767
1250.020.080.1680545517.9088229536821.62301214335606.324620095201215.29839204480344302.61043094491976.74701742536821.6230121418716.5697792393518105.0532329016684.6186752422327516.60812353234402.657299765173939670.46698575566620.192511149
1260.020.080.1680344302.6104309536821.62301214334767.927543462202053.69546867880142248.91496223939670.46698575536821.6230121416415.2936124406520406.3293996995751.6897048898723676.2931958683788.206911338883389836.15468529562461.399001559
1270.020.080.1680142248.9149622536821.62301214333926.037145676202895.58586646479939353.32909573389836.15468529536821.6230121414124.3173111887522697.3057009514822.9362624893219853.16643882953176.506630212732842462.74628302558321.219083246
1280.020.080.1679939353.3290957536821.62301214333080.638871232203740.98414090879735612.34495482842462.74628302536821.6230121411843.5947761792524978.0282359613898.3396595506316047.15092299442567.544147679112297539.22746451554199.569447006
1290.020.080.1679735612.3449548536821.62301214332231.718103978204589.90490816179531022.44004672297539.22746451536821.623012149573.08011443547527248.5428977042977.881291228312258.17006325471961.307210120751755054.63321233550096.367156502
1300.020.080.1679531022.4400467536821.62301214331379.260166861205442.36284527979325580.07720141755054.63321233536821.623012147312.72763838469529508.8953737552061.542635946888486.147617275791357.783618764131214998.04758535546011.529646598
1310.020.080.1679325580.0772014536821.62301214330523.250321672206298.37269046779119281.70451091214998.04758535536821.623012145062.49186493895531759.1311472011149.305255028294731.00768396242756.961229433988677358.603499156541944.974721697
1320.020.080.1679119281.7045109536821.62301214329663.673768795207157.94924334478912123.7552676677358.603499156536821.623012142822.32751457982533999.29549756241.150792320784992.67470193128158.827952309005142125.482507344537896.620554083
1330.020.080.1678912123.7552676536821.62301214328800.515646948208021.10736519278704102.6479024142125.482507344142717.672017792592.189510447268142125.4825073440000142717.672017792

Example #2

In this example, we have a 10-year, 20,000,000 loan, with monthly payments calculated as though it were a 25-year loan.

SELECT *
FROM wct.SMMAmort(   20000000,             --@PrinAmt
                     0.05,                 --@InterestRate
                     300,                  --@NumPmts
                     120,                  --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     NULL,                 --@InterestOnly
                     NULL,                 --@PrinPaymentMultiple
                     NULL,                 --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.1520000000116918.00830159683333.333333333333584.674968262719966415.325031720000000116918.00830159683333.333333333333584.67496826273330.79021552573174538.63493132226180.795239698319788545.8998849268606.638208745
20.0020.10.1519966415.3250317116918.00830159683193.397187632233724.611113963819932690.713917819788545.8998849116918.00830159682452.274582853734465.73371874233295.36854077598172682.48358051525902.372537077319578102.3140449266993.48788581
30.0020.10.1519932690.7139178116918.00830159683052.877974657433865.130326938619898825.583590819578102.3140449116918.00830159681575.426308520235342.58199307583260.11614204388170835.2025587125625.280383806519368664.413351265388.046618543
40.0020.10.1519898825.5835908116918.00830159682911.773264961834006.235036634219864819.348554219368664.413351116918.00830159680702.768388962636215.23991263343225.03221037924168996.74947564725349.51242134719160227.3917524263790.277566275
50.0020.10.1519864819.3485542116918.00830159682770.080618975834147.927682620219830671.420871619160227.3917524116918.00830159679834.280798968237083.72750262783190.11594069776167167.08214364525075.062321546718952786.4661654262200.144064392
60.0020.10.1519830671.4208716116918.00830159682627.797586964934290.210714631119796381.21015718952786.4661654116918.00830159678969.943609022537948.06469257353155.36653176255165346.15857663324801.92378649518746336.8763644260617.609623497
70.0020.10.1519796381.210157116918.00830159682484.921708987334433.086592608719761948.123564318746336.8763644116918.00830159678109.736984851838808.27131674423120.78318616572163533.93698918724530.090548378118540873.8848723259042.637928571
80.0020.10.1519761948.1235643116918.00830159682341.450514851434576.557786744619727371.565777618540873.8848723116918.00830159677253.64118696839664.3671146283086.3651103101161730.3757955724259.556369335518336392.7768518257475.192838141
90.0020.10.1519727371.5657776116918.00830159682197.381524073334720.626777522719692650.939000118336392.7768518116918.00830159676401.636570215940516.37173138013052.11151439105159935.43360877823990.315041316718132888.8599973255915.238383448
100.0020.10.1519692650.9390001116918.00830159682052.712245833734865.296055762419657785.642944318132888.8599973116918.00830159675553.703583321941364.30471827413018.02161237828158149.06923959223722.360385938717930357.464427254362.738767627
110.0020.10.1519657785.6429443116918.00830159681907.440178934635010.568122661419622775.074821717930357.464427116918.00830159674709.822768445942208.18553315012984.09462199788156371.24169562923455.686254344317728793.9425762252817.658364878
120.0020.10.1519622775.0748217116918.00830159681761.562811756935156.445489839119587618.629331817728793.9425762116918.00830159673869.974760734343048.03354086172950.32976471432154601.91018040623190.28652706117528193.6690903251279.961719656
130.0020.10.1519587618.6293318116918.00830159681615.077622215935302.930679380119552315.698652417528193.6690903116918.00830159673034.140287876143883.86801371992916.72626571259152841.03409240222926.155113860317328552.0407184249749.61354585
140.0020.10.1519552315.6986524116918.00830159681467.982077718535450.026223877519516865.672428617328552.0407184116918.00830159672202.300169660144715.70813193592883.28335388043151088.57302412322663.285953618517129864.4762085248226.578725981
150.0020.10.1519516865.6724286116918.00830159681320.27363511935597.73466647719481267.937762117129864.4762085116918.00830159671374.435317535445543.57298406062850.00026179067149344.48676118122401.673014177116932126.4162015246710.82231039
160.0020.10.1519481267.9377621116918.00830159681171.949740675335746.058560920719445521.879201216932126.4162015116918.00830159670550.526734172746367.48156742332816.87622568353147608.73528136522141.310292204716735333.323127245202.30951644
170.0020.10.1519445521.8792012116918.00830159681023.007830004835895.000471591219409626.878729616735333.323127116918.00830159669730.555513029147187.45278856692783.91048544919145881.27875372721882.191813059116539480.6810992243701.005727713
180.0020.10.1519409626.8787296116918.00830159680873.445328039836044.562973556219373582.31575616539480.6810992116918.00830159668914.502837913548003.50546368252751.1022846103144162.07753766721624.3116306516344563.9958133242206.876493223
190.0020.10.1519373582.315756116918.00830159680723.259648983436194.748652612619337387.567103416344563.9958133116918.00830159668102.349982555348815.65831904072718.45087030459142451.09218202121367.663827303116150578.7944419240719.887526618
200.0020.10.1519337387.5671034116918.00830159680572.448196264236345.560105331919301042.006998116150578.7944419116918.00830159667294.078310174649623.92999142142685.95549326769140748.28342415821112.242513623715957520.6255331239240.004705398
210.0020.10.1519301042.0069981116918.00830159680421.008362491936496.999939104119264545.00705915957520.6255331116918.00830159666489.669273054450428.33902854162653.61540781582139053.6121890820858.04182836215765385.0589076237767.19407013
220.0020.10.1519264545.007059116918.00830159680268.937529412336649.070772183719227895.936286815765385.0589076116918.00830159665689.104412115151228.90388948092621.42987182877137367.03958852220605.055938278215574167.6855578236301.421823668
230.0020.10.1519227895.9362868116918.00830159680116.233067861636801.775233734419191094.16105315574167.6855578116918.00830159664892.365356490852025.64294510522589.39814673282135688.52692006220353.279038009315383864.1175459234842.654330381
240.0020.10.1519191094.161053116918.00830159679962.89233772136955.11596387519154139.045089215383864.1175459116918.00830159664099.433823107952818.57447848812557.51949748381134018.03566623220102.705349934915194469.9879037233390.858115377
250.0120.10.1519154139.0450892116918.00830159679808.912687871537109.095613724519117029.949475415194469.9879037116918.00830159663310.291616265453607.716685330615224.7810927831132355.52749363719853.329124045514993281.9626319244644.98776397
260.0120.10.1519117029.9494754116918.00830159679654.291456147737263.716845448319079766.2326314993281.9626319116918.00830159662472.008177633154446.000123962915021.6350453518130589.49210027719588.423815041614793224.8353624242940.711632183
270.0120.10.1519079766.23263116918.00830159679499.025969291637418.982332304419042347.250297714793224.8353624116918.00830159661638.436814009855279.571487586214819.6309021611128833.38376840819325.007565261214594292.2492042241246.015406904
280.0120.10.1519042347.2502977116918.00830159679343.11354290737574.89475868919004772.35553914594292.2492042116918.00830159660809.551038350856108.457263245214618.7622444529127087.14669702519063.072004553814396477.8829995239560.84523852
290.0120.10.1519004772.355539116918.00830159679186.551481412537731.456820183518967040.898718814396477.8829995116918.00830159659985.324512497856932.683789098214419.0226895498125350.72539878618802.608809817914199775.451122237885.147580114
300.0120.10.1518967040.8987188116918.00830159679029.337077995137888.671223600918929152.227495214199775.451122116918.00830159659165.731046341857752.277255254214220.4058906522123624.06469824918543.609704737314004178.7032779236218.86918576
310.0120.10.1518929152.2274952116918.00830159678871.467614563438046.540687032618891105.686808214004178.7032779116918.00830159658350.744596991258567.263704604814022.9055366362121907.10973011818286.066459517613809681.4243065234561.957108832
320.0120.10.1518891105.6868082116918.00830159678712.940361700838205.067939895218852900.618868313809681.4243065116918.00830159657540.339267943859377.669033652213826.5153518536120199.80593750118029.970890625113616277.4339835232914.358700325
330.0120.10.1518852900.6188683116918.00830159678553.752578617938364.255722978118814536.363145313616277.4339835116918.00830159656734.489308264660183.518993331413631.2290959322118502.09907017617775.314860526413423960.5868241231276.021607178
340.0120.10.1518814536.3631453116918.00830159678393.901513105538524.106788490518776012.256356813423960.5868241116918.00830159655933.16911176760984.83918982913437.0405635774116813.93518286617522.090277429913232724.7718878229646.89377061
350.0120.10.1518776012.2563568116918.00830159678233.384401486838684.623900109218737327.632456713232724.7718878116918.00830159655136.353216199261781.655085396813243.9435843754115135.26063352717270.289095029113042563.9125845228026.92342447
360.0120.10.1518737327.6324567116918.00830159678072.198468569738845.809833026418698481.822623713042563.9125845116918.00830159654344.016302435462573.991999160613051.9320225968113466.02208164217019.903312246312853471.9664811226416.059093588
370.0120.10.1518698481.8226237116918.00830159677910.340927598739007.667373997318659474.155249712853471.9664811116918.00830159653556.133193671363361.875107924712860.9997770017111806.16648652516770.924972978712665442.9251097224814.249592144
380.0120.10.1518659474.1552497116918.00830159677747.80898020739170.19932138918620303.955928312665442.9251097116918.00830159652772.678854623664145.329446972512671.1407806459110155.64110563816523.346165845712478470.8137764223221.444022034
390.0120.10.1518620303.9559283116918.00830159677584.599816367939333.408485228118580970.547443112478470.8137764116918.00830159651993.62839073564924.37991086112482.3490006882108514.39349291516277.159023937312292549.6913719221637.591771262
400.0120.10.1518580970.5474431116918.00830159677420.710614346239497.297687249918541473.249755812292549.6913719116918.00830159651218.95704738365699.05125421312294.6184381986106882.37149709416032.35572456412107673.6501824220062.642512324
410.0120.10.1518541473.2497558116918.00830159677256.138540649339661.869760946718501811.379994912107673.6501824116918.00830159650448.640209093466469.368092502612107.9431279675105259.52326005815788.928489008811923836.8157019218496.546200613
420.0120.10.1518501811.3799949116918.00830159677090.880749978739827.127551617318461984.252443311923836.8157019116918.00830159649682.653398757967235.354902838111922.3171383166103645.79721519415546.869582279111741033.3464455216939.253072828
430.0120.10.1518461984.2524433116918.00830159676924.934385180339993.073916415818421991.178526811741033.3464455116918.00830159648920.972276856567997.036024739611737.7345709099102041.14208574715306.171312862111559257.4337642215390.713645391
440.0120.10.1518421991.1785268116918.00830159676758.296577195240159.711724400818381831.466802411559257.4337642116918.00830159648163.57264068468754.43566091211554.1895605667100445.50688319515066.826032479211378503.3016595213850.878712878
450.0120.10.1518381831.4668024116918.00830159676590.964445010240327.043856585818341504.422945911378503.3016595116918.00830159647410.430423581269507.577878014911371.67627507598858.840905626414828.82613584411198765.2066008212319.699346454
460.0120.10.1518341504.4229459116918.00830159676422.935095607740495.073205988318301009.349739911198765.2066008116918.00830159646661.521694169870256.486607426211190.188915006497281.093736131714592.164060419811020037.4373422210797.126892314
470.0120.10.1518301009.3497399116918.00830159676254.205623916140663.802677679918260345.547062211020037.4373422116918.00830159645916.822655592571001.185646003511009.721713531495712.21524119914356.832286179810842314.3147415209283.112970146
480.0120.10.1518260345.5470622116918.00830159676084.773112759140833.235188836918219512.311873410842314.3147415116918.00830159645176.309644756171741.698656839910830.268936236594152.155569121914122.823335368310665590.1915793207777.609471586
490.0120.10.1518219512.3118734116918.00830159675914.634632805641003.373668790418178508.938204610665590.1915793116918.00830159644439.959131580372478.049170015710651.824880942292600.865148415513890.129772262310489859.4523799206280.568558691
500.0120.10.1518178508.9382046116918.00830159675743.78724251941174.22105907718137334.717145510489859.4523799116918.00830159643707.747718249573210.260583346510474.383877521291058.294686241413658.744202936210315116.5132328204791.942662422
510.0120.10.1518137334.7171455116918.00830159675572.227988106241345.780313489818095988.93683210315116.5132328116918.00830159642979.652138469973938.356163126110297.940287718589524.395166840913428.659275026110141355.8216151203311.684481129
520.0120.10.1518095988.936832116918.00830159675399.953903466741518.054398129418054470.882433910141355.8216151116918.00830159642255.649256729674662.359044866410122.488504972787999.117849977813199.86767749679968571.85621528201839.74697905
530.0120.10.1518054470.8824339116918.00830159675226.962010141141691.046291454918012779.83614249968571.85621528116918.00830159641535.716067563775382.29223403249948.0229542369586482.414269389812972.36214040859796759.12675762200376.083384814
540.0120.10.1518012779.8361424116918.00830159675053.2493172641864.75898433617970915.07715819796759.12675762116918.00830159640819.829694823476098.17860677269774.5380918026784974.236231248112746.13543468729625912.1738278198920.64718996
550.0120.10.1517970915.0771581116918.00830159674878.81282149242039.19548010417928875.8816789625912.1738278116918.00830159640107.967390949276810.04091064699602.0284051228483474.535812626412521.1803718949456025.5686994197473.392147451
560.0120.10.1517928875.881678116918.00830159674703.649506991542214.358794604517886661.52288349456025.5686994116918.00830159639400.106536247577517.90176534859430.4884126370781983.265359977912297.48980399679287093.91316144196034.272270214
570.0120.10.1517886661.5228834116918.00830159674527.756345347442390.251956248717844271.27092719287093.91316144116918.00830159638696.224638172778221.78366342349259.9126635973580500.377487621212075.05662314329119111.8393468194603.241829671
580.0120.10.1517844271.2709271116918.00830159674351.130295529742566.878006066417801704.3929219119111.8393468116918.00830159637996.299330611778921.70897098449090.2957378948879025.825076234411853.87376143528952074.00956169193180.25535429
590.0120.10.1517801704.392921116918.00830159674173.768303837742744.239997758317758960.15292338952074.00956169116918.00830159637300.308373173779617.69992842238921.6322458878477559.561271358211633.93419070378785975.11611602191765.267628138
600.0120.10.1517758960.1529233116918.00830159673995.66730384742922.34099774917716037.81192558785975.11611602116918.00830159636608.229650483480309.77865111268753.916828230176101.539481906811415.2309222868620809.88115477190358.233689447
610.020.080.1517716037.8119255116918.00830159673816.824216356443101.184085239617672936.62784038620809.88115477116918.00830159635920.041171478280997.967130117814365.181012973359132.92526641678869.938789962518466313.80774526181546.175791023
620.020.080.1517672936.6278403116918.00830159673637.235949334643280.772352261417629655.8554888466313.80774526116918.00830159635276.307532271981641.700769324114104.213741912858058.67788153098708.801682229638312509.2153525180372.09824281
630.020.080.1517629655.855488116918.00830159673456.899397866843461.108903729217586194.74658438312509.2153525116918.00830159634635.455063968782282.553237627313844.414487035256989.23852611498548.385778917248159393.00910172179203.275535829
640.020.080.1517586194.7465843116918.00830159673275.811444101343642.196857494717542552.54972688159393.00910172116918.00830159633997.470871257282920.537430338913585.778020628255924.58568077988388.687852116978006962.10796997178039.684150887
650.020.080.1517542552.5497268116918.00830159673093.968957195143824.039344400917498728.51038248006962.10796997116918.00830159633362.342116541583555.666185054513328.299138377354864.69792245128229.704688367687855213.44472409176881.300674057
660.020.080.1517498728.5103824116918.00830159672911.368793260144006.639508335917454721.87087417855213.44472409116918.00830159632730.056019683784187.952281912313071.97265926153809.55392393868071.433088590787704143.96585898175728.101796205
670.020.080.1517454721.8708741116918.00830159672728.007795308744190.000506287317410531.87036787704143.96585898116918.00830159632100.599857745784817.408443850312816.793425446752759.13245350577913.869868025867553750.63153618174580.064312523
680.020.080.1517410531.8703678116918.00830159672543.882793199244374.125508396917366157.74485947553750.63153618116918.00830159631473.960964734185444.047336861912562.756302186851713.41237444397757.011856166597404030.41552268173437.16512206
690.020.080.1517366157.7448594116918.00830159672358.990603580844559.017698015217321598.72716147404030.41552268116918.00830159630850.126731344586067.881570251512309.856177715350672.37264464627600.855896696937254980.30513007172299.381227261
700.020.080.1517321598.7271614116918.00830159672173.328029839144744.680271756917276854.04688967254980.30513007116918.00830159630229.084604708686688.923696887412058.087963145149635.99231618447445.398847427657106597.30115385171166.689733498
710.020.080.1517276854.0468896116918.00830159671986.891862040144931.116439555917231922.93045017106597.30115385116918.00830159629610.82208814187307.18621345511807.446592365548604.25053488717290.637580233076958878.41781314170039.067848616
720.020.080.1517231922.9304501116918.00830159671799.678876875345118.329424720717186804.60102546958878.41781314116918.00830159628995.326740888187922.681560707911557.927021940347577.12653992067136.568980988096811820.68269057168916.492882469
730.020.080.1517186804.6010254116918.00830159671611.685837605645306.322463990417141498.27856146811820.68269057116918.00830159628382.586177877488535.422123718611309.524231006346554.59966337076983.18994950566665421.13667248167798.942246467
740.020.080.1517141498.2785614116918.00830159671422.909494005745495.098807590317096003.17975386665421.13667248116918.00830159627772.588069468789145.420232127311062.233221172245536.64932982696830.497399474036519676.83388935166686.393453121
750.020.080.1517096003.1797538116918.00830159671233.346582307445684.661719288617050318.51803456519676.83388935116918.00830159627165.320141205689752.688160390410816.049016418344523.25505596866678.488258395296374584.84165658165578.824115588
760.020.080.1517050318.5180345116918.00830159671042.993825143745875.014476452317004443.5035586374584.84165658116918.00830159626560.770173569190357.238128026910570.96666299643514.39645015286527.159467522916230142.2404154164476.211947222
770.020.080.1517004443.503558116918.00830159670851.847931491846066.160370104216958377.34318796230142.2404154116918.00830159625958.926001730890959.082299865210326.981229328342510.05321200366376.507981800546086346.1236742163378.534761127
780.020.080.1516958377.3431879116918.00830159670659.905596616446258.102704979616912119.24048296086346.1236742116918.00830159625359.775515309291558.232786286810084.087805910541510.2051320046226.53076980065943193.59795162285.77046971
790.020.080.1516912119.2404829116918.00830159670467.163502012346450.844799583716865668.39568345943193.59795116918.00830159624763.30665812592154.7016434719842.2815052116140514.83209108916077.224813663375800681.78271023161197.897084233
800.020.080.1516865668.3956834116918.00830159670273.618315347446644.389986248716819024.00569715800681.78271023116918.00830159624169.507427959392748.50087363679601.5574615757839523.91406024145928.587109036215658807.81031478160114.892714377
810.020.080.1516819024.0056971116918.00830159670079.266690404746838.741611191316772185.26408595658807.81031478116918.00830159623578.365876311693339.64242528449361.9108311244738537.43110008745780.614665013115517568.82595828159036.735567795
820.020.080.1516772185.2640859116918.00830159669884.105267024747033.903034571316725151.36105145517568.82595828116918.00830159622989.870108159593928.13819343659123.3367916589737555.36336049685633.304504074525376961.98761269157963.403949677
830.020.080.1516725151.3610514116918.00830159669688.130671047347229.877630548716677921.48342085376961.98761269116918.00830159622404.008281719594514.00001987658885.830542563436577.69108018295486.653662027435236984.46597006156894.876262315
840.020.080.1516677921.4834208116918.00830159669491.339514253447426.668787342616630494.81463355236984.46597006116918.00830159621820.768608208695097.23969338748649.3873047080635604.39458630495340.659187945745097633.44438566155831.131004663
850.020.080.1516630494.8146335116918.00830159669293.728394306147624.279907289916582870.53472625097633.44438566116918.00830159621240.139351606995677.86894998918414.0023203533134635.45429407225195.318144110834958906.11882125154772.146771911
860.020.080.1516582870.5347262116918.00830159669095.293894692447822.714406903616535047.82031934958906.11882125116918.00830159620662.108828421996255.89947317418179.6708530538233670.85070635025050.627605952534820799.69778867153717.902255047
870.020.080.1516535047.8203193116918.00830159668896.032584663648021.975716932416487025.84460234820799.69778867116918.00830159620086.665407452896831.34289414327946.3881875632532710.56441326794906.584661990184683311.4022937152668.376240437
880.020.080.1516487025.8446023116918.00830159668695.941019176448222.067282419616438803.77731994683311.4022937116918.00830159619513.797509557197404.21079203897714.1496297393731754.57609182754763.186413774124546438.46578009151623.547609389
890.020.080.1516438803.7773199116918.00830159668495.01573883348422.99256276316390380.78475724546438.46578009116918.00830159618943.49360741797974.5146941797482.9505064496330802.86650551554620.429975827324410178.13407395150583.395337734
900.020.080.1516390380.7847572116918.00830159668293.253269821548624.755031774516341756.02972544410178.13407395116918.00830159618375.742225308198542.26607628797252.7861654770929855.41650391574478.312475587354274527.66532827149547.898495401
910.020.080.1616341756.0297254116918.00830159668090.650123855848827.358177740316292928.67154764274527.66532827116918.00830159617810.531938867899107.47636272827023.6519754268428912.20702232364625.953123571784139484.32996779148227.914175775
920.020.080.1616292928.6715476116918.00830159667887.202798115249030.805503480816243897.86604424139484.32996779116918.00830159617247.851374865899670.15692673026795.5433256327927973.21908136334475.715053018124005045.41063406147211.055655574
930.020.080.1616243897.8660442116918.00830159667682.90777518449235.10052641216194662.76551784005045.41063406116918.00830159616687.6892109753100230.3190906216568.455626064927038.43378660484326.149405856773871208.20213077146198.748308409
940.020.080.1616194662.7655178116918.00830159667477.761522990649440.246778605416145222.51873913871208.20213077116918.00830159616130.0341755449100787.9741260516342.3843072367826107.83232818464177.253172509543737970.0113693145190.971764508
950.020.080.1616145222.5187391116918.00830159667271.760494746449646.247806849616095576.27093233737970.0113693116918.00830159615574.8750473721101343.1332542246117.3248201138425181.39598042684029.023356868283605328.15731453144187.705745268
960.020.080.1616095576.2709323116918.00830159667064.901128884649853.107172711416045723.16375963605328.15731453116918.00830159615022.2006554772101895.8076461195893.2726360216324259.10610146623881.456976234593473279.97093093143188.930062849
970.020.080.1616045723.1637596116918.00830159666857.179848998350060.828452597715995662.3353073473279.97093093116918.00830159614471.9998788789102446.0084227175670.2232465548123340.94413287353734.551061259773341822.79512878142194.624619765
980.020.080.1615995662.335307116918.00830159666648.593063779150269.415237816915945392.92006923341822.79512878116918.00830159613924.2616463699102993.7466552265448.1721634863922426.89159928183588.302655885093210953.98471079141204.769408479
990.020.080.1615945392.9200692116918.00830159666439.137166954950478.871134641115894914.04893453210953.98471079116918.00830159613378.9749362949103539.0333653015227.1149186774121516.93010801463442.708817282333080670.90631879140219.344511006
1000.020.080.1615894914.0489345116918.00830159666228.808537227250689.199764368815844224.84917023080670.90631879116918.00830159612836.1287763283104081.8795252685007.0470639870720611.04134871583297.766615794522950970.93838082139238.330098504
1010.020.080.1615844224.8491702116918.00830159666017.60353820950900.40476338715793324.44440682950970.93838082116918.00830159612295.7122432534104622.2960583434787.9641711831619709.20709298143153.473134877032821851.47105832138261.706430884
1020.020.080.1615793324.4444068116918.00830159665805.518518361651112.489783234515742211.95462352821851.47105832116918.00830159611757.714462743105160.2938388534569.8618318530318811.40919399273009.825471038842693309.90619362137289.453856403
1030.020.080.1615742211.9546235116918.00830159665592.549810931451325.458490664615690886.49613292693309.90619362116918.00830159611222.1246091401105695.8836924564352.7356573148217917.6295861512866.820733784162565343.6572577136321.552811278
1040.020.080.1615690886.4961329116918.00830159665378.69373388751539.31456770915639347.18156522565343.6572577116918.00830159610688.9319052404106229.0763963564136.581278529217027.85028471412724.456045554252437950.1492981135357.983819285
1050.020.080.1615639347.1815652116918.00830159665163.946589854951754.061711741215587593.11985342437950.1492981116918.00830159610158.1256220754106759.8826795213921.3943460114216142.05338543442582.72854166952311126.81888713134398.727491372
1060.020.080.1615587593.1198534116918.00830159664948.304666055951969.703635540115535623.41621792311126.81888713116918.0083015969629.69507869638107288.31322293707.170529743815260.22106419882441.63537027182184871.11407029133443.764525267
1070.020.080.1615535623.4162179116918.00830159664731.764234241252186.244067354815483437.17215052184871.11407029116918.0083015969103.62964195954107814.3786596363493.905519088614382.33557666982301.173692267172059180.49431489132493.075705087
1080.020.080.1615483437.1721505116918.00830159664514.321550627252403.686750968815431033.48539962059180.49431489116918.0083015968579.91872631206108338.0895752843281.595022701313508.37925792882161.340681268611934052.43045898131546.641900958
1090.020.080.1615431033.4853996116918.00830159664295.972855831552622.035445764515378411.44995381934052.43045898116918.0083015968058.55179357908108859.4565080173070.2347684442112638.33452212022022.133523539231809484.4046604130604.444068621
1100.020.080.1615378411.4499538116918.00830159664076.714374807552841.293926788515325570.1560271809484.4046604116918.0083015967539.51835275166109378.4899488442859.8205033005411772.18386209781883.549417935651685473.91034616129666.463249059
1110.020.080.1615325570.156027116918.00830159663856.542316779253061.465984816815272508.69004221685473.91034616116918.0083015967022.80795977565109895.200341822650.3479932888210909.90984907241745.585575851591562018.45216197128732.680568106
1120.020.080.1615272508.6900422116918.00830159663635.452875175853282.555426420215219226.13461581562018.45216197116918.0083015966508.41021734156110409.5980842542441.8130233776610051.49513226141608.239221161821439115.54592208127803.077236073
1130.020.080.1615219226.1346158116918.00830159663413.442227565753504.566074030315165721.56854171439115.54592208116918.0083015965996.31477467534110921.6935269212234.2113974019196.922438539131471.507590166261316762.71855922126877.63454737
1140.020.080.1615165721.5685417116918.00830159663190.506535590653727.501766005415111994.06677571316762.71855922116918.0083015965486.51132733008111431.4969742662027.538937973628346.174572089781335.387931534361194957.50807489125956.333880125
1150.020.080.1615111994.0667757116918.00830159662966.641944898953951.366356697115058042.7004191194957.50807489116918.0083015964978.98961697871111939.0186846171821.791486407117499.234414061091199.877506249771073697.46348981125039.156695814
1160.020.080.1615058042.700419116918.00830159662741.844585079354176.163716516715003866.53670251073697.46348981116918.0083015964473.73943120752112444.2688703881616.964902626186656.084922220011064.9735875552952980.144794571124126.084538887
1170.020.080.1615003866.5367025116918.00830159662516.110569593854401.897732002214949464.6389705952980.144794571116918.0083015963970.75060331071112947.2576982851413.055065085345816.70913060973930.673460897556832803.122900591123217.099036394
1180.020.080.1614949464.6389705116918.00830159662289.435995710554628.572305885514894836.0666646832803.122900591116918.0083015963470.01301208579113447.995289511210.0578706864981.09014920828796.974423873324713163.979591186122312.181897617
1190.020.080.1614894836.0666646116918.00830159662061.81694443654856.191357160114839979.8753075713163.979591186116918.0083015962971.51658162994113946.4917199661007.969234693894149.21116358869663.873786174191594060.307472937121411.314913704
1200.020.080.1614839979.875307514901813.124787961833.249480447814839979.87530750594060.307472937596535.5587540752475.25128113724594060.3074729370000596535.558754075

Example #3

In this example we have a 10-year, 25,000,000 interest-only loan with quarterly payments.

SELECT *
FROM wct.SMMAmort(   25000000,             --@PrinAmt
                     0.04,                 --@InterestRate
                     40,                   --@NumPmts
                     NULL,                 --@LastPmtNum
                     4,                    --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     'True',               --@InterestOnly
                     NULL,                 --@PrinPaymentMultiple
                     NULL,                 --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.152500000025000025000002500000025000000250000250000012509.385952561649906.33936758197485.950905137224337584.2746799814929.774415005
20.0020.10.152500000025000025000002500000024337584.2746799243375.842746799243375.842746799012177.929393798632686.01220028894902.901830043223692720.3330858793336.882510841
30.0020.10.152500000025000025000002500000023692720.3330858236927.203330858236927.203330858011855.2553165064615921.96565342592388.294848013823064943.1121158772316.129452776
40.0020.10.152500000025000025000002500000023064943.1121158230649.431121158230649.431121158011541.1310145328599602.10982866989940.316474300322453799.8712726751852.355490059
50.0020.10.152500000025000025000002500000022453799.8712726224537.998712726224537.998712726011235.3299476526583714.67516924387557.201275386421858849.8661557731930.802554235
60.0020.10.152500000025000025000002500000021858849.8661557218588.498661557218588.498661557010937.6315781931568248.20397195385237.230595792921279664.0306056712537.10361591
70.0020.10.152500000025000025000002500000021279664.0306056212796.640306056212796.640306056010647.821211987553191.54212411582978.731318617220715824.6672695693657.272323541
80.0020.10.152500000025000025000002500000020715824.6672695207158.246672695207158.246672695010365.6898435383538533.8310594380780.074658914620166925.1463665675277.692916749
90.0120.10.152500000025000025000002500000020166925.1463665201669.251463665201669.251463665060774.9505685028524264.49992700478639.674989050519581885.695871708069.026970121
100.0120.10.152500000025000025000002500000019581885.695871195818.85695871195818.85695871059011.8784379507509055.66602071776358.349903107619013818.1514123687528.051514271
110.0120.10.152500000025000025000002500000019013818.1514123190138.181514123190138.181514123057299.9527634377494288.03808741174143.205713111618462230.1605615667582.96665186
120.0120.10.152500000025000025000002500000018462230.1605615184622.301605615184622.301605615055637.6897940043479948.81680849171992.322521273717926643.653959648216.485686837
130.0120.10.152500000025000025000002500000017926643.653959179266.43653959179266.43653959054023.6488220821466025.57417166369903.836125749517406594.4309653629411.823407586
140.0120.10.152500000025000025000002500000017406594.4309653174065.944309653174065.944309653052456.4309348115452506.2426993967875.936404908616901631.7573311611152.681538946
150.0120.10.152500000025000025000002500000016901631.7573311169016.317573311169016.317573311050934.6778015835439379.10498983565906.865748475316411317.9745396593423.234616254
160.0120.10.152500000025000025000002500000016411317.9745396164113.179745396164113.179745396049457.0704967548426632.78356121863994.917534182715935228.1204817576208.116269186
170.0120.10.152500000025000025000002500000015935228.1204817159352.281204817159352.281204817048022.3283565158414256.23099078362138.434648617515472949.5611344559492.405903498
180.0120.10.152500000025000025000002500000015472949.5611344154729.495611344154729.495611344046629.2078689201402238.72033984260335.808050976415024081.6329256543261.61576913
190.0120.10.152500000025000025000002500000015024081.6329256150240.816329256150240.816329256045276.5015961154390569.83585657658585.475378486414588235.2954729527501.678403461
200.0120.10.152500000025000025000002500000014588235.2954729145882.352954729145882.352954729043963.0371278386379239.4639485556885.919592282514165032.7943965512198.934438835
210.020.080.152500000025000025000002500000014165032.7943965141650.327943965141650.327943965071362.6364138935292219.50821835343832.926232752913801450.6497643461399.546343458
220.020.080.152500000025000025000002500000013801450.6497643138014.506497643138014.506497643069530.9300726108284718.93994974742707.840992462113447200.7797419449556.535527539
230.020.080.152500000025000025000002500000013447200.7797419134472.007797419134472.007797419067746.2392045406277410.89313426141611.633970139113102043.6474031438017.506166081
240.020.080.152500000025000025000002500000013102043.6474031131020.436474031131020.436474031066007.3570361562270290.42621165740543.563931748512765745.8641553426774.655790096
250.020.080.152500000025000025000002500000012765745.8641553127657.458641553127657.458641553064313.1077688897263352.72445960239502.908668940312438080.0319268415820.382201104
260.020.080.152500000025000025000002500000012438080.0319268124380.800319268124380.800319268062662.3457840796256593.09673804538488.964510706712118824.5894047405147.278330686
270.020.080.152500000025000025000002500000012118824.5894047121188.245894047121188.245894047061053.9548683258250006.97231715737501.045847573611807763.6622192394748.127231956
280.020.080.152500000025000025000002500000011807763.6622192118077.636622192118077.636622192059486.8474587271243589.89778669536538.484668004211504686.9169738384615.89719961
290.020.080.152500000025000025000002500000011504686.9169738115046.869169738115046.869169738057959.9639074931237337.53404468735600.630106703111209389.4190216374743.737015215
300.020.080.152500000025000025000002500000011209389.4190216112093.894190216112093.894190216056472.2717654297231245.6533634234686.84800451310921671.4938928365124.971314553
310.020.080.162500000025000025000002500000010921671.4938928109216.714938928109216.714938928055022.7650838177225310.1365307336049.621844916710641338.5922782353499.994708558
320.020.080.162500000025000025000002500000010641338.5922782106413.385922782106413.385922782053610.4637342095219526.97006466735124.315210346810368201.1584793344426.504511312
330.020.080.162500000025000025000002500000010368201.1584793103682.011584793103682.011584793052234.4127456849213892.24349966434222.758959946210102074.502234335585.908870196
340.020.080.162500000025000025000002500000010102074.502234101020.74502234101020.74502234050893.6816591183208402.14674234633344.34347877549842778.67383252326972.229945029
350.020.080.16250000002500002500000250000009842778.6738325298427.786738325298427.7867383252049587.3638980205203052.96749522732488.47479923649590138.34243927318579.643332337
360.020.080.16250000002500002500000250000009590138.3424392795901.383424392795901.3834243927048314.5761555288197841.0887465231654.57419944329343982.67753722310402.474126998
370.020.080.16250000002500002500000250000009343982.6775372293439.826775372293439.8267753722047074.4577971319192762.98632438630842.07781190179104145.2334157302435.193084988
380.020.080.16250000002500002500000250000009104145.233415791041.45233415791041.452334157045866.1702787258187815.22651395630050.43624223298870463.83662302294672.412884606
390.020.080.16250000002500002500000250000008870463.8366230288704.638366230288704.6383662302044688.8965796064182994.46373552129279.11419768348642780.47630789287108.884483674
400.020.080.1625000000252500002500002500000008642780.476307898729208.2810709786427.80476307898642780.4763078900008729208.28107097

Example #4

In this example we have a 10,000,000 loan with monthly payments of interest and quarterly payments of principal. The loan matures in 120 months.

SELECT *
FROM wct.SMMAmort(   10000000,             --@PrinAmt
                     0.06,                 --@InterestRate
                     120,                  --@NumPmts
                     NULL,                 --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     NULL,                 --@InterestOnly
                     3,                    --@PrinPaymentMultiple
                     NULL,                 --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.1510000000500005000001000000010000000500005000001668.1963994558187416.109546967213112.41643204519910915.69405358125971.889514378
20.0020.10.151000000050000500000100000009910915.6940535849554.578470267949554.578470267901653.3353876130386637.369202214412995.60538033229822624.98946375124849.677679763
30.0020.10.1510000000276455.1864921150000226455.186492119773544.813507899822624.98946375271551.56233042649113.1249473187222438.4373831081601.499664028583921.095930800312588.164389629514663.95648581344485.993535635
40.0020.10.159773544.8135078948867.724067539548867.724067539509773544.813507899514663.9564858147573.319782429147573.319782429101587.2328154241683173.490672274412476.02360084129429903.23299811119858.019669286
50.0020.10.159773544.8135078948867.724067539548867.724067539509773544.813507899429903.2329981147149.516164990647149.516164990601573.0930620504282432.545403306312364.8818104969345897.59453276118790.272819851
60.0020.10.159773544.81350789276455.1864921148867.7240675395227587.4624245719545957.351083329345897.59453276271551.56233042646729.4879726638224822.0743577631521.5745341920579732.893685777811959.93405286679039821.05195502340846.09649753
70.0020.10.159545957.3510833247729.786755416647729.786755416609545957.351083329039821.0519550245199.105259775145199.105259775101508.0196930596279022.598736268111853.38981044028959290.4335257113876.333878663
80.0020.10.159545957.3510833247729.786755416647729.786755416609545957.351083328959290.433525744796.452167628544796.452167628501494.5856042886578318.631400017811747.79471000278879477.21652139112861.874461932
90.0020.10.159545957.35108332276455.1864921147729.7867554166228725.3997366949317231.951346638879477.21652139271551.56233042644397.386082607227154.1762478191443.3774142712975635.241872430311345.28628086458575244.42098687337284.895336263
100.0020.10.159317231.9513466346586.159756733146586.159756733109317231.951346638575244.4209868742876.222104934342876.222104934301430.5191867543874961.450569700811244.21758545518498852.45123041108023.974275934
110.0020.10.159317231.9513466346586.159756733146586.159756733109317231.951346638498852.4512304142494.262256152142494.262256152101417.7755058648874293.661690026911144.0492535048423141.01403452107061.65019854
120.0020.10.159317231.95134663276455.1864921146586.1597567331229869.0267353779087362.924611258423141.01403452271551.56233042642115.7050701726229435.8572602541366.8709440733471626.18275801310743.92741370198120712.10307218333800.688618811
130.0020.10.159087362.9246112545436.814623056245436.814623056209087362.924611258120712.1030721840603.560515360940603.560515360901354.6942691362370988.10588015410648.21588202318048369.30292289102298.144782628
140.0020.10.159087362.9246112545436.814623056245436.814623056209087362.924611258048369.3029228940241.846514614540241.846514614501342.6260692626770355.713265875610553.35698988137976670.96358775101386.828859871
150.0020.10.159087362.92461125276455.1864921145436.8146230562231018.3718690548856344.55274227976670.96358775271551.56233042639883.3548179388231668.2075124881292.0185711460167703.800936663810155.57014049967676006.93656746330391.811697737
160.0020.10.158856344.552742244281.72276371144281.72276371108856344.55274227676006.9365674638380.034682837338380.034682837301280.5087133779767100.666325026110065.09994875397607625.7615290596696.1097724874
170.0020.10.158856344.552742244281.72276371144281.72276371108856344.55274227607625.7615290538038.128807645338038.128807645301269.1013903790166502.90469621549975.43570443237539853.7554424695834.6991898073
180.0020.10.158856344.5527422276455.1864921144281.722763711232173.4637283998624171.08901387539853.75544246271551.56233042637699.2687772123233852.2935532141218.7845333142563866.22241428139579.933362142197240916.45494165327056.63591588
190.0020.10.158624171.089013843120.85544506943120.85544506908624171.08901387240916.4549416536204.582274708336204.582274708301207.927075889463297.27460456179494.591190684257176411.253261291215.1927644751
200.0020.10.158624171.089013843120.85544506943120.85544506908624171.08901387176411.253261235882.05626630635882.05626630601197.1663413704562733.39522691699410.009284037547112480.6916929190402.6085505558
210.0020.10.158624171.0890138276455.1864921143120.855445069233334.3310470418390836.757966767112480.69169291271551.56233042635562.4034584646235989.1588719621147.1338415940360111.61371318699016.742056978036815232.78526617323793.567828229
220.0020.10.158390836.7579667641954.183789833841954.183789833808390836.757966766815232.7852661734076.163926330834076.163926330801136.9146793834259576.1135744918936.417036173656754519.7570122985852.7751440316
230.0020.10.158390836.7579667641954.183789833841954.183789833808390836.757966766754519.7570122933772.598785061533772.598785061501126.7865538701159045.38390161418856.807585242126694347.5865568185087.9616553036
240.0020.10.158390836.75796676276455.1864921141954.1837898338234501.0027022768156335.755264486694347.58655681271551.56233042633471.7379327841238079.8243976421077.0322634756656438.18099614598465.727149421886398752.54889955320601.048440626
250.0120.10.158156335.7552644840781.678776322440781.678776322408156335.755264486398752.5488995531993.762744497731993.762744497706434.2178852700255935.40537785398390.310806678086336382.9256364285973.0752009435
260.0120.10.158156335.7552644840781.678776322440781.678776322408156335.755264486336382.9256364231681.914628182131681.914628182106371.5025759295855390.19439589668308.529159384496274621.228664685135.0824406238
270.0120.10.158156335.75526448276455.1864921140781.6787763224235673.5077157887920662.247548696274621.2286646271551.56233042631373.106143323240178.4561871036067.8889076575652750.75104537977912.612656806965975624.13252446322457.589626657
280.0120.10.157920662.2475486939603.311237743539603.311237743507920662.247548695975624.1325244629878.120662622329878.120662622306008.7442630911552236.58137802597835.487206703885917378.8068833480287.9590970354
290.0120.10.157920662.2475486939603.311237743539603.311237743507920662.247548695917378.8068833429586.894034416729586.894034416705950.1761104536651727.42340134167759.113510201245859701.2073715479505.3800360107
300.0120.10.157920662.24754869276455.1864921139603.3112377435236851.8752543677683810.372294325859701.20737154271551.56233042629298.5060368577242253.0562935695648.5830772529149105.54629490417365.831944235615562694.02170582318939.859758348
310.0120.10.157683810.3722943238419.051861471638419.051861471607683810.372294325562694.0217058227813.470108529127813.470108529105593.5254709763148626.90699776957294.036049665435508473.5892370774739.8665276095
320.0120.10.157683810.3722943238419.051861471638419.051861471607683810.372294325508473.5892370727542.367946185427542.367946185405539.0045196390948152.93307133247222.939960699855454781.651646174011.365576457
330.0120.10.157683810.37229432276455.1864921138419.0518614716238036.1346306397445774.237663695454781.6516461271551.56233042627273.9082582305244277.6540721965239.3834198552745548.19882468316832.229823702475159716.41532937315506.914751262
340.0120.10.157445774.2376636937228.871188318437228.871188318407445774.237663695159716.4153293725798.582076646825798.582076646805188.3143454489445104.23353937176765.635030905755109423.8674445569325.4949305617
350.0120.10.157445774.2376636937228.871188318437228.871188318407445774.237663695109423.8674445525547.119337222725547.119337222705137.7430491496444664.59565184216699.689347776325059621.5287435568649.7686904382
360.0120.10.157445774.23766369276455.1864921137228.8711883184239226.3153037927206547.922359895059621.52874355271551.56233042625298.1076437178246253.4546867094840.0463549431242076.59108516286311.488662774424766451.43661674312156.711107758
370.0120.10.157206547.9223598936032.739611799536032.739611799507206547.922359894766451.4366167423832.257183083723832.257183083704792.8696802042741666.46409335886249.969614003824719992.1028431864041.621342643
380.0120.10.157206547.9223598936032.739611799536032.739611799507206547.922359894719992.1028431823599.960514215923599.960514215904746.1528437554241260.33467229596189.050200844394673985.6153271263417.3978294228
390.0120.10.157206547.92235989276455.1864921136032.7396117995240422.4468803116966125.475479584673985.61532712271551.56233042623369.9280766356248181.6342537914450.3341728097738688.6565642915803.298484643654382664.99033623308887.254582884
400.0120.10.156966125.4754795834830.627377397934830.627377397906966125.475479584382664.9903362321913.324951681221913.324951681204406.9560825285938311.5522902895746.732843543354339946.4819634258885.1004809554
410.0120.10.156966125.4754795834830.627377397934830.627377397906966125.475479584339946.4819634221699.732409817121699.732409817104364.0008051516437938.12370952895690.718556429334297644.3574487458311.1383680683
420.0120.10.156966125.47547958276455.1864921134830.6273773979241624.5591147126724500.916364874297644.35744874271551.56233042621488.2217872437250063.3405431834070.0148930641235382.37855740415307.356783610614008128.62345509305696.598997284
430.0120.10.156724500.9163648733622.504581824433622.504581824406724500.916364874008128.6234550920040.643117275420040.643117275404030.3438331792735037.50108262855255.625162394273969060.7785392853852.8628706889
440.0120.10.156724500.9163648733622.504581824433622.504581824406724500.916364873969060.7785392819845.303892696419845.303892696403991.0594532043834695.9851815365204.397777230413930373.7339045453327.9507502064
450.0120.10.156724500.91636487276455.1864921133622.5045818244242832.6819102866481668.234454593930373.73390454271551.56233042619651.8686695227251899.6936609043698.8621265417632155.78896676134823.368345014193642619.38915033302582.845078715
460.0120.10.156481668.2344545932408.341172272932408.341172272906481668.234454593642619.3891503318213.096945751718213.096945751703662.8087496418631842.36155598724776.354233398083607114.218844748941.9130179826
470.0120.10.156481668.2344545932408.341172272932408.341172272906481668.234454593607114.218844718035.571094223518035.571094223503627.1067905405831531.98917029524729.798375544273571955.1228838748464.868679515
480.0120.10.156481668.23445459276455.1864921132408.3411722729244046.8453198376237621.389134753571955.12288387271551.56233042617859.7756144193253691.7867160073336.6549405444429006.96713001344351.045069502023285919.7140973299544.139331482
490.0120.10.156237621.3891347531188.106945673731188.106945673706237621.389134753285919.714097316429.598570486516429.598570486503304.1320526830328724.23176900694308.634765351033253891.3502756144149.3276268254
500.0120.10.156237621.3891347531188.106945673731188.106945673706237621.389134753253891.3502756116269.456751378116269.456751378103271.9261704016628444.25227296224266.637840944333222175.1718322543718.9973537976
510.0120.10.156237621.38913475276455.1864921131188.1069456737245267.0795464375992354.309588313222175.17183225271551.56233042616110.8758591612255440.6864712652983.1777273274725934.03867690813890.105801536212937817.26895675296578.672933126
520.0120.10.155992354.3095883129961.771547941629961.771547941605992354.309588312937817.2689567514689.086344783714689.086344783702954.1002361198525681.25562120953852.188343181422909181.9130994239472.2538589317
530.0120.10.155992354.3095883129961.771547941629961.771547941605992354.309588312909181.9130994214545.909565497114545.909565497102925.3061676822425430.93648075543814.640472113312880825.6704509839087.5117418214
540.0120.10.155992354.30958831276455.1864921129961.7715479416246493.4149441695745860.894644142880825.67045098271551.56233042614404.1283522549257147.4339781712638.2200757568422935.17441355013440.276162032512598104.8419835293684.680657701
550.0120.10.155745860.8946441428729.304473220728729.304473220705745860.894644142598104.841983512990.524209917512990.524209917502612.5049397279522711.62174813363406.743262220032572780.7152956434907.907635559
560.0120.10.155745860.8946441428729.304473220728729.304473220705745860.894644142572780.7152956412863.903576478212863.903576478202587.0404530770522490.24808486083373.537212729122547703.426757734567.6549016869
570.0120.10.155745860.89464414276455.1864921128729.3044732207247725.882018895498135.012625252547703.4267577271551.56233042612738.5171337885258813.0451966382301.5766460597820008.58923355423001.288385033122266580.21568145290860.439825007
580.0120.10.155498135.0126252527490.675063126327490.675063126305498135.012625252266580.2156814511332.901078407311332.901078407302279.1428252128419813.56244309982972.034366464972244487.5104131430453.5719802549
590.0120.10.155498135.0126252527490.675063126327490.675063126305498135.012625252244487.5104131411222.437552065711222.437552065702256.9276702611419620.43660870752943.065491306122222610.1461341730156.7363397282
600.0120.10.155498135.01262525276455.1864921127490.6750631263248964.5114289845249170.501196272222610.14613417271551.56233042611113.0507306708260438.5115997551973.04704759417152.54105544122572.881158316181943046.04643138288104.269275145
610.020.080.155249170.5011962726245.852505981326245.852505981305249170.501196271943046.046431389715.230232156899715.2302321568903268.4804366346113454.39428989532018.159143484291926323.1717048524419.9458152025
620.020.080.155249170.5011962726245.852505981326245.852505981305249170.501196271926323.171704859631.615858524249631.6158585242403240.3501774529913338.59870664372000.789805996551909744.2228207524209.7749366244
630.020.080.155249170.50119627276455.1864921126245.8525059813250209.3339861294998961.167210141909744.22282075271551.5623304269548.72111410376262002.8412163232771.7358939067111409.59179871181711.438769806771633560.05391181284021.451253238
640.020.080.154998961.1672101424994.805836050724994.805836050704998961.167210141633560.053911818167.800269559058167.8002695590502747.8808791406111311.39485959081696.709228938621619500.7781730820530.3667793518
650.020.080.154998961.1672101424994.805836050724994.805836050704998961.167210141619500.778173088097.503890865398097.5038908653902724.2311731597911214.04305489911682.106458234861605562.5039450220353.6716606894
660.020.080.154998961.16721014276455.1864921124994.8058360507251460.380656064747500.786554081605562.50394502271551.5623304268027.8125197251263523.7498107012257.500495754949292.789835632271393.918475344841330488.46380293281707.934186469
670.020.080.154747500.7865540823737.503932770423737.503932770404747500.786554081330488.463802936652.442319014666652.4423190146602238.071260892029212.81120590981381.921680886471319037.5813361316721.40310493
680.020.080.154747500.7865540823737.503932770423737.503932770404747500.786554081319037.581336136595.187906680656595.1879066806502218.809244228199133.520914277981370.02813714171307685.2511776216577.4899280451
690.020.080.154747500.78655408276455.1864921123737.5039327704252717.682559344494783.103994741307685.25117762271551.5623304266538.42625588812265013.1360745381753.923133369877219.860680832021082.97910212481033698.33128888279442.367042503
700.020.080.154494783.1039947422473.915519973722473.915519973704494783.103994741033698.331288885168.491656444425168.4916564444201738.827949756927157.722768078841073.658415211831024801.7805710512991.3839590684
710.020.080.154494783.1039947422473.915519973722473.915519973704494783.103994741024801.780571055124.008902855245124.0089028552401723.862683221847096.119646836481064.417947025471015981.7982409912879.5732858881
720.020.080.154494783.10399474276455.1864921122473.9155199737253981.2709721374240801.83302261015981.79824099271551.5623304265079.90899120495266471.6533392211260.782908449275189.89502709198778.484254063797743059.466966227277223.756011904
730.020.080.154240801.833022621204.00916511321204.00916511304240801.8330226743059.4669662273715.297334831133715.2973348311301249.931948599885145.22806485437771.784209728155736664.3069527739338.67313855722
740.020.080.154240801.833022621204.00916511321204.00916511304240801.8330226736664.3069527733683.321534763863683.3215347638601239.174377809675100.94552995201765.141829492801730324.1870450119258.29961303274
750.020.080.154240801.8330226276455.1864921121204.009165113255251.1773269973985550.65569561730324.187045011271551.5623304263651.62093522505267899.941395201777.8635010260433202.00241348201480.300362022301458444.379735302275051.127882912
760.020.080.153985550.6556956119927.75327847819927.75327847803985550.65569561458444.3797353022292.221898676512292.221898676510771.1687992170513174.44429908062476.166644862094454498.7666370045761.66835211209
770.020.080.153985550.6556956119927.75327847819927.75327847803985550.65569561454498.7666370042272.493833185022272.493833185020764.5317155277583147.12336428478472.068504642717450587.1115571915712.08040835484
780.020.080.153985550.65569561276455.1864921119927.753278478256527.4332136323729023.22248197450587.111557191271551.5623304262252.93555778596269298.62677264304.9530745777741255.31083475287188.29662521293179728.22087522272923.529614544
790.020.080.153729023.2224819718645.116112409918645.116112409903729023.22248197179728.22087522898.641104376102898.6411043761020302.3284882623851244.50697044354186.67604556653178181.3854165142258.80051751549
800.020.080.153729023.2224819718645.116112409918645.116112409903729023.22248197178181.385416514890.906927082572890.9069270825720299.7264905152091233.79608986444185.069413479665176647.8628361352239.36009398255
810.020.080.153729023.22248197276455.1864921118645.1161124099257810.07037973471213.15210227176647.862836135177531.102150315883.239314180674176647.8628361350000177531.102150315

Example #5

This example uses the same loan as the previous loan, 1 month later.

SELECT *
FROM wct.SMMAmort(   10000000,             --@PrinAmt
                     0.06,                 --@InterestRate
                     119,                  --@NumPmts
                     NULL,                 --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     NULL,                 --@InterestOnly
                     3,                    --@PrinPaymentMultiple
                     2,                    --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.1510000000500005000001000000010000000500005000001668.1963994558187416.109546967213112.41643204519910915.69405358125971.889514378
20.0020.10.1510000000276455.1864921150000226455.186492119773544.813507899910915.69405358273992.40465071649554.5784702679224437.8261804491615.8947502594484675.421042227112701.31315633419600186.55208064347582.407286869
30.0020.10.159773544.8135078948867.724067539548867.724067539509773544.813507899600186.5520806448000.932760403248000.932760403201601.499664028583921.095930800312588.164389629514663.95648581120935.363965612
40.0020.10.159773544.8135078948867.724067539548867.724067539509773544.813507899514663.9564858147573.319782429147573.319782429101587.2328154241683173.490672274412476.02360084129429903.23299812119858.019669287
50.0020.10.159773544.81350789276455.1864921148867.7240675395227587.4624245719545957.351083329429903.23299812273992.40465071647149.5161649906226842.8884857261535.2512130690180449.573124324512067.43596864879121075.520175343909.793019461
60.0020.10.159545957.3510833247729.786755416647729.786755416609545957.351083329121075.52017545605.37760087545605.37760087501521.5745341920579732.893685777811959.93405286679039821.05195503114899.911767978
70.0020.10.159545957.3510833247729.786755416647729.786755416609545957.351083329039821.0519550345199.105259775145199.105259775101508.0196930596279022.598736268111853.38981044028959290.4335257113876.333878663
80.0020.10.159545957.35108332276455.1864921147729.7867554166228725.3997366949317231.951346638959290.4335257273992.40465071644796.4521676285229195.9524830881456.3512180184376315.089551019511447.26343265298652323.04027357340316.581987101
90.0020.10.159317231.9513466346586.159756733146586.159756733109317231.951346638652323.0402735743261.615201367943261.615201367901443.3774142712975635.241872430311345.28628086458575244.42098687108994.948207205
100.0020.10.159317231.9513466346586.159756733146586.159756733109317231.951346638575244.4209868742876.222104934442876.222104934401430.5191867543874961.450569700811244.21758545518498852.45123042108023.974275934
110.0020.10.159317231.95134663276455.1864921146586.1597567331229869.0267353779087362.924611258498852.45123042273992.40465071642494.2622561521231498.1423945641379.1570691025572269.994992478610840.49924887188193705.15677427336801.057463426
120.0020.10.159087362.9246112545436.814623056245436.814623056209087362.924611258193705.1567742740968.525783871440968.525783871401366.8709440733471626.18275801310743.92741370198120712.10307219103217.652072256
130.0020.10.159087362.9246112545436.814623056245436.814623056209087362.924611258120712.1030721940603.560515360940603.560515360901354.6942691362370988.105880154110648.21588202318048369.3029229102298.144782628
140.0020.10.159087362.92461125276455.1864921145436.8146230562231018.3718690548856344.55274228048369.3029229273992.40465071640241.8465146145233750.5581361021303.6318853173268312.356826206610246.8535239317745002.75607527333361.539838309
150.0020.10.158856344.552742244281.72276371144281.72276371108856344.55274227745002.7560752738725.013780376438725.013780376401292.0185711460167703.800936663910155.57014049967676006.9365674697565.2631476867
160.0020.10.158856344.552742244281.72276371144281.72276371108856344.55274227676006.9365674638380.034682837338380.034682837301280.5087133779767100.666325026110065.09994875397607625.7615290696696.1097724875
170.0020.10.158856344.5527422276455.1864921144281.722763711232173.4637283998624171.08901387607625.76152906273992.40465071638038.1288076453235954.2758430711229.7395830392464440.28421369819666.042632054717306001.46188925329996.385815399
180.0020.10.158624171.089013843120.85544506943120.85544506908624171.08901387306001.4618892536530.007309446236530.007309446201218.7845333142563866.22241428139579.93336214227240916.4549416592035.0808948996
190.0020.10.158624171.089013843120.85544506943120.85544506908624171.08901387240916.4549416536204.582274708336204.582274708301207.927075889463297.27460456179494.591190684257176411.253261291215.1927644751
200.0020.10.158624171.0890138276455.1864921143120.855445069233334.3310470418390836.757966767176411.2532612273992.40465071635882.056266306238110.348384411157.4448587856560651.92719705319097.789079557976876491.53282095326703.987626997
210.0020.10.158390836.7579667641954.183789833841954.183789833808390836.757966766876491.5328209534382.457664104834382.457664104801147.1338415940360111.61371318699016.742056978036815232.7852661786624.4631619076
220.0020.10.158390836.7579667641954.183789833841954.183789833808390836.757966766815232.7852661734076.163926330934076.163926330901136.9146793834259576.1135744918936.417036173656754519.757012385852.7751440316
230.0020.10.158390836.75796676276455.1864921141954.1837898338234501.0027022768156335.755264486754519.7570123273992.40465071633772.5987850615240219.8058656551086.713172347856945.47581512388541.821372268576456267.76215917323482.772265919
240.0020.10.158156335.7552644840781.678776322440781.678776322408156335.755264486456267.7621591732281.338810795832281.338810795801077.0322634756656438.18099614598465.727149421886398752.5488995581330.8249209955
250.0120.10.158156335.7552644840781.678776322440781.678776322408156335.755264486398752.5488995531993.762744497731993.762744497706434.2178852700255935.40537785398390.310806678086336382.9256364285973.0752009435
260.0120.10.158156335.75526448276455.1864921140781.6787763224235673.5077157887920662.247548696336382.92563642273992.40465071631681.9146281821242310.4900225346127.8490705350653272.01036187777990.801554281666034672.57618148325401.462528848
270.0120.10.157920662.2475486939603.311237743539603.311237743507920662.247548696034672.5761814830173.362880907430173.362880907406068.1199850575652752.75989995597912.913984993385975851.6962964681081.3287809275
280.0120.10.157920662.2475486939603.311237743539603.311237743507920662.247548695975851.6962964629879.258481482329879.258481482306008.9730881442652238.57065198827835.785597798225917604.1525563380291.0166238165
290.0120.10.157920662.24754869276455.1864921139603.3112377435236851.8752543677683810.372294325917604.15255633273992.40465071629588.0207627817244404.3838879355704.6437003652649592.90524597467438.935786896185617902.21972206321851.01781016
300.0120.10.157683810.3722943238419.051861471638419.051861471607683810.372294325617902.2197220628089.511098610328089.511098610305649.0396625902249109.51558633747366.42733795065563143.6644731375481.6390095872
310.0120.10.157683810.3722943238419.051861471638419.051861471607683810.372294325563143.6644731327815.718322365627815.718322365605593.9776059062548630.837599917294.62563998655508918.8492673174745.9078881954
320.0120.10.157683810.37229432276455.1864921138419.0518614716238036.1346306397445774.237663695508918.84926731273992.40465071627544.5942463366246447.810404385291.6384905039946002.47448209856900.371172314775211176.92589033318386.146451004
330.0120.10.157445774.2376636937228.871188318437228.871188318407445774.237663695211176.9258903326055.884629451726055.884629451705240.0600779032245554.08130222576833.112195333865160382.784510270016.9138142467
340.0120.10.157445774.2376636937228.871188318437228.871188318407445774.237663695160382.784510225801.91392255125801.91392255105188.9844080070445110.05867950286766.508801925415110083.7414226969334.4482081354
350.0120.10.157445774.23766369276455.1864921137228.8711883184239226.3153037927206547.922359895110083.74142269273992.40465071625550.4187071135248441.9859436034888.5875951334942498.5808275076374.787124126054814254.58705645315004.785949231
360.0120.10.157206547.9223598936032.739611799536032.739611799507206547.922359894814254.5870564524071.272935282324071.272935282304840.9377814757142084.34063691166312.651095536744767329.3086380664683.9002581328
370.0120.10.157206547.9223598936032.739611799536032.739611799507206547.922359894767329.3086380623836.646543190323836.646543190304793.7524178656241674.13810903726251.120716355584720861.4181111664053.4163537376
380.0120.10.157206547.92235989276455.1864921136032.7396117995240422.4468803116966125.475479584720861.41811116273992.40465071623604.3070905558250388.0975601614495.251093849339079.1385516085861.870782741214426898.93090554311704.923513433
390.0120.10.156966125.4754795834830.627377397934830.627377397906966125.475479584426898.9309055422134.494654527722134.494654527704451.4351914442738698.22818973915804.734228460864383749.2675243659479.4238072502
400.0120.10.156966125.4754795834830.627377397934830.627377397906966125.475479584383749.2675243621918.746337621821918.746337621804408.0463693654538321.03061963475748.15459294524341020.1905353658899.6687336767
410.0120.10.156966125.47547958276455.1864921134830.6273773979241624.5591147126724500.916364874341020.19053536273992.40465071621705.1009526768252287.303698044111.3948488451535742.11219440595361.316829160884048879.37979407308484.594864807
420.0120.10.156724500.9163648733622.504581824433622.504581824406724500.916364874048879.3797940720244.396898970320244.396898970304071.3204521797435393.72834065355309.059251098024009414.3310012354400.3864407056
430.0120.10.156724500.9163648733622.504581824433622.504581824406724500.916364874009414.3310012320047.071655006220047.071655006204031.636666809835048.74023779845257.311035669763970333.9540966353870.1375239446
440.0120.10.156724500.91636487276455.1864921133622.5045818244242832.6819102866481668.234454593970333.95409663273992.40465071619851.6697704831254140.7348802333736.7903655398332485.51535487174872.827303230753679970.91349598305341.883067897
450.0120.10.156481668.2344545932408.341172272932408.341172272906481668.234454593679970.9134959818399.854567479918399.854567479903700.3672962726732168.87405038184825.331107557263644101.6721493349443.7648065771
460.0120.10.156481668.2344545932408.341172272932408.341172272906481668.234454593644101.6721493318220.508360746618220.508360746603664.2992482523831855.31909728924778.297864593383608582.0538037848961.8288416948
470.0120.10.156481668.23445459276455.1864921132408.3411722729244046.8453198376237621.389134753608582.05380378273992.40465071618042.9102690189255949.4943816973371.2146565633429307.4095085174396.111426277553319953.93525701302274.917389519
480.0120.10.156237621.3891347531188.106945673731188.106945673706237621.389134753319953.9352570116599.76967628516599.76967628503338.3549098451929021.74568953114353.261853429673287593.8346576344606.6084222317
490.0120.10.156237621.3891347531188.106945673731188.106945673706237621.389134753287593.8346576316437.969173288216437.969173288203305.8154521220728738.86627963654310.829941945483255549.1529258744171.8209631013
500.0120.10.156237621.38913475276455.1864921131188.1069456737245267.0795464375992354.309588313255549.15292587273992.40465071616277.7457646294257714.6588860873014.4501090212426205.90285346593930.885428019882968614.1410773299281.872185184
510.0120.10.155992354.3095883129961.771547941629961.771547941605992354.309588312968614.141077314843.070705386514843.070705386502985.0678011091425950.46989590893892.570484386342939678.6033802839886.0379180182
520.0120.10.155992354.3095883129961.771547941629961.771547941605992354.309588312939678.6033802814698.393016901414698.393016901402955.9718870622525697.52668259663854.629002389492911025.1048106239497.2625841708
530.0120.10.155992354.30958831276455.1864921129961.7715479416246493.4149441695745860.894644142911025.10481062273992.40465071614555.1255240531259437.2791266632666.2843549582323179.14918433933476.87237765092625742.39214466296360.965812363
540.0120.10.155745860.8946441428729.304473220728729.304473220705745860.894644142625742.3921446613128.711960723313128.711960723302640.2956720922722953.21845938333442.98276890752600148.8780131835279.2433232914
550.0120.10.155745860.8946441428729.304473220728729.304473220705745860.894644142600148.8780131813000.744390065913000.744390065902614.5603049073122729.48991588243409.423487382372574804.8277923934935.3711234733
560.0120.10.155745860.89464414276455.1864921128729.3044732207247725.882018895498135.012625252574804.82779239273992.40465071612874.024138962261118.3805117542326.5101449438220225.34679328183033.802018992272291134.59034242293510.45956995
570.0120.10.155498135.0126252527490.675063126327490.675063126305498135.012625252291134.5903424211455.672951712111455.672951712102303.8332934561220028.20723362183004.231085043282268802.5498153430783.4823937468
580.0120.10.155498135.0126252527490.675063126327490.675063126305498135.012625252268802.5498153411344.012749076711344.012749076702281.3774767206219832.98922350962974.948383526442246688.1831151130483.4310657805
590.0120.10.155498135.01262525276455.1864921127490.6750631263248964.5114289845249170.501196272246688.18311511273992.40465071611233.4409155755262758.9637351411994.9252247048817342.73739747482601.410609621221964591.55675779290728.656663275
600.0120.10.155249170.5011962726245.852505981326245.852505981305249170.501196271964591.556757799822.957783788939822.9577837889301975.4803823309817173.69507405852576.054261108781945442.381301426396.0789790697
610.020.080.155249170.5011962726245.852505981326245.852505981305249170.501196271945442.38130149727.211906506989727.2119065069803272.5114134900913470.98742944082020.648114416131928698.8824584724450.0626350218
620.020.080.155249170.50119627276455.1864921126245.8525059813250209.3339861294998961.167210141928698.88245847273992.4046507169643.49441229233264348.9102384242799.6739109222611524.59603505111728.689405257661650025.70227407286587.985191432
630.020.080.154998961.1672101424994.805836050724994.805836050704998961.167210141650025.702274078250.128511370348250.1285113703402775.5784469092111425.40930907411713.811396361121635824.7145180820737.3048709925
640.020.080.154998961.1672101424994.805836050724994.805836050704998961.167210141635824.714518088179.123572590428179.1235725904202751.6903611139411327.07623615191699.061435422781621745.9479208220558.8287344335
650.020.080.154998961.16721014276455.1864921124994.8058360507251460.380656064747500.786554081621745.94792082273992.4046507168108.72973960409265883.6749111122280.753625083839388.509169594981408.276375439251344193.01021503284253.391069956
660.020.080.154747500.7865540823737.503932770423737.503932770404747500.786554081344193.010215036720.965051075146720.9650510751402261.12426157789307.706729014441396.156009352171332624.1792244416893.6400323152
670.020.080.154747500.7865540823737.503932770423737.503932770404747500.786554081332624.179224446663.120896122186663.1208961221802241.663838683079227.599716673451384.139957501021321154.9156690816748.2444939777
680.020.080.154747500.78655408276455.1864921123737.5039327704252717.682559344494783.103994741321154.91566908273992.4046507166605.77457834539267386.6300723711772.588473929657296.69481103871094.504221655811044699.00231174281967.183714029
690.020.080.154494783.1039947422473.915519973722473.915519973704494783.103994741044699.002311745223.49501155875223.495011558701757.332646593167233.895623409141085.084343511371035707.7740417413129.6389380496
700.020.080.154494783.1039947422473.915519973722473.915519973704494783.103994741035707.774041745178.538870208695178.5388702086901742.208118918797171.636918569271075.745537785391026793.9290042513016.6383699114
710.020.080.154494783.10399474276455.1864921122473.9155199737253981.2709721374240801.83302261026793.92900425273992.4046507165133.96964502125268858.4350056951274.955546686665248.23536801513787.235305202269751412.303083852279728.360260216
720.020.080.154240801.833022621204.00916511321204.00916511304240801.8330226751412.3030838523757.061515419263757.0615154192601263.982609669395203.06629816428780.459944724643744945.2541760199443.6504785283
730.020.080.154240801.833022621204.00916511321204.00916511304240801.8330226744945.2541760193724.726270880093724.7262708800901253.104111510885158.28597705052773.742896557578738533.8640874579362.37346288391
740.020.080.154240801.8330226276455.1864921121204.009165113255251.1773269973985550.65569561738533.864087457273992.4046507163692.66932043729270299.735330279787.636552627393242.23226714312486.334840071467464204.259937408277535.938630415
750.020.080.153985550.6556956119927.75327847819927.75327847803985550.65569561464204.2599374082321.021299687042321.021299687040780.8577388036953214.32791349317482.149187023976460209.0742851115834.05776495993
760.020.080.153985550.6556956119927.75327847819927.75327847803985550.65569561460209.0742851112301.045371425552301.045371425550774.1372670118723186.66371936558477.999557904837456248.2732987335783.84679989817
770.020.080.153985550.65569561276455.1864921119927.753278478256527.4332136323729023.22248197456248.273298733273992.4046507162281.24136649367271711.163284223310.4177253149921277.80555886106191.670833829158182948.886730334275388.957101063
780.020.080.153729023.2224819718645.116112409918645.116112409903729023.22248197182948.886730334914.744433651672914.7444336516720307.7461073454281266.80809314225190.021213971337181374.3325298472299.27742016801
790.020.080.153729023.2224819718645.116112409918645.116112409903729023.22248197181374.332529847906.871662649234906.8716626492340305.0974827231931255.90527738907188.385791608361179813.3297697342279.48863115314
800.020.080.153729023.22248197276455.1864921118645.1161124099257810.07037973471213.15210227179813.329769734180712.396418583899.066648848672179813.3297697340000180712.396418583

Example #6

This is an interest-only loan.

SELECT *
FROM wct.SMMAmort(   50000,                --@PrinAmt
                     .05,                  --@InterestRate
                     36,                   --@NumPmts
                     NULL,                 --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     'TRUE',               --@InterestOnly
                     NULL,                 --@PrinPaymentMultiple
                     NULL,                 --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.1550000208.333333333333208.33333333333305000050000208.333333333333208.33333333333308.34098199727906437.08054773483665.562082160225449554.5784702679588.192780905223
20.0020.10.1550000208.333333333333208.33333333333305000049554.5784702679206.477410292783206.47741029278308.26667693806514433.18684601107264.978026901660849113.1249473187582.952906340259
30.0020.10.1550000208.333333333333208.33333333333305000049113.1249473187204.638020613828204.63802061382808.19303382031406429.3278310588764.399174658830648675.6040824396577.759710834182
40.0020.10.1550000208.333333333333208.33333333333305000048675.6040824396202.815017010165202.81501701016508.12004674716623425.50319387353463.825479081030148241.9808418189572.612778549835
50.0020.10.1550000208.333333333333208.33333333333305000048241.9808418189201.008253507579201.00825350757908.04770987429385421.71262820311363.25689423046747812.2205037415567.511697354519
60.0020.10.1550000208.333333333333208.33333333333305000047812.2205037415199.217585432256199.21758543225607.97601740943289417.95583052388262.693374578582247386.2886558081562.456058786988
70.0020.10.1550000208.333333333333208.33333333333305000047386.2886558081197.442869399201197.44286939920107.90496361191929414.23250001603362.13487500240546964.1511921802557.445458024748
80.0020.10.1550000208.333333333333208.33333333333305000046964.1511921802195.683963300751195.68396330075107.83454279222934410.54233853959561.581350780939346545.7743108484552.479493851636
90.0020.10.1550000208.333333333333208.33333333333305000046545.7743108484193.940726295201193.94072629520107.76474931152401406.88505061055361.03275759158346131.1245109263547.557768625696
100.0020.10.1550000208.333333333333208.33333333333305000046131.1245109263192.213018795526192.21301879552607.6955775811975403.26034337719260.489051506578745720.1685899679542.679888247337
110.0020.10.1550000208.333333333333208.33333333333305000045720.1685899679190.5007024582190.500702458207.62702206242972399.66792659664459.950188989496645312.8736413088537.845462127777
120.0020.10.1550000208.333333333333208.33333333333305000045312.8736413088188.80364017212188.8036401721207.55907726574276396.10751261165359.41612689174844909.2070514314533.054103157768
130.0020.10.1550000208.333333333333208.33333333333305000044909.2070514314187.121696047631187.12169604763107.49173775056135392.57881632753658.886822449130444509.1364973533528.305427676598
140.0020.10.1550000208.333333333333208.33333333333305000044509.1364973533185.454735405639185.45473540563907.42499812477721389.08155518935558.362233278403344112.6299440392523.599055441368
150.0020.10.1550000208.333333333333208.33333333333305000044112.6299440392183.80262476683183.8026247668307.35885304431728385.61544915929657.842317373894343719.6556418356518.934609596548
160.0020.10.1550000208.333333333333208.33333333333305000043719.6556418356182.165231840982182.16523184098207.29329721271581382.18022069423857.327033104135743330.1821239286514.3117166438
170.0020.10.1550000208.333333333333208.33333333333305000043330.1821239286180.542425516369180.54242551636907.22832538069023378.77559472353856.816339208530842944.1782038244509.730006412067
180.0020.10.1550000208.333333333333208.33333333333305000042944.1782038244178.934075849268178.93407584926807.16393234572086375.40129862699956.310194794049942561.6129728517505.189112027939
190.0020.10.1550000208.333333333333208.33333333333305000042561.6129728517177.340054053549177.34005405354907.1001129516343372.05706221304255.808559331956342182.455797687500.688669886269
200.0020.10.1550000208.333333333333208.33333333333305000042182.455797687175.760232490362175.76023249036207.03686208819054368.74261769707155.311392654560641806.6763179017496.228319621063
210.0020.10.1550000208.333333333333208.33333333333305000041806.6763179017174.194484657924174.19448465792406.97417469067382365.4576996800354.818654952004541434.244443531491.807704076623
220.0020.10.1550000208.333333333333208.33333333333305000041434.244443531172.642685181379172.64268518137906.91204573948705362.20204512715354.330306769072941065.1303526644487.426469278946
230.0020.10.1550000208.333333333333208.33333333333305000041065.1303526644171.104709802768171.10470980276806.85047025974983358.975393346953.84630900203540699.3044890577483.084264407383
240.0020.10.1550000208.333333333333208.33333333333305000040699.3044890577169.580435371074169.58043537107406.78944332090019355.77748597008553.366622895512740336.7375597667478.780741766546
250.0120.10.1550000208.333333333333208.33333333333305000040336.7375597667168.069739832361168.069739832361040.5603055059738352.60806692918452.891210039377539943.5691873316508.346902228141
260.0120.10.1550000208.333333333333208.33333333333305000039943.5691873316166.431538280548166.431538280548040.1649579824507349.17114197766452.375671296649639554.2330873715503.391966944014
270.0120.10.1550000208.333333333333208.33333333333305000039554.2330873715164.809304530714164.809304530714039.7734639719227345.76771726119451.865157589179139168.6919061384498.485328174652
280.0120.10.1550000208.333333333333208.33333333333305000039168.6919061384163.202882942243163.202882942243039.3857859136073342.3974662478451.35961993717638786.9086539769493.626515166514
290.0120.10.1550000208.333333333333208.33333333333305000038786.9086539769161.61211939157161.61211939157039.0018866128325339.06006558842650.859009838263838408.8467017757488.815061754565
300.0120.10.1550000208.333333333333208.33333333333305000038408.8467017757160.036861257399160.036861257399038.6217292374684335.75519508550950.363279262826438034.4697774527484.05050631755
310.0120.10.1550000208.333333333333208.33333333333305000038034.4697774527158.476957406053158.476957406053038.2452773143939332.48253766266249.872380649399237663.7419624756479.332391733709
320.0120.10.1550000208.333333333333208.33333333333305000037663.7419624756156.932258176982156.932258176982037.8724947259966329.24177933404749.386266900107137296.6276884156474.660265336919
330.0120.10.1550000208.333333333333208.33333333333305000037296.6276884156155.402615368398155.402615368398037.5033457067083326.03260917429948.904891376144836933.0917335346470.03367887326
340.0120.10.1550000208.333333333333208.33333333333305000036933.0917335346153.887882223061153.887882223061037.137794839573322.85471928868548.428207893302736573.0992194063465.452188458016
350.0120.10.1550000208.333333333333208.33333333333305000036573.0992194063152.387913414193152.387913414193036.7758070528496319.70780478357247.956170717535836216.6156075699460.915354533079
360.0120.10.155000050208.3333333333208.33333333333350000036216.615607569936367.5181726014150.90256503154136216.6156075699000036367.5181726014

Example #7

In this loan the principal payment is a fixed percentage of the outstanding principal.

SELECT *
FROM wct.SMMAmort(   1000000,              --@PrinAmt
                     .18,                  --@InterestRate
                     24,                   --@NumPmts
                     NULL,                 --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     NULL,                 --@InterestOnly
                     NULL,                 --@PrinPaymentMultiple
                     NULL,                 --@FirstPrinPayNo
                     0.0100                --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.1510000001000015000-5000100500010000001000015000-5000167.6537381453098785.31900947021317.79785142053996047.02725238417635.174896195
20.0020.10.1510050001005015075-50251010025996047.0272523849960.4702725238414940.7054087858-4980.23513626192166.9910074873858750.590882846661312.588632427992109.68049831217565.4635304309
30.0020.10.15101002510100.2515150.375-5050.1251015075.125992109.6804983129921.0968049831214881.6452074747-4960.54840249156166.330896585698716.000035561241307.40000533419988187.89796865717496.0277317959
40.0020.10.151015075.12510150.7512515226.126875-5075.3756251020150.500625988187.8979686579881.8789796865714822.8184695299-4940.93948984328165.6733950844018681.545924952451302.23188874287984281.61813846317426.8664109806
50.0020.10.151020150.50062510201.5050062515302.257509375-5100.7525031251025251.25312812984281.6181384639842.8161813846314764.224272077-4921.40809069232165.0184926686278647.228010503941297.08420157559980390.77972598317357.9784829816
60.0020.10.151025251.2531281210252.512531281315378.7687969219-5126.256265640621030377.50939377980390.7797259839803.9077972598314705.8616958897-4901.95389862992164.3661790642558613.0457538361291.9568630754976515.32169171317289.3628670847
70.0020.10.151030377.5093937710303.775093937715455.6626409065-5151.887546968831035529.39694073976515.3216917139765.1532169171314647.7298253757-4882.57660845856163.7164440377858578.998618697121286.84979280457972655.18323743617221.0184868475
80.0020.10.151035529.3969407310355.293969407315532.940954111-5177.646984703671040707.04392544972655.1832374369726.5518323743614589.8277485615-4863.27591618718163.0692773961678545.086070955571281.76291064334968810.30380527217152.9442700828
90.0020.10.151040707.0439254410407.070439254415610.6056588816-5203.535219627191045910.57914507968810.3038052729688.1030380527214532.1545570791-4844.05151902636162.4246689866468511.307578591061276.69613678866964980.6230767217085.1391488418
100.0020.10.151045910.5791450710459.105791450715688.658687176-5229.552895725331051140.13204079964980.623076729649.806230767214474.7093461508-4824.9031153836161.7826086966028477.662611686311271.64939175295961166.08097172117017.6020593972
110.0020.10.151051140.1320407910511.401320407915767.1019806119-5255.700660203951056395.83270099961166.0809717219611.6608097172114417.4912145758-4805.8304048586161.1430864533868444.150642418841266.62259636283957366.61764770716950.3319422266
120.0020.10.151056395.8327009910563.958327009915845.9374905149-5281.979163504971061677.8118645957366.6176477079573.6661764770714360.4992647156-4786.83308823854160.5060922241698410.77114505261261.61567175789953582.17349866916883.327741996
130.0020.10.151061677.811864510616.77811864515925.1671779675-5308.38905932251066986.20092382953582.1734986699535.8217349866914303.73260248-4767.91086749335159.8716160157818377.523595929771256.62853938947949812.68915421716816.5884075428
140.0020.10.151066986.2009238210669.862009238216004.7930138573-5334.931004619111072321.13192844949812.6891542179498.1268915421714247.1903373133-4749.06344577108159.2396478745538344.407473462561251.66112101938946058.10547865116750.1128918599
150.0020.10.151072321.1319284410723.211319284416084.8169789266-5361.605659642211077682.73758808946058.1054786519460.5810547865114190.8715821798-4730.29052739325158.6101778861658311.422258124961246.71333871874942318.36357003316683.9001520789
160.0020.10.151077682.7375880810776.827375880816165.2410638213-5388.413687940421083071.15127602942318.3635700339423.1836357003314134.7754535505-4711.59181785016157.9831961754878278.567432444671241.7851148667938593.40475926316617.9491494538
170.0020.10.151083071.1512760210830.711512760216246.0672691404-5415.355756380121088486.5070324938593.4047592639385.9340475926314078.9010713889-4692.96702379631157.3586929064248245.842480994911236.87637214924934883.17060915816552.2588493447
180.0020.10.151088486.507032410884.86507032416327.2976054861-5442.432535162021093928.93956757934883.1706091589348.8317060915814023.2475591374-4674.41585304579156.7366582817648213.246890386411231.98703355796931187.60291353516486.8282212018
190.0020.10.151093928.9395675710939.289395675716408.9340935135-5469.644697837831099398.5842654931187.6029135359311.8760291353513967.814043703-4655.93801456768156.1170825430248180.780149259281227.11702238889927506.64369630116421.6562385488
200.0020.10.151099398.584265410993.98584265416490.9787639811-5496.992921327021104895.57718673927506.6436963019275.0664369630113912.5996554445-4637.53321848151155.4999559702948148.441748275021222.26626224125923840.23521053716356.7418789671
210.0020.10.151104895.5771867311048.955771867316573.433657801-5524.477885933651110420.05507266923840.2352105379238.4023521053713857.6035281581-4619.20117605268154.8852688820888116.231180108561217.43467701628920188.31993759916292.0841240797
220.0020.10.151110420.0550726611104.200550726616656.30082609-5552.100275363321115972.15534803920188.3199375999201.8831993759913802.824799064-4600.94159968799154.273011635198084.147939440241212.62219091604916550.84058621216227.6819595354
230.0020.10.151115972.1553480311159.721553480316739.5823302204-5579.860776740141121552.01612477916550.8405862129165.5084058621213748.2626087932-4582.75420293106153.6631746245048052.191522947941207.82872844219912927.7400915716163.5343749924
240.0020.10.151121552.016124771138375.2963666416823.28024187151121552.016124770912927.74009157926621.65619294413693.9161013736912927.740091570000926621.656192944

Example #8

In this example, we have a thirty-year loan which is interest-only for the first seven years and then switches to be a fully amortizing loan.

SELECT *
FROM wct.SMMAmort(   500000,               --@PrinAmt
                     .05,                  --@InterestRate
                     360,                  --@NumPmts
                     NULL,                 --@LastPmtNum
                     12,                   --@PmtPerYr
                     'SELECT * FROM #ls',  --@LSRatesQuery
                     'SELECT * FROM #cpr', --@CPRRatesQuery
                     'SELECT * FROM #cdr', --@CDRRatesQuery
                     'False',              --@InterestOnly
                     NULL,                 --@PrinPaymentMultiple
                     85,                   --@FirstPrinPayNo
                     NULL                  --@PmtPayPct
                 );

This produces the following result.

num_pmtCPRCDRLScont_prin_begincont_pmtcont_int_paycont_prin_paycont_prin_endproj_prin_beginproj_pmtproj_int_payproj_prin_payprin_prepayamt_defaultamt_loss_severityproj_prin_endproj_amt_cashflow
10.0020.10.155000002083.333333333332083.3333333333305000005000002083.333333333332083.33333333333083.40981997279064370.80547734836655.620821602254495545.7847026795881.92780905223
20.0020.10.155000002083.333333333332083.333333333330500000495545.7847026792064.774102927832064.77410292783082.66676938065144331.86846011072649.780269016608491131.2494731875829.52906340259
30.0020.10.155000002083.333333333332083.333333333330500000491131.2494731872046.380206138282046.38020613828081.93033820314064293.2783105887643.991746588306486756.0408243965777.59710834182
40.0020.10.155000002083.333333333332083.333333333330500000486756.0408243962028.150170101652028.15017010165081.20046747166234255.03193873534638.254790810301482419.8084181895726.12778549835
50.0020.10.155000002083.333333333332083.333333333330500000482419.8084181892010.082535075792010.08253507579080.47709874293854217.12628203113632.56894230467478122.2050374155675.11697354519
60.0020.10.155000002083.333333333332083.333333333330500000478122.2050374151992.175854322561992.17585432256079.76017409432894179.55830523881626.933745785822473862.8865580815624.56058786988
70.0020.10.155000002083.333333333332083.333333333330500000473862.8865580811974.428693992011974.42869399201079.04963611919294142.32500016033621.34875002405469641.5119218025574.45458024748
80.0020.10.155000002083.333333333332083.333333333330500000469641.5119218021956.839633007511956.83963300751078.34542792229344105.42338539595615.813507809393465457.7431084845524.79493851636
90.0020.10.155000002083.333333333332083.333333333330500000465457.7431084841939.407262952011939.40726295201077.64749311524014068.85050610553610.32757591583461311.2451092635475.57768625696
100.0020.10.155000002083.333333333332083.333333333330500000461311.2451092631922.130187955261922.13018795526076.9557758119754032.60343377192604.890515065787457201.6858996795426.79888247336
110.0020.10.155000002083.333333333332083.333333333330500000457201.6858996791905.0070245821905.007024582076.27022062429723996.67926596644599.501889894966453128.7364130885378.45462127777
120.0020.10.155000002083.333333333332083.333333333330500000453128.7364130881888.03640172121888.0364017212075.59077265742763961.07512611653594.16126891748449092.0705143145330.54103157768
130.0020.10.155000002083.333333333332083.333333333330500000449092.0705143141871.216960476311871.21696047631074.91737750561353925.78816327536588.868224491304445091.3649735335283.05427676598
140.0020.10.155000002083.333333333332083.333333333330500000445091.3649735331854.547354056391854.54735405639074.24998124777213890.81555189355583.622332784033441126.2994403925235.99055441368
150.0020.10.155000002083.333333333332083.333333333330500000441126.2994403921838.02624766831838.0262476683073.58853044317283856.15449159296578.423173738943437196.5564183565189.34609596548
160.0020.10.155000002083.333333333332083.333333333330500000437196.5564183561821.652318409821821.65231840982072.93297212715813821.80220694238573.270331041357433301.8212392865143.117166438
170.0020.10.155000002083.333333333332083.333333333330500000433301.8212392861805.424255163691805.42425516369072.28325380690233787.75594723538568.163392085308429441.7820382445097.30006412067
180.0020.10.155000002083.333333333332083.333333333330500000429441.7820382441789.340758492681789.34075849268071.63932345720863754.01298626999563.101947940499425616.1297285175051.89112027939
190.0020.10.155000002083.333333333332083.333333333330500000425616.1297285171773.400540535491773.40054053549071.0011295163433720.57062213042558.085593319563421824.557976875006.88669886269
200.0020.10.155000002083.333333333332083.333333333330500000421824.557976871757.602324903621757.60232490362070.36862088190543687.42617697071553.113926545606418066.7631790174962.28319621063
210.0020.10.155000002083.333333333332083.333333333330500000418066.7631790171741.944846579241741.94484657924069.74174690673823654.5769968003548.186549520045414342.444435314918.07704076623
220.0020.10.155000002083.333333333332083.333333333330500000414342.444435311726.426851813791726.42685181379069.12045739487053622.02045127153543.303067690729410651.3035266444874.26469278946
230.0020.10.155000002083.333333333332083.333333333330500000410651.3035266441711.047098027681711.04709802768068.50470259749833589.753933469538.46309002035406993.0448905774830.84264407383
240.0020.10.155000002083.333333333332083.333333333330500000406993.0448905771695.804353710741695.80435371074067.89443320900193557.77485970085533.666228955127403367.3755976684787.80741766546
250.0120.10.155000002083.333333333332083.333333333330500000403367.3755976681680.697398323611680.697398323610405.6030550597383526.08066929184528.912100393776399435.6918733165083.46902228142
260.0120.10.155000002083.333333333332083.333333333330500000399435.6918733161664.315382805481664.315382805480401.6495798245073491.71141977664523.756712966496395542.3308737155033.91966944014
270.0120.10.155000002083.333333333332083.333333333330500000395542.3308737151648.093045307151648.093045307150397.7346397192273457.67717261194518.651575891791391686.9190613844984.85328174652
280.0120.10.155000002083.333333333332083.333333333330500000391686.9190613841632.028829422431632.028829422430393.8578591360733423.9746624784513.59619937176387869.0865397694936.26515166514
290.0120.10.155000002083.333333333332083.333333333330500000387869.0865397691616.12119391571616.12119391570390.0188661283253390.60065588426508.590098382639384088.4670177574888.15061754565
300.0120.10.155000002083.333333333332083.333333333330500000384088.4670177571600.368612573991600.368612573990386.2172923746843357.55195085509503.632792628264380344.6977745274840.5050631755
310.0120.10.155000002083.333333333332083.333333333330500000380344.6977745271584.769574060531584.769574060530382.4527731439393324.82537662662498.723806493993376637.4196247564793.32391733709
320.0120.10.155000002083.333333333332083.333333333330500000376637.4196247561569.322581769821569.322581769820378.7249472599663292.41779334048493.862669001071372966.2768841564746.60265336919
330.0120.10.155000002083.333333333332083.333333333330500000372966.2768841561554.026153683981554.026153683980375.0334570670833260.32609174299489.048913761448369330.9173353464700.3367887326
340.0120.10.155000002083.333333333332083.333333333330500000369330.9173353461538.878822230611538.878822230610371.377948395733228.54719288685484.282078933027365730.9921940634654.52188458016
350.0120.10.155000002083.333333333332083.333333333330500000365730.9921940631523.879134141931523.879134141930367.7580705284963197.07804783572479.561707175359362166.1560756994609.15354533079
360.0120.10.155000002083.333333333332083.333333333330500000362166.1560756991509.025650315411509.025650315410364.1734761664623165.91563737173474.88734560576358636.0669621614564.22741824785
370.0120.10.155000002083.333333333332083.333333333330500000358636.0669621611494.316945675671494.316945675670360.6238213958883135.05697170577470.258545755866355140.3861690594519.73919302146
380.0120.10.155000002083.333333333332083.333333333330500000355140.3861690591479.751609037751479.751609037750357.1087656552123104.49909019067465.674863528601351678.7783132134475.68460135503
390.0120.10.155000002083.333333333332083.333333333330500000351678.7783132131465.328242971721465.328242971720353.6279717023813074.23906103714461.135859155572348250.9112804744432.05941655568
400.0120.10.155000002083.333333333332083.333333333330500000348250.9112804741451.045463668641451.045463668640350.1811055824883044.27398103251456.641097154876344856.4561938594388.85945312876
410.0120.10.155000002083.333333333332083.333333333330500000344856.4561938591436.901900807741436.901900807740346.7678365957383014.60097526213452.190146289319341495.0873820014346.08056637629
420.0120.10.155000002083.333333333332083.333333333330500000341495.0873820011422.8961974251422.8961974250343.3878372657182985.21719683361447.782579525042338166.4823479024303.71865199929
430.0120.10.155000002083.333333333332083.333333333330500000338166.4823479021409.027009782921409.027009782920340.0407833079772956.11982660367443.417973990551334870.321737994261.76964570402
440.0120.10.155000002083.333333333332083.333333333330500000334870.321737991395.293007241621395.293007241620336.7263535989142927.30607290763439.095910936144331606.2893114834220.22952281202
450.0120.10.155000002083.333333333332083.333333333330500000331606.2893114831381.692872131181381.692872131180333.4442301449692898.77317129159434.815975693739328374.0719100474179.094297874
460.0120.10.155000002083.333333333332083.333333333330500000328374.0719100471368.22529962521368.22529962520330.1940980521162870.51838424723430.577757637085325173.3594277474138.36002428746
470.0120.10.155000002083.333333333332083.333333333330500000325173.3594277471354.888997615611354.888997615610326.9756454956472842.53900094913426.38085014237322003.8447813034098.02279391802
480.0120.10.155000002083.333333333332083.333333333330500000322003.8447813031341.682686588761341.682686588760323.7885636902592814.8323369947422.224850549205318865.2238806184058.07873672451
490.0120.10.155000002083.333333333332083.333333333330500000318865.2238806181328.605099502571328.605099502570320.6325468604252787.39573414663418.109360121995315757.1955996114018.52402038763
500.0120.10.155000002083.333333333332083.333333333330500000315757.1955996111315.654981665041315.654981665040317.5072922110612760.22656007787414.033984011681312679.4617473223979.3548499423
510.0120.10.155000002083.333333333332083.333333333330500000312679.4617473221302.831090613841302.831090613840314.4124998984712733.32220811906409.998331217859309631.7270393043940.56746741351
520.0120.10.155000002083.333333333332083.333333333330500000309631.7270393041290.13219599711290.13219599710311.3478730015842706.68009700845406.002014551267306613.6990692943902.15815145586
530.0120.10.155000002083.333333333332083.333333333330500000306613.6990692941277.557079455391277.557079455390308.3131174934612680.29767064423402.044650596634303625.0882811563864.12321699644
540.0120.10.155000002083.333333333332083.333333333330500000303625.0882811561265.104534504821265.104534504820305.3079422130932654.17239783932398.125859675897300665.6079411043826.45901488133
550.0120.10.155000002083.333333333332083.333333333330500000300665.6079411041252.773366421271252.773366421270302.3320588374582628.3017720785394.245265811776297734.9741101883789.16193152545
560.0120.10.155000002083.333333333332083.333333333330500000297734.9741101881240.562392125781240.562392125780299.3851818538662602.68331127796390.402496691695294832.9056170563752.22838856592
570.0120.10.155000002083.333333333332083.333333333330500000294832.9056170561228.470440071071228.470440071070296.467028532562577.31455754712386.597183632068291959.1240309773715.65484251868
580.0120.10.155000002083.333333333332083.333333333330500000291959.1240309771216.496350129071216.496350129070293.5773188995952552.19307695284382.828961542926289113.3536351243679.43778443858
590.0120.10.155000002083.333333333332083.333333333330500000289113.3536351241204.638973479681204.638973479680290.7157757099752527.31645928591379.097468892886286295.3214001283643.57373958268
600.0120.10.155000002083.333333333332083.333333333330500000286295.3214001281192.897172500531192.897172500530287.8821244210542502.68231782978375.402347674467283504.7569578773608.0592670769
610.020.080.155000002083.333333333332083.333333333330500000283504.7569578771181.269820657821181.269820657820476.8954155829361963.09541411938294.464312117906281064.7661281753326.79633824223
620.020.080.155000002083.333333333332083.333333333330500000281064.7661281751171.103192200731171.103192200730472.791003181946.19998400498291.929997600746278645.775140993298.16418178496
630.020.080.155000002083.333333333332083.333333333330500000278645.775140991161.024063087461161.024063087460468.7219155057621929.4499648353289.417494725295276247.6032606493269.77844870323
640.020.080.155000002083.333333333332083.333333333330500000276247.6032606491151.03168025271151.03168025270464.6878485370571912.84410512739286.926615769108273870.0713069853241.63701814804
650.020.080.155000002083.333333333332083.333333333330500000273870.0713069851141.125297112441141.125297112440460.68850086731896.38116416921284.457174625381271513.0016419483213.73778752356
660.020.080.155000002083.333333333332083.333333333330500000271513.0016419481131.304173508121131.304173508120456.7235736839711880.05991192694282.008986789041269176.2181563373186.07867232998
670.020.080.155000002083.333333333332083.333333333330500000269176.2181563371121.567575651411121.567575651410452.7927707462861863.87912895308279.581869342961266859.5462566383158.65760600781
680.020.080.155000002083.333333333332083.333333333330500000266859.5462566381111.914776069321111.914776069320448.8957983630651847.83760629533277.175640944299264562.8128519793131.47253978342
690.020.080.155000002083.333333333332083.333333333330500000264562.8128519791102.345053549911102.345053549910445.0323653707911831.93414540628274.790121810942262285.8463412023104.52144251604
700.020.080.155000002083.333333333332083.333333333330500000262285.8463412021092.857693088341092.857693088340441.202183111851816.16755805383272.425133708075260028.4766000373077.80230054595
710.020.080.155000002083.333333333332083.333333333330500000260028.4766000371083.451985833491083.451985833490437.4049654129681800.53666623246270.080499934868257790.5349683913051.31311754404
720.020.080.155000002083.333333333332083.333333333330500000257790.5349683911074.127229034961074.127229034960433.640428563831785.04030207514267.756045311271255571.8542377523025.05191436266
730.020.080.155000002083.333333333332083.333333333330500000255571.8542377521064.882725990631064.882725990630429.9082912958791769.67730776616265.451596164924253372.268638692999.01672888775
740.020.080.155000002083.333333333332083.333333333330500000253372.268638691055.717785994541055.717785994540426.2082747613031754.44653545456263.166980318184251191.6138284742973.20561589222
750.020.080.155000002083.333333333332083.333333333330500000251191.6138284741046.631724285311046.631724285310422.5401025122031739.34684716838260.902027075258249029.7268787942947.61664689064
760.020.080.155000002083.333333333332083.333333333330500000249029.7268787941037.623861994971037.623861994970418.9035004799331724.37711472967258.65656720945246886.4462635842922.24790999513
770.020.080.155000002083.333333333332083.333333333330500000246886.4462635841028.693526098271028.693526098270415.2981969546271709.53621967014256.430432950521244761.6118469592897.09750977251
780.020.080.155000002083.333333333332083.333333333330500000244761.6118469591019.840049362331019.840049362330411.7239225648971694.82305314765254.223457972148242655.0648712472872.16356710273
790.020.080.155000002083.333333333332083.333333333330500000242655.0648712471011.062770296861011.062770296860408.1804102577061680.23651586333252.0354773795240566.6479451262847.4442190384
800.020.080.155000002083.333333333332083.333333333330500000240566.6479451261002.361033104691002.361033104690404.6673952784161665.77551797945249.866327696918238496.2050318682822.93761866564
810.020.080.155000002083.333333333332083.333333333330500000238496.205031868993.734187632783993.7341876327830401.1846151510071651.438979038247.7158468557236443.5814376792798.64193496609
820.020.080.155000002083.333333333332083.333333333330500000236443.581437679985.181589323662985.1815893236620397.7318096584651637.22582787996245.583874181994234408.6238001412774.5553526801
830.020.080.155000002083.333333333332083.333333333330500000234408.623800141976.702599167252976.7025991672520394.3087208233391623.13500256527243.47025038479232391.1800767522750.67607217107
840.020.080.155000002083.333333333332083.333333333330500000232391.180076752968.296583653133968.2965836531330390.9150928884691609.16545029346241.374817544019230391.099533572727.00230929105
850.020.080.155000003052.029851782142083.33333333333968.696518448807499031.303481551230391.099533571406.32102672273959.962914723208446.358111999524386.7998343239221592.22537296832238.833805945249227965.7162142783146.51242806973
860.020.080.15499031.3034815513052.029851782142079.2970978398972.732753942344498058.570727609227965.7162142781406.32102672273949.857150892826456.463875829906382.7029945004691575.36111466974236.304167200461225551.1882292783128.08096869248
870.020.080.15498058.5707276093052.029851782142075.24404469837976.785807083771497081.784920525225551.1882292781406.32102672273939.796617621992466.52440910074378.6244909810021558.57233605305233.785850407958223147.4669931433109.73200334883
880.020.080.15497081.7849205253052.029851782142071.17410383552980.85574794662496100.929172578223147.4669931431406.32102672273929.78111247143476.539914251302374.5642416973751541.85869929241231.278804893861220754.5041379023091.46516281865
890.020.080.15496100.9291725783052.029851782142067.08720488574984.942646896397495115.986525682220754.5041379021406.32102672273919.810433907926486.510592814806370.5221649487571525.21986807397228.782980211096218372.2515120653073.28007953437
900.020.080.15495115.9865256823052.029851782142062.98327719034989.046574591799494126.93995109218372.2515120651406.32102672273909.88438130027496.436645422462366.4981793999881508.65550758916226.298326138374216000.6611796533055.1763875735
910.020.080.16494126.939951093052.029851782142058.86224979621993.167601985931493133.772349104216000.6611796531406.32102672273900.002754915221506.318271807511362.4922040799411492.16528452788238.746445524461213639.6854192383022.23206980609
920.020.080.16493133.7723491043052.029851782142054.7240514546997.305800327539492136.466548777213639.6854192381406.32102672273890.165355913491516.155670809241358.504158379891475.74886707187236.1198187315211289.2767229773004.454233443
930.020.080.16492136.4665487773052.029851782142050.56861061991001.46124116224491135.005307615211289.2767229771406.32102672273880.371986345737525.949040376995354.5339620518961459.40592488797233.504947982076208949.387795662986.75596568052
940.020.080.16491135.0053076153052.029851782142046.395855448391005.63399633375490129.371311281208949.387795661406.32102672273870.622449148583535.698577574149350.5815352071831443.13612912151230.901780659441206619.9715537572969.13691039198
950.020.080.16490129.3713112813052.029851782142042.2057137971009.82413798514489119.547173296206619.9715537571406.32102672273860.916548140654545.404478582078346.6467983145371426.93915238966228.310264382346204300.9811244712951.59671304459
960.020.080.16489119.5471732963052.029851782142037.998113222071014.03173856008488105.515434736204300.9811244711406.32102672273851.254088018628555.066938704104342.7296721987041410.81466877491225.730347003985201992.3698447932934.13502069236
970.020.080.16488105.5154347363052.029851782142033.772980978061018.25687080408487087.258563932201992.3698447931406.32102672273841.634874353304564.686152369428338.8300780387931394.76235381841223.161976610945199694.0912605662916.75148196899
980.020.080.16487087.2585639323052.029851782142029.530244016381022.49960776576486064.758956166199694.0912605661406.32102672273832.058713585693574.262313137039334.9479373666961378.78188451353220.605101522165197406.0991255492899.4457470808
990.020.080.16486064.7589561663052.029851782142025.269828984021026.76002279812485037.998933368197406.0991255491406.32102672273822.525413023121583.795613699611331.0831720655061362.87293929933218.059670287892195128.3474004852882.21746779967
1000.020.080.16485037.9989333683052.029851782142020.991662222361031.03818955978484006.960743808195128.3474004851406.32102672273813.034780835353593.286245887379327.2357043679441347.03519805406215.525631688649192860.7902521752865.06629745609
1010.020.080.16484006.9607438083052.029851782142016.695669765871035.33418201627482971.626561792192860.7902521751406.32102672273803.586626050731602.734400672002323.4054568547951331.26834208877213.002934734203190603.382052562847.99189093209
1020.020.080.16482971.6265617923052.029851782142012.38177734081039.64807444134481931.97848735190603.382052561406.32102672273794.180758552332612.1402681704319.5923524533541315.57205414086210.491528662538188356.0773777952830.99390465441
1030.020.080.16481931.978487353052.029851782142008.049910363961043.97994141818480887.998545932188356.0773777951406.32102672273784.816989074147621.504037648585315.7963144358691299.94601836771207.991362938834186118.8310073432814.07199658748
1040.020.080.16480887.9985459323052.029851782142003.699993941381048.32985784076479839.668688091186118.8310073431406.32102672273775.495129197263630.825897525469312.0172664181284.38992034033205.502387254454183891.5979230592797.22582622661
1050.020.080.16479839.6686880913052.029851782141999.331952867051052.69789891509478786.970789176183891.5979230591406.32102672273766.21499134608640.106035376652308.2551323572821268.90344703702203.024551525923181674.3333082882780.45505459111
1060.020.080.16478786.9707891763052.029851782141994.945711621571057.08414016057477729.886649016181674.3333082881406.32102672273756.976388784534649.344637938198304.5098365515951253.48628683707200.557805893931179466.9925469612763.75934421747
1070.020.080.16477729.8866490163052.029851782141990.54119437091061.48865741124476668.397991604179466.9925469611406.32102672273747.779135612339658.541891110393300.7813036376411238.13812951451198.102100722321177269.5312226992747.13835915256
1080.020.080.16476668.3979916043052.029851782141986.118324965021065.91152681712475602.486464787177269.5312226991406.32102672273738.623046761245667.697979961487297.0694585894271222.85866623184195.657386597095175081.9051179162730.59176494691
1090.020.080.16475602.4864647873052.029851782141981.677026936611070.35282484553474532.133639942175081.9051179161406.32102672273729.507937991317676.813088731415293.3742267167531207.64758953385193.223614325416172904.0702129342714.11922864792
1100.020.080.16474532.1336399423052.029851782141977.217223499761074.81262828238473457.321011659172904.0702129341406.32102672273720.433625887225685.887400835507289.6955336637141192.50459334139190.800734934622170735.9826850942697.72041879321
1110.020.080.16473457.3210116593052.029851782141972.738837548581079.29101423356472378.029997426170735.9826850941406.32102672273711.399927854556694.921098868176286.03330540721177.42937294525188.38869967124168577.5989078732681.39500540394
1120.020.080.16472378.0299974263052.029851782141968.241791655941083.7880601262471294.2419373168577.5989078731406.32102672273702.406662116137703.914364606595282.3874682554081162.42162500001185.987460000002166428.8754500112665.14265997815
1130.020.080.16471294.24193733052.029851782141963.726008072081088.30384371006470205.93809359166428.8754500111406.32102672273693.453647708378712.867379014354278.7579488463581147.48104751793183.596967602869164289.7690746322648.96305548415
1140.020.080.16470205.938093593052.029851782141959.191408723291092.83844305885469113.099650531164289.7690746321406.32102672273684.540704477634721.780322245098275.1446741464181132.6073398629181.217174378065162160.2367383782632.85586635399
1150.020.080.16469113.0996505313052.029851782141954.637915210541097.3919365716468015.707713959162160.2367383781406.32102672273675.667653076574730.653373646158271.5475714488351117.80020274436178.848032439098160040.2355905382616.82076847683
1160.020.080.16468015.7077139593052.029851782141950.065448808161101.96440297398466913.743310985160040.2355905381406.32102672273666.834314960577739.486711762156267.966568372271103.05933821129176.489494113806157929.7229721932600.85743919248
1170.020.080.16466913.7433109853052.029851782141945.473930462441106.5559213197465807.187389665157929.7229721931406.32102672273658.040512384136748.280514338596264.4015928593431088.38444964621174.141511943393155828.6564153492584.96555728489
1180.020.080.16465807.1873896653052.029851782141940.863280790271111.16657099187464696.020818674155828.6564153491406.32102672273649.286068397285757.034958325447260.8525731751821073.77524175923171.804038681477153736.9936420892569.14480297567
1190.020.080.16464696.0208186743052.029851782141936.233420077811115.79643170433463580.224386969153736.9936420891406.32102672273640.570806842036765.750219880696257.319437905981059.2314205821169.477027293136151654.692563722553.39485791767
1200.020.080.16463580.2243869693052.029851782141931.584268279041120.4455835031462459.778803466151654.692563721406.32102672273631.894552348833774.426474373899253.8021159575591044.75269346226167.160430953962149581.7112799262537.71540518859
1210.020.080.16462459.7788034663052.029851782141926.915745014441125.1141067677461334.664696698149581.7112799261406.32102672273623.257130333026783.063896389706250.3005365539381030.33876905701164.854203049122147518.0080779262522.10612928456
1220.020.080.16461334.6646966983052.029851782141922.227769569581129.80208221256460204.862614486147518.0080779261406.32102672273614.658366991356791.662659731376246.814629235911015.9893573276162.558297172417145463.5414316312506.56671611383
1230.020.080.16460204.8626144863052.029851782141917.520260893691134.50959088845459070.353023597145463.5414316311406.32102672273606.098089298461800.222937424271243.3443238596221001.70416953343160.272667125349143418.2700008132491.09685299043
1240.020.080.16459070.3530235973052.029851782141912.793137598321139.23671418382457931.116309414143418.2700008131406.32102672273597.576125003389808.744901719343239.889550595168987.482918226196157.997266916191141382.1526302732475.6962286279
1250.020.080.16457931.1163094143052.029851782141908.046317955891143.98353382625456787.132775587141382.1526302731406.32102672273589.092302626136817.228724096596236.450239925179973.325317244155155.732050759065139355.1483490072460.364533133
1260.020.080.16456787.1327755873052.029851782141903.279719898281148.75013188386455638.382643703139355.1483490071406.32102672273580.646451454194825.674575268538233.026322643426959.231081706332153.476973073013137337.2163693882445.10145799948
1270.020.080.16455638.3826437033052.029851782141898.493261015431153.53659076671454484.846052937137337.2163693881406.32102672273572.238401539118834.082625183614229.617729853428945.199928006804151.231988481089135328.3160863452429.90669610188
1280.020.080.16454484.8460529373052.029851782141893.68685855391158.34299322824453326.503059709135328.3160863451406.32102672273563.867983693102842.45304302963226.224392967066931.231573808985148.997051809438133328.4070765392414.77994168935
1290.020.080.16453326.5030597093052.029851782141888.860429415451163.16942236669452163.333637342133328.4070765391406.32102672273555.535029485578850.785997237154222.846243703203917.325738039949146.772118086392131337.4490975592399.72089037949
1300.020.080.16452163.3336373423052.029851782141884.013890155591168.01596162655450995.317675715131337.4490975591406.32102672273547.239371239827859.081655482905219.483214086305903.482140884777144.557142541564129355.4020871052384.72923915225
1310.020.080.16450995.3176757153052.029851782141879.147156982151172.88269479999449822.434980915129355.4020871051406.32102672273538.980842029602867.34018469313216.135236445083889.700503780918142.352080604947127382.2261621852369.80468634379
1320.020.080.16449822.4349809153052.029851782141874.260145753811177.76970602833448644.665274887127382.2261621851406.32102672273530.759275675773875.56175104696212.802243411121875.980549412591140.156887906015125417.8816183152354.94693164043
1330.020.080.16448644.6652748873052.029851782141869.35277197871182.67707980344447461.988195084125417.8816183151406.32102672273522.574506742978883.746519979754209.484167917528862.322001705204137.971520272833123462.3289287122340.15567607263
1340.020.080.16447461.9881950843052.029851782141864.424950812851187.60490096929446274.383294114123462.3289287121406.32102672273514.426370536301891.894656186431206.180943197585848.724585819793135.795933731167121515.5287435082325.43062200894
1350.020.080.16446274.3832941143052.029851782141859.476597058811192.55325472333445081.830039391121515.5287435081406.32102672273506.314703097952900.00632362478202.8925027834835.188028147501133.6300845036119577.4418889532310.77147315003
1360.020.080.16445081.8300393913052.029851782141854.507625164131197.52222661801443884.307812773119577.4418889531406.32102672273498.23934120397908.081685518762199.618780504576821.712056304065131.47392900865117648.0293666252296.17793452272
1370.020.080.16443884.3078127733052.029851782141849.517949219891202.51190256225442681.795910211117648.0293666251406.32102672273490.200122360939916.120904361793196.359710486874808.296399124335129.327423859894115727.2523526522281.64971247405
1380.020.080.16442681.7959102113052.029851782141844.507482959211207.52236882293441474.273541388115727.2523526521406.32102672273482.196884802718924.124141920014193.11522715089794.940786656826127.190525865092113815.0721969252267.18651466536
1390.020.080.16441474.2735413883052.029851782141839.476139755781212.55371202636440261.719829361113815.0721969251406.32102672273474.229467487186932.091559235546189.885265210734781.644950158274125.063192025324111911.450422322252.78805006642
1400.020.080.16440261.7198293613052.029851782141834.423832622341217.6060191598439044.113810202111911.450422321406.32102672273466.297710093940.023316629732186.669759672719768.408622088238122.945379534118110016.3487239292238.45402894957
1410.020.080.16439044.1138102023052.029851782141829.350474209171222.67937757297437821.434432629110016.3487239291406.32102672273458.401453016372947.91957370636183.468645834052755.23153610371120.837045776594108129.7289682852224.1841628839
1420.020.080.16437821.4344326293052.029851782141824.255976802621227.77387497952436593.660557649108129.7289682851406.32102672273450.540537367855955.780489354877180.281859281528742.113427053763118.738148328602106251.5531925952209.97816472942
1430.020.080.16436593.6605576493052.029851782141819.140252323541232.8895994586435360.770958191106251.5531925951406.32102672273442.714804969146963.606221753586177.10933589024729.054030974205116.648644955873104381.7836039772195.8357486313
1440.020.080.16435360.7709581913052.029851782141814.003212325791238.02663945635434122.744318734104381.7836039771406.32102672273434.924098349904971.396928372828173.951011822287716.05308508228114.568493613165102520.38257872181.75663001413
1450.020.080.16434122.7443187343052.029851782141808.844767994731243.18508378741432879.559234947102520.38257871406.32102672273427.168260744582979.15276597815170.806823525487703.110327771368112.497652443419100667.3126614252167.74052557617
1460.020.080.16432879.5592349473052.029851782141803.664830145611248.36502163653431631.19421331100667.3126614251406.32102672273419.447136089269986.873890633463167.6767077321690.225498605731110.43607977691798822.53656445342153.78715328365
1470.020.080.16431631.194213313052.029851782141798.463309222131253.56654256001430377.6276707598822.53656445341406.32102672273411.760569018556994.560457704176164.560601457553677.398338315265108.38373413044296986.01716697642139.89623236511
1480.020.080.16430377.627670753052.029851782141793.240115294791258.78973648735429118.83793426396986.01716697641406.32102672273404.1084048624021002.21262186033161.458441999178664.628588790289106.34057420644695157.71751432662126.06748330575
1490.020.080.16429118.8379342633052.029851782141787.995158059431264.03469372271427854.8032405495157.71751432661406.32102672273396.4904896430271009.8305370797158.370166934943651.915993076345104.30655889221593337.60081723562112.30062784181
1500.020.080.16427854.803240543052.029851782141782.728346835581269.30150494656426585.50173559493337.60081723561406.32102672273388.9066700718151017.41435665092155.295714122201639.260295369036102.28164725904691525.63045109352098.59538895492
1510.020.080.16426585.5017355943052.029851782141777.439590564971274.59026121717425310.91147437791525.63045109351406.32102672273381.3567935462231024.96423317651152.235021696439626.661241008868100.26579856141989721.76995521162084.95149086662
1520.020.080.16425310.9114743773052.029851782141772.12879780991279.90105397224424031.01042040489721.76995521161406.32102672273373.8407081467151032.48031857602149.18802807003614.11857647613598.258972236181787925.98303208952071.36865903272
1530.020.080.16424031.0104204043052.029851782141766.795876751681285.23397503046422745.77644537487925.98303208951406.32102672273366.3582626337061039.96276408903146.154671930997601.63204938581496.261127901730286138.23354668362057.84662013781
1540.020.080.16422745.7764453743052.029851782141761.440735189061290.58911659308421455.18732878186138.23354668361406.32102672273358.9093064445151047.41172027822143.134892241778589.20140848248394.272225357197284358.48552568122044.3851020898
1550.020.080.16421455.1873287813052.029851782141756.063280536591295.96657124555420159.22075753584358.48552568121406.32102672273351.4936896903381054.82733703239140.128628237999576.82640363527292.292224581643682586.70315677552030.98383401436
1560.020.080.16420159.2207575353052.029851782141750.663419823061301.36643195908418857.85432557682586.70315677551406.32102672273344.1112631532311062.2097635695137.135819427248564.50678583282690.321085733252280822.85078794592017.64254624955
1570.020.080.16418857.8543255763052.029851782141745.24105968991306.78879209224417551.06553348480822.85078794591406.32102672273336.7618782831081069.55914843962134.156405587863552.24230717829588.358769148527279066.89292674012004.36097034036
1580.020.080.16417551.0655334843052.029851782141739.796106389521312.23374539262416238.83178809179066.89292674011406.32102672273329.4453871947511076.87563952798131.190326767715540.03272088434386.405235341494977318.79423956011991.13883903329
1590.020.080.16416238.8317880913052.029851782141734.328465783711317.70138599843414921.13040209377318.79423956011406.32102672273322.1616426648341084.1593840579128.237523283004527.87778126818984.460445002910275578.5195509511977.97588627101
1600.020.080.16414921.1304020933052.029851782141728.838043342051323.19180844009413597.93859365375578.5195509511406.32102672273314.9104981289621091.41052859377125.297935717059515.77724374665582.524358999464873846.03384289351964.87184718698
1610.020.080.16413597.9385936533052.029851782141723.324744140221328.70510764192412269.23348601173846.03384289351406.32102672273307.6918076787231098.62921904401122.371504919141503.73086483125280.596938373000472121.30225409911951.82645810013
1620.020.080.16412269.2334860113052.029851782141717.788472858381334.24137892376410934.99210708772121.30225409911406.32102672273300.5054260587461105.81560066399119.458172003253491.73840212327578.678144339724170404.29007930861938.83945650954
1630.020.080.16410934.9921070873052.029851782141712.229133779531339.80071800261409595.19138908470404.29007930861406.32102672273293.3512086637861112.96981805895116.557878346954479.79961430892976.767938289428668694.96276859381925.91058108919
1640.020.080.16409595.1913890843052.029851782141706.646630787851345.38322099429408249.8081680968694.96276859381406.32102672273286.2290115358071120.09201518692113.670565590183467.91426115446974.86628178471566993.28592666221913.03957168267
1650.020.080.16408249.808168093052.029851782141701.040867367041350.9889844151406898.81918367566993.28592666221406.32102672273279.1386913610921127.18233536164110.79617563408456.08210350137272.973136560219565299.22531216511900.22616929796
1660.020.080.16406898.8191836753052.029851782141695.411746598651356.61810518349405542.20107849265299.22531216511406.32102672273272.0801054673551134.24092125538107.93465063982444.30290326151971.08846452184363612.74683700841887.47011610223
1670.020.080.16405542.2010784923052.029851782141689.759171160381362.27068062176404179.9303978763612.74683700841406.32102672273265.0531118208681141.26791490186105.085933027449432.57642341240869.212227745985261933.81656566671874.7711554166
1680.020.080.16404179.930397873052.029851782141684.083043324461367.94680845768402811.98358941261933.81656566671406.32102672273258.0575690236111148.26345769912102.249965474723420.90242799238267.344388478781260262.40071450051862.12903171106
1690.020.080.16402811.9835894123052.029851782141678.383264955881373.64658682626401438.33700258660262.40071450051406.32102672273251.0933363104191155.2276904123199.4266909159593409.28068209588465.484909135341458598.46565107631849.54349059923
1700.020.080.16401438.3370025863052.029851782141672.659737510771379.37011427137400058.96688831558598.46565107631406.32102672273244.1602735461511162.1607531765896.6160525408815397.71095186872663.633752298996156941.97789349011837.01427883334
1710.020.080.16400058.9668883153052.029851782141666.912362034641385.1174897475398673.84939856756941.97789349011406.32102672273237.2582412228751169.0627854998693.8179937934822386.19300450338661.790880720541755292.90410969341824.54114429906
1720.020.080.16398673.8493985673052.029851782141661.14103916071390.88881262144397282.96058594655292.90410969341406.32102672273230.3871004570561175.9339262656891.0324583708825374.72660823432459.956257317491953651.21111682251812.12383601045
1730.020.080.16397282.9605859463052.029851782141655.345669108111396.68418267403395886.27640327253651.21111682251406.32102672273223.546712986761182.7743137359788.2593902221989363.31153233331858.129845173330952016.8658805311799.76210410492
1740.020.080.16395886.2764032723052.029851782141649.52615168031402.50370010184394483.7727031752016.8658805311406.32102672273216.7369411688791189.5840855538585.4987335474165351.94754710481956.31160753677150389.83551432491787.4556998382
1750.020.080.16394483.772703173052.029851782141643.682386263211408.34746551893393075.42523765150389.83551432491406.32102672273209.9576479763541196.3633787463882.7504327962652340.63442388133154.50150782101348770.08727890091775.20437557932
1760.020.080.16393075.4252376513052.029851782141637.814271823541414.2155799586391661.20965769248770.08727890091406.32102672273203.208696995421203.1123297273180.0144326671023329.37193501881152.699509603009847157.58858148771763.00788480564
1770.020.080.16391661.2096576923052.029851782141631.921706907051420.10814487509390241.10151281747157.58858148771406.32102672273196.4899524228651209.8310742998777.2906781057999318.15985389208650.905576622733745552.306975191750.86598209788
1780.020.080.16390241.1015128173052.029851782141626.004589636741426.0252621454388815.07625067245552.306975191406.32102672273189.8012790632911216.5197476594474.5791143046368306.99795489029249.119672782446643954.21015833561738.77842313521
1790.020.080.16388815.0762506723052.029851782141620.062817711131431.96703407101387383.10921660143954.21015833561406.32102672273183.1425423263981223.1784843963371.8796867011958295.88601341233747.34176214597442363.26597382571726.74496469029
1800.020.080.16387383.1092166013052.029851782141614.09628840251437.93356337964385945.17565322142363.26597382571406.32102672273176.5136082242741229.8074184984669.1923409772657284.82380586238245.571808937981240779.44240848761714.7653646244
1810.060.050.14385945.1756532213052.029851782141608.104898555091443.92495322705384501.25069999440779.44240848761406.32102672273169.9143433686981236.40668335403203.370340143595168.66365280016423.612911392022939171.00173218981754.74210827447
1820.060.050.14384501.2506999943052.029851782141602.088544583311449.94130719883383051.30939279539171.00173218981406.32102672273163.2125072174581243.10851950527195.063641476847161.77455511337822.64843771587337571.05501609431740.51078559708
1830.060.050.14383051.3093927953052.029851782141596.047122469981455.98272931216381595.32666348337571.05501609431406.32102672273156.546062567061249.77496415567186.800809375355154.92183783057321.689057296280235979.55740473271726.35461663238
1840.060.050.14381595.3266634833052.029851782141589.980527764511462.04932401763380133.27733946635979.55740473271406.32102672273149.914822519721256.40620420301178.581612185653148.10530883169720.734743236437634396.46427951241712.27320450364
1850.060.050.14380133.2773394663052.029851782141583.888655581111468.14119620103378665.13614326434396.46427951241406.32102672273143.3186011646351263.0024255581170.405819477603141.3247770112619.785468781576532821.73125746541698.26615443002
1860.060.050.14378665.1361432643052.029851782141577.771400596941474.25845118521377190.87769207932821.73125746541406.32102672273136.7572135727731269.56381314996162.273202037941134.58005227297618.841207318216731255.31419000451684.33307371543
1870.060.050.14377190.8776920793052.029851782141571.628657050331480.40119473181375710.47649734731255.31419000451406.32102672273130.2304757916861276.09055093105154.183531863845127.8709455244317.901932373420229697.16916168521670.47357173759
1880.060.050.14375710.4764973473052.029851782141565.460318738951486.56953304319374223.90696430429697.16916168521406.32102672273123.7382048403551282.58282188238146.136582156547121.19726867177916.967617614049128147.25248897451656.68725993701
1890.060.050.14374223.9069643043052.029851782141559.266279017931492.76357276421372731.1433915428147.25248897451406.32102672273117.280218704061289.04080801867138.132127314973114.5588346144816.038236846027126605.52071902641642.97375180616
1900.060.050.14372731.143391543052.029851782141553.046430798081498.98342098406371232.15997055626605.52071902641406.32102672273110.8563363292771295.46469039346130.169942929417107.9554572400415.113764013605625071.93062846351629.33266287858
1910.060.050.14371232.1599705563052.029851782141546.800666543981505.22918523816369726.93078531825071.93062846351406.32102672273104.4663776185981301.85464910413122.249805775251101.38695141880514.194173198632623546.43922216531615.76361071816
1920.060.050.14369726.9307853183052.029851782141540.528878272161511.50097350998368215.42981180823546.43922216531406.3210267227398.11016342568861308.21086329704114.37149380666894.853132998762313.279438619826722029.00373206281602.26621490834
1930.060.050.14368215.4298118083052.029851782141534.23095754921517.79889423294366697.63091757522029.00373206281406.3210267227391.78751555026161314.53351117247106.53478615045388.353818800384312.369534632053820519.58161593951588.84009704152
1940.060.050.14366697.6309175753052.029851782141527.90679548991524.12305629225365173.50786128320519.58161593951406.3210267227385.49825673308121320.8227699896598.739463099794381.888826611488411.464435725608419018.13055623861575.48488070841
1950.060.050.14365173.5078612833052.029851782141521.556282755341530.4735690268363643.03429225619018.13055623861406.3210267227379.2422106509941327.0788160717490.985306108121675.457975182130410.564116525498317524.60845887661562.20019148749
1960.060.050.14363643.0342922563052.029851782141515.179309551071536.85054223107362106.18375002517524.60845887661406.3210267227373.01920191198571333.3018248107583.272097782980569.06108421952329.6685517907332516038.97345206331548.9856569345
1970.060.050.14362106.1837500253052.029851782141508.77576562511543.25408615704360562.92966386816038.97345206331406.3210267227366.82905605026381339.4919706724775.599621879936962.69797438298138.7777164136173914561.18388512791535.84090657203
1980.060.050.14360562.9296638683052.029851782141502.345540266121549.68431151602359013.24535235214561.18388512791406.3210267227360.67159952136631345.6494272013767.967663296514656.36846727889397.8915854190451413091.19832735111522.7655718791
1990.060.050.14359013.2453523523052.029851782141495.888522301471556.14132948067357457.10402287113091.19832735111406.3210267227354.54665969729651351.7743670254460.376008066164950.07238545572267.0101339638011711628.97556680381509.75928628082
2000.060.050.14357457.1040228713052.029851782141489.40460009531562.62525168684355894.47877118411628.97556680381406.3210267227348.45406486168261357.8669618610552.824443352267843.80955239902716.133337335863810174.47460919151496.82168513816
2010.060.050.14355894.4787711843052.029851782141482.89366154661569.13619023554354325.34258094910174.47460919151406.3210267227342.39364420496451363.9273825177745.31275744216537.57979252651635.261170953712288727.654676705031483.9524057377
2020.060.050.14354325.3425809493052.029851782141476.355594087291575.67425769485352749.6683232548727.654676705031406.3210267227336.36522781960431369.9557989031337.840739741224531.38293118312544.393610365637557288.475206877561471.15108728144
2030.060.050.14352749.6683232543052.029851782141469.790284680221582.23956710192351167.4287561527288.475206877561406.3210267227330.36864669532321375.9523800274130.408180766936425.21879463611993.530631249056785856.895851447091458.41737087673
2040.060.050.14351167.4287561523052.029851782141463.19761981731588.83223196484349578.5965241875856.895851447091406.3210267227324.40373271436291381.9172940083723.014872143039919.08721007022462.672209409831454432.876475225461445.75089952617
2050.060.050.14349578.5965241873052.029851782141456.577485517451595.45236626469347983.1441579224432.876475225461406.3210267227318.47031864677271387.8507080759615.660606593681412.98800558277881.818320781589033016.377154973041433.1513181176
2060.060.050.14347983.1441579223052.029851782141449.929767324681602.10008445746346381.0440734653016.377154973041406.3210267227312.5682381457211393.752788577018.345177937603346.921010178916420.9689414250482991607.358178279511420.6182734142
2070.060.050.14346381.0440734653052.029851782141443.25435030611608.77550147604344772.2685719891607.358178279511406.321026722736.697325742831281399.62370097991.068381082363910.8860537667727570.124047527348186205.780042450471408.15141404452
2080.060.050.14344772.2685719893052.029851782141436.551119049951615.47873273219343156.789839257205.78004245047206.6374592940130.857416843543624205.780042450470000206.637459294013

See Also

AMORTRATE - Constant daily effective rate for bond/loan amortization

AMORTSCHED - Amortization schedule for a loan with constant periodic payments

BALLOON - Schedule with periodic interest payments and principal repaid at maturity

BULLET - Schedule with single interest and principal payment at maturity

CDRCASHFLOW - Loan amortization model with conditional prepayment and constant default rates

CONSTANTCASHFLOW - Schedule with equal periodic cash flows

CONSTANTCASHFLOWFR - Schedule for a loan with a fixed maturity date and annuity-style payments

CONSTANTPAYMENTAMOUNT - Schedule with no maturity with fixed periodic payment amount

CONSTPRINAMORT - Amortization schedule of a loan with a fixed principal repayment

CONSTANTPRINCIPAL - Schedule with fixed maturity date where the periodic principal payment is calculated on a straight-line basis

CONSTANTPRINCIPALAMOUNT - Schedule with no fixed maturity with a fixed periodic principal payment

CONSTANTPRINCIPALRATE - Schedule with no fixed maturity where a fixed percentage principal payment

NPD - Next payment date of a loan

NPNO - Next payment number of a loan

PAYMENTPERIODS - Number of months until first payment date, start of grace period, end of grace period, and total number payments for a loan

PERIODRATE - Adjust the nominal rate of a loan

PPD - Previous payment date of a loan

PPNO - Previous payment number of a loan

UNEQUALLOANPAYMENTS - Calculate a payment schedule for a loan where the interest payment frequency and the principal payment frequency are different, or the loan starts with an interest only schedule with principal repayments commencing after the first interest payment date.