An Optimized Newton-Raphson Algorithm For Approximating Internal Rate of Return

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/338386550

An Optimized Newton-Raphson Algorithm for Approximating Internal Rate of


Return

Article  in  International Journal of Advanced Trends in Computer Science and Engineering · December 2019

CITATIONS READS

3 273

3 authors:

Narene M. Nagares Ariel M. Sison


Technological Institute of the Philippines Emilio Aguinaldo College
2 PUBLICATIONS   3 CITATIONS    93 PUBLICATIONS   124 CITATIONS   

SEE PROFILE SEE PROFILE

Ruji Medina
Technological Institute of the Philippines
132 PUBLICATIONS   166 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

DIT Dissertation View project

Dissertation DIT View project

All content following this page was uploaded by Narene M. Nagares on 12 May 2020.

The user has requested enhancement of the downloaded file.


ISSN 2278-3091
Volume 8, No.6, November – December 2019
International Journal of Advanced Trends in Computer Science and Engineering
Available Online at http://www.warse.org/IJATCSE/static/pdf/file/ijatcse95862019.pdf
https://doi.org/10.30534/ijatcse/2019/95862019

An Optimized Newton-Raphson Algorithm for Approximating


Internal Rate of Return

Narene M. Nagares1, Dr. Ariel M. Sison2, Dr. Ruji P. Medina3


1
Technological Institute of the Philippines, Philippines, [email protected]
2
Emilio Aguinaldo College, Philippines, [email protected]
3
Technological Institute of the Philippines, Philippines, [email protected]


making processes, which may help them in realizing certain
ABSTRACT goals [9]. However, IRR cannot be isolated in the equation
and cannot be determined analytically, which led researchers
The internal rate of return (IRR) is the most widely-used to use iterative algorithms in estimating IRR [11], [16]. While
method in measuring the rate of return on investment (RROI), there are many root-finding algorithms, such as bisection,
which helps investors decide whether an investment is viable false position, and secant, the Newton-Raphson algorithm is
or not. Iterative root-finding algorithms are the most efficient the most preferred algorithm due to its quick convergence,
techniques in calculating IRR, amongst which, the given a certain accuracy level [1], [10], [15], by using the
Newton-Raphson algorithm is the most popular and the fastest equation below [8].
algorithm. However, when the primary unknown, which is
provided by the user, is far from the actual root, the result of (1)
the algorithm, oftentimes, does not converge to the root. This
problem is addressed by the midpoint-based Newton-Raphson
However, [12] stated that, though its convergence is very fast
algorithm. Nevertheless, said algorithm could further be
improved in terms of proximity, speed, and accuracy. This and the number of the digits doubles in every iteration, which
study presents a novelty in estimating IRR using the helps us in reaching our tolerance of errors quickly, the
centroid-based Newton-Raphson algorithm. The experimental guarantee of convergence is still ambiguous and there are
results show that the presented algorithm is 30.77% faster instances when division by zero occurs, and it is a
than the midpoint approach. It also delivered an average error considerable disadvantage of Newton–Raphson method, and
reduction of 90.96% than the midpoint-based algorithm in suggested that the initial guess must be chosen very close to
calculating the initial IRR. the true root [6], [7]. It also requires an initial guess value
from the user, which gives a high probability of
Keywords: root-finding algorithm, Newton-Raphson non-convergence when the user’s guess is far from the true
algorithm, IRR, convergence. root. Insofar as IRR is concerned, the study of Pascual et al.
[12] has addressed this issue by removing input of initial
guess from the user and used the midpoint of cash flows as the
1. INTRODUCTION initial IRR. Their study dramatically improved the
convergence, speed, and accuracy of Newton-Raphson
The root-finding problem is one of the most relevant algorithm in determining IRR. However, the midpoint
computational problems and it arises in a wide variety of injected to the algorithm is static and the number of iterations,
practical applications in Physics, Chemistry, Biosciences, as well as the accuracy, can still be further enhanced using
Engineering, et cetera [4]. It is a challenging task in scientific centroid.
application problems to estimate the solution of non-linear
equations [2], the function of IRR being one of them [16], as Thus, this study proposes using the centroid of cash flows, as
well as trial calculation, which may take numerous hours [17]. initial input, which further optimizes the newton-raphson
A more efficient way to estimate is by using a root-finding algorithm in determining IRR. A comparison of the two
algorithm, an iterative calculation scheme, to approximate a algorithms based on proximity, speed, and accuracy is
single, isolated root of a function , where the root presented in this paper.
is a solution of the equation [11].
2. EXISTING NEWTON- RAPHSON ALGORITHM
IRR is the most widely-used method in measuring the
feasibility of a project or investment [3]–[5]. It is one of the Pascual et al. (2019) proposed a modified Newton-Raphson
tools that helps an intelligent enterprise in their decision algorithm in approximating IRR which automatically
generates the initial guess input by using the midpoint of time
periods of cash flows equal to . The

