Showing posts with label BA II Plus. Show all posts
Showing posts with label BA II Plus. Show all posts

Saturday, August 20, 2016

Internal Rate of Return and Polynomials

Internal Rate of Return and Polynomials 

The internal rate of return function (IRR) is featured on many financial calcualtors, such as the HP 12C and HP 10bII (Plus) from Hewlett Packard, and BA II Plus (Professional) from Texas Instruments.  It calculates an interest rate of a group of cash flows when the net present value (NPV) is zero.  

0 = CF0 + CF1/(1 + r%) + CF2/(1 + r%)^2 + CF3/(1 + r%)^3 + ...

where r% = r/100 and r = IRR. 

The IRR can also aid in finding a root of polynomial.  Let x = 1/(1 + r/100).  Then:

0 = CF0 + CF1*x + CF2*x^2 + CF3*x^3 + ...

In the case, the cash flows are coefficients of the polynomial.  When calculating IRR, enter cash flows (coefficients) in terms of coefficients of increasing powers of x. 

Once r is calculated, then we can calculate for x (the root):

Algebraic operating system (HP 10bII, BA II Plus, and most others):
IRR [ ÷ ] 100 [ + ] 1 [ = ] [1/x] 

Reverse Polish Notation (RPN) system (HP 12C, a setting on the HP 17B II+):
IRR 1 [ % ] 1 [ + ] [1/x]

Things to keep in mind:

1.  This method is for polynomials for real roots only.  If all the roots are complex, this method is a no-go. 
2. Likewise, no complex number coefficients.  
3. The IRR function and algorithm to adjust it to find the root will be a positive root that is closest to zero (not always, but this is the case most of the time).  

A beautiful article by Valentin Albillo covers this topic for the HP 12C calculator and has a program to find all the roots for polynomials: http://www.hpcc.org/datafile/V21N2/V21N2P35.pdf

Let's look at a few examples. For these examples, all results are rounded to four decimal places (FIX 4). 

Using IRR to Find a Root to a Polynomial 

Example 1:  x^2 + 2x - 3 = 0

Enter the cash flows:
CF0 = -3
CF1 = 2
CF2 = 1

If need be, set P/Y = 1 (not necessary for the HP 12C and BA II Plus (Professional))

Compute IRR to get 0.0000

Follow the transformation x = 1/(IRR/100 + 1) and one root of x^2 + 2x - 3 is:

x = 1.0000

To my knowledge, the only calculator that allows for initial guesses is the HP 12C by entering the initial guess, then pressing [RCL], [ g ], [R/S].  

Example 2: 11.2x^4 - 2.1x^3 + 3x^2 - 3.6x - 2 = 0

Set the cash flows as follows:
CF0 = -2
CF1 = -3.6
CF2 = 3
CF3 = -2.1
CF4 = 11.2

Calculating IRR yields 29.7291.  

Transforming to the root for the polynomial will yield the root 0.7708.  

Simple enough, but let's look at the next example. 

Example 3: x^2 + 10x + 24 = 0

The cash flows for this problem would be:

CF0 = 24
CF1 = 10
CF2 = 1

Straight forward so far.  However, calculating IRR will yield an error.  Why?

The IRR function will require that at least one cash flow be the opposite sign, a mix of negative and positive cash flows.  Looking at what we have, all the flows are positive.  We can make the problem more palpable, we can make another substitution x = -t. As a consequence:

x = -t, x^2 = t^2, x^3 = -t^3, x^4 = t^4, and so on.

Our transformed polynomial is now:  t^2 - 10t + 24 = 0.  

The adjusted cash flows are:

CF0 = 24
CF1 = -10
CF2 = 1


This will require an adjustment in transform from IRR to root:

x = -1/(IRR/100 + 1) 

Procedure if the polynomial is going to adjusted by this additional step:

Algebraic operating system (HP 10bII, BA II Plus, and most others):
IRR [ ÷ ] 100 [ + ] 1 [ = ] [1/x] [+/-]

Reverse Polish Notation (RPN) system (HP 12C, a setting on the HP 17B II+):
IRR 1 [ % ] 1 [ + ] [1/x] [CHS]

Now calculate IRR. 

