Using Excel and VBA CHANDAN SENGUPTA SECOND EDITION. WILEY John Wiley & Sons, Inc.



Similar documents
Explore commands on the ribbon Each ribbon tab has groups, and each group has a set of related commands.

NAVIGATION TIPS. Special Tabs

Microsoft' Excel & Access Integration

DESKTOP PRODUCTIVITY SOFTWARE

Microsoft Excel Training - Course Topic Selections

ESSENTIAL TOOL FOR ACCOUNTANTS MICROSOFT EXCEL TM JEFFERSON HASKINS CPA

Excel 2007 Tutorials - Video File Attributes

Rows & Columns. Workbooks & Worksheets

ARIS Design Platform Getting Started with BPM

Microsoft Office 2010: Access 2010, Excel 2010, Lync 2010 learning assets

Task Force on Technology / EXCEL

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

How To Model Money In An Excel 3D Program

Corporate Valuation Modeling

3 What s New in Excel 2007

By: Peter K. Mulwa MSc (UoN), PGDE (KU), BSc (KU)

Excel 2010: Create your first spreadsheet

Training Needs Analysis

Microsoft Office Access 2007 Basics

To reuse a template that you ve recently used, click Recent Templates, click the template that you want, and then click Create.

Professional. SlickEdif. John Hurst IC..T...L. i 1 8 О 7» \ WILEY \ Wiley Publishing, Inc.

Microsoft Office Word 2010: Level 1

Introduction to Financial Models for Management and Planning

Overview of sharing and collaborating on Excel data

Excel 2003 Tutorials - Video File Attributes

Basic Microsoft Excel 2007

A Simulation-Based lntroduction Using Excel

Programming in Access VBA

Search help. More on Office.com: images templates. Here are some basic tasks that you can do in Microsoft Excel 2010.

USC Marshall School of Business Marshall Information Services

ADVANCE EXCEL. Advance Excel with Formulas. Advance Excel Training

WHAT S NEW IN MS EXCEL 2013

How to Use Excel for Law Firm Billing

Computer Applications (10004)

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Tommy B. Harrington 104 Azalea Drive Greenville, NC

Accounting & Financial Modeling Liberal Arts Boot Camp Overview

Advanced Excel 10/20/2011 1

The Complete Guide to Option Strategies

Excel Reports and Macros

MAS 500 Intelligence Tips and Tricks Booklet Vol. 1

Word 2010: Mail Merge to with Attachments

Option Valuation. Chapter 21

Excel Database Management Microsoft Excel 2003

Excel 2007: Basics Learning Guide

Course Contents For All : Advance Excel & VBA Macros

Quick Start Guide. Microsoft Access 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

MICROSOFT EXCEL 2010 ANALYZE DATA

Microsoft Office Series

Getting Started with Excel Table of Contents

03 The full syllabus. 03 The full syllabus continued. For more information visit PAPER C03 FUNDAMENTALS OF BUSINESS MATHEMATICS

Microsoft Excel 2013: Macro to apply Custom Margins, Titles, Gridlines, Autofit Width & Add Macro to Quick Access Toolbar & How to Delete a Macro.

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

Online Courses. All online courses are available in sections. Ideal as pre-matriculation requirements or assigned coursework

This chapter is completely devoid of any hands-on training material. It

Construction Administrators Work Smart with Excel Programming and Functions. OTEC 2014 Session 78 Robert Henry

Training. Class Room & Online Training. Advance Finance Training Equity Valuation. JPFIS.com. to change the course of your career

To create a histogram, you must organize the data in two columns on the worksheet. These columns must contain the following data:

Introduction to Windchill PDMLink 10.0 for Heavy Users

Microsoft Office Topics per Course

Microsoft VBA Programming

Monte Carlo Simulation. SMG ITS Advanced Excel Workshop

Financial Data Access with SQL, Excel & VBA

Third Edition. Philippe Jorion GARP. WILEY John Wiley & Sons, Inc.

Indiana County Assessor Association Excel Excellence

Introduction to Windchill Projectlink 10.2