3265
Narene M. Nagares et al., International Journal of Advanced Trends in Computer Science and Engineering, 8(6), November - December 2019, 3265 - 3268

modified algorithm is shown below [12]. 3. PROPOSED METHOD


The proposed centroid-based method, presented in Figure 2, is
an enhancement of the midpoint-based Newton-Raphson
technique. The improvement consists of the replacement of
the midpoint of cash flows of the midpoint-based IRR
technique with the centroid of cash flows equal to

(3)

This will substantially improve accuracy of initial IRR,


thereby reducing remarkably the number of iterations in
reaching convergence.

Figure 1. Midpoint-Based Newton-Raphson Algorithm[12]


(2)
| |

The process of the midpoint-based Newton Raphson


algorithm, demonstrated in Figure 1 above, is as follows.

1. The user inputs the initial investment and cash flows;


2. The initial is automatically generated by using the
Present-Future-Value formula, as shown in equation 2 Figure 2. Proposed Centroid-Based Newton-Raphson Algorithm
above, where period n is assigned the value of midpoint
of time periods of cash flows; A. Centroid-Based Newton-Raphson Method
3. The net present value ( ) of all cash flows discounted 1. Input initial investment and cash flows;
by is then defined using function 2. Calculate the centroid of time periods of cash flows
; with the equation
4. If the condition is not met, a new is generated and
the process goes back to step (3). Else, the last is (∑ )
accepted as the true root. (4)

This method improved the convergence, speed, and accuracy where:


of the original algorithm, which gives results that are close to subsequent cash flows
the true solution without the need for a user’s initial guess distance of from the time of first
values for the rate. However, this midpoint-based technique investment;
has low initial IRR accuracy when cash flows are not uniform
which causes more iterations. This technique served as a 3. The initial IRR is generated using the equation:
reference point for the proposed improved algorithm of this ∑
( )
study. ( | |
) (5)

where:
initial investment;
3266
Narene M. Nagares et al., International Journal of Advanced Trends in Computer Science and Engineering, 8(6), November - December 2019, 3265 - 3268