The HP 10b II+ gives -83.3333.   Translating to the root -6.0000. 

The BA II gives -75.000, which translate to the root -4.0000. 

Both are correct. 

The HP 12C gives Error 3.  However, if I entered an initial guess of say, -50, by keying -50 [RCL], [ g ], [R/S] returns -75.0000.   (For the root of -4.0000 after converting IRR to x (see above)). 

Interesting to see how the IRR function can help find a root of polynomials, which the required adjustments. 

Using the Polynomial Solver to Find IRR

Let's go the other way.  Say we have a scientific, even graphing calculator, and we are going to need to find the IRR but we don't have such function?  

Recall:

0 = CF0 + CF1/(1 + r%) + CF2/(1 + r%)^2 + CF3/(1 + r%)^3 + ...

where r% = r/100 and r = IRR. 

The IRR can also aid in finding a root of polynomial.  Let x = 1/(1 + r/100).  Then:

0 = CF0 + CF1*x + CF2*x^2 + CF3*x^3 + ...

Solving x = 1/(1 + r/100) for r yields:  r = 100*(1/x- 1)

In this case (and ideally), pick the root (x) that is positive and the closet to zero. 

Example 4:  Find the IRR for the following cash flows:
CF0 = -5000
CF1 = 1000
CF2 = 2000
CF3 = 3000
CF4 = 5000

The translated polynomial to be solved is:
0 = -5000 + 1000x + 2000x^2 + 3000x^3 + 5000x^4

Using the PolySmlt2 app of the TI-84 Plus CE I get the following roots, rounded to four decimal places:
-0.1238 ± 1.0739i, -1.1179, 0.7655

Substituting x = 0.7655 into r = 100*(1/x- 1) yields an approximate IRR of 30.6336%.  

Running the problem through the financial calculators yield 30.6348%. Using more decimal places of x will get a more precise IRR. 

This is the relationship between IRR and roots of polynomials.  

Eddie

Source: Albillo, Valentin "HP-12C's Serendipitous Solver". Ex-PPC #4747, HPCC #1075, Datafile.  March/April 2002. http://www.hpcc.org/datafile/V21N2/V21N2P35.pdf



This blog is property of Edward Shore, 2016 

Friday, April 4, 2014

Three Generations of the BA II Plus



Here is my collection of the BA II Plus calculators I have with the year I bought them typed into each one.


Eddie

Thursday, March 27, 2014

Finance Calculators: Tips and Tricks with the Cash Flow Operation


This applies to any calculator that has the time value of money (TMV) and net present value (NPV) function.

Net Present Value Formula

NPV = Σ ( pmt_k ÷ (1 + rate/100)^k for k = 0 to n )

pmt_k: payment for each period k
rate: the periodic rate

Breaking Cash Flow Groups

A lot of financial calculators (Texas Instruments BA II Plus, BA II Plus Professional, HP 10 bII+, HP 17bii+) allow for a cash flow to have a frequency greater than 99 (to most likely higher limit of 999). However, the popular HP 12C and older financial calculators allows a frequency limit of 99.

This comes into play when finding the net present value of payments of a pension and retirement plans.

For example:

Evaluate a pension factor of the following payment structure:

Initial Cash Flow: 0
Cash Flow Set 1: 1 for 120 flows
Cash Flow Set 2: 0.9 for 180 flows
Cash Flow Set 3: 0.8 for 180 flows

Periodic Rate: 0.45%

Cash Flow Setup:
CF0 = 0
CF1 = 1; FRQ1 = 120
CF2 = 0.9; FRQ2 = 180
CF3 = 0.8; FRQ3 = 180

Calculated NPV = 182.88

Here is the same problem with breaking large groups into smaller ones. Let's say 99 is the frequency limit. Hence: 120 = 99 + 21 and 180 = 99 + 81. So here it is with the large cash flow frequencies split. This can be used with the HP 12C.

Periodic Rate: 0.45%

Cash Flow Setup:
CF0 = 0
CF1 = 1; FRQ1 = 99
CF2 = 1; FRQ2 = 21
CF3 = 0.9; FRQ3 = 99
CF4 = 0.9; FRQ4 = 81
CF5 = 0.8; FRQ5 = 99
CF6 = 0.8; FRQ6 = 81

