A MICROCOMPUTER BASED SOLUTION TO THE CALCULATION OF REBATES BY THE 'RULE OF 78' METHOD



Introduction

1.  The purpose of this paper is to provide a description of the algorithm and formulae used for the calculation of rebate on early settlement of a credit agreement by the Rule of 78 method.  Please see the Office of Fair Trading's booklet "Matters arising during the lifetime of an agreement" for details of the rules on calculating rebates and settlement dates.  Although the algorithm described here has been in use for some time, it has not previously been documented in the same way as the algorithm used for calculating APRs has been in the paper 'A MICROCOMPUTER/CALCULATOR BASED SOLUTION TO THE CALCULATION OF APR' ("the APR Paper").  This paper fills that gap but it does not try to explain the (somewhat suspect) thinking behind the Rule of 78 method.

2.  The Consumer Credit (Rebate on Early Settlement) Regulations 1980 provide the following general formula for the calculation of a rebate where the capital is repaid in instalments:

where: n  is the total number of instalments payable under the agreement,
m  is the total number of instalments not yet due at the settlement date (we'll come back to those words later),
A1 to An  is the amount of each instalment payable under the agreement, 1 to n,
B1 to Bm  is the amount of each instalment not yet due at the settlement date, 1 to m,
a1 to an  is the time of each instalment payable under the agreement, 1 to n, measured from the relevant date of the agreement,
b1 to bm  is the time of each instalment, 1 to m, not yet due at the settlement date, measured from the settlement date, and
K  is the Total Charge for Credit (TCC) of the agreement


NB:  the 'relevant date' is generally the date on which the agreement is made, ie its start date and the 'settlement date' is usually the payment date on which the borrower settles, subject to a deferment of one or two months.

3.  You can see that the bottom half of the formula represents all the repayments under the agreement and the top half represents those the borrower doesn't pay because they settle early.  What the formula is doing is finding the fraction of the total charge which should be rebated (ie the Bb's values over the Aa's).  It's a common convention in maths to refer to a fraction as u/v and we'll use this here, so we can also say that the rebate is found by:

where: u  is the sum of multiples of the amounts and times of the instalments, 1 to m, not yet due at the settlement date, and
v  is the sum of the multiples of the amount and times of all the repayments, 1 to m, payable under the agreement.


NB:  we'll use the term 'multiple' as a form of shorthand to refer to an Aa or Bb pairing.

4.  Although the arithmetic the general formula requires is fairly simple (more so, for example, than the maths required to find an APR) the large number of factors which may have to be taken into account (particularly for long term agreements) and the possibility for error when making the calculation 'by hand' makes a computer based solution desirable in most cases.

5.  The Regulations also provide a simple formula for dealing with cases where the capital and charges are paid in equal instalment at regular intervals.  The application of that formula is fairly straightforward and a computer would probably only be used in those cases for convenience.  It is perhaps worth mentioning however that the complex formula is equally applicable to equal instalment cases (the simple formula is in fact just a special case of the complex formula, see paragraph 15 below) so the algorithm described here can be used for all cases where repayment is made in instalments.

6.  One of the main objectives in creating this algorithm was to provide a facility which can easily be used by those already familiar with the similar program developed for calculating APRs, so the same approach of describing the repayments under a credit agreement in terms of `levels' and `extra payments' will be adopted.  See the APR Paper for further details.

Levels of Repayments

7.  Most credit agreements have as the basis a series of repayments of the same amount made at regular intervals, or a combination of such series.  For example, an agreement might have regular repayments apart from the first or last repayment being of a different value, or it might have a series of repayments of one amount, followed by a series of a higher amount, and then by a series of a lower amount.  We can take advantage of this semi-regularity to reduce the amount of information the user has to enter into our program - and to reduce the number of calculations the program has to carry out.

8.  Take an agreement which is repaid by 24 instalments, the first 18 of £50 and the last 6 of £57.50.  We can describe the repayment pattern with the diagram in Figure 1 below.  Each cross on the diagram represents the amount and time of a repayment.  For obvious reasons I usually describe such a payment pattern as having two levels.


Amount
  (£) ^
      |
57.50 |                  ++++++
50.00 |++++++++++++++++++
      |
      |
      |
      |
      +------------------------->
    0                            time
       1    6    12    18    24

                (Figure 1)

9.  Here I should introduce a formal definition of the term `level' - this is taken straight from the earlier paper on APR calculations:

A 'level' is a series of repayments of the same amount made at regular intervals, one each time period.  The first repayment in a level occurs one time period after the level begins.

Point to Note

10.  The first level is regarded as starting at time 'zero' rather than time 1 and the second at time 18 (ie when the last payment in the first level is made).  The idea that the first repayment occurs one time period after the beginning of the level may seem confusing at first but it's used for a number of reasons:-

(a)  it allows us to 'chain together' a number of levels with the same value representing the end point of one level and the beginning of the next.  For example, in the case described in Figure 1 above, time point 18 is both the end of the first level and the beginning of the second.

(b)   it can actually avoid some confusion because it means that the number of payments in a level and the length of the level is the same.  If we were to assume a level started with the first payment and ended with the last, there would be one more payment in the level than its length.

(c)  most importantly, this is the basis on which I will develop the equations given later and they will only give the right answer when used in this way,

11.  The general formula given above requires us to add up the multiples of the amount and time of each repayment.  First we'll concentrate on calculating v, the bottom half of our fraction and consider the simplest example of a loan repaid by n instalments of amount A paid at regular intervals.  In that case v would be represented by ...

... which can also be written as ...

12.  There is a general formula for adding together a regular series of numbers such as this, but an explanation of how it is arrived at, tailored to our particular case, may help.  The first step to getting to the general formula is to simply write the summed digits in equation (1) the other way around, which gives ...

... the next step is to add together equations (1) and (2) to give ...

... you can see from this that each of the expressions in the inner brackets, eg (3+n-2) or (n-1+2), in fact comes to (n+1) and, since we know there are n of these terms we know that adding them all up will give us n(n+1), so we can rewrite (3) as follows ...

13.  This formula enables us to calculate v by adding up the multiples of the amounts and times of a level of n repayments of the same amount which starts at the outset of the loan (time zero).

14.  What we need however is a formula which will deal with the more general case of a level of repayments of the same amount which start at a non-zero time.  There's a way to get this.  Look at the diagram in Figure 2.  We need to be able to calculate the sum of the payment and time multiples represented by the crosses.  We can already calculate the multiples for all these payments from 1 to e (the end of the level) - ie both the noughts and the crosses - by applying equation (4) with n = e.  Also we can calculate the multiples for the payments from 1 to b (the beginning of the level) - ie just the noughts - by applying (4) with n = b ...

Amount
  (£) ^
      |

A |oooooooooooo++++++++++++ | . . | . . | . . | . . |

+-------------------------> 0 time 1 b e (Figure 2)

... so, the multiples for the crosses (which we'll call Slev) can be calculated by subtracting the sum for the noughts from the sum for the noughts and crosses ...

... and this is the basic formula we can use to deal with levels.  Of course in practice an agreement may have several levels of repayments, but since the method requires us to calculate the sum of all the multiples, we can simply add together the results of applying equation (5) to each level.

15.  Although we've only considered v above, our formula can equally be used when calculating u, the top half of our fraction.  The only difference is that the times of the repayments in u are measured from the deferred settlement date rather than the relevant date of the agreement.  So for example, if we have a level which runs from time 15 to time 20 in an agreement where the deferred settlement date is time 10, we can apply (5) with b=15 and e=20 to find the value to be added to v and then apply it again with b=5 and e=10 to find the value to be added to u.

Note:  I won't cover the point in any detail here, but it is perhaps not too difficult to see how we get from equation (4) to the equal instalment formula given in the Regulations.  As with (5), the same basic equation can be used to find both v and (substituting m for n) u in the general rebate formula.  Since A/2 appears in both the top and bottom half of our fraction, they cancel out leaving just ...

Extra Repayments

16.  We are not going to be able to describe every agreement we come across in terms of levels.  'Extra' repayments is the term I use for payments which don't fall neatly into a pattern of levels.  They will be described individually to our program by the user entering separately the amount of each extra repayment and the time at which it is made.  Again, since our general formula requires us to add together the multiples of the amounts and times of each repayment to get u (where appropriate) and v, we can simply calculate the multiples for any extra repayments and add them those for levels obtained using (5).

Time Periods

17.  You may have noticed that, unlike the corresponding formulae for APR calculations, those drawn up in this paper make no reference to how the times of repayments should be expressed (ie in days, weeks, months, years, etc).  This is because both u and v in our 'Rule of 78 fraction' are made up of multiples of time periods and, provided we always use the same basis for all the periods, the value of the fraction will always be the same regardless of how we express them.  For example:  5 days divided by 10 days comes to a half (NB:  not half a day) and so does 5 years divided by 10 years.

18.  Consequently, our program will not ask the user for information on the time periods being used.  More sophisticated implementations which, for example, allow the user to describe payments times or the length of levels using dates, will also require this information.

19.  It should be remembered that our formula for levels assumes that there is one repayment at the end of each time period.  So, if the user describes regular monthly repayments to the program using levels, the times of any extra repayments should also be described in months.

Deferment Period

20.  The time periods in use are particularly important when it comes to describing the deferment to the settlement date allowed by the Regulations.  Remember that this is one or two months not one or two payment periods.  For example, when dealing with an agreement with weekly repayments the deferment may be four to five or eight to nine weeks.

Other Factors to be Calculated

21.  So far we have only considered the user entering details of the repayments and how we are going to calculate u and v from them.  In order to find the rebate we also need to know the total charge for credit under the agreement.  This can be arrived at fairly simply by asking the user to enter the amount of the loan and then subtracting it from the total amount payable under the agreement (found by adding up all the repayments entered).

22. It will probably be useful for the program to provide a settlement figure (ie how much the borrower has to pay to settle) as well as a rebate.  In order to calculate this we will also need to know how much the borrower has paid up to (and including - see 'Not Yet Due' below) the time of settlement.  Again, this can be obtained fairly simple by examining the time of each repayment and adding together those which occur on or before the settlement date.

23.  Obviously we also need to know the settlement date.  But to calculate how much was paid we will need to keep a separate record of the settlement date and the deferment to be applied, since only repayments before or on the settlement date will be treated as paid, but only those after the deferred settlement date are included in u.

'Not Yet Due'

24.  I said earlier that we would return to these words.  Under the regulations the settlement date almost always falls on a repayment date and this invites two ways of dealing with that repayment.  We could, for example, assume that the borrower has not made it - so it should be included in the final settlement figure.

25.  However, the Regulations talk in terms of a rebate on the repayments 'not yet due' at the time of settlement.  Since the payment due on the settlement date is not 'not yet due', we have opted to assume that it has been paid for the purposes of calculating the settlement figure - ie we do not include it in the final settlement figure.

26.  Since, in practice, most borrowers will hand over a single sum comprising both the settlement figure and the final repayment, this decision might seem a little perverse.  However the reason for doing it is to keep distinct the additional sum the borrower has to repay to discharge his indebtedness under the agreement (the settlement figure) and, what is after all, a normal contractual repayment which would have been paid at that time even if early settlement had not taken place.

Split Levels

27.  In the case of a level where all the repayments occur after the deferred settlement date we know that all their multiples should be included in u - with the times of the repayments being measured from the deferred settlement date.  Similarly we know that for a level where all the repayments occur on or before the settlement date they should all be regarded as having been paid (so we can calculate the total paid for a level as A(e-b), ie the amount of the repayments in the level multiplied by the number of repayments in the level).

28.  However, one point which is not always immediately obvious is that we cannot guarantee that the settlement date (or the deferred settlement date) will necessarily fall exactly at the end of a level.  We could deal with this by asking the user to describe separately the repayments before and after settlement, but in order to maintain the same basic input format as the APR program I have opted to allow the user to describe all the repayments under the agreement both before and after settlement and then indicate where during those repayments settlement takes place.  It will be up to the program to work out which of the repayments should be included in u (they are all included in v) and which are treated as having been paid.

29.  We can still use our equation (5) for cases where the level straddles the deferred settlement date as shown in Figure 3 below.  However when calculating the sum of the multiples to be added to u, we should use the deferred settlement date (labelled t in Figure 3) in place of the beginning of the level (labelled b) so that only the multiples of the repayments after t are included in u.

30.  Similarly, when it comes to calculating the repayments which have been paid we should include only those up to and including t (ie by calculating A(t-b), ie the amounts of the repayments multiplied by the number of repayments up to and including t).

Amount
 (£) ^
      |
    A |      .ooooo+++++++++
      |      .    .        .
      |      .    .        .
      |      .    .        .
      |      .    .        .
      |

+-...---------------------> 0 time 1 b t e (Figure 3)

The Listing

31.  We now have everything we need to approach a calculation.  The following listing is a program applying the method described above.  As with the APR listing in the earlier paper this is kept fairly simple to make it as easy as possible to understand and convert to other languages.  However, rather than use BBC BASIC I have opted to produce it in the more generally available GWBASIC or QBASIC dialect.  Even so, it uses only a few of the more sophisticated facilities those languages offer (longer variable names, a WHILE WEND loop and the use of PRINT USING to provide a tidy output are about all).

[Note:  there are a few places where the layout of the listing has broken program lines, everything after each line number should appear on one line.]
1000 REM >RULE78.BAS by Brian Stewart, 1994
1010 REM RULE OF 78 Rebate/Settlement Figure Calculator
1020 :
1030 REM set up arrays
1040 DIM LEVEL(100),LENGTH%(100),EXTRA(100),TIME(100)
1050 F$=" ########.## ":REM format string
1060 :
1070 REM get repayment pattern
1080 CLS
1090 PRINT "RULE OF 78 CALCULATOR:":PRINT
1100 INPUT " Number of Levels? ",LEVELS%
1110 INPUT " and Extra Payments? ",EXTRAS%
1120 :
1130 PRINT
1140 INPUT " Amount of Credit? £",LOAN
1150 INPUT " and Deposit? £",DEPOSIT
1160 TAP=DEPOSIT
1170 :
1180 IF LEVELS%=0 THEN 1310
1190 :
1200 REM load levels
1210 FOR N%=1 TO LEVELS%
1220 PRINT
1230 PRINT "Amount of Level ";N%;"? £";:INPUT "",LEVEL(N%)
1240 LENGTH%(N%)=0
1250 WHILE LENGTH%(N%)=0
1260 PRINT " ... and length ";N%;"? ";:INPUT "",LENGTH%(N%)
1270 WEND
1280 TAP=TAP+LEVEL(N%)*LENGTH%(N%)
1290 NEXT N%
1300 :
1310 IF EXTRAS%=0 THEN 1420
1320 :
1330 REM load extra payments
1340 FOR N%=1 TO EXTRAS%
1350 PRINT
1360 PRINT " Extra payment ";N%;"? £";:INPUT "",EXTRA(N%)
1370 TAP=TAP+EXTRA(N%)
1380 PRINT " ... and time ";N%;"? ";:INPUT "",TIME(N%)
1390 NEXT N%
1400 :
1410 REM get settlement details
1420 PRINT
1430 INPUT " Settlement Time? ",SETT%
1440 INPUT " ... and Deferment? ",DEFR%
1450 :
1460 REM set initial values
1470 PAID=DEPOSIT:U=0:V=0
1480 DS%=SETT%+DEFR%:REM deferred settlement
1490 :
1500 IF LEVELS%=0 THEN 1640
1510 :
1520 REM calculate V, paid and U for levels
1530 B%=0
1540 FOR N%=1 TO LEVELS%
1550 E%=B%+LENGTH%(N%)
1560 V=V+LEVEL(N%)/2*(E%*(E%+1)-B%*(B%+1))
1570 IF SETT%>=E% THEN PAID=PAID+LEVEL(N%)*(E%-B%)
1580 IF SETT%>B% AND SETT%<E% THEN PAID=PAID+LEVEL(N%)*(SETT%-B%)
1590 IF DS%<=B% THEN U=U+LEVEL(N%)/2*((E%-DS%)*(E%+1-DS%)-(B%-DS%)*(B%+1-DS%))
1600 IF DS%>B% AND DS%<E% THEN U=U+LEVEL(N%)/2*((E%-DS%)*(E%+1-DS%))
1610 B%=E%
1620 NEXT N%
1630 :
1640 IF EXTRAS%=0 THEN 1740
1650 :
1660 REM calculate V, paid and U for extra payments
1670 FOR N%=1 TO EXTRAS%
1680 V=V+EXTRA(N%)*TIME(N%)
1690 IF TIME(N%)<=SETT% THEN PAID=PAID+EXTRA(N%)
1700 IF TIME(N%)>DS% THEN U=U+EXTRA(N%)*(TIME(N%)-DS%)
1710 NEXT N%
1720 :
1730 REM calculate other information
1740 TCC=TAP-LOAN
1750 REBATE=(U/V)*TCC
1760 REMAIN=TAP-PAID
1770 SETTFIG=REMAIN-REBATE
1780 :
1790 REM output results
1800 PRINT:PRINT "RESULTS:":PRINT
1810 PRINT " Total Amount Payable: £";USING F$;TAP;:PRINT "(TAP)"
1820 PRINT " Total Charge for Credit: £";USING F$;TCC;:PRINT "(TCC)"
1830 PRINT " Total Amount Paid so far: £";USING F$;PAID
1840 PRINT
1850 PRINT "Total Remaining to be Paid: £";USING F$;REMAIN
1860 PRINT " Statutory Rebate: £";USING F$;REBATE;:PRINT" <=="
1870 PRINT " Settlement Figure: £";USING F$;SETTFIG
1880 : 1890 PRINT:PRINT "Another (Y/N)? ";
1900 K$=INKEY$:IF K$="" THEN 1900
1910 IF INSTR("YyNn",K$)=0 THEN 1900
1920 IF INSTR("Yy",K$) THEN 1080
1930 PRINT "No":PRINT
1940 END

32.  If you have received this document in an electronic format (by disc or e-mail) you should be able to simply copy the listing from the text and save it as an ASCII file for loading into GWBASIC or QBASIC (although it may be necessary to carry out some editing).  Of course, as with the APR listing, this will probably only form the starting point of your implementation.  A full implementation would require input validation, calculator and date entry facilities.

33.  Please remember that, although every effort has been made to ensure that the information contained in this paper is correct, because of the many different types of machines, languages and credit agreements in existence, we cannot guarantee that the results obtained using the method and program described here represent a complete and authoritative interpretation of the law.






Brian Stewart.
July 1995

(v.3 February 1999)






ANNEX 1


THE ACTUARIAL RULE

1.  This annex shows how to adapt the approach described in the main paper to the Actuarial Rule for calculating the sum due on early settlement of a loan.  The principle on which this method is based is that the borrower, when settling early, should incur the same overall effective rate of charge as they would have done had the agreement run its full course.  Present value methods are used to calculate the settlement figure which, combined with the contractual payments due up to the time of settlement, gives the same rate.

2.  Consequently, the first step in calculating a settlement figure by the Actuarial Rule is to determine what the effective, compound annual rate for the agreement would have been if it had run to full term, based on the facts known at the time of settlement.  This calculation is the same mathematical process as that used to calculate APR, except that any variations in the agreement which took place after the agreement was made but before settlement will be known, and so are taken into account.  If the agreement is one which has fixed charges, or where no variation in charges has occurred before the time of settlement, the agreement's APR could be used in place of this first step.  The methods for making this calculation are covered in detail in the APR Paper.  The implementation described will simply ask the user to enter the rate to be used.

The Formulae

3.  The calculation by the Actuarial Rule is most conveniently dealt with in two stages in the following manner:

(1)  calculate an 'intermediate value' from the agreement's effective, annual compound rate using the following equation:

where: x  is the intermediate variable,
r  is the effective annual rate or APR, and
m  is the annual frequency of the period used to describe the timing of payments, m=12 for payments described in months, m=52 for payments described in weeks, etc.

Alternatively, the calculation can be based on a period rather than annual, effective compound rate.  Equation (1) can then be simplified by omitting 1/m.

(2)  The following general formula can then be applied to calculate the settlement figure:

where: P  is the amount of each instalment of credit due on or before the settlement date (P1 is the amount of the first instalment, P2 the amount of the second, and Pj the amount of the jth),
p  is the length of the period beginning with the relevant date of the agreement and ending with the date of advance of each such instalment expressed in periods (pj is the time of the jth payment),
v  is the total number of such instalments of credit,
A  is the amount of each payment of credit or of total charge for credit due on or before the settlement date (Ak is the amount of the kth payment),
a  is the length of the period beginning with the relevant date of the agreement and ending with the date of each such payment expressed in periods (ak is the time of the kth payment),
n  is the total number of such payments of credit or of total charge for credit,
x  is the intermediate variable calculated using equation (1), and
t  is the length of the period beginning with the relevant date and ending with the settlement date expressed in periods.

(3)  You may recognise in this the same expression for the present value of a single payment as used in the APR Paper (shown here as Pxp and Axa).  This means that we can also use the same formula for the calculation of the present values of a level, or split level, of payments (equation (6) from the APR Paper):

where: A, x, b and e have the meanings given earlier (see the APR Paper for the derivation of this formula) .

The Listing

4.  We now have all the formulae necessary to carry out an actuarial calculation adopting the same general approach as that used for the Rule of 78 method in the main body of this paper.  However there are a few additional points to note:

-  The Actuarial formula directly calculates the settlement figure rather than a rebate.  This needs to be taken into account in adapting the earlier listing and we can in fact calculate a notional rebate from the settlement figure rather than the other way around.

-  As with the listing in the main paper, we will also only be dealing with cases where there is a single advance of credit although, unlike the statutory Rule of 78 formula, the Actuarial formula will cope adequately with multiple advances of credit.

-  As the concept of a 'deferment' is generally something specific to the Rule of 78 method, this listing does not allow for a deferment of the settlement date.

-  Using an APR as suggested, which is generally truncated after the first decimal place, will produce a slightly lower settlement figure than accurately calculating the effective, compound annual rate.


1000 REM >ACTUAR.BAS by Brian Stewart, 1996
1010 REM Actuarial Rule Settlement Figure Calculator
1020 :
1030 REM set up arrays
1040 DIM LEVEL(100),LENGTH%(100),EXTRA(100),TIME(100)
1050 F$=" ########.## ":REM format string
1060 :
1070 REM get repayment pattern
1080 CLS
1090 PRINT "ACTUARIAL CALCULATOR:":PRINT
1100 INPUT " Number of Levels? ",LEVELS%
1110 INPUT " and Extra Payments? ",EXTRAS%
1120 :
1130 PRINT
1140 INPUT " Amount of Credit? £",LOAN
1150 INPUT " and Deposit? £",DEPOSIT
1160 TAP=DEPOSIT
1170 :
1180 IF LEVELS%=0 THEN 1310
1190 :
1200 REM load levels
1210 FOR N%=1 TO LEVELS%
1220 PRINT
1230 PRINT "Amount of Level ";N%;"? £";:INPUT "",LEVEL(N%)
1240 LENGTH%(N%)=0
1250 WHILE LENGTH%(N%)=0
1260 PRINT " ... and length ";N%;"? ";:INPUT "",LENGTH%(N%)
1270 WEND
1280 TAP=TAP+LEVEL(N%)*LENGTH%(N%)
1290 NEXT N%
1300 :
1310 IF EXTRAS%=0 THEN 1420
1320 :
1330 REM load extra payments
1340 FOR N%=1 TO EXTRAS%
1350 PRINT
1360 PRINT " Extra payment ";N%;"? £";:INPUT "",EXTRA(N%)
1370 TAP=TAP+EXTRA(N%)
1380 PRINT " ... and time ";N%;"? ";:INPUT "",TIME(N%)
1390 NEXT N%
1400 :
1410 REM get rate and settlement details
1420 PRINT
1430 INPUT " Settlement Time? ",SETT%
1440 INPUT "Annual effective rate? ",AER
1450 INPUT " Periods p.a? ",M
1460 :
1470 X=1/(1+AER/100)^(1/M)
1480 :
1490 REM set initial values
1500 PAID=DEPOSIT:SPV=DEPOSIT
1510 :
1520 IF LEVELS%=0 THEN 1650
1530 :
1540 REM calculate SPV and PAID for levels
1550 B%=0
1560 FOR N%=1 TO LEVELS%
1570 E%=B%+LENGTH%(N%):A=LEVEL(N%)
1580 IF SETT%>=E% THEN PAID=PAID+A*(E%-B%)
1590 IF SETT%>B% AND SETT%<E% THEN PAID=PAID+A*(SETT%-B%)
1600 IF SETT%>=E% THEN SPV=SPV+A*(X^(E%+1)-X^(B%+1))/(X-1)
1610 IF SETT%>B% AND SETT%<E% THEN SPV=SPV+A*(X^(SETT%+1)-X^(B%+1))/(X-1)
1620 B%=E%
1630 NEXT N%
1640 :
1650 IF EXTRAS%=0 THEN 1740
1660 :
1670 REM calculate SPV and PAID for extra payments
1680 FOR N%=1 TO EXTRAS%
1690 IF SETT%>=TIME(N%) THEN PAID=PAID+EXTRA(N%)
1700 IF SETT%>=TIME(N%) THEN SPV=SPV+EXTRA(N%)*X^TIME(N%)
1710 NEXT N%
1720 :
1730 REM calculate other information
1740 TCC=TAP-LOAN
1750 SETTFIG=1/(X^SETT%)*(LOAN-SPV)
1760 REMAIN=TAP-PAID
1770 REBATE=REMAIN-SETTFIG
1780 :
1790 REM output results
1800 PRINT:PRINT "RESULTS:":PRINT
1810 PRINT " Total Amount Payable:  £";USING F$;TAP;:PRINT "(TAP)"
1820 PRINT " Total Charge for Credit:  £";USING F$;TCC;:PRINT "(TCC)"
1830 PRINT " Total Amount Paid so far:  £";USING F$;PAID
1840 PRINT
1850 PRINT " Total Remaining to be Paid:  £";USING F$;REMAIN
1860 PRINT "Actuarial Settlement Figure:  £";USING F$;SETTFIG;:PRINT "<=="
1870 PRINT " Actuarial Rebate:  £";USING F$;REBATE
1880 :
1890 PRINT:PRINT "Another (Y/N)? ";
1900 K$=INKEY$:IF K$="" THEN 1900
1910 IF INSTR("YyNn",K$)=0 THEN 1900
1920 IF INSTR("Yy",K$) THEN 1080
1930 PRINT "No":PRINT
1940 END






Brian Stewart.
October 1996







ANNEX 2


THE REDUCING BALANCE

1.  This annex shows briefly how to apply the Reducing Balance method for calculating the sum due on early settlement of a loan.  The principle on which this method is based is that the borrower is charged interest each period at the current rate on the balance then outstanding and, when settling early, simply pays the current balance.  So, this approach treats any loan rather like a bank or credit card account and could be looked at as an accounting method rather than a method for determining a rebate or settlement figure.

2.  Implementing this method by computer is actually very simple and the listing below correspondingly short.  All that is required is to obtain the opening balance on the account and loan term from the user and then, for each sequence of payments (ie sequences where the rate and payment remain constant) up to the time of settlement, obtain the rate of interest for the period at the current rate, the number or repayments and the current periodic repayment being made by the borrower.  Interest is then added to the balance and the borrower's periodic repayment deducted for each period in the sequence.

The Formulae

3.  The formulae used in this implementation are very straightforward:

The Listing

4.  Please note that this listing applies only the most simple method of determining the interest charge each period.  In practice credit agreements often use more complex methods (such as recording the exact date on what sums are paid or charged to the account and calculating interest on the average daily balance outstanding during the period) and, in such cases, your implementation should apply the method required by the agreement in order to obtain an accurate result.


1000 REM >REDUCE.BAS by Brian Stewart, 1999
1010 REM Reducing Balance Settlement Figure Calculator
1020 :
1030 REM get loan details
1040 CLS:PRINT "REDUCING BALANCE METHOD":PRINT
1050 INPUT "Opening Balance?£",BALANCE
1060 INPUT " Length of Loan? ",TERM
1070 :
1080 REM format strings and starting values
1090 FORM$="#### ##.##### #####.## #####.## #####.## #######.##"
1100 F$=" ########.## ":T%=0:BAL=BALANCE:TOTCHG=0:TOTCAP=0:TOTPAY=0
1110 :
1120 REM get details of current rate and repayments
1130 WHILE T%<TERM AND BAL>0
1140 PRINT
1150 INPUT " Current Period Rate? %",PER
1160 INPUT "Number of Repayments? ",NUM%
1170 INPUT " Repayment Amount?£",PAY
1180 PRINT
1190 :
1200 REM calculate and display new balances
1210 PRINT "Time Rate Repayment Capital Charges Balance"
1220 N%=1
1230 WHILE N%<=NUM% AND T%+N%<=TERM AND BAL>0
1240 CHG=BAL*PER/100:CAP=PAY-CHG:BAL=BAL+CHG-PAY
1250 :
1260 REM adjust for -ve balance, add to totals
1270 IF BAL<0 THEN PAY=PAY+BAL:CAP=CAP+BAL:BAL=0
1280 TOTCHG=TOTCHG+CHG:TOTCAP=TOTCAP+CAP:TOTPAY=TOTPAY+PAY
1290 PRINT USING FORM$;T%+N%,PER,PAY,CAP,CHG,BAL
1300 N%=N%+1
1310 WEND
1320 :
1330 T%=T%+NUM%
1340 WEND
1350 :
1360 REM output results
1370 PRINT:PRINT "RESULTS:":PRINT
1380 PRINT "Total Amount Paid: £";USING F$;TOTPAY
1390 PRINT " Total Capital: £";USING F$;TOTCAP
1400 PRINT " Total Charges: £";USING F$;TOTCHG
1410 PRINT
1420 PRINT " Closing Balance: £";USING F$;BAL;:PRINT "<=="
1430 :
1440 PRINT:PRINT "Another (Y/N)? ";
1450 K$=INKEY$:IF K$="" THEN 1450
1460 IF INSTR("YyNn",K$)=0 THEN 1450
1470 IF INSTR("Yy",K$) THEN 1030
1480 PRINT "No":PRINT
1490 END






Brian Stewart.
February 1999