Windchill PDMLink Curriculum Guide

Quick Start Guide. Microsoft Access 2013 looks different from previous versions, so we created this guide to help you minimize the learning curve.

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

Spreadsheet Modelling

ACTUARIAL MATHEMATICS FOR LIFE CONTINGENT RISKS

v. Other things held constant, which of the following will cause an increase in working capital?

Overview What is a PivotTable? Benefits

Microsoft Excel 2013: Using a Data Entry Form

Sample- for evaluation purposes only! Advanced Excel. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP

EXCEL VBA ( MACRO PROGRAMMING ) LEVEL SEPTEMBER AM-5.00PM MENARA PJ@AMCORP PETALING JAYA

EXCEL FINANCIAL USES

PRINCIPLES OF DESIGNING AND DEVELOPING SPREADSHEET-BASED DECISION SUPPORT SYSTEMS

COPAL INSTITUTE S ONLINE CERTIFICATE COURSES From the leading player in Financial Services outsourcing industry

business statistics using Excel OXFORD UNIVERSITY PRESS Glyn Davis & Branko Pecar

Option Values. Determinants of Call Option Values. CHAPTER 16 Option Valuation. Figure 16.1 Call Option Value Before Expiration

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

Highline Excel 2016 Class 26: Macro Recorder

Microsoft Excel Step by Step. Curtis D. Frye

Computer Skills: Levels of Proficiency

How To Write Tvalue Amortization Software

TABLE OF CONTENTS ABSTRACT ACKNOWLEDGEMENT LIST OF FIGURES LIST OF TABLES

Excel for Data Cleaning and Management

Financial Planning and Analysis Using Excel

Financial Analysis Certificate by Distance Learning

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

PivotTable and PivotChart Reports, & Macros in Microsoft Excel

Release Document Version: User Guide: SAP BusinessObjects Analysis, edition for Microsoft Office

CalPlanning. Smart View Essbase Ad Hoc Analysis

ORACLE ESSBASE SPREADSHEET ADD-IN RELEASE ONLINE HELP

BAT Smart View for Budget Users. Miami-Dade County. BAT Smart View Training Activity Guide

Options: Valuation and (No) Arbitrage

Creating Reports with Smart View s Ad Hoc Analysis

Transcription:

Using Excel and VBA SECOND EDITION CHANDAN SENGUPTA WILEY John Wiley & Sons, Inc.

Contents About This Book CHAPTER 1 Introduction to Hnancial Analysis and Modeling 1 Steps in Creating a Model 5 How This Book Is Organized 9 xix Part One Excel for Financial Analysis and Modeling CHAPTER 2 Excel 2007 and the Previous Versions The New Features in Excel 2007 The New User Interface The Office Icon The Ribbon The Quick Access Toolbar (QAT) and Customizing It The Shortcut Menus and the Mini Toolbar Finding Some of the Old Tools and Dialog Boxes Other New Features PivotTable Table Professional Quality Charts Conditional Formatting AutoComplete for Entering Formulas One Integrated Function Library Styles and Themes A Much Larger Grid Page Layout View Consolidated Options New File Formats in Excel 2007 15 15 16 17 17 18 19 19 19 20 20 21 21 21 22 22 22 23 23 23 vii

CONTENTS CHAPTER 3 Excel Basics Improving Your Excel Skills Saving Your Workbooks Using Excel's Online Help Learning Excel Features The Basic Excel Features Keeping Your Workbooks and Related Files Organized Naming Workbooks and Worksheets Finding the Commands You Need Working with Worksheets Working with Rows, Columns, and Cells Using the Toolbars Using Keyboard Shortcuts Navigating the Worksheet Formatting Entering and Working with Formulas Using Paste Special Controlling the Worksheet View Using Undo and Redo Customizing the Excel Work Environment Controlling When Formulas Are Calculated Printing Creating Charts Working with More Than One Workbook Using the Scroll Lock 25 26 26 28 32 32 32 33 33 33 34 34 34 36 36 37 37 38 38 38 39 39 40 40 41 CHAPTER 4 Advanced Excel Features Copying Formulas Using Absolute and Relative Cell References Creating Names for Cells and Ranges Using Names in Formulas Al and R1C1 Reference Styles Using Comments in Cells Data Validation Controls Custom Number Formats Hiding and Protecting Custom Views Arrays and Array Formulas Outline 43 46 49 56 57 58 60 62 65 67 71 72 75

