12
- 1 Introduction Overview Common Excel errors Systematic design method Auditing Summary 1 File: MFME2_01.xls

Mastering Financial Mathematics in Microsoft Excel Ch01

Embed Size (px)

DESCRIPTION

Mastering Financial Mathematics in Microsoft Excel Ch01

Citation preview

Page 1: Mastering Financial Mathematics in Microsoft Excel Ch01

­1

Introduction

Overview

Common Excel errors

Systematic design method

Auditing

Summary

1

File: MFME2_01.xls

Page 2: Mastering Financial Mathematics in Microsoft Excel Ch01
Page 3: Mastering Financial Mathematics in Microsoft Excel Ch01

1 · Introduction

­3

OVERVIEW

The book starts with an explanation of compounding a present and future value and builds up the calculations into net present value and internal rate of return. Other methods follow to analyse fixed income products, deriva-tives, foreign exchange, equities and leasing. Since Excel allows the layout of each stage of calculation, it is better suited to automating and displaying the results than traditional programming languages. Many users do not use the full functionality in Excel and while this is not a book on pure financial modelling, the models conform to design standards as in Mastering Financial Modelling and Mastering Risk Modelling. Excel should be used primarily for analysis, decision-making and communication rather than simple mathe-matics and the objectives should be:

OO reduction in the amount of development time needed;OO decreased repeat or extended calculations;OO prevention of coding, logic and other errors;OO easier updating, development and maintenance;OO clear communication through charts, tables and summaries.

The widespread use of Microsoft® Office means that most people (like you) have Microsoft® Excel as part of their desktop. However, consider the following:

OO Many companies do not appear to offer specific training in applied finan-cial modelling and solving problems in Excel.

OO Basic financial modelling courses often seem to show functions and methods without demonstrating how a series of methods and techniques can be combined to make more powerful and robust models.

OO Few business schools teach Excel as a core part of their curriculum, yet many junior analysts and corporate finance executives need the expertise in their first job placements.

OO Most corporate finance textbooks rely on calculator solutions rather than providing instruction on how to write simple spreadsheets to solve the problems.

With enough practice, people eventually achieve a certain standard in mod-elling through trial and error, however this means that many spreadsheet models often:

OO are incomprehensible except to the author;OO contain serious structural errors which remain undiscovered;OO are not able to be audited due to the lack of structure and rules;

Page 4: Mastering Financial Mathematics in Microsoft Excel Ch01

OO are not maintainable or flexible enough to be developed further due to a lack of confidence in the answer;

OO ultimately fail in their key objectives.

The inherent simplicity of Excel means that models can be written ‘on the fly’ with no thought to any of the above problems, however Excel is a sophis-ticated tool only if used properly. Given the importance in financial analysis, the use of Excel should be a core skill for managers to enable them to produce clear maintainable applications and be proficient in spreadsheet design.

COMMON­EXCEL­ERRORS

There have been many studies of spreadsheets in use by organizations and here are some questions that you could ask about your own or colleagues’ spread-sheets. If you can answer ‘yes’ to any of the questions, then you could examine the structure and some of the coding using the simple rules in the chapter.

OO Have you ever found an error in a spreadsheet long after it was finished?OO When you receive spreadsheets from others, do you find it hard to under-

stand the structure or know what to do next to obtain alternative answers?OO If you want to add extra functionality to a spreadsheet, do you have to

undertake major redesign?OO Do you wish that a spreadsheet could answer more complex problems?OO When did you or others last doubt the accuracy of the spreadsheets

you developed?

Since the majority of people using Excel are amateur programmers, there is a wide range of errors that can be categorized between high-level concep-tual errors and lower-level coding and method errors. Spreadsheets can be quick and dirty for individual use; however, many applications need to be reviewed or used by others. Types of spreadsheets that appear to be used are:

OO unplanned and uncontrolled leading in all directions;OO technical applications that are over-complex often with minimal

documentation;OO single user application what-if, risk, decision tree, probability and simu-

lation models;OO database and data analysis;OO ‘turnkey’ applications.

Nevertheless both experienced and new users make mistakes in Excel. Whether there are time pressures or a lack of thought about design, it is too easy to make simple errors. Here is a selection of common input errors:

Mastering Financial Mathematics in Microsoft® Excel

­4

Page 5: Mastering Financial Mathematics in Microsoft Excel Ch01

1 · Introduction

­5

OO No clear layout with areas split into inputs, calculations, outputs, reports and explanation. Where calculations and inputs are mixed, it is hard to understand how to change inputs easily.

