Financial Modeling in Excel Module 201201Advanced Excel
Instructor : Guruprasad Jambunathan Indian Institute of Quantitative Finance
Module I Agenda
Financial Modeling & Why Excel Mastering the building blocks
Hygiene factors Key Board shortcuts Formatting Formulae and Functions Specialised Excel Tools What-If Analysis
2 Indian Institute of Quantitative Finance
Financial Modeling
What is a financial model?
Represents the inter-relationship among financial variables in mathematical terms
Why a financial model?
Apart from establishing the relationship, financial model helps in extensive analysis Forecasting, what if analysis, stress testing
3 Indian Institute of Quantitative Finance
Financial Modeling
Spreadsheet based solution
Simplest and effective way to build a financial model is to present it in a s/sheet Flexibility of presenting in tabulated form Facilitates several operations with the data
Excel as the key spreadsheet
MS-Excel the commonly used spreadsheet Very powerful & flexible tool yet very user-friendly
4 Indian Institute of Quantitative Finance
Introducing Excel
Menu Bar Tool Bar
Sheets Tab
W/book W/sheet
Anything default that has to be changed Excel 2003: Tools Options; Excel 2007: Excel Options
5 Indian Institute of Quantitative Finance
Mastering the building blocks
Getting Started Hygiene Factors
Keep saving regularly Good to maintain several versions of the file Maintain files and support docs in an organised manner Use clear, descriptive names - files, folders & w/sheets Get familiar with Excel menus and tool bars Comment wherever appropriate Pick up keyboard shortcuts
6 Indian Institute of Quantitative Finance
Mastering the building blocks
Excel Keyboard Shortcuts
The Basics
Shortcut keys Ctrl + N Ctrl + O Ctrl + A Ctrl + B Ctrl + I Ctrl + U Ctrl + P Ctrl + S Action Opens a new Work Book Pops up Open Dialog Box Selects content of the entire sheet Bold Italic Underline Print Dialog Box Save a Work book
It is not necessary to master the shortcuts. But, knowing them helps save a lot of time and effort.
7 Indian Institute of Quantitative Finance
Mastering the building blocks
Excel Keyboard Shortcuts
Cell content manipulation
Shortcut keys Ctrl + C Ctrl + X Ctrl + V Ctrl + Z Ctrl + Y Ctrl + D Ctrl + R Ctrl + ; Ctrl + Shift + ; Action Copy Content of cells Cut Content of cells Paste Content of cells Undo last action Redo last action Copies formula down Copies formula to the right Enters current Date Enters current Time
Under Edit Paste Special (2003) and Paste Paste Special, several paste options are provided
8 Indian Institute of Quantitative Finance
Mastering the building blocks
Excel Keyboard Shortcuts
Selection and Insertion
Shortcut keys Ctrl + SpaceBar Shift + SpaceBar Ctrl + "+" Ctrl + "-" Alt + "=" Action Select the column of the Active Cell Select the row of the Active Cell Insert Dialog Box Delete Dialog Box Insers Auto Sum
Row height and Column widths can either be manually adjusted or optimised with a mouse click Multiple cells can be selected by clicking cells or range along with holding the Shift key
9 Indian Institute of Quantitative Finance
Mastering the building blocks
Excel Keyboard Shortcuts
Navigation
Shortcut keys Ctrl + Home Ctrl + End Ctrl + Arrow Keys Ctrl + Shift + Arrow Keys Ctrl + Page Up Ctrl + Page Down Ctrl + Tab Alt + Tab Action Takes to Cell A1 Takes to last used cell combination Moving to end of current series of cells Select the current series of cells Navigating across Work Sheets Navigating across Work Sheets Navigating across Work Books Navigating across Applications
Ctrl + Shift + Page Up or Page Down helps in selecting multiple sheets. Could be done easily with a mouse.
10 Indian Institute of Quantitative Finance
Mastering the building blocks
Excel Keyboard Shortcuts
Function Keys
Shortcut keys F1 F2 F5 F7 F9 F11 Action Help Dialog Box Edit content of selected cell GoTo dialog box Spell Check Evaluate part of the formulae Quick Chart
GoTo function has far wider application than a simple tool to go to a particular cell
11 Indian Institute of Quantitative Finance
Mastering the building blocks
Customising Excel You can customise the Excel screen Tools Options provide the needed tools
Changing standard number of sheets Changing font and font size Show/Hide Gridlines, Row/Column headers, scrolls Copying colour pattern from other sheets Calculation mode: Manual / Automatic
Under Excel 2007, part of these options reside under Excel Options, partly under various Menu items
12 Indian Institute of Quantitative Finance
Mastering the building blocks
Adding lines, colours, borders and shading
Although, it appears simple, one of the most crucial elements of model building Facilitates easy read and trouble-shooting
Working on the right format
Picking the right data type and presentation Be familiar with Paste Special / Format Painter Setting Print Area
Exercise 1
13 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You
Format the s/sheet in the manner as you deem appropriate Take care of the following:
Major Blocks like Total Assets and Liabilities stand out Various levels of information (categories and sub-categories) within Assets and Liabilities are easy to distinguish Decimal point presentation consistent Borders used to separate years of data Colours used consistently and legibly Numbering schemeQuantitative Finance Indian Institute of for easy reading of the data
14
Mastering the building blocks
Linking across worksheets Cell Referencing
Absolute reference Fixing row & column Relative reference Allowing row & columns to vary Hybrid reference Fixing either row or column as static; allowing the other to vary Function F4 key is used by toggle acrossfrontvarious Fixing of a row/column to placing $ in the referencing options: Absolute, Relative and Hybrid
15 Indian Institute of Quantitative Finance
Mastering the building blocks
Formulae
and Functions
Evaluation based on BODMAS rule Functions
Logical functions Statistical functions Financial functions Mathematical functions Look up functions Date and Time functions Text functions Information functions
Indian Institute of Quantitative Finance
B Brackets O Operators D Divide M Multiply A Addition S - Subtraction
16
Mastering the building blocks
Logical functions
IF (logical, True, False) Logical operators: =, <, >, <> Nested IF AND, OR, NOT
Exercise 2
17 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You Has the employee addition in Asia led to stronger sales in the region between 2008-09? Has the capex addition to the MENA region improved both the top line and the bottom line, 2005 vs. 2009? Has the CAGR sales growth been above 5% in all regions? Did the EBIT margin come under pressure in Europe in any of the years? Has the asset growth not run ahead of sales growth in USA in any of the years?
18 Indian Institute of Quantitative Finance
Mastering the building blocks
Statistical functions
Average, Median, Mode, Max and Min Count, Counta, Countblank, Countif Stdev and Var Sum, Sumif Rank, Rand Normdist, Norminv Covar, Correl
Exercise 3
19 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You What is the average daily return earned by the index? Is the median return greater than the average return? What can we say about the skewness of the distribution? What is the maximum and minimum daily return earned over last year? What proportion of days did the index open at days low?
20 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You What is the annual standard deviation of market return? What is the average return earned during periods of share trade volume exceeding 200mn? Is the proportion of days with negative returns lower than what is suggested by a normal distribution? Is the daily return correlated with change in daily traded volume?
21 Indian Institute of Quantitative Finance
Mastering the building blocks
Financial
functions
PV, FV, PMT, NPER, RATE NPV, IRR More to follow when we discuss bond valuation
Exercise 4
22 Indian Institute of Quantitative Finance
Mastering the building blocks
Mathematical
functions
Round, Roundup, Rounddown, Mround Ceiling, Floor Abs, Quotient, Mod, Sumproduct, Sqrt
Exercise 5
23 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You Which week in the year generated the highest number of sales order? Which week in the year generated the least amount of sales by value? What is the average sale price when units sold were greater than 40 units and the sale occurred in Q1 2010?
24 Indian Institute of Quantitative Finance
Mastering the building blocks
Lookup functions
Vlookup, Hlookup Index, match Row, column Indirect, address
Exercise 6
25 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You How many shares did the selected funds hold in Apr-Jul? Which fund held the maximum number of shares in Jun? How many shares does it hold and what is the fund rating? Do we see a pattern that higher rated funds on an average hold more shares of Bharti Airtel?
26 Indian Institute of Quantitative Finance
Mastering the building blocks
Date & Time functions
Date, day, month, year Today, now Weekday
Exercise 7
27 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You Which day of the week were the minimum number of units placed as orders? What were the total number of orders received between AprAug? What is the monthly returned earned by Nifty from Jan-Aug? (Data 2)
28 Indian Institute of Quantitative Finance
Mastering the building blocks
Text functions
Left, Right, Mid, Len Upper, Lower, Proper Find Trunc, Concatenate, Trim
Exercise 8
29 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You Can we use the available average daily turnover data directly for further analysis? What is the average trade turnover of each sector?
30 Indian Institute of Quantitative Finance
Mastering the building blocks
Information functions
Cell (info type, reference cell)
Cell type could be col, row, address, filename
Type as an info type
Exercise 6
31 Indian Institute of Quantitative Finance
Mastering the building blocks
Tools that make your life easier
Freezing of panes Window split Naming a range
No need to define and customise range every time Remains set for a workbook
Lets look at Exercise 6 to understand it better
32 Indian Institute of Quantitative Finance
Mastering the building blocks
Data validation
Helps to control the nature of values that a cell can take Most important use comes with the use of list, when we want values to be picked from a list
Exercise 9
33 Indian Institute of Quantitative Finance
Mastering the building blocks
Queries Ahead of You Create a chart of sales growth over the years Now, we would like to provide the freedom to the user to pick a growth ratio to chart. Once the user, picks a ratio, the relevant chart should be dynamically displayed Now let us say, we want to provide users with 2 options. First to select the category of ratios and based on that we want to display the various ratios in that category. The user would pick one such ratio to chart
34 Indian Institute of Quantitative Finance
Mastering the building blocks
Conditional Formatting
Purpose is what the name indicates Helps to identify outliers and those cells which you need to pay attention to Lets look at Exercise 9 again to understand it
We want to show growth below 10% in red We want to show a decline in margins in red
Exercise 9
35 Indian Institute of Quantitative Finance
Mastering the building blocks
Dynamic table / chart
One way of dynamic charts make table dynamic
Exercise 10
Lets say, we would like to chart the close price of the index over the last 30 days Lets say we give the decision on no. of days to the user
36 Indian Institute of Quantitative Finance
Mastering the building blocks
User Forms
Aids in presenting options to users attractively Lets look at Exercise 10 again
Exercise 10
Lets say we would provide users option button whether to show open, close, high or low price Next, we would provide a spinner for no. of days A check box to decide whether to include turnover data as well
In Excel 2007, User forms are located under Excel Options Popular tab Show Developer Tab
37 Indian Institute of Quantitative Finance
Mastering the building blocks
What if Analysis - Data Tables
Helps perform a sensitivity analysis of how a dependent variable change to changes in independent variable Under Data Table
Exercise 11
Lets say, we want to see how profits vary with change in selling price and variable cost (Set I) Given the current loan structure, a loan taker would like to know how will his EMI change with a change in interest rate and tenor (Set II)
In Excel 2007, Data Table is located under Data What if Analysis
38 Indian Institute of Quantitative Finance
Mastering the building blocks
What if Analysis Goal Seek
Given that target variable takes a particular value, we might see what should be the corresponding input variable value Under Tools Goal Seek
Exercise 11
Lets say, we want to see at what selling price would the seller breakeven (Set I) Assume the loan taker has an option of entering into a fixed rate loan of a flexible tenor and he would like to make an EMI payment of Rs.10000. What would be the optimal tenor?
In Excel 2007, Goal Seek is located under Data What if Analysis
39 Indian Institute of Quantitative Finance
Mastering the building blocks
What if Analysis Scenario Manager
Helps to work out what would be output value under various scenarios Tools Scenarios
Exercise 11
Lets say the best case scenario of interest rate be 6% and worst case be 8%, how will the EMIs vary (Set II) Lets say I believe the best case scenario for SP would be Rs.120, cost would be 60% of SP. Worst case would be Rs.90 and cost at 80% of SP, how would the profits look like (Set I)
In Excel 2007, Scenario Manager is located under Data What if Analysis
40 Indian Institute of Quantitative Finance
Mastering the building blocks
What if Analysis Solver
Its like an extension of Goal Seek Helps to evaluate a function with multiple constraints Tools Solver
Exercise 11
Lets say, the number of units sold is inversely proportional to SP. A 10% increase in SP would lead to 8% fall in demand. Assume the maximum production capacity is for 2000 units. What should be the SP to maximise profits? (Set I)
In Excel 2007, Solver Add-in needs to be added using Excel Options Add-Ins Manage Excel Add-Ins
41 Indian Institute of Quantitative Finance
Thank You
42 Indian Institute of Quantitative Finance