Contents ix CHAPTER 5 Making Oecisions and Looking Up Values Making Decisions Examples of Creating Decision-Making Formulas Looking Up Values Conditional Formatting 77 78 82 97 103 CHAPTER 6 Analyzing Databases The Mutual Fund Portfolio v Sorting Sorting on One Field Sorting Using Custom Lists Multiple Sort Filtering Filtering on a Single Column Filtering on Multiple Columns Combining Filtering and Sorting Tables Creating a Table Working with a Table Adding and Using a Total Row Removing Duplicate Data Rows from a Table Sorting and Filtering a Table Using Structured References with Tables PivotTable The Basic Structure of a Pivot Table Creating a Basic Pivot Table Formatting a Pivot Table Modifying Pivot Tables Grouping Fields Sorting and Filtering Pivot Tables Other Features of PivotTable 109 110 112 113 115 118 120 121 122 124 124 126 127 129 132 132 133 135 136 138 142 145 151 156 159 CHAPTER 7 Answering What-lf Questions Data Tables Scenario Manager 161 162 166 CHAPTER 8 Finding Iterative Solutions Circular Reference Goal Seek Solver 171 171 174 177

CONTENTS CHAPTERS CHAPTER 10 CHAPTER 11 Doing Statistics! Analysis Descriptive Statistics Frequency Distributions and Histograms Counting, Ranking, and Calculating Quantiles Normal Probability Distributions Random Numbers Statistical Tests Using the Hnancial Frictions Annuity Functions Investment Analysis Functions Bond Functions Depreciation Functions Other Useful Excel Functions Mathematical Functions Truncating and Rounding Numbers Logarithms Other Mathematical Functions Date and Time Functions Text Functions Information Functions 185 187 192 195 203 207 218 221 221 228 232 237 243 243 243 246 246 248 251 254 Part Two Financial Modeling Using EKcel CHAPTER 12 Building ted Excel Models and Debugging Them Attributes of Good Excel Models Documenting Excel Models Common Ways to Document Your Excel Model Debugging Excel Models Errors Excel May Find for You Errors You Will Have to Find Yourself Using Formula Auditing Tools for Debugging The Formula Auditing Tools Learning Modeling Using Excel The Four Learning Tracks 257 257 260 260 262 263 264 265 266 267 267 CHAPTER 13 Financial Statements Forecasting Review of Theory and Concepts Step 1: Understand the Expected Uses of the Model Step 2: Collect Historical Data 271 271 272 272

Contents Ki Step 3: Understand the Company's Plans and Develop a Comprehensive Set of Modeling Assumptions 273 Step 4: Build the Model and Debug It 275 Step 5: Improve the Model Based on Feedback 276 The Level of Detail in a Model 277 The Statement of Cash Flows 277 Free Cash Flow 279 Modeling Examples : 281 Model 1: Historical Financial Statements 281 Model 2: Common Size Statements 288 Model 3: Financial Indicators 290 Model 4: Financial Statement Forecasting with Unbalanced Balance Sheet 293 Model 5: Financial Statement Forecasting, Version 1 300 Model 6: Financial Statement Forecasting, Version 2 303 Model 7: Financial Statement Forecasting, Version 3 305 Model 8: Financial Statement Forecasting, Version 4 308 Model 9: Financial Statement Forecasting, Version 5 310 Model 10: Financial Statement Forecasting, Version 6 311 Model 11: Financial Statement Forecasting, Version 7 314 Model 12: Financial Statements Sensitivity Analysis 319 Model 13: Financial Statements Scenario Analysis 321 Model 14: Calculating Free Cash Flow 323 CHAPTER 14 Time Value of Money 327 Review of Theory and Concepts 327 Present and Future Values 327 Investment and Project Evaluation 333 Constant Annuities 334 Growing Annuities 338 Modeling Examples 341 Model 1: Effect of Compounding Frequency 342 Model 2: Constant Annuities 344