OO No specific colour or marking for inputs. My spreadsheets use a blue, bold font with a turquoise background and many other people do too.

OO No styles, borders or shading to mark the different areas of the sheet.OO No use of more advanced features, such as validation, names, comments,

views and protection.

Where there is no organization in a file, it makes it difficult to understand and maintain. Similarly, there are typical calculation problems, which, if present, can reduce the confidence in the answers. Here are some examples:

OO Cell formulas are overwritten with numbers and hard coded so that users cannot be sure that changes will cascade through a model. A lack of con-sistency means that, from experience, there are likely to be more errors in a model.

OO Mixture of number formats with no consistency on percentages or numbers of decimal places. Cells contain a mixture of numbers and formulas. For example, hard coded corporate tax =C5 * 0.30. You could change the tax rate by performing an edit replace through the file provided that some-body has not changed 0.30 to another number such as 0.305. The 0.30 should be variable in an inputs area and this reference used in the formula.

OO Where there is more than one formula per line, this can also cause con-fusion. For example, the columns for January, February and March contain one formula and then the formula inexplicably changes in April. Sometimes users make formulas impossibly complicated as if it is some kind of competition where it could be advantageous to show workings not shown separately or break down the calculations.

OO There is a wide range of built-in functions and procedures in add-ins such as the Analysis ToolPak and it is usually preferable to use the functions in order to reduce the volume of required code. Since Excel is an analysis tool, some users do not take advantage of the procedures to obtain clearer management information.

OO Procedures such as data tables, sensitivity analysis, scenario manager, report manager, custom views, advanced charting, pivot tables, database queries and Microsoft® Office connectivity can improve the quality of information.

OO Many users do not document their work or provide some explanation of how to use the model or the range of permitted results.

This is not an exhaustive list of Excel errors, but shows the weakness of an unplanned approach with the consequent sub-optimization in the eventual model.

Page 6: Mastering Financial Mathematics in Microsoft Excel Ch01

Mastering Financial Mathematics in Microsoft® Excel

­6

SYSTEMATIC­DESIGN­METHOD

There are many ways of designing spreadsheets with no right or wrong answer. While the previous section includes practices that many users would agree produce weak and error-prone models, there is no accepted method adopted by the majority of spreadsheet users. Some modelling methods use complicated rules, however the objective should be a distinc-tive simple repeatable style. The basic method used in this book is one that I have developed over the last 20 years. I have found that it works so that models can be developed rapidly while reducing the incidence of errors. Some aspects are:

OO Defined colour coding of cells.OO Specific areas for inputs, calculations, outputs, summaries, etc.OO Simplicity with no long formulas or nested IF statements.OO As little hard code as possible with formulas cascading through workbooks.OO One formula per row or column across sheets.OO No mixed formulas and numbers in cell formulas.OO Standard number formats.OO Formulas refer to cells to the left or above like a book rather than an

illogical flow of information.OO Multiple sheets with a modular design rather than sheets with multiple

reports or sub-schedules.OO Standard schedule and model layouts with menu sheets, version numbers,

author names and full explanation and documentation.

