Top Banner
Financial Modeling Lecture 2: Introduction to spreadsheets Fall 2017 Financial Modeling Fall 2017 1 / 25
25

Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

May 03, 2018

Download

Documents

phungdan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Financial Modeling

Lecture 2: Introduction to spreadsheets

Fall 2017

Financial Modeling Fall 2017 1 / 25

Page 2: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Content

Spreadsheet overview

Navigating a spreadsheet and crafting formulas

Using functions

Common errors in spreadsheet

From spreadsheet to model

Financial Modeling Fall 2017 2 / 25

Page 3: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Spreadsheet overview

Definition of spreadsheet: an electronic document in which data is arranged in the rows

and columns of a grid and can be manipulated and used in calculations.

Spreadsheet should be thought as a tool for thinking with numbers

There are many programs that can create and manipulate spreadsheets, but we will

use Excel

Financial Modeling Fall 2017 3 / 25

Page 4: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Navigating a spreadsheet and crafting formulas

Navigating a spreadsheet

Spreadsheets use cells to contain data.

Position of a cell is identified by the intersection of its column label (alphabet) and

row label (positive integer)

E.g. cell D7 where the column label is D and the row label is 7

Financial Modeling Fall 2017 4 / 25

Page 5: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Navigating a spreadsheet and crafting formulas (continued)

Types of data

You tell Excel what kind of data is in a cell by how you type it into the cell or by

how you format the cell

Data in Excel can fall into one of four categories.

Numbers: numeric data that can be used for calculation purposes.

Text: alphabetic or numeric data that is not used for calculation purposes

Dates and times: although dates and times may be considered text, there are

occasions where you might want to perform calculations on the values, so it is

important to identify the data correctly to Excel.

Formulas and functions: it’s important that Excel knows you’re entering a formula or

it will treat what you enter like text.

You can’t combine types of data in a cell. E.g. type “3 percent” and Excel will see

it as a text, you can either type 0.03 or 3 then format it as percentage (or type 3%)

Financial Modeling Fall 2017 5 / 25

Page 6: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Navigating a spreadsheet and crafting formulas (continued)

Types of data: examples

Note: to apply formulas and functions, you need to type “=” at the beginning of a cell

Financial Modeling Fall 2017 6 / 25

Page 7: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Navigating a spreadsheet and crafting formulas (continued)

Spreadsheet notation for mathematical operations on cells and arrays

On cells: start with (=), addition (+), subtraction (-), multiplication (*), division

(\), exponentiation (ˆ), use brackets to separate complex terms

On arrays

Array: a range of cells. E.g. A5:A11

We can perform calculations on an array or among arrays

To perform calculations on array(s), choose all cells in the array and press

Ctrl+Shift+Enter instead of just Enter

Financial Modeling Fall 2017 7 / 25

Page 8: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Navigating a spreadsheet and crafting formulas (continued)

Spreadsheet notation for mathematical operations on cells and arrays: examples

Note the difference between using calculations on arrays and on cells

If you calculate on cell, you type “Enter” to complete the formula

If you calculate on arrays (calculate E6:E9 simultaneously) , you choose E6:E9, then

type in the formula, then press “Ctrl+Shift+Enter” to complete the formula, and

you get ( { =})Financial Modeling Fall 2017 8 / 25

Page 9: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Navigating a spreadsheet and crafting formulas (continued)

Use shortcuts for copying data and formulas

It is important to differentiate between copying a value and copying a formula

Cell E14 contains a formula (=C14*D14) that produces a value (500).

Suppose you want to calculate the total value of other stocks, you can copy the

formula in E14 to E15, E16, E17. Note that sometimes we just want to copy a

value, then you should use the “paste” option in Excel

Financial Modeling Fall 2017 9 / 25

Page 10: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Using functions

Using built-in functions

Built-in functions are functions provided already in Excel (to compare with functions

we can create using Visual Basic )

For this course, we are mainly interested in basic financial, statistical and logical

functions

E.g. AVERAGE, MIN, MAX, SUM, IF, COUNT, PV, FV, NPV, IRR, etc.

Financial Modeling Fall 2017 10 / 25

Page 11: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Using functions (continued)

Using built-in functions: examples

Financial Modeling Fall 2017 11 / 25

Page 12: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Using functions (continued)

Using built-in functions: the conditional function IF

The IF function is one of the most popular functions in Excel, and it allows you to make

logical comparisons between a value and what you expect. In its simplest form, the IF

function says:

=IF(Something is True, then do something, otherwise do something else)

So an IF statement can have two results.

The first result is if your comparison is True

The second if your comparison is False

Financial Modeling Fall 2017 12 / 25

Page 13: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Common errors in spreadsheet

Understanding relative and absolute reference in formulas

A cell reference refers to a cell or a range of cells on a worksheet and can be used in

a formula so that Excel can find the values or data that you want that formula to

calculate.

E.g. Cell A1 contains value 1, cell A2 contains value 2. Then in cell A3, one can

type “=A1+A2”

Two types of cell references: relative and absolute

Relative references change when a formula is copied to another cell. Absolute

references, on the other hand, remain constant, no matter where they are copied.

Financial Modeling Fall 2017 13 / 25

Page 14: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Common errors in spreadsheet (continued)

