The Art of Modeling with Spreadsheets - Cal...

21
The Art of Modeling with Spreadsheets Chapter 4: Hillier and Hillier

Transcript of The Art of Modeling with Spreadsheets - Cal...

Page 1: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

The Art of Modeling with Spreadsheets

Chapter 4: Hillier and Hillier

Page 2: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Agenda

Case Study: The Everglade Golden Years Company

Process of Modeling with Spreadsheets Guidelines for Good Spreadsheets Debugging the Spreadsheet

Page 3: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

The Everglade Golden Years Company

The Everglade Golden Years Company has a short-term cash flow problem.

It must decide on a borrowing strategy to optimize its long-run net cash flow at the end of year 2012.

The two components that Everglade can use in its borrowing strategies are: – One year short-term loans – Long-term loans

Page 4: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

The Everglade Golden Years Company Cont.

Terms of the short-term loan – Interest and principle paid at the end of the year – Interest rate: 10% APR – Loan can be taken out in any year

Terms of the long-term loan – Ten year loan – Interest is paid on the loan each year – Principle is paid back after the ten year period with no

prepayment possible – Interest rate: 7% APR

Page 5: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

The Everglade Golden Years Company Cont.

Everglade would like to maintain a cash balance each year of $500,000

Everglade has a $1,000,000 in its bank currently

The projected net cash flow for Everglade is given on the next slide.

Page 6: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

The Everglade Golden Years Company Cont.

Year Projected Net Cash Flow ($ Mil.)

Year Projected Net Cash Flow ($ Mil.)

2003 -8 2008 3

2004 -2 2009 -4

2005 -4 2010 7

2006 3 2011 -2

2007 6 2012 10

Page 7: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Process of Modeling with Spreadsheets

Four major stages when building a spreadsheet model: – Planning Stage – Building Stage – Testing Stage – Analysis Stage

Page 8: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Planning Stage

Visualize and diagram the process you are trying to model – It can be very useful to put together a visual sketch of

what processes are occurring in your model – This is a conceptual drawing of the process you are

modeling Calculate by hand answers for different

components by hand – This will allow you to see what is going on at each

component within your model

Page 9: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Planning Stage Cont.

Sketch a spreadsheet that represents the visual diagram you developed – This should be a visual sketch of the

spreadsheet that only has important components that come from your visual sketch

Page 10: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Diagram of Everglade’s Model

BankTake No Loan

Year i

BankTake Short-Term Loan

Year i

BankTake Long-Term Loan

Year i

Ending Cash FlowYear i

Goal:Maintain $500K

Goal:Highest Net Cash Flow in Year 2013

Beginning Cash FlowYear i

Page 11: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Spreadsheet Diagram of Everglade’s Model

L-T Rate

S-T Rate

Start Balance

Minimum Cash

Year Cash Flow

L-T Loan

S-T Loan

L-T Interest

S-T Interest

L-T Payback

S-T Payback

Ending Balance

Minimum Balance

2003

2007

2012

2013

Page 12: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Building and Testing Phase

The building and testing phase are intertwined with each other.

Usually there will be many iterations within the building and testing stage.

If the spreadsheet model has any complexity, you will want to build and test a small version of the model. – This is useful when your spreadsheet has a time

component or when it has many modules used for calculations.

Page 13: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Building and Testing Phase Cont.

Once you have a small working version of the spreadsheet model, you want to build and test the full-scale version. – If you put together a small spreadsheet model

that was representative of the model needed to solve the problem, it should be fairly straight forward to expand to the full-scale model.

– When testing the model, you should try to put in data that you know the answer to.

Page 14: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Analysis Stage

In the analysis stage, you will take the spreadsheet model and use it to examine the question at hand.

This is when you use the Solver tool to find the optimal answer.

In this stage you are doing the ultimate test of the spreadsheet model. – If the spreadsheet does not give satisfactory answers,

you may have to return to the building stage.

Page 15: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Guidelines for Building Good Spreadsheets

Enter the data first – Since the data can dictate the structure of the

spreadsheet model, it is valuable to input the data in the spreadsheet first.

– This can also allow you to build the spreadsheet to closely resemble the structure of the data.

Organize and clearly identify the data – Data should be grouped together in a convenient

format. – Each piece of data or group of data should be

appropriately labeled.

Page 16: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Guidelines for Building Good Spreadsheets Cont.

Enter each piece of data into one cell only – If you need to use the data elsewhere in the model, you

can reference it. Separate data from formulas

– If possible, formulas should have no specific parameters encoded in them.

– By keeping the data separate from formulas, you can save time when changes are needed by only having to change one parameter rather than looking for all the formulas that use a specific piece of data.

– This allows all the data to be visual in the spreadsheet.

Page 17: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Guidelines for Building Good Spreadsheets Cont.

Keep it simple – You should avoid more powerful functions when

simpler ones will accomplish the same task. – Keep formulas simple.

• If you have a very complicated formula, you should break it up into components on the spreadsheet.

Use range names – Range names should be indicative of what they

represent. – When using range names, care should be taken not to

allow too many range names so the names become unwieldy.

Page 18: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Guidelines for Building Good Spreadsheets Cont.

Use relative and absolute references to simplify copying formulas – This also allows you to copy cells without

making as many errors. Use borders, shading, and colors to

distinguish between cell types – This will make it easy for you to keep track of

the items within your spreadsheet model.

Page 19: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Guidelines for Building Good Spreadsheets Cont.

Show the entire model on the spreadsheet – You should attempt to put as many of the

elements of the model on the spreadsheet. • This will allow others to more easily understand

your model. • This will allow people using the spreadsheet to more

easily understand the Solver dialog box.

Page 20: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Debugging a Spreadsheet Model

Toggle – By using CTRL~, you can toggle between the results of

cells and the formulas in the cells. – This will allow you to look at multiple formulas at

once. Excel’s Auditing Toolbar

– Excel has an Auditing tool that allows you to examine precedent cells and dependent cells.

– This tool can be useful to you by visually showing you how the cells are interconnected.

Page 21: The Art of Modeling with Spreadsheets - Cal Polyagribusiness.calpoly.edu/shurley/agb435/agbus-435-lec4-w11.pdf · Agenda Case Study: The Everglade Golden Years Company Process of

Debugging a Spreadsheet Model Cont.

Divide and Conquer – This is a method that requires that you breakup

the model into components and test each component to find errors.

– It is a valuable method for debugging spreadsheet models.