The simplest way of showing the difference is to take a poor model and demonstrate the difference in the model when properly formatted. This is a simple cash flow and discounting valuation model where cash flows grow each year for five years. At the end of the period, the company is valued at a multiple of the earnings before interest, tax, depreciation and amortization (EBITDA) (see Figure 1.1). The cash flows are then discounted at 10.0 per cent to a present value. The methodology is covered in more detail in later chapters; however, the model is difficult to understand since all the vari-ables are hard coded into the cells. If you want to increase the growth rate or reduce the discount rate it is hard to know what to do next. If you go to Formulas, Formula Auditing, Show formulas you can show the formulas quickly (or Control +' or use search Help for Formula Auditing Mode). Figure 1.2 reveals the mixture of numbers and formulas in the cells.

Page 7: Mastering Financial Mathematics in Microsoft Excel Ch01

1 · Introduction

­7

An alternative method using third-party audit software produced by Systematic Finance (www.financial-models.com) is to match patterns in the cells by use or function (see Figure 1.3). The colour scheme is visible on the Excel model and the key to the function is:

OO Blue denotes text cells or labels (cell B6).OO Crimson marks numbers cells (cell C5).OO Beige shows all formulas (cell H9).OO Orange is reserved for mixed formulas which require attention since

mixed formulas can be difficult to maintain (cell E6).OO Green cells show complex formulas with more than a defined number of

characters.OO Bold is used to mark row differences where a formula changes across a

line (cell E11).OO Turquoise shows errors such as DIV/0 Patterned blue bold marks

unlocked cells (there are none on this initial model).

Figure­1.1Initial­model

Figure­1.2Show­formulas

Page 8: Mastering Financial Mathematics in Microsoft Excel Ch01

­8

The solution to this simple model is to extract all the inputs and rework the model into sections with colour coding (see Figure 1.4). This means that any user can immediately see all the inputs and follow the information flow through to the answer and summary. As a model grows in size, these small sections would be developed as separate sheets; however, a user can under-stand a model more quickly if there is a consistent style and approach.

The revised model (see Figure 1.5) follows this approach. The individual factors are replaced with a single function and a management summary is available near the inputs. More techniques or layers are possible since a user can have confidence that the inputs flow directly through the calculations

Figure­1.3 Pattern­match

Figure­1.4 Revised­model­layout

Mastering Financial Mathematics in Microsoft® Excel

Page 9: Mastering Financial Mathematics in Microsoft Excel Ch01

1 · Introduction

­9

to the answer. If sensitivity, scenario analysis, or some form of optimization or simulation technique is required, this can be added efficiently as an extra module without fundamental redesign.

The pattern matching reveals the consistency with the removal of mixed formulas and the marking of formula column changes. The input cells are the only unlocked cells on the sheet and the inputs are used in the calcula-tions in Figure 1.6. This is a simple example; however, the same methods are used in all the models developed for this book.

Figure­1.5Revised­model

Figure­1.6Revised­pattern­match

Page 10: Mastering Financial Mathematics in Microsoft Excel Ch01

Mastering Financial Mathematics in Microsoft® Excel

­10

AUDITING

While it is important to set the models out correctly, model auditing is often ignored or performed inadequately. Simply looking at the model will not find the errors and it is important to work from a position of assuming that there are errors in a model and applying consistent methods. A system-atic organized approach is required. There are a few initial tests that can be run to try to understand the reliability of the output. You can use these tests to understand the spreadsheets in this book. Instances that need to be checked carefully include:

OO formulas not copied correctly across multiple ranges;OO inconsistent references used in formulas;OO sum over wrong range or sheets result is used;OO mixed numbers and formulas;OO relative and absolute references with cell locking (F4) not applied correctly;OO unit errors where percentages and numbers are used interchangeably;OO functions such as LOOKUP, MATCH and INDEX can produce errors if the

ranges are not carefully chosen.

Some initial methods for checking the spreadsheet in this book include:

OO Manual review looking at the reasonableness of the answers and interim calculations. For example, you can always select a range and press F11 to produce a chart directly. If you expect a downward or linear relationship charting can assist in showing errors.

OO Showing formulas or formula auditing mode used earlier (Formulas, Formula Auditing) helps to demonstrate consistency and also pro-vides a visual ‘quality score’ on the spreadsheet.

OO Audit toolbar (see Figure 1.7) allows you to trace precedents and depend-ents to a specific cell or range.

The arrows show the cells that build up the answer in cell C19 by clicking the second left-hand icon for each stage. The next arrow allows you to hide each stage. The next two arrows do the same for dependents and the icon with three arrows removes all arrows. If you have Excel XP or later, other icons allow you to display formula watches similar to other programming languages or evaluate formulas (see Figure 1.8). As you click Evaluate, each number or formula is transformed to its interim result. This is especially useful for working through nested IF statements where you are not sure of the progress of the logic.

Page 11: Mastering Financial Mathematics in Microsoft Excel Ch01

1 · Introduction

­11

OO Other extras include options such as Formulas, Formula Auditing, Error Checking. Figure 1.9 lists the rules that you either accept or unclick. You can then run tests on a sheet using com-mands under Office Button, Excel Options, Formulas. While this method will find many errors, you cannot rely on it to find all the mixed or inconsistent formulas.

Figure­1.7Audit­trace­arrows

Figure­1.8Evaluate­formula

Page 12: Mastering Financial Mathematics in Microsoft Excel Ch01

­12

Figure­1.9 Error­checking­options

The following chapters outline financial mathematics in Excel and try to make the models more understandable by using a specific design method. It is easier to produce unstructured and hard-to-understand models in Excel. This chapter sets out a few pointers to design such as layout or colour coding and shows the advantages of this approach. By repeating the same consistent design method, the quality and reliability of models improves and this reduces development and audit time.

SUMMARY

Mastering Financial Mathematics in Microsoft® Excel