Calculated NPV = 182.88

Net Future Value (NFV) and Net Utility Stream (NUS)

Some advanced financial calculators have the net future value (NFV) and net utility stream (NUS) functions. But this section will show how to calculate NFV and NUS using the NPV and TVM functions.

Steps:
1. Enter the cash flows and periodic interest rate.
2. Calculate NPV. Store this amount in memory as needed.
3. Set up the TVM variables as such:

For calculating NFV:
P/YR (payments per year) = 1
N = total number of cash flows
I = periodic interest rate
PV = -NPV (enter the NPV then press the change sign)
PMT = 0
Compute FV. (that is the NFV)

For calculating NUS:
P/YR (payments per year) = 1
N = total number of cash flows
I = periodic interest rate
PV = -NPV (enter the NPV then press the change sign)
FV = 0
Compute PMT (that is the NUS).


Let's go through a couple of examples:

Example 1:

Periodic Rate: 5%
Initial Cash Flow: -1000 (Flow 0)
Cash Flow 1: 100
Cash Flow 2: 250
Cash Flow 3: 500
Cash Flow 4: 750
Cash Flow 5: 500

NPV = 762.70

Computing NFV:
P/YR = 1
N = 5
I = 5
PV = -762.70
PMT = 0
Compute FV: 973.43 (NFV = 973.43)

Computing NUS:
P/YR = 1
N = 5
I = 5
PV = -762.70
FV = 0
Compute PMT: 176.16 (NUS = 176.16)

Example 2:

Periodic Rate: 4.75%
Initial Cash Flow: -1000 (Flow 0)
Cash Flow 1: 200
Cash Flow 2: -500
Cash Flow 3: 500
Cash Flow 4: -100
Cash Flow 5: 800
Cash Flow 6: 1000

NPV = 478.51

Computing NFV:
P/YR = 1
N = 6
I = 4.75
PV = -478.51
PMT = 0
Compute FV: 632.14 (NFV = 632.14)

Computing NUS:
P/YR = 1
N = 6
I = 4.75
PV = -478.51
FV = 0
Compute PMT: 93.52 (NUS = 93.52)

Hopefully this helps. Have a great day and I will talk to you next time!

Eddie


This blog is property of Edward Shore. 2014


Saturday, March 22, 2014

Random Calculator Thoughts: New Design of the BA II Plus, Names of Calculators, Calculator Apps allowed on Tests in Texas

Texas Instruments:  New Design of the BA II Plus and BA II Plus Professional

