Comparing investments

From Bogleheads
(Redirected from Comparing Investments)

Comparing investments shows you how to compare the past performance of two investments. The page includes solutions so that you can duplicate the results with a spreadsheet.

There are many online financial calculators that do exactly what this article describes. However, if you use one you are placing full confidence that the math behind the online calculator (1) is accurate and (2) uses the assumptions you expect. There should be no surprises, especially when finances are involved. Having your own spreadsheet clearly defines the situation. You can easily run what-if scenarios, especially because you can manipulate the data to see trends with a simple chart.

This article uses Microsoft Excel. However, LibreOffice Calc or Open Office Calc will work equally well and are free applications supported on several operating systems. Financial functions are very similar to Microsoft's functions.[note 1]

Copy the formulas from the example tables below and paste into a spreadsheet. Alternatively, you can download the examples and graphs at the bottom of this page.

Present value

In order to evaluate a financial investment, prices are referenced as if the money is invested today. The amount of money that must be invested today is called present value. Using the same point in time allows comparison between different financial instruments, that is, an "apples-to-apples" comparison.

The equation for Present Value can be expressed as:[1]

PV = FV * 1 / (1 + i)N -or- PV = FV * (1 + i)-N

where

PV is the present value (amount of money today)
FV is the future value (amount of money at some point in the future)
i is the interest rate
N is the number of periods

The graph below shows the general idea. The slope of the line depends on the interest rate (i) and the number of payments (N).

Equate Future Prices to the Present
Reference future values to present value.png

Fundamental property #1

The first important property of present value is that the higher the interest rate (or discount rate[note 2]), the lower the present price.[2][note 3]

The higher the interest rate, the less that you have to invest today to achieve the same value in the future.

Increasing the interest rate lowers the price.
Increases in the interest rate lowers the price.png

Fundamental property #2

The second important property of present value is that for a given interest rate (or discount rate), the farther into the future you receive the investment, the lower the present value.[3]

Longer term investments have more time for the interest to accumulate, meaning that you need to invest fewer dollars.

The longer the investment time, the lower the price.
Longer investement time - lower price.png

How to compare investments

Every financial calculation involves certain basic elements; but the terminology used to refer to these elements typically differs among the various segments of the business and financial communities. All you need to do is identify the basic elements of the problem, and then structure the problem so that it will be readily apparent what quantities you should enter into Excel and what quantity you want to solve for.[4]

The process is basically:

  1. Sum the individual cash flows (every payment and any final value) in today's price for each investment.
  2. Compare the prices.

Use a cash flow diagram to help setup the problem and identify what is needed. Then, use Excel to bring the future cash flows back to today's price (present value).

An investment that consists of equal payments is referred to as an annuity.[4] Investments with unequal payments need to use different Excel functions (NPV and IRR) and are discussed below.

Cash flow diagrams

Any financial problem can be solved by:
  1. Drawing the cash flow diagram
  2. Defining the problem in terms of 4 financial variables
  3. Using Excel to solve for the 5th (unknown) variable.

Excel provides a function for each variable:

  • PV - use PV()
  • FV - use FV()
  • PMT - use PMT()
  • N - use NPER()
  • I - use RATE()

A cash flow diagram is a graphical representation of the timing and direction of financial transactions. The diagram begins with a horizontal line, called a time line. It represents the duration of a financial problem, and is divided into compounding periods.

Vertical arrows depict the exchange of money in a problem. An arrow pointing up from the point in the time line when the transaction occurs represents money you receive is represented by; an arrow pointing down represents money you pay out.

Cash Flow Diagram
Cash flow diagram.png

Solving the problem is now basically a matter of entering the quantities identified in the cash flow diagram into Excel.

Every completed cash flow diagram must include at least one cash flow in each direction. Note that cash flows corresponding to the accrual of interest are not represented by arrows in the cash flow diagram.[4]

Complicated problems may mean you have to decompose them into several simpler cash flows. The total cash flow is always equal to the sum of the individual cash flows. This principal holds true for all investments. As long as the cash flow diagram is drawn correctly, the problem can be solved.[note 4]

Sign convention

Financial functions use a standard sign convention to indicate the direction of cash flow.[note 4]

  • A positive sign is used for money that flows into our hand.
  • A negative sign is used for money that flows out of our hand.

Whether a cash flow is an inflow (+) or outflow (-) depends on your perspective. For example, money paid on a loan (outflow) is negative.[note 5]