4. The non-linear function is then defined to Qiao-Zhang test case while the proposed method only
get the net present value of all cash flows discounted garnered an error of 0.094618059 or 9%. The test case from
by ; Patrick-French has an error of 1.549589718 or 155% when
5. If satisfies the condition, the last value of using the midpoint approach, on the other hand, the centroid
is accepted, else a new is calculated, and approach only has an error of 0.08782530385 or 8.79%. This
the process goes back to step 4. proves that when the cash flows are more diverse, the
midpoint approach becomes static while the centroid method
4. EXPERIMENTAL RESULTS dynamically adjusts to the changes in the values. In the test
case Pascual et al, the proposed technique only produces an
This section presents the simulation results of the proposed
error of 0.01029926307 or 1% while the midpoint approach
centroid-based Newton-Raphson algorithm by comparing it
took an error of 0.050466023 or 5%.
with the midpoint-based Newton-Raphson algorithm, in terms
of proximity, speed, and accuracy.
These results show that the centroid-based IRR technique
performed better than the midpoint-based IRR technique in
4.1 Data Analysis
terms of the proximity of the initial IRR to the actual root.
The test cases from the studies of Qiao and Zhang[14], Patrick Given the three test cases, the proposed method gave an
and French[13], and Pascual et al. were used in the simulation average error reduction of 90.96% over the midpoint
of this study. Qiao and Zhang used the data of a hydraulic approach.
engineering project, which has the beginning investment in its
four-year construction period of 70x106 yuan each year. The Table 1. Comparison Based on Error Percentage of Initial IRR
annual benefit of the project is 45×10 6 yuan, and the yearly
operation cost is 10×106 yuan. Then the IRR needs to be Initial Initial IRR
Method Test case IRR
estimated for engineering economic analysis. The end of the IRR Error
fourth year is the discount base year. In other words, C0, C1, Qiao- 0.094618 0.094618 0.531649
C2 and C3, respectively, equal -70 Million Yuan, C4 equals 0, Zhang 07075113 071 558
and each of C5, C6, …, C38 equals 35 Million Yuan. 72
Midpoint-
based IRR Patrick- 0.087828 0.087828 1.549589
Patrick and French made use of the following data: Initial French 17946 17946 718
technique
investment,C0=145; C1=C2=C3=C4=100 and C5= -275. While
Pascual 0.010299 0.010299 0.050466
an installment plan for a Chevrolet Trailblazer was employed
et al. 26307 26307 023
by Pascual et.al. It consists of cash flows C0= -₱1,438,888.00
and C1, …,C60=₱32,269.00. Qiao- 0.094618 0.108239 0.094618
Zhang 059 52991 059
4.1 Numerical Analysis Centroid- Patrick- 0.087825 0.050717 0.087825
based IRR 30385 57450 30385
As demonstrated in Table 1, the experiment shows that the French
technique
centroid-based approach, an enhancement of the Pascual 0.010299 0.009779 0.010299
midpoint-based IRR technique, automatically computes an et al. 26307 50022 26307
initial value which is more proximate to the real root IRR than 0.909582
that of the previous algorithm, thereby reducing the number of Average Error Reduction of Centroid
893 or
iterations and in finding the final IRR. This new algorithm approach over Midpoint Approach
90.96%
simply needs the data consisting of the principal amount, also
known as initial investment or outlay,C0, and the subsequent B. Results on Iteration and Runtime
cash flows, C1, C2, …, Cn. These data serve as the respective The enhanced algorithm’s speed, as shown in Table 2 below,
coefficients of the terms of the function to be differentiated by for the three test cases are observed at only 3 iterations,
using Differential Calculus. compared to the midpoint approach which are observed at 5, 5
A. Results of Centroid Approach to the Automatic Initial and 3 iterations, respectively. This means that the proposed
IRR Computation algorithm reduced the iterations by 0.307692308 or 30.77%
over the midpoint approach which then caused a faster
The simulation presented the percentage of error in
runtime of 0.179310345 or 17.93%.
calculating for the initial IRR by computing the difference
between the initial IRR and the final IRR over said final IRR. Table 2. Comparison Based on Speed
| |
(6) Runtime
Method Test case Iterations
(in ms)
Based on the trial results in Table 1, the centroid approach Qiao- Zhang 5 132
produced, consistently, lesser errors than the midpoint Midpoint-based Patrick-French 5 33
approach in calculating for the initial IRR. The midpoint IRR technique
approach produced an error of 0.531649558 or 53% for Pascual et. al 3 125

3267
Narene M. Nagares et al., International Journal of Advanced Trends in Computer Science and Engineering, 8(6), November - December 2019, 3265 - 3268

Qiao- Zhang 3 79 5. A. Gallo, A Refresher on Internal Rate of Return,