Recently, Texas Instruments released a new design of their financial calculators, the BA II Plus (http://education.ti.com/en/us/products/calculators/financial-calculators/baii-plus/features/features-summary) and the BA II Plus Professional (http://education.ti.com/en/us/products/calculators/financial-calculators/baii-plus-professional/features/features-summary).

*  The display of the new BA II Plus and the Professional show larger digits and time-value-of-money indicators.
*  I first purchased a BA II Plus Professional when it was first released in 2004.  The original had a silver, metallic design with silver keys.  The keys on the one I had were really hard to press, making the calculator incredibly hard to use.   The keyboard certainly did not allow for long periods of use.  I am really hoping the new black design has a much better keyboard.
*  At first glance, the black design of the BA II Plus professional looked like a calculator that was specialized for the auto mechanic, not for the finance professional.  It still looks good, and better than the original silver design in my opinion.
 * I don't own either calculators in the new design, but I plan to get the BA II Professional when I can.  If you do, please leave a comment.


The Names of Calculator Series

* Texas Instruments and Casio both like to keep the model numbers of their calculators the same.  This is both good and bad.  The good is that keeping the same number shows that the calculator, even with the new features, keeps the same lineage so going to the new version is easier.  The bad is that if there are so many versions, it is hard to tell which one to shop for, either online or in the store.  Bottom line, research and note the exact model name that you want.
*  Here are a few examples of such calculator lines:

TI-30 (Texas Instruments)

The Original TI-30 was released in 1976.  Jumping to today:

TI-30xa: basic battery powered model with the old-school post-fix entry

TI-30x Solar, known as the TI-30 ECO RS outside of the United States:  the solar version of the TI-30xa.   Unfortunately, Texas Instruments stopped selling the 30x Solar model in the United States.

TI-30 X II:  Two line calculator - now comes in a rainbow of colors.  I have a light blue one I got from Target several years ago.  The TI-30 XII gets linear regression and five storage registers.  Want a battery powered 30XII?  Shop outside the United States.

TI-30 X Multiview: Over the 30 XII, the Multiview gets the ability to input equations in textbook fashion and a function table.

TI-30X Pro/TI-36X Pro:  Both are the same.  In the United States, this is called the TI-36X Pro.  Outside the USA, it is called the TI 30X-Pro.  This is the top of the line in this line and the 36X Pro is one of my favorite calculators of all time.  Over the 30XII Multiview, we get calculus functions (integrals, derivatives, summations), an equation solver, Boolean algebra, matrices, vectors, and conversions.  

TI-83/84 (Texas Instruments - their flagship graphing calculator)

TI-83 - without apps
TI-83 Plus
TI-83 Plus Silver Edition
TI-84 Plus
TI-84 Plus Silver Edition
TI-84 Plus C Silver Edition (this is the color graphing calculator)

Casio fx-115/fx-991 Series

Depending on where you live, these calculators are either called the fx-115 or the fx-991.  Several years back I did a review of the fx-115 ES Plus calculator where I talk about the newer features such of integer division, GCD, and LCM.  It turns out that that the fx-991 ES Plus did not have the new features I mentioned, which was brought up in the comments (thanks! :) ).  The international equivalent of the fx-115 ES Plus is the fx-991 EX Plus C, though I am not sure if the fx-991 ES Plus C is even available anymore.  Although the equivlaent for Japan is the fx-995 ES.  

Link the fx-995 ES - translated into English by Google Translate

 The fx-991 ES Plus which is still on sale according to the World Wide Casio website, by looking at the keyboard, the fx-991 ES Plus only has one more thing than the fx-115 ES, a random integer function.  
 
Casio fx-3650p and fx-50f (Plus)

The fx-3650p and fx-50f are solar programmable calculators.  The fx-50f has the added bonus an equation library.    Despite the fact that the programming language on both of these calculators are simplified, it adds a powerful dimension.  It it also encourages students to learn programming to solve various mathematical problems.  

Why are the fx-3650p and fx-50f not sold in the United States?  Drives me nuts!  I have a fx-3650p which ordered from a store in Hong Kong several years.   

Here are links to the Casio world-wide site:
fx-3650p:  http://edu.casio.com/products/program/fx3650p/
fx-50f Plus: http://edu.casio.com/products/program/fx50fp/

Apparently, there are now several varieties of the fx-50f.

Calculator Apps in the Classroom

I believe it is inevitable that calculator apps will become part of the norm in the classroom.  For comparison purposes, fifteen to twenty years ago, a lot of teachers shivered at the thought of allowing graphing calculators into the classroom.   Today, go to any math classroom (middle school, high school, or college), and the majority of the students will have a graphing calculator. Please correct me if I am wrong, but I think that the standardized tests of high school students have parts that require graphing calculators. 

The reason why I am coming to the conclusion is because of an article I recently read.  Texas Commissioner of Education Michael Williams has decided to allow districts to use either a handheld graphing calculator or a graphing calculator app for the 8th grade mathematics portion of the STAAR (State of Texas Assessment of Academic Readiness).  The article states that it is the first time a graphing calculator app is allowed on a standardized test.  This a pilot program that will be used for the 2014-2015 academic school year.  I expect that graphing calculator apps will be fully accepted after the pilot program.  Note that smart phones are not still allowed.  

Wow... 8th graders have smart phones - shows how old I am.  

Here is a link to the article from the KLTV news site, one of the various news sources reporting on this:  http://www.kltv.com/story/25031254/tea-authorizes-use-of-calculator-app-for-14-15-staar-math-test.


That wraps up this blog entry - please let me your thoughts and comments.  As always they are much appreciated.  I'll talk to you next time!

Eddie



This blog is property of Edward Shore.  2014


 

 
 

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations Some Background and Periodic Reduction Formulas ...