NEW HIGH PERFORMNCE COMPUTTIONL METHODS FOR MORTGGES ND NNUITIES Yuri Shestopaloff, Geerally, mortgage ad auity equatios do ot have aalytical solutios for ukow iterest rate, which has to be foud usig umerical methods. other issue is that these equatios have multiple solutios. We discovered a iterestig property of mortgage ad auity fuctios that ca be beeficially used for computig the iterest rate. Namely, these fuctios have a sigle miimum ad oe or o iflectio poit, while the value of iterest rate that correspods to the miimum is equal to approximately oe-half of the value of the correct solutio. The appropriate values of iterest rates for the miimum ad iflectio poit have a very simple aalytical presetatio. Based o this discovered property, we itroduce ew computatioal methods that allow uambiguously choosig the correct solutio ad fidig a very accurate value of ukow iterest rate without solvig the mortgage or auity equatio at all. This value ca be used directly or, if its accuracy is ot sufficiet, as the first iitial value i iterative procedures. Such a iitial value guaratees covergece to the correct solutio. We also propose some additioal computatioal ehacemets, which, take together, sigificatly improve the overall computatioal performace of mortgage ad auity related calculatios. Itroductio I this article, we propose ew methods for computig iterest rates for mortgages ad auities. Some may argue that moder computers are powerful eough, ad system desigers should ot be cocered about computatioal efficiecy. Eve if computatios take te times more, would it make ay differece if we compute a iterest rate i 6 5 sec, or sec? I fact, thigs are ot so simple. Beside the oe time computatio of a iterest rate, there is a large area of optimizatio problems, may of which require the computatio of differet combiatios of parameters. For istace, may simulatio models that are based o the Mote Carlo simulatio method use very computatioally itesive simulatio procedures. So, if multiple computatios of a iterest rate are required (which ofte happes), the the computatioal efficiecy of every repeated operatio becomes importat, ad i may istaces critical. The proposed methods ca be used i ay relevat fiacial software applicatio. lso, the high computatioal efficiecy of these algorithms, which require small computatioal resources, makes their applicatio i fiacial calculators very promisig. The computatioal algorithms that we discuss i this article are based o a iterestig discovered property of the mortgage (ad auity) IRR fuctio, which allows efficiet computig of iterest rate. The computatioal performace of umerical algorithms depeds o two factors. The first oe is the quality of a computatioal algorithm, such as, for istace, the fast covergece of Newto-Raphso s iterative algorithm. The secod factor is the iitial value used i the iterative process. If the iitial value is chose far from the solutio, the
the iterative process requires more iteratios, which slows dow computatios. I may istaces, a iadequate iitial value does ot allow for the iterative procedure to coverge to a solutio. I geeral, optimal criteria for choosig a iitial value deped o the algorithm. Examples ca be foud i (Burde, 25), chapter. However, whe it comes to a specific problem, the oe ca substatially improve the accuracy of the iitial approximatio, ad cosequetly the efficiecy of the overall computatioal process, by takig ito accout problem specifics. I case of mortgage ad auities calculatios, specific restrictios are imposed by the possible rage of iterest rates ad umber of paymet periods. For istace, the aual iterest rate for home mortgages is ulikely to be several tes or hudreds of percet. It usually lies withi the rage of several percet. So, i this case, it makes sese to choose a iitial approximatio of several percet. I the fiacial idustry, the software applicatios that serve umerical mortgage calculatios, ofte use the iitial iterest rate of C / P. Here, C is a regular mortgage paymet for a certai period, ad P is the mortgage pricipal. This value ca be obtaied directly from the mortgage equatio if oe assumes that C compared to other equatio s terms. This approach is ofte implemeted i fiacial calculators. For brevity, we will call this method CP-approximatio. This method produces reasoable iitial accuracy whe the umber of paymet periods is large (over oe hudred) ad the iterest rate is high (for a aual iterest rate of roughly 5% or more). Whe the umber of periods is less or the value of iterest rate is smaller, the the iterative process that uses CPapproximatio quickly becomes iefficiet. Such calculatios have to use a relatively large umber of iteratios (five ad more) i order to obtai the required accuracy 5 (usually, about ). There are also some other custom approaches that heavily rely o problem specifics ad caot be used outside their areas of applicatio. So, the choice of a more precise iitial value of iterest rate, which would reduce the umber of required iteratios, is importat. The preseted article addresses this issue ad itroduces geeral algorithms for fidig the iitial value of iterest rate that ca be used i ay fiacial applicatio that does mortgage or auity calculatios.. IRR equatio for mortgages ad auities We ca trasform the geeral form of IRR equatio for mortgages, preseted i (Shestopaloff, 29, 2), as follows, i order to make it more coveiet for computatioal purposes. P( + ( P + C)( + C = () where C is the mortgage paymet; P is the pricipal (the borrowed amout); R is the iterest rate (applied to oe period); is the umber of paymets. This formula is similar i appearace to the IRR equatio. We will call the left side of this equatio the mortgage IRR fuctio, ad defie it as follows. 2
F( R) = P( + ( P + C)( + C Formula () is essetially the IRR equatio rewritte for iitial coditios imposed by a mortgage as a specific ledig istrumet. (Other represetatios are possible, see Broverma, 99.) These coditios iclude regular equal paymets at equal itervals, util the pricipal is paid off. Otherwise, this is the same familiar IRR equatio. The CP-approximatio ca be derived from () as follows. Let us assume that P( + ( P + C)( >> C (Here, the otatio ">>" deotes a mathematical symbol much greater.) The formula ca be rewritte as ( ( PR C) >> C. We ca see that this iequality holds true if the iterest rate is high ad the pricipal P is large compared to the regular paymet C, which happes whe the umber of periods is large. If these coditios are fulfilled, we + ca obtai the equatio P ( ( P + C)(, whose solutio produces CPapproximatio. For istace, whe this approximatio was used as the iitial value for computig iterest rate by Newto-Raphso s procedure, covergece was attaied i a maximum of 3 iteratios for the rage of aual iterest rates of 5 % or more, for a umber of periods greater tha two hudred. Similarly to the mortgage fuctio, we ca derive the auity IRR fuctio, which has the followig form for a ordiary auity. F ( R) = P( a + ( P C)( C The oly differece betwee these fuctios is that the sig of a periodic paymet has chaged. Below, we cosider calculatio of iterest rate for mortgages. However, exactly the same approach ca be used for computig the iterest rate for auities. ll formulas which we derive for mortgages are valid for auities as well, if we substitute C by (-C). Equatio is a particular form of a regular IRR equatio. So, it ca be solved usig the same methods. For istace, Newto-Raphso s iterative procedure, which ca be derived as follows. Let us deote x = + R. The Px ( P + C) x + C x (3) + = k k k + xk ( + ) Px ( + ) k P C xk fter completig the computatios, we ca fid the iterest rate as R = x. We ca also use a alterative approach, which ca be itroduced through the + followig substitutio. Let us deote y = (. The, a similar equatio for Newto- Raphso s iterative procedure will be as follows. 3
+ k + C ( ) + ) yk Pyk ( P + C) y y k + = yk (4) P ( P + C + Oce the iterative procedure is complete, the iterest rate ca be foud as R + = y 2. Specific properties of the mortgage IRR fuctio ad its characteristic poits The mortgage IRR fuctio has some iterestig properties that make it possible to compute iterest rates much more efficietly tha the geeral form of IRR equatio allows. We cosider these properties below. We eed them i order to fid approximate values of iterest rate that ca be used by themselves or as the iitial value for iterative algorithms. IRR Fuctio 4 2 8 6 4 2-2 Mortgage IRR Fuctio (N=, R=.4) -.95 -.868 -.785 -.73 -.62 -.538 -.455 -.373 -.29 -.28 -.25 -.43.4 Iterest rate R.23 a 4
.5 Mortgage IRR Fuctio.4.3 IRR Fuctio.2. -. -.2 -.5 -.85 -.2.45..75 R ().24.35.37.435.5 -.3 Iterest rate b Mortgage IRR fuctio (N=2, R=.4) IRR Fuctio - -2-3 -4 -.5 -. -.7 -.2.2.6..5.9.23.27.32.36.4-5 -6 Iterest rate c Fig.. Graph of the mortgage IRR fuctio. a the overall view of fuctio whe the umber of periods N=; b the same graph elarged below the abscissa (circled area); c the graph for a larger umber of periods (N=2). Let us take a look at the graph at Fig. that represets the mortgage IRR fuctio. Note the area i the circle where the IRR fuctio s curve siks below the abscissa. These two itersectios of the abscissa by the graph represet solutios of the mortgage IRR equatio. The first solutio is R =. The existece of this solutio ca be proved by substitutig this value ito () ad doig the appropriate trasformatio as follows: P ( P + C) + C =. So, the value of R = is a solutio for every combiatio of possible iput parameters P ad C. The secod solutio is the oe we are lookig for. 5
Note that the graphs of the IRR fuctio are skewed to the right, so that the miimum poit is located slightly to the right of the middle poit betwee the two solutios. We will provide more detail with regard to this property of the IRR fuctio later. t this poit, it is importat to ote that the double distace betwee the miimum of the IRR fuctio ad its first solutio R = is close to the value of the secod solutio, which is the solutio we eed. This value slightly exceeds the real solutio whe the umber of paymet periods is small. Note that whe the umber of periods icreases, the the divergece of this double distace from the real solutio icreases too. 3. symptotic behavior of the mortgage IRR fuctio. Characteristic poits Let us cosider other properties of the mortgage IRR fuctio. To the right of the secod solutio, the graph of the mortgage IRR fuctio mootoically (cotiuously) icreases to ifiity, ad ever itersects the abscissa agai. This behavior ca be proved by cosiderig () for large values of R. I this case, we ca eglect C, ad the first term mootoically overtakes the secod term, thus forcig the IRR fuctio to go to ifiity. lim R = lim = lim R R P( ( ( + ( P + C)( ( P( P C) = ( PR C) = + C = (5) lteratively, we ca explore the first derivative of the mortgage IRR fuctio. It is defied as follows. () F ( R) = P( + )( ( P + C)( (6) Equatig the first derivative to zero, we will fid the followig value. R () C P = (7) ( + ) P We kow that the poit where the first derivative becomes zero is a extremum, which ca be either a maximum or a miimum. I our case, based o the graph i Fig., we ca assume that this is a miimum. We ca prove this more rigorously usig the secod derivative, which should be positive (as fuctio is covex at its miimum poit). The secod derivative ca be foud as follows. 2 F ( R) = ( + ) P( ( )( P + C)( (8) If we substitute the value of iterest rate from (7) ito this formula, whe the first () () 2 derivative is equal to zero, the we will fid that F ( R ) = ( + R ) ( P + C) >. 6
So, the mortgage IRR fuctio has oe extremum, which is a miimum, because the fuctio is covex at this poit. (Certaily, the same assertio is true for the auity IRR fuctio.) We ca fid from (6) that the first derivative is egative to the left of this miimum, which meas that the fuctio mootoically decreases i this domai, while the first derivative is positive to the right of this miimum. This meas that the fuctio grows mootoically i this domai. We will eed the value of iterest rate whe the secod derivative of IRR fuctio becomes zero. I geometrical terms, this value correspods to fuctio s iflectio poit. Equatig the secod derivative (8) to zero, ad solvig this equatio, we will fid the followig value. R C( ) 2P = (9) ( + ) P 4. Trasformig the mortgage IRR equatio Below, we cotiue to explore specific properties of mortgage IRR fuctios, this time aalyzig trasformatios of the origial equatio (). Let us cosider the graphs of the IRR fuctio as it depeds o the variable y, which + is defied as y = ( (we used this substitutio i formula 3). The mortgage IRR fuctio, i this case, is as follows. + F( y) = Py ( P + C) y + C () IRR fuctio of Y (N=2) IRR fuctio - -2-3 -4 23 45 68 8 3 26 48 62 823 226 2229 243 2634-5 -6 Y-value a 7
IRR fuctio of Y (N=2).2. R () IRR fuctio -. -.2 -.3 -.4.95.53.56.258.36.464.567.669.772.875.978 2.8 2.83 2.286 -.5 -.6 -.7 Y b Fig. 2. Graphs of mortgage IRR fuctio as a fuctio of Y. a) R =. 4 ; b) R =. 4. I geeral, we ca fid the maximum umber of abscissa itersectio fuctios ad () (the umber of solutios of the appropriate equatios) usig the aalog of Descartes Rule of Sigs for geeralized polyomials. pplicatio of this rule produces a maximum umber of two solutios. Formulatio of this rule ad proof of appropriate theorems ca be foud i (Shestopaloff, 2, 2) ad formulatio i (Rahma, 22). 5. pproximate solutio of IRR equatio We will itroduce methods to obtai approximate solutios based o specific properties of the mortgage IRR fuctio, which we discovered. O the other had, despite the practicality of these methods, they are ot our ultimate goal. We cosider these methods i order to facilitate the itroductio of a more advaced method, based o similar cosideratios. Fig. 2 shows graphs of the mortgage IRR fuctios for differet parameters i case of Y-substitutio (). We ca see the same two solutios, as it was the case with the IRR fuctio. Oe solutio is y = (which correspods to R = ), ad the other solutio is some y >, which is the solutio we eed. We ca also see that ulike i the case of Fig., whe the graphs were skewed to the right, the graphs i Fig. 2 are skewed to the left, so that the miimum is located to the left of the middle poit betwee the solutios. This tred is more promiet whe the iterest rate icreases. This is what we ca see i Fig. 2, a. The graph i Fig. 2, b for a smaller iterest rate is almost symmetrical, so that the poit of miimum R is close to the midpoit betwee the solutios of the mortgage () IRR equatio. So, i the case of Y-substitutio we discovered that the double distace betwee the first solutio R=, ad the poit of miimum of IRR fuctio, is close to the value of the 8
secod solutio. I additio, because of the overall skew of the IRR fuctio to the left, this value is slightly less the the secod solutio. The real solutio ca therefore be approximated by a double distace betwee the poit R= ad the poit of miimum R ( ), that is by 2R (). However, whe the umber of periods is large - this sceario is represeted by Fig., c - the more correct approximatio is whe istead of R= we use the value of R that correspods to the iflectio poit. Below, we will refer to the aforemetioed approaches as X-approximatio (which we foud o the basis of equatio ), ad Y-approximatio (based o equatio ). Let us fid the value of X-approximatio first, usig the cosideratios preseted above. R X = 2( R () R ) + R ( C P) C( ) 2 = 2 = ( + ) P P( + ) + = C P if R > R () 2( C P) = 2R X = ( + ) if R () P Note that the first formula is the approximate solutio for a large umber of paymet periods, ad / or for the relatively large iterest rates. We obtaied it earlier by aalyzig the origial mortgage IRR equatio (). Let us fid the Y-approximatio. I order to do that, we have to kow the poit of miimum y of IRR fuctio F ( y). The first derivative of this fuctio is as follows. () () + ( y) = P ( P + C) y F + Equatig to zero, we will fid the value of fuctio F ( y). () y that correspods to the miimum of + () C = + y (3) P + () The secod derivative of fuctio F ( y) is ever equal to zero, which ca be easily proved by differetiatig. So, we ca use the poit y =, which correspods to the value R =, as the first referece poit. Hece, the value of Y-approximatio ca be foud as follows. + ( P + C) Y = + 2 (4) P( + ) 9
The correspodig iterest rate R Y ca be foud from (4). + R = Y (5) Y The itroduced X ad Y approximatios ca therefore be used as iitial values for iterative procedures, such as the Newto-Raphso s method, or quadratic approximatio (Shestopaloff, 29). However, these values have aother useful applicatio. y iitial approximatio to the left of the miimum will result i solutio R =, or o solutio at all. The iitial approximatio has to be chose to the right of the miimum of the IRR fuctio, i order to guaratee the covergece of the iterative procedure. So, the poit of () miimum R, defied by (7), ad the poit of miimum (3), should be used whe choosig the iitial value for iterative procedures for fidig iterest rates. I particular, for equatio (), this coditio is stated as follows: R >. () R 6. The accuracy of X ad Y approximatios, ad their computatioal performace We saw that the choice of the first approximatio is a importat issue which determies the covergece or divergece of the iterative procedure ad computatioal performace of iterative algorithms i geeral. We should choose the first approximatio as close to the solutio as possible, i order to implemet a computatioally efficiet iterative procedure. Let us ow aalyze the accuracy of X ad Y approximatios ad computatioal performace whe they are used with Newto-Raphso s iterative procedure. Table illustrates the accuracy of X approximatio. The absolute approximatio error is measured i percet of iterest rate. The relative approximatio error is defied as the absolute approximatio error divided by the value of iterest rate. I the practical rage of iterest rates, up to 55%, the approximatio error is a few percet. The umber of required iteratios for covergece is 2-3. The umber of paymet periods rages from 3 to. 4 We ca see that whe the required accuracy is o the order of, ad the value of ukow iterest rate does ot exceed 4 5%, the X-approximatio ca be used directly for fidig iterest rates. For istace, whe the iterest rate is 3.7 %, the 4 absolute error is 2. Table. X-approximatio errors, depedig o the iterest rate for the whole period. Iterest rate, % Relative pproximatio error, % bsolute pproximatio error, % 3.73.5.2 2 Number of iteratios
28 3.6. 3 55.5 6.7 3.7 3 87 9.4 8.2 4 22.5 4 4 6 4.3 23 4 26 6. 34 4 255 8.8 48 4 3 2.6 64 5 37 22.6 84 5 Table 2 presets similar data for Y-approximatio. Note that the approximatio value is less tha the actual solutio, because of slower pace of growth of the correspodig IRR fuctio. Whe the iterest rate does ot exceed 3 %, computatioal performace of both approximatio algorithms is very impressive. Summary of performace results for this rage of iterest rates is preseted i Table 3. Overall, the preseted results show that both approximatios may, i some istaces, have practical value for solvig the mortgage IRR equatio. Table 2. Y-approximatio error, depedig o the iterest rate for the whole period; the predefied accuracy is. Iterest rate, % Relative approximatio error, % 3.73 -.36 2 28-2.45 3 55.5-3.8 3 87-4.46 3 22-8.2 4 6-9.97 4 26 -.7 4 255-3.3 4 3-4.8 4 37-3. 4 Number of iteratios Table 3. Required time to calculate,, iterest rates o a desktop computer, depedig o the computatioal algorithms; R 3%. Number of periods X-approximatio, sec Y-approximatio, sec 2.73.2
2..2 7. Geeralizatio of X- ad Y- approximatios. -approximatio method The idea of the method that we preset i this sectio is based o the observatio that whe we decrease the power of the first term i the mortgage IRR equatio, the graph of the fuctio becomes skewed more to the left, which meas the miimum is displaced to the left, ad vice versa. Let us cosider the geeral form of this equatio. + F( x) = Px ( P + C) x + C (6) Note that whe x =, we have F ( ) = ad x = is the first solutio of equatio F ( x) =. I geeral, whe we icrease the value of, the miimum of fuctio (6) moves to the right, so that there is always a value of such that the fuctio s miimum is located exactly i the middle of the iterval betwee the two solutios. Of course, such a value of also depeds o other parameters, i particular, o the pricipal amout ad period paymets. However, it turs out that depedecies o the last parameters are ot critical, ad, cosidered as a fuctio of the umber of periods, ca be used to provide a much better approximatio to the iterest rate tha X ad Y approximatios. So, we have to fid the miimum ad iflectio poit of fuctio (6). This ca be doe i the same way as before. That is we have to fid the first ad secod derivatives, equate them to zero, ad solve the obtaied equatios with respect to x. Let us fid the first derivative. () + F ( x) = Px ( P + C) x (7) + Equatig the right side of (7) to zero, ad solvig this equatio with respect to x, we will evetually obtai the followig. x () + C = + P (8) + Formula (8) ca be verified as follows. I case whe =, we have to obtai the poit of miimum for Y-approximatio, result (3). Equatio (8) satisfies this requiremet. Whe we substitute =, we obtai (3), which is the miimum of IRR fuctio for the Y-approximatio. I the same way, whe we substitute =+, the we have x = R +, thus (8) ca be trasformed ito (7), which represets the miimum for the X- approximatio. 2
The ext step is to fid the value of x that correspods to iflectio poit. s we discovered previously, (8) may ot ecessarily have a iflectio poit, as it was the case for Y-approximatio. So, whe implemetig the -approximatio, oe should check for the existece of this poit. If the poit does ot exist, the value of x= should be used istead. The secod derivative ca be foud as follows. 2 2 + F ( x) = ( ) Px ( )( )( P + C) x (9) + + Solvig equatio F ( x) =, we fid the value of poit. x that correspods to the iflectio x + C + = P if x > + + If x, the we should assume that x =. We ca see from that iflectio poit exists if +. Fially, we ca write the approximatio formula for the value of x, whe the fuctio F (x) itersects abscissa for the secod time. I other words, we ca fid the secod solutio of equatio F ( x) = usig the same approach as for computig the X- approximatio. Namely, if the iflectio poit of IRR fuctio is greater tha oe, the we have to compute the double distace betwee the miimum ad iflectio poit, ad add this value to the x that correspods to the iflectio poit. If this value is less tha oe, the we substitute it by. The followig formula thus covers all scearios. x () = x + 2( x ) x Oce the approximate value of x is determied, we ca fid the approximate value of the iterest rate from as follows. + R = ( ) (22) x 8. ddig CP-approximatio I additio, whe the umber of periods is large, we will complemet the - approximatio method with the earlier discussed CP-approximatio. We proved that i this case, we ca approximate the value of iterest rate as 3
C R CP = (23) P Substitutig this ito (22), we get C x = + (24) P whe we have = + (25) For this sceario, formula (6) effectively trasforms ito the left side of the origial IRR equatio (), which validates the trasformatio. So, we ca use the CP-approximatio for (6) as well. The questio is: how we ca fid the threshold which will work as a trigger which switches the computatios from -approximatio to CP-approximatio. It turs out that C the value of itself ca be used for this purpose. We will discuss this i the subsectio P devoted to the algorithm s implemetatio. Overall, both - ad CP approximatios are ot techically complicated. What makes them a little difficult to uderstad is the uderlyig ucovetioal idea, which is, i fact, is simple ad elegat. 9. Practical implemetatio of -approximatio method. ccuracy evaluatio. Numerical examples We eed the followig compoets i order to implemet the method.. threshold fuctio, which is the trigger betwee -approximatio ad CPapproximatio. 2. power fuctio that computes the value of. Let us begi with the threshold fuctio. First, we have to defie the domai of iterest rates to which we would like to apply the approximatio. I our umerical example, we specified a domai of up to % aual iterest rate. Note that we ca implemet differet variatios of the -approximatio. For istace, the rage of possible umbers of periods ca be divided ito several sub-rages, ad additioal trigger fuctios that call appropriate -approximatios for particular umbers of periods ca be implemeted. This way, the approximatio accuracy ca be further icreased by orders of 4
magitude. For istace, if the rage of umbers of periods [2, ] is subdivided ito four itervals, [2-6], [6-8], [8-4] ad [4-], the the accuracy icreases, o average, by 23 times.. Threshold fuctio C I our case, the threshold fuctio T, is very simple ad triggers oly whe P >. The graph of the value of the relative approximatio accuracy, depedig o the umber of periods, is show i Fig. 3. Relative accuracy Relative accuracy of approximatio.8e-3.6e-3.4e-3.2e-3.e-3 8.E-4 6.E-4 4.E-4 2.E-4.E+ 2 4 8 2 6 24 32 4 48 Number of periods Fig. 3. Relative accuracy of combied ad CP approximatios for the rage of iterest rates up to %. The form of the graph i Fig. 3 is well explaied by the previous cosideratios. We kow that whe the umber of periods is relatively small, the graph of the mortgage IRR fuctio is above the abscissa, so that two solutios are close to each other, ad the fuctio s miimum is located close to the middle poit betwee two solutios. We ca expect that the approximatio accuracy should be high, ad this is what the graph i Fig. 3 cofirms. With the icrease of the umber of periods, the graph of IRR fuctio siks more below the abscissa, the distace betwee solutios icreases, ad eve mior variatios of the power should oticeably impact the accuracy. This is why the approximatio error icreases. This tred evetually is itercepted by the CPapproximatio, whe it becomes more accurate tha -approximatio. Note that the overall achieved approximatio accuracy is very good. However, if we reduce the iterest rates rage to aual %, the the accuracy icreases two-three orders of magitude, which i may cases is already sufficiet accuracy for practical applicatios. So, subdividig the rage of iterest rates ito several sub-domais is a 5
beeficial approach, while it adds very small computatioal overhead. We ca fid the iitial value of iterest rate, i order to determie the sub-domai, usig X-approximatio (for smaller umber of periods) or Y approximatio (for larger umber of periods).. Power fuctio The Power fuctio = () is also very simple fuctio that depeds oly o the umber of periods. I our case, we subdivided the domai of period umbers ito two. Oe is for = { 2,2}, ad the other oe for = { 2,8}, so that () is the composite of two simple fuctios..2 ( ) =, for = { 2,2} ;.925 ).48 ( =, for = { 2,8} ; The approach, which we used to fid the represetatio of (), was based o miimizatio of relative error for the whole rage of iterest rates. 2. Iterative algorithms The ext step is icorporatio of the approximatio procedure ito iterative algorithms. We used two iterative methods. Oe is the Newto-Raphso s iterative algorithm, ad the other oe is the quadratic iteratio from (Shestopaloff, 29). If we rewrite formulas for quadratic approximatio, the they will trasform as follows for the mortgage IRR fuctio. 2 k a = x 2 b = x [ x P( + ) ( C + P)( )) ] k [ x P( + ) ( P C) ] k k + [ x P P + C ] C c = x ( ) (26) k k + where k =,,2,.. ad x = x. The, the iteratio algorithm is represeted as a solutio of quadratic equatio, plus the previous iteratio. 2 b + b 4ac xk + = xk + (27) 2a 6
It tured out that this quadratic iteratio algorithm is computatioally superior to Newto-Raphso s method because of the smaller umber of iteratios. We evaluated the computatioal performace of both methods i the rage of aual rates up to % ad the umber of periods from 2 to 8. Table 4 presets the results. Table 4. Computatioal efficiecy of quadratic ad Newto-Raphso s iteratios for the combied -approximatio, ad CP-approximatio oly for the umber of periods [2-2]. Time required to calculate,, iterest rates o a desktop computer, i sec. Quadratic iteratio Newto-Raphso -approximatio -approximatio.72.9.6.37 CP-approximatio 3.2 5.64 3.42 4.55 The -approximatio provides the most computatioal gai, compared to CPapproximatio, i the rage of periods from 2 to 2. CP-approximatio aloe works well for the umber of periods above 2. We ca see from this table that - approximatio provides very good ad stable computatioal performace i the whole rage of practical values of iterest rates. We also researched the feasibility of usig the proposed -approximatio method i fiacial calculators, cosiderig the base model HP 2b. The very prelimiary evaluatios showed that the performace gai is of the order of.7-2.5 times, due to reduced umber of iteratios. Fig. 4 shows the worst sceario that we ecoutered with regard to the umber of iteratios i case of quadratic iteratio, while the usual umber of iteratios does ot exceed two. 7
4 Quadratic iteratio, N=6 Number of iteratios 3 2..7.3.9.25.3.36.42.48.54 Mothly iterest rate Fig. 4. Number of quadratic iteratios depedig o the mothly iterest rate. The 3 umber of paymet periods is 6, iteratio accuracy is equal to. The umber of iteratios for the Newto-Raphso s method is usually i the rage 2-3, very rarely icreasig to four iteratios. The implemetatio of Newto-Raphso s method i case of -approximatio is based o formula (6). The iterest rate is calculated i the very fial phase from the value x obtaied i the last iteratio (22). This is why the iteratio procedure i case of -approximatio deals oly with the value of x. With this regard, we ca call it as -iterative algorithm. Usig (6) ad (7), we ca write it as follows. F( xk ) xk + = xk (28) () F ( x ) k Overall, the computatioal performace achieved by -approximatio method (combied with the CP-approximatio) ad -iteratio algorithm is very good. I our umerical illustratios the computatioal performace has bee several times better tha the best approximatio (CP-approximatio) that is used today (see Table 4). Such substatial improvemet i computatioal time ca have sigificat impact to the system desig approaches ad busiess applicatios, as well as to the desig of fiacial calculators (this is the most computatioally expesive calculatio). The ote especially appeals to iformatio systems performig optimizatio of ivestmet strategies, because such systems require exhaustive computatios based o aalysis of differet permutatios of ifluecig parameters. Such efficiet algorithms are also idispesable computatioal tools for the systems that recalculate mortgages ad other ledig istrumets or do simulatios o a regular basis, which is a commo practice i ledig istitutios. 3. Defiig iteratio accuracy 8
Previously, we discussed briefly the iteratio accuracy. I particular, we discovered that the iteratio accuracy i case of some iterative methods, such as Newto-Raphso s algorithm, does ot guaratee that we foud a iterest rate with the same precisio. Some iterative methods, such as, for istace, bisectioal algorithm, are free from this drawback. However, eve with regard to iterative methods, which use the differece betwee successive iteratios as a measure of accuracy, the issue is ot straightforward. I this subsectio, we will discuss some of these problems. Let us cosider formula (22), which we reproduce below. + R = ( ) (29) x I fact, we are iterested i the accuracy of value R, while -iterative algorithm (28) produces value x. So, if we require that the fial value has to be foud with a accuracy + a, the the value of x has to be calculated with the accuracy of a, accordig to the rules for fidig accuracy of derivative values. I case of -iteratio algorithm, this ca be a large correctio of the order of umber of periods, which ca save oe-two iteratios. other cosideratio is this. Do we eed to calculate the iterest rate for loas 5 $ ad $,, with the same accuracy, as some iformatio systems, ad eve some hadheld calculators, implemet? The aswer is o. I fact, eve if the requiremet is to roud the total sum to cet, the actual required accuracy i these two 7 cases ca differ as much as. The procedures how to compute the actual required accuracy for the iterative procedure, give the accuracy of the fial evaluatio, are well defied, ad we will ot elaborate o this topic. We just wated to pay attetio to this purely techical issue which is ofte eglected i the systems implemetatios, while it ca save -3% of precious time ad computatioal resources by applyig miimum efforts durig the desig ad implemetatio phases. Coclusio The preseted results show that iterative procedures are ot the oly optio whe we have to fid the iterest rate for fiacial istrumets with regular paymets, such as mortgages ad auities. I may istaces, the itroduced methods allow fidig iterest rates with high accuracy without usig ay iterative procedures at all. Depedig o particular requiremets, the methods ca be further adjusted for higher accuracy ad efficiecy. The proposed algorithms improve the computatioal efficiecy of mortgage ad auity related fiacial software applicatios from tes of percet to several times. 9
Such software applicatios ca be deployed o all kids of computers. Besides, the simplicity ad high computatioal efficiecy of itroduced algorithms make them very useful for devices with low computatioal resources, such as hadheld ad desktop fiacial calculators. We discovered a coditio for the iitial value that guaratees covergece of the iterative process to the right solutio. This is a importat computatioal restrictio that makes the solutio of the mortgage IRR equatio uambiguous whe oe uses iterative algorithms, such as Newto-Raphso, or similar oes. ll obtaied results are valid for auities if we substitute the value of mortgage paymet C by (-C), assumig that C is a auity paymet. I fact, whe the purchaser of a auity receives paymets, we ca cosider this sceario as a covetioal mortgage, because the value of the auity i the auity equatio i this case is egative, which trasforms it to the mortgage IRR fuctio. We also discovered additioal ways of improvig the computatioal performace of fiacial software systems that deal with such mortgage ad auity related calculatios. I particular, varyig the accuracy of computatios, which is defied by iput parameters, ca sigificatly reduce the computatioal workload. Overall, this ewly discovered approach for computig iterest rates of mortgages ad auities opes a whole ew area. It sigificatly improves the arseal of efficiet computatioal tools for aalytical studies ad routie busiess computatios related to these fiacial istrumets. Refereces. S.. Broverma, Mathematics of Ivestmet ad Credit. CTEX Publicatios, Ic. Wisted ad vo, Coecticut. 99. 378 p. 2. R. L. Burde, J. D. Faires, Numerical alysis, 8-th editio, Thomso Brooks/Cole, 25, 847 p. 3. Q. I. Rahma, G. Schmeisser, alytic Theory of Polyomials, 22, Oxford Sciece Publicatio, 742 p. (Refr. Page 353). 4. Yu. K. Shestopaloff, Sciece of iexact mathematics. Ivestmet performace measuremet. Mortgages ad auities. Computig algorithms. ttributio. Risk valuatio, 29, KVY Press, 592 p. 2
5. Yu. K. Shestopaloff, Mortgages ad uities: a Itroductio, 2, KVY Press, 27 p. 6. Yu. K. Shestopaloff, Properties ad iterrelatioships of polyomial, expoetial, logarithmic ad power fuctios with applicatios to modelig atural pheomea, 2, KVY Press, 224 p. 7. Yu. K. Shestopaloff, Properties, relatioships ad solutios of equatios composed of some elemetary fuctios, Joural of Computatioal Mathematics ad Mathematical Physics, 2, No. 5. 2