Centroid-based Harv. Bus. Rev., pp. 1–5, 2016.
Patrick-French 3 24 6. A. Gholami and H. S. Aghamiry, Iteratively
IRR technique
Pascual et. al 3 110 re-weighted and refined least squares algorithm
for robust inversion of geophysical data, Geophys.
Average Improvement of 0.307692 0.179310 Prospect., 2017.
Centroid approach over 308 345 https://doi.org/10.1111/1365-2478.12593
Midpoint approach 7. T. N. Grapsa, A modified Newton direction for
unconstrained optimization, Optimization, vol. 63,
5. CONCLUSION AND FUTURE WORK no. 7, pp. 983–1004, 2014.
The centroid-based Newton-Raphson algorithm has https://doi.org/10.1080/02331934.2012.696115
performed better than the midpoint Newton-Raphson 8. Y. Liang, Z. Shi, and P. W. Chung, A Hessian-free
algorithm by replacing the midpoint formula with the centroid Newton–Raphson method for the configuration of
formula. The algorithm can automatically produce an initial physics systems featured by numerically
asymmetric force field, Math. Comput. Simul., vol.
IRR value closer to the final root and dynamically takes into
140, pp. 1–23, 2017.
consideration the amounts of cash flows which accounts for
https://doi.org/10.1016/j.matcom.2016.11.011
its low error, unlike the static midpoint technique, which does
9. M. Łobaziewicz, Data & Information Management
not respond to changes in cash flows. The centroid-based In Decision Making Processes In An Intelligent
algorithm further ensures convergence as the initial IRR is Enterprise, Int. J. Adv. Trends Comput. Sci. Eng.,
closer to the real root by 90.96% than the midpoint-based vol. 8, no. 1.1, pp. 273–279, 2019.
algorithm. https://doi.org/10.30534/ijatcse/2019/4881.12019
10. D. Mancusi and A. Zoia, Chaos in eigenvalue search
Considering its usefulness, the proposed centroid-based methods, Ann. Nucl. Energy, vol. 112, pp. 354–363,
approach is highly recommended for investment decision 2018.
making by individuals or companies in determining realistic https://doi.org/10.1016/j.anucene.2017.10.022
interest rates or rates of return on investments (RROI). For 11. M. J. P. Nijmeijer, A parallel root-finding
future researches, this study recommends for finding a algorithm, LMS J. Comput. Math., vol. 18, no. 01, pp.
closed-form or analytical solution, one which does not 713–729, 2015.
anymore need an iterative process. This study has provided https://doi.org/10.1112/S1461157015000236
the opportunity for that possibility. 12. N. S. Pascual, A. M. Sison, and R. P. Medina,
Enhanced Newton - Raphson Algorithm in
ACKNOWLEDGMENT Estimating Internal Rate of Return ( IRR ), Int. J.
The authors are very grateful to the Commission on Higher Eng. Adv. Technol., vol. 8, no. 3S, pp. 389–392, 2019.
Education (CHED) of the Philippines in their support in the 13. M. Patrick and N. French, The internal rate of
fulfillment of this scholarly study. return (IRR): projections, benchmarks and
pitfalls, J. Prop. Invest. Financ., vol. 34, no. 6, pp.
REFERENCES 664–669, 2016.
https://doi.org/10.1108/JPIF-07-2016-0059
1. A. G. Ahmad, Comparative Study of Bisection and 14. Z. Qiao and H. Zhang, Research on estimation
Newton-Rhapson Methods of Root-Finding methods of internal rate of return in hydraulic
Problems, Int. J. Math. Trends Technol., vol. 19, no. engineering project, in 2nd International
2, pp. 121–129, 2015. Conference on Information Engineering and
https://doi.org/10.14445/22315373/IJMTT-V19P516 Computer Science, 2010, pp. 1–4.
2. A. A. Aziz, M. Syahmi, A. Shafie, M. Haidhar, and N. https://doi.org/10.1109/ICIECS.2010.5678145
Harun, Comparative Study of Collocation Method 15. M. Salimi, T. Lotfi, S. Sharifi, and S. Siegmund,
and Galerkin Method for Solving Nonlinear Optimal Newton–Secant like methods without
Partial Differential Equation, Int. J. Adv. Trends memory for solving nonlinear equations with its
Comput. Sci. Eng., vol. 8, no. 1.5, pp. 1–4, 2019. dynamics, Int. J. Comput. Math., vol. 94, no. 9, pp.
https://doi.org/10.30534/ijatcse/2019/0181.52019 1759–1777, 2017.
3. S. Chun and A. Kwasinski, Analysis of classical https://doi.org/10.1080/00207160.2016.1227800
root-finding methods applied to digital maximum 16. A. A. Sangah, A. A. Shaikh, and S. F. Shah,
power point tracking for sustainable photovoltaic Comparative Study of Existing Bracketing
energy generation, IEEE Trans. Power Electron., Methods with Modified Bracketing Algorithm for
vol. 26, no. 12, pp. 3730–3743, 2011. Solving Nonlinear ..., SINDH Univ. Res. J.
https://doi.org/10.1109/TPEL.2011.2157707 (SCIENCE Ser., no. October, 2016.
4. Ehiwario, J.C. and S. O. Aghamie, Comparative 17. P. Vernimmen, Y. Le Fur, M. Dallochio, A. Salvi, and
Study of Bisection, Newton-Raphson and Secant P. Quiry, The Internal Rate of Return, in Corporate
Methods of Root- Finding Problems, IOSR J. Eng., Finance: Theory and Practice, Fifth Edition, 2017.
vol. 04, no. 04, p. 07, 2014.

3268

View publication stats

You might also like