Note:

  • One wrong sign will change the computed results and give an incorrect answer.
  • If you consistently change all signs in the problem, you switch roles (for example, switching from being the borrower to being the lender)
  • In all problems, both signs must be used. Sometimes the other sign is in the answer.

Financial variables

There are five financial variables.[5]

  1. PV: The first unequal money in or out of the cash flow diagram is the Present Value.
  2. FV: The last unequal money in or out of the cash flow diagram is the Future Value.
  3. PMT: A fixed amount received in each period is the Payment.
  4. N: Number of periods.
  5. I: Interest rate per compounding period.

N and I must be expressed in the same terms. If N is years, then I must be expressed in years. If N is months, then I must be expressed in months.

Type

When working with periodic payments, it is important to know whether the payment is due at the beginning or end of a compounding period. To accommodate the payment due dates, spreadsheet functions include a parameter known as Type, defined as:

  • 0 or omitted: Payments are due at the end of the period (payment in arrears, or ordinary annuity)
  • 1: Payments are due at the beginning of a compounding period (payment in advance, or annuity due)

Calculations involving payments in advance give different results from calculations involving payments in arrears.

Cash Flow Diagram
Cash flow - when the payment is made.png

Comparing interest rates

Compare the offered price to the present value.
Compare offered price to present value.png

Example 1

An investing opportunity offers to pay $500 at the end of each year for the next 20 years. At the end of 20 years, the value of this investment is zero, it can not be sold.

For example: You loan your friend some money. In 20 years when the debt is repaid, its value is zero.

The purchase price of this opportunity is $5,300.

If the investor wants a 5.5% interest rate, is this a good investment?[6]

The cash flow diagram looks like this:

Cash Flow Diagram
Investment Example 1.png
  • I = 5.5 (this is the APY)
  • N = 20 (each period is one year)
  • PMT = 500 (sign is positive because money flows into our hand)
  • FV = 0 (there is no last period unequal amount received)
  • Type = 0 (end of period payments)
  • PV = (solve for this)

With Excel:

Present Value Excel Formula
($5,975.19) =PV(5.5%,20,+500)

The PV of this investment is $5,975.19. The sign is negative because we should pay (money out of our hand) this much today to buy this investment. Forgetting the sign, this investment is worth $5,975.19.

Since we can buy an investment worth $5,975.19 for only $5,300, it is a good investment.

Example 2

An investing opportunity offers to pay $100 per year for the next 5 years and an additional $1,000 at the end of 5 years. The purchase price is $1,243.83.

If the investor wants a 6.25% interest rate, is this a good investment?[7]

Cash Flow Diagram
Investment Example 2.png

This example has two cash flows. You could draw it either in a single diagram or as two separate cash flows - one for the periodic payments and one for the final payment. The sum of the two cash flows is identical to the original solution. Example 6 is a more comprehensive example which uses separate cash flows.

  • I = 6.25 (this is the APY)
  • N = 5 (each period is one year)
  • PMT = 100 (sign is positive because money flows into our hand)
  • FV = 1000 (sign is positive because money flows into our hand)
  • Type = 0 (end of period payments)
  • PV = (solve for this)

Excel (displayed):

  Present Value
Column D
Present Value
(Combined)
Row 8 ($418.39)  
Row 9 ($738.51)  
Sum: ($1,156.90) ($1,156.90)

Excel formulas:

  Present Value
Column D
Present Value
(Combined)
Row 8 =PV(6.25%,5,100,0,0)  
Row 9 =PV(6.25%,5,0,1000,0)  
Sum: =SUM(D8:D9) =PV(6.25%,5,100,1000,0)

Excel's PV function lets you enter the future value along with the payment. You could solve this problem either as two separate entries (sum individual cash flows, column on left) or a single equation (column on right). In either case, the result is identical. It all depends on how you set up the cash flow diagram.

The PV of this investment is $1,156.90. Remember the negative sign only tells us that the money flows out of our hand to buy it, nothing more. Ignore the sign, this investment is worth $1,156.90.

As the investment is worth less than the purchase price ($1,156.90 is less than $1,243.83), this is not a good investment.

Example 3

Would you like to receive $15,000 today or $18,000 in four years?

The answer depends on the interest rate. If you can find an investment with good interest rate, it will be better to take the $15,000 today. How do you find the interest rate to invest $15,000 today?

Use a starting guess of 4%. The present value of $18,000 received four years from now is $15,386.48. Since the present value is higher than $15,000 (receiving $386.48 more) it is still better to receive $18,000 in four years.[note 6]

With Excel:

Present Value Excel Formula
$15,386.48 =PV(4%,4,0,-18000)