Understanding relative and absolute reference in formulas: an example of relative

reference

Cell E14 references (points to) cells C14 and D14

Select cell E14, click on the lower right corner of cell E14 and drag it down to cell

E17 to copy the formula, thus allow us to calculate the total value for other stocks.

Financial Modeling Fall 2017 14 / 25

Page 15: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Common errors in spreadsheet (continued)

Understanding relative and absolute reference in formulas: an example of absolute

reference

To create an absolute reference to cell D14, place a $ symbol in front of the column

letter and row number of cell D14 ($D$14) in the formula of cell G14.

Select cell G14, click on the lower right corner of cell G14 and drag it down to cell

G17 to copy the formula, thus allow us to calculate the total value for other stocks.

Note that the reference to cell D14 is fixed when we drag the formula down

Financial Modeling Fall 2017 15 / 25

Page 16: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

Common errors in spreadsheet (continued)

Recognize errors in formulas: don’t start with “=”, lack of brackets, etc.

Identify and correct circular references (more on pro forma financial statement

forecast)

Financial Modeling Fall 2017 16 / 25

Page 17: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model

Organization and layout of model elements

Normally a model includes following elements:

Assumptions. E.g. fixed interest rate, constant growth rate, etc.

Decision variables: a set of quantities that model builders control. We manipulate

decision variables in search of values that help achieve model objectives.

E.g. The variable cost that makes break-even, the interest rate level that makes an

project acceptable, the weights allocated to assets in a portfolio to achieve a desired

return. etc.

Objectives and objective functions: a function that depends on decision variables

E.g. Net present value of a project is a function of interest rate, portfolio risk is a

function of weights allocated to each asset in the portfolio, etc.

Constraints (sometimes): a set of quantitative boundaries on decision variables and

they are normally expressed as functions of decision variables.

Financial Modeling Fall 2017 17 / 25

Page 18: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

Organization and layout of model elements: examples

Example 1: You have VND10M. What annual interest rate will you accept to lend so

that you will get VND12M after 3 years

Assumption: interest rate is fixed over the 3-year period

Decision variable: interest rate

Objective and objective function: CF3 = 10 ∗ (1 + r)3 = 12

Constraint: none

Financial Modeling Fall 2017 18 / 25

Page 19: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

Organization and layout of model elements: examples

Example 1: You have a portfolio of stocks A and B. What weights to invest in A and B

so that the portfolio risk is minimized, if you want to achieve a 10% portfolio return.

Assumptions: standard assumptions in portfolio theory such as no tax on portfolio

return, etc.

Decision variables: the weights in two stocks wA,wB

Objective: to minimize the portfolio risk which is represented by σ2p

Objective function: σ2p = w 2

A ∗ σA + w 2B ∗ σB + 2wAwBCovA,B

Constraints: no short sales (wA > 0,wB > 0), return is 10%

(wA ∗ rA + wB ∗ rB = 10%)

Financial Modeling Fall 2017 19 / 25

Page 20: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

What-if analysis

By using What-If Analysis tools in Excel, you can use several different sets of

decision variables’ values in one or more formulas to explore all the various results.

Access to What-If Analysis: Data → What-If Analysis

Financial Modeling Fall 2017 20 / 25

Page 21: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

What-if analysis: Scenario and Data Tables

Scenarios and Data Tables take sets of input values and determine possible results

E.g. change the interest rate (the decision variable) to 2%, 3%, 4%, ..., or 10% (9

values), what are the CF3s that correspond to these changes?

A Data Table works with only one or two decision variables, but it can accept many

different values for those variables

E.g. change wA,wB (2 decision variables) simultaneously to different values

(unlimited), then what are the changes in portfolio returns?

A Scenario can have multiple variables, but it can only accommodate up to 32 values

E.g. change the growth rate of revenue, the cost of equity, the cost of debt, the

capital structure (4 decision variables) simultaneously to different values (limited),

then what are the changes in enterprise value?

Financial Modeling Fall 2017 21 / 25

Page 22: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

What-if analysis: Goal Seek

Goal Seek works differently from Scenarios and Data Tables in that it takes a result

and determines possible input values that produce that result

E.g. You know how much money you want to borrow, how long a period you want

in which to pay off the loan, and how much you can afford to pay each month. You

can use Goal Seek to determine what interest rate you must secure in order to meet

your loan goal.

Financial Modeling Fall 2017 22 / 25

Page 23: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

What-if analysis: Goal Seek - example

Suppose interest rate is 5%, then the formula

to calculate required payment gives you 790.79.

Now if you can pay 900, then you can use Goal

Seek to find out which interest rate satisfies this.

−→

Financial Modeling Fall 2017 23 / 25

Page 24: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

From spreadsheet to model (continued)

Solver

Goal Seek works with only one variable input value (1 decision variable with 1 value)

If we want to determine more than one input value (multiple decision variables), we

use Solver

Solver also allows us to add constraints to the decision variables

Financial Modeling Fall 2017 24 / 25

Page 25: Financial Modeling Lecture 2: Introduction to spreadsheetsfmt.hanu.vn/en/pluginfile.php/18572/mod_forum/attachment/33175/lec... · Financial Modeling Lecture 2: Introduction to spreadsheets

End of Lecture 2

Financial Modeling Fall 2017 25 / 25