Xii CONTENTS Model 3: Growing Annuities 348 Model 4: Loan Amortization Table, Version 1 351 Model 5: Loan Amortization Table, Version 2 354 Model 6: Loan Amortization Table for Changing Interest Rate 356 Model 7: Loan Amortization Table for Changing Annual Payment 359 Model 8: The Condominium Project 361 CHAPTER 15 Hnancial Planning and Investments 305 Review of Theory and Concepts 365 Some Basic Issues 365 Saving and Investing for Retirement 368 Structuring Portfolios 371 Modeling Examples 372 Model 1: Return with Changing Reinvestment Rates 372 Model 2: Saving for Retirement 376 Model 3: Retirement Planning in Real Dollars 379 Model 4: Retirement Planning in Nominal Dollars 380 Model 5: Portfolio Structuring 385 CHAPTER 16 Analyzing Market History 389 Review of Theory and Concepts 389 Indexes 389 Measuring Returns 390 Risk 394 Modeling Examples 394 Model 1: Calculating Total Returns 394 Model 2: Comparing Returns on Several Assets 397 Model 3: Comparing Nominal and Real Growth of Investment 400 Model 4: Comparing Rolling Period Returns 402 CHAPTER 17 Bond Pricing and Duration 409 Review of Theory and Concepts 409 Key Characteristics of Bonds 409 Bond Valuation 411 Risks of Bond Investing 413 Bond Duration 414 The Yield Curve and Forward Rates 415

fc. Contents Xiii Modeling Examples 416 Model 1: Yield Curve and Forward Rates 416 Model 2: Bond Pricing Using Yield to Maturity 418 Model 3: Bond Pricing Using the Yield Curve 420 Model 4: Bond Duration and Its Dependence on Yield to Maturity 422 Model 5: Dependence of Bond Duration on Remaining Life 424 CHAPTER 18 Simulating Stock Prices 427 Review of Theory and Concepts 427 Generating Random Numbers 437 Modeling Examples 438 Model 1: Estimating a Stock's Volatility, Version 1 438 Model 2: Estimating a Stock's Volatility, Version 2 440 Model 3: Simulating Stock Prices 442 Model 4: Lognormal Distribution of Stock Prices 445 CHAPTER 19 Options and Option Portfolios 449 Review of Theory and Concepts 449 Option Basics and Terminology 449 Payoffs of Options at Expiration 451 The Black-Scholes-Merton Equation for Option Valuation 452 The Greek Letters 455 Valuing American Options 458 Option on Other Assets 459 Option Portfolios 459 Modeling Examples 460 Model 1: Option Payoffs at Expiration 460 Model 2: Profit of Option Portfolios at Expiration 462 Model 3: Profit of Option Portfolios at Expiration (Using Array Formulas) 466 Model 4: BSM Model and the Greek Letters 469 Model 5: Variation of Option Price with Stock Price 472 Model 6: Variation of Option Price with Volatility 476 Model 7: Variation of Delta with Time to Expiration 478 Model 8: Leverage of Options 481 Model 9: Profit of Options Portfolio at Any Time 483

xiv CONTENTS CHAPTER 20 Binomial Option Pricing Review of Theory and Concepts Modeling Examples Model 1: European Options on Stocks with Known Dividend Yield Model 2: American Options on Stocks Paying No Dividend Model 3: American Options on Stocks with Known Dividend Yields Model 4: American Options on Stocks with Known Dollar Dividends 487 487 491 491 495 498 500 Part Three VBA for Financial Modeling CHAPTER 21 Introduction to VBA Why Learn VBA? Understanding Programs Example of a VBA Model Running the Model Analyzing the Model The Order of Statements Recording Macros Using VBA's Help Finding Help in Excel 2007 Finding Help in Previous Versions of Excel The Strategy to Learn VBA Efficiently 505 506 509 510 511 512 519 520 524 524 524 526 CHAPTER 22 VBA Essentials The Visual Basic Editor The VBE Window Using the Project Explorer Window Using the Code Window Setting VBE Options Some Basics Entering Code Running Procedures Organizing Procedures in Modules Line Continuation Multiple Statements in One Line Adding Comments Indenting Code Lines 529 530 531 532 534 534 535 535 536 537 537 538 538 539