Now, let Excel remove the guess work and find where it would be more beneficial to receive the $15,000 now.

Use the Goal Seek function (see Excel help for details) to set the value of Cell F13 to zero by adjusting Cell C13.

Excel (displayed):

Rate PV Purchase Price Difference
4.0% $15,386.48 $15,000.00 $386.48
4.7% $15,000.00 $15,000.00 $0.00

Excel formulas:

  Rate
(Column C)
PV
(Column D)
Purchase Price
(Column E)
Difference
(Column F)
Row 12 0.04 =PV(C12,4,0,-18000) 15000 =D12-E12
Row 13 0.0466 =PV(C13,4,0,-18000) 15000 =D13-E13

If you can get more than 4.7% for your investment now, take the $15,000.

Comparing interest rates and maturity dates

Compare with different interest rates and maturity dates.
Compare two investments.png

Example 4

Which is better: $140,000 paid over the next 36 months or $160,000 paid over the next 60 months? Clearly $160,000 is better than $140,000 but what is the interest rate on the deferred funds to get the additional $20,000?[8]

Phrased differently, what is the interest rate for the first investment (36 months) to match the 60 month investment ($160,000)?

The interest rate where it would be worthwhile to take the $140,000 in 36 months is 14.90%.

How:

Find the interest rate where the present value of both investments are equal. In other words, make the present value of the two investments in the figure above equal height by adjusting the interest rate (ignore the FV height difference, the graph is easier to read this way). Adjust the interest rate for both investments simultaneously to find where the arrows align.

Let Excel do the work. Use the Goal Seek function (see Excel help for details) to set the value of Cell P11 to zero by adjusting Cell K11.

Displayed values:

Effective
Annual Yield
Nominal
Interest Rate
Monthly
Interest Rate
36 Month Investment 60 Month Investment Difference
15.96% 14.90% 1.24% $112,346.88 $112,346.88 ($0.00)

Cell Formulas:

  Effective
Annual Yield
(Column K)
Nominal
Interest Rate
(Column L)
Monthly
Interest Rate
(Column M)
36 Month Investment
(Column N)
60 Month Investment
(Column O)
Difference
(Column P)
Row 11 0.15957 =NOMINAL(K11,12) =L11/12 =PV(M11,36,-140000/36) =PV(M11,60,-160000/60) =N11-O11

There is an important assumption that shows why you need to be careful. Nowhere does it say that the interest is an annual rate! This problem is stated in months, and the solution is a rate per month.[8] That is how the PV() equation works. All time periods must be the same. If interpreted as annual rate, a significant error of 1.06% results.

There are two columns of interest here. Effective Annual Yield and Nominal Interest Rate, explained below. The Goal Seek function was used to find the annual yield, which flows into the monthly rate.

Comparing mortgages

Building on the above concepts, forum member jimb_fromATL has a comprehensive tutorial for calculating and comparing mortgages.

See: Bogleheads forum post: "Analytical solution for annual mortgage interest?"

Compounded interest rates

As shown in Example 4, the time period and type of interest (compounded[9] or simple) needs to be clearly defined. Use Excel to convert between an annual yield and the rate for the period of interest.

APR versus APY

There are two ways of expressing compound interest. Although the results are identical, how the interest rates are presented has implications for borrowers and lenders.[10] As defined below, Annual Percentage Rate (APR) is always a lower number than Annual Percentage Yield (APY).

  • Lenders, such as banks or other institutions, will quote the higher APY to entice customers. For example, bank savings accounts are advertised using APY, as customers are looking for the highest rates.
  • Borrowers looking for the lowest rates will be attracted to the lower APR. For example, mortgages and automobile loans use APR to entice borrowers with low rates.

To find the total interest paid over the life of a loan, use Excel's CUMIPMT() function, not FV().

Periodic interest rate

By definition, the periodic rate is the annual rate divided by the number of periods per year. So multiply the periodic rate by the number of periods per year to get the annual rate.[11] For example, if we have an annual interest rate and want to find the semiannual interest rate, just divide the annual rate by 2.

To determine the APY from the APR or vice versa, first compute the Periodic Interest Rate using one of the first two formulas below; and then compute the other using one of the next two formulas.

Period Interest Rate = APR / N
Period Interest Rate = (1 + APY)(1 / N) - 1

APR = Period Interest Rate * N
APY = (1 + Period Interest Rate)N - 1

Where:

APR = Annual Percentage Rate
APY = Annual Percentage Yield
N = number of compounding periods per year
    = 2 for semi-annual compounding, 4 for quarterly, 12 for monthly, 365 for daily

Note: Excel functions RATE and IRR return the periodic rate, while XIRR returns the annualized yield.[11]

Yield

Yield is defined as the return on an investment. It is computed by determining the interest rate that will make the present value of the cash flow from an investment equal to its price. This is shown mathematically as:

p = C1/(1 + y) + C2/(1 + y)2 + C3/(1 + y)3 + ... +CN/(1 + y)N

where

p = Price
Ct = Cash flow in year t
y = Yield (interest rate used to determine the price of the investment)
N = Number of years

If the equation is confusing, just remember that interest rate is used to determine the yield of an investment. For example, CDs often quote both the periodic interest rate and the effective annual yield. The higher interest rate is the effective annual yield.

The yield calculated above is also called the internal rate of return.[12]

Approximating the interest rate

More often than not, monthly interest rates are obtained from the effective annual yield by simply dividing by the number of periods. For example, a monthly interest rate is usually taken as the annual rate / 12.

For typical interest rates, simple multiplication is often close enough to the exponential equation. It produces the result with a lot less work if you do not have a calculator that can do exponential and logarithmic functions.

For example, 3% per year is 0.25% per month by division, and 0.246627% per month by the exponential formula - a difference of only 0.0034 percentage points.

Going the other way, 0.25% per month is 3% by multiplication or 3.041596% by exponential formula.

It is possible that using simple multiplication in certain contexts (such as monthly vs. annual interest rates) is traditional and dates back to the pre-calculator era.[11]

Consequences of approximation errors

Be careful when approximating interest rates for large amounts of funds over long periods of time.

For example, a home mortgage is available for an annual interest rate of 12%. However, it is not clearly stated whether the rate is compounded yearly or monthly. The difference is only

0.0511 % per month = 1 % (12% / 12) - 0.949% (NOMINAL(0.12,12)/12)

Compounding over 16 years results in an overpayment by the homeowner of several thousand dollars. For details, see Bogleheads forum post: "New in Wiki - Comparing Investments". The Excel file at the bottom of this page includes one suggested solution.

Example 5

Show the monthly interest rates for a given effective annual yield. Conversely, show the effective annual yield for a monthly interest rate.

Displayed values:

  Annual Yield
(Column K)
Nominal Monthly Rate   Monthly Rate
(Column N)
Effective Annual Yield
Row 22 10% 0.80%   2.0% 26.82%
Row 23 8% 0.64%   1.5% 19.56%
Row 24 6% 0.49%   1.1% 14.03%
Row 25 4% 0.33%   1.0% 12.68%
Row 26 2% 0.17%   0.5% 6.17%

Cell formulas:

  Annual Yield
(Column K)
Nominal Monthly Rate   Monthly Rate
(Column N)
Effective Annual Yield
Row 22 0.1 =NOMINAL(K22,12)/12   0.02 =EFFECT(N22*12,12)
Row 23 0.08 =NOMINAL(K23,12)/12   0.015 =EFFECT(N23*12,12)
Row 24 0.06 =NOMINAL(K24,12)/12   0.011 =EFFECT(N24*12,12)
Row 25 0.04 =NOMINAL(K25,12)/12   0.01 =EFFECT(N25*12,12)
Row 26 0.02 =NOMINAL(K26,12)/12   0.005 =EFFECT(N26*12,12)

Unequal payments

You can use the present value formula only if all payments are the same amount. Suppose you have a series of payments that vary every period? The theory is the same - sum the present value of the individual cash flows (payments). The only difference is that you need to use a present value function for each payment.

Example 6 - net present value

Suppose you have the opportunity to purchase an investment which promises to make the following payments every quarter (3 months, see table below). If a 12% interest rate is desired, what is the most that you should pay for it?

You should pay at most $8,212.79.[13]

How:

First, note that neither the type of interest nor the period of time is stated. For this problem, it is 12 % per year, but the quarterly interest is defined as 3% = 12% / 4. This is simple interest, no compounding is used.

Because the payments vary every 3 month period, you calculate the present value of each payment. Then, sum the payments to get the total present value. Excel already has a function that will do the individual calculations for you, called Net Present Value. Note that the answers match (Sum of Column F with Net Present Value in Cell G20).

Displayed values:

  Interest Rate