Contents XV CHAPTER 23 CHAPTER 24 Operators Working with Text The MsgBox Function The InputBox Function The Stop and End Statements Variables, Constants, and Arrays Naming Variables Changing Variable Names Data Types! Declaring Variables ' Scope of Variables Constants Arrays Objects, Properties, and Methods Objects Properties Methods Branching If Statements Select Case... End Select Statement GoTo Statement Looping For... Next Statement Do... Loop Statements Nested Loops For Each... Next Statement The Exit Statements With... End With Statement Using Built-in Functions Sub and Function Procedures Sub Procedures The Structure of Sub Procedures Using Sub Procedures Function Procedures The Advantages of Function Procedures The Structure of Function Procedures Using Function Procedures Debugging VBA Codes The Four Basic Types of Bugs The VBA Debugging Tools 540 541 542 544 545 545 546 547 547 549 550 553 553 557 558 560 560 561 561 565 566 567 567 569 571 572 573 573 574 577 577 577 578 582 582 583 584 589 590 591

XVI CONTENTS Part Four Financial Moddiig Using BA CHAPTER 25 How to Build Oood VBA Models Attributes of Good VBA Models Documenting VBA Models Learning Modeling Using VBA Sketching the VBA Code The Three Learning Tracks 597 597 601 603 603 604 CHAPTER 26 Time Vaiue of Mmney 607 Review of Theory and Concepts 607 Solving Problems by Iteration 607 Modeling Examples 611 Model 1: Loan Amortization Table, Version 1 612 Model 2: Loan Amortization Table, Version 2 619 Model 3: Loan Amortization Table, Version 3 626 Model 4: Loan Amortization Table, Version 4 630 Model 5: Loan Amortization Table Using Goal Seek 634 Model 6: Loan Amortization Table Using Arrays 638 Model 7: MyPmt Function 643 Model 8: Loan Amortization Table Using the Bisection Method 646 Model 9: Loan Amortization Table for Changing Interest Rate 653 Model 10: Loan Amortization Table for Changing Annual Payment 658 CHAPTER 27 Financial Planning and investments Modeling Examples Model 1: Saving for Retirement, Version 1 Model 2: Saving for Retirement, Version 2 Model 3: Retirement Planning in Nominal Dollars, Version 1 Model 4: Retirement Planning in Nominal Dollars, Version 2 Model 5: Portfolio Structuring 663 663 666 668 674 680 CHAPTER 28 Analyzing Market History Modeling Examples Model 1: Nominal and Real Growth of $1 Investment in Stocks 691 691 691

Contents XVII Model 2: Growth of $1 Investment in Different Assets 700 Model 3: Comparing Rolling Period Returns 706 CHAPTER 29 Simulating Stock Prices Modeling Examples Model 1: Estimating a Stock's Volatility Model 2: Simulating Stock Prices 717 717 717 719 CHAPTER 30 Options and Option Portfolios Modeling Examples Model 1: Profit of Options Portfolio at Expiration Model 2: Option Pricing Using the BSM Equations Model 3: Implied Volatility of Options Model 4: Profit of Options Portfolio at Any Time 725 725 725 730 734 736 CHAPTER 31 Binomial Option Pricing Modeling Examples Model 1: European Options on Stocks with Known Dividend Yield Model 2: American Options on Stocks Paying No Dividend Model 3: American Options on Stocks with Known Dividend Yields Model 4: American Options on Stocks with Known Dollar Dividends 741 741 741 745 748 750 APPENDIX A APPENDIX B APPENDIX C Keyboard Shortcuts for Excel VBA Quick Reference Excel and VBA Built-in Functions 755 757 759 About the CD-ROM Index 777 781