(Quarterly) (Column C)
3 Month Period
(Column D)
Payment
(Column E)
Present Value
(Column F)
Net Present Value
(Column G)
Row 20 0.03 1 1000 $970.87 $8,212.79
Row 21 0.03 2 1200 $1,131.12  
Row 22 0.03 3 1500 $1,372.71  
Row 23 0.03 4 1700 $1,510.43  
Row 24 0.03 5 1800 $1,552.70  
Row 25 0.03 6 2000 $1,674.97  
      Sum of Present Value: $8,212.79  

Cell formulas:

  Interest Rate (Quarterly)
(Column C)
3 Month Period
(Column D)
Payment
(Column E)
Present Value
(Column F)
Net Present Value
(Column G)
Row 20 0.03 1 1000 =PV(C20,D20,0,-E20) =NPV(C20,E20:E25)
Row 21 0.03 2 1200 =PV(C21,D21,0,-E21)  
Row 22 0.03 3 1500 =PV(C22,D22,0,-E22)  
Row 23 0.03 4 1700 =PV(C23,D23,0,-E23)  
Row 24 0.03 5 1800 =PV(C24,D24,0,-E24)  
Row 25 0.03 6 2000 =PV(C25,D25,0,-E25)  
      Sum of Present Value: =SUM(F20:F25)  

Internal rate of return

Both Present Value and Net Present Value assume that the interest rate is defined. If you only have the payments, how do you calculate the interest?

Not a problem. Just use the Internal Rate of Return function, IRR, to find the yield (internal rate of return). Finding the solution is somewhat more complicated and best left to Excel. Refer to Microsoft's help for information on the IRR function. Pay special attention to setting up the problem. The sum of the income and payments must be zero for the function to work.

For investments that are not periodic, where there are arbitrary contributions and withdrawals, use XIRR.

XIRR is the best and most accurate method for calculating your rate of return, if you know the dates you made your investment contributions and your withdrawals. This method is far more accurate than annual average returns, as contributions and withdrawals (cash flows) are weighted for both time and value.[14] See the Excel help file to understand how it works.

Notes

  1. Open Office Calc Financial functions. For example PV(rate; numperiods; payment; futurevalue; type) is identical.
  2. Calculating the present value is also referred to as discounting. The interest rate is referred to as the discount rate and present value is also known as discounted value.
  3. The graphs on this page are not from this text, but were derived by the wiki author. There are no spreadsheet programs used in this book- the examples are used to verify results from Excel.
  4. 4.0 4.1 From forum member dratkinson, via PM.
  5. See: Excel help for PV().
  6. From Understanding The Time Value Of Money, but extended to show the break-even point.

See also

References

  1. "Understanding the Time Value of Money". Investopedia. Retrieved September 10, 2023.
  2. Frank J. Fabozzi. Fixed Income Mathematics, Analytical & Statistical Techniques (3rd ed.). McGraw-Hill. p. 22. ISBN 978-0-7863-1121-7.
  3. Fabozzi, page 22.
  4. 4.0 4.1 4.2 "HP-12C Calculator User's Guide" (PDF). Retrieved September 10, 2023. Page 34. Financial Calculations and the Cash Flow Diagram (updated by wiki author for Excel)]
  5. "HP 12c Calculator - Time Value of Money (TVM) Calculation" (PDF). HP. Retrieved September 10, 2023.
  6. Fabozzi, page 25. Comments and detailed solution from forum member dratkinson via PM.
  7. Fabozzi, page 24. Detailed solution from forum member dratkinson via PM.
  8. 8.0 8.1 Bogleheads forum post: "$140,000 over 3 years or $160,000 over 5 years". February 11, 2010
  9. "Compounding Interest: Formulas and Examples". Investopedia. Retrieved September 10, 2023.
  10. "Compounding Interest: Formulas and Examples". Investopedia. Retrieved September 10, 2023.
  11. 11.0 11.1 11.2 Bogleheads forum post: "New in Wiki - Comparing Investments". March 13, 2010
  12. Fabozzi, page 34.
  13. Fabozzi, page 28.
  14. Bogleheads forum topic: "Using XIRR in Excel". March 3, 2010

External links

Cash flow diagrams

Excel functions

Microsoft's help files are well documented with working examples for each function. If using Open Office, Microsoft descriptions may be more informative. Enable browser cookies to view.

  • PV, Present Value.
  • NPV, Net Present Value
  • IRR, Internal Rate of Return
  • XIRR, Internal Rate of return for cash flows that are not periodic
  • Effect, Convert to Effective annual yield from the periodic rate
  • Nominal, Convert to Periodic interest rate from the effective annual yield
  • RATE, Interest rate per period of an annuity

Forum discussions