CS Capital Budgeting
CS Capital Budgeting
thirteen
Capital Budgeting
case study
OVERVIEW
This application has both deterministic and stochastic input. The stochastic input includes
the sales volume, the product development cost, and the time horizon. Since these values
are unknown, we prompt the user for the best case, worst case, and most likely values
they have. A triangular random variable analyzes the values that may occur between the
best case and worst case values. For this application, we want to generate a random
number from the triangular distribution for a given probability of this input. We therefore
model the inverse triangular distribution function; for a best case, a, worst case, b, and
most likely value, m, and a given probability, p, the formula is:
a≤m≤b
⎛ (b − a )(m − a ) p ⎞ m−a
F −1 ( p ) = a + ⎜ ⎟ , if 0 ≤ p ≤
⎝ 2 ⎠ b−a
⎛ (b − a)(b − m)(1 − p ) ⎞ m−a
F −1 ( p ) = b − ⎜ ⎟ , if ≤ p ≤1
⎝ 2 ⎠ b−a
The Triang function procedure takes as input the best case, worst case, and most likely
values and outputs a random number that is found from this triangular distribution for a
given probability.
We use this function to create values for this stochastic input during the simulation runs. In
each run, these values are updated and placed on a simulation calculation worksheet that
contains several formulas. The formulas are therefore updated with these new values, and
the run results are recorded.
'TIME HORIZON
NumYears = Triang(Time(i, 1), Time(i, 2), Time(i, 3))
Range(Range("Prod" & i & "NPV").Offset(-1, 0), Range("Prod" & i & "NPV") _
.Offset(-1, NumYears)).Name = "Prod" & i & "Time"
'SALES VOLUMES
For year = 1 To NumYears
Range("Prod" & i & "Start"). Offset(6, year + 1).Value = Triang (Sales(i, 1),
Sales(i, 2), Sales(i, 3))
Next
Range(Range("Prod" & i & "Start").Offset(6, NumYears + 2), _
Range("Prod" & i & "Start").Offset(6, 11)).ClearContents
'record NPV and profit to SimDetails
Range("DetailsStart").Offset(runs + 1, 2 * i - 1).Value = Range("Prod" & i &
"NPV").Value
Range("DetailsStart").Offset(runs + 1, 2 * i - 1).Offset(0, 1).Value = _
Application.WorksheetFunction.Sum(Range(Range("Prod" & i & "NPV").Offset(-2,
1), _Range("Prod" & i & "NPV").Offset(-2, NumYears)))
Next i
Next
The simulation calculations seek to determine the total profit and net present value (NPV)
of each product given its input values. The deterministic input values include the tax rate,
the discount rate, the labor cost, the variable cost, and the selling price. Using these
values as well as the stochastic values calculated for each run, the application calculates
the depreciation, the before tax profit, the after tax profit, the cash flow, and the NPV. The
simple formulas for these calculations appear in the table below; the NPV Excel function
calculates the NPV.
Before tax profit Labor Cost + Selling Price * Sales Vol – Variable
Cost * Sales Vol – Depreciation
After tax profit ((1-Tax Rate) * Before Tax Profit
Range(“Prod” & i & “Time”)… Range(“Prod1Time”) …
Cash flow
Prod. Devel. Cost After Tax Profit + Depreciation
Range(“Prod” & i & “NPV”)
NPV (NPVfunction using Discount
Rate and Time Horizon)
CS13.1.2 Input
This application requires two types of input: deterministic and stochastic. The deterministic
input is:
Tax rate
Discount rate
Labor cost
Variable cost
Selling price
Desired NPV
CS13.1.3 Output
This application has two types of output: output per product and overall, or comparative,
output. The output per product is:
Depreciation
Before tax profit
After tax profit
Cash flow
Actual NPV
CS13.2 Worksheets
This application requires five worksheets: the welcome sheet, the input sheet, the
simulation calculations sheet, the simulation details sheet, and the results sheet. The
welcome sheet contains the title, the description of the application, and the “Start” button.
(See Figure CS13.1.) The “Start” button on the welcome sheet prompts the user for the
input values and then displays the input sheet.
The input sheet stores the input values for each product entered by the user. (See Figure
CS13.2.) These input values are recorded from a user form, which we will describe in the
next section. This sheet stores the deterministic values for the labor cost, the variable
cost, the selling price, the tax rate, the discount rate, and the desired NPV. The stochastic
input is recorded by best, worst, and most likely values for the sales volume, production
development cost, and time horizon.
CASE STUDY 13 Capital Budgeting 5
The simulation details sheet records the NPV and total profit values for each product for
each run of the simulation. (See Figure CS13.4.) The application employs these values to
determine each product’s minimum, maximum, and average NPV and profit values, which
are stored on the results sheet.
CASE STUDY 13 Capital Budgeting 6
The results sheet displays each product’s minimum, maximum, and average NPV and
profit values in a table. (See Figure CS13.5.) It also uses the simulation details sheet
values to calculate the probability that the NPV will be greater than or equal to the desired
NPV provided by the user. The comparative, or overall, output shows which product has
the largest average NPV and profit values.
Welcome sheet Contains the application description and the “Start” button.
Stores the deterministic and stochastic input values for each
Input sheet
product.
Summary Calculates the simulation formulas to find the NPV and profit
Simulation calculations
values for each product. Formulas and results are updated for
sheet
new stochastic values for each run of the simulation.
Simulation details Records the NPV and profit values calculated for each product
sheet for each run of the simulation.
Shows the minimum, maximum, and average NPV and profit
values for each product, the probability that the NPV is greater
Results sheet
than or equal to the desired NPV for each product, and the
product with the best overall NPV and profit values.
Then, the user views an input form for each product he or she is comparing. (See Figure
CS13.8.) This form prompts the user for the deterministic and stochastic input; each set of
input values is grouped into a respective frame. Text boxes are used for all the data, and
the stochastic input text boxes are arranged in a tabular format since each requires a best,
worst, and most likely value.
CASE STUDY 13 Capital Budgeting 9
This same form is shown to the user for each product; therefore, the product number label
is updated for each product shown. Default values are provided for all the input, including
the product name. As the user enters the input values for each product, they are recorded
to the input sheet, which appears in the background. For example, in Figure CS13.9, the
input values have already been entered and recorded for the first two products on the
input sheet. The input form now prompts the user for the input values of the third product.
Input boxes For the number of products and the number of runs.
Figure CS13.9 The input form appears in front of the input sheet.
CS13.4 Procedures
We will now outline the procedures for this application beginning with the variable
declarations and initial sub procedures. (See Figure CS13.10.) The Main procedure is
called from the “Start” button. It calls the ClearPrev procedure to clear previous values and
tables from all the sheets. It then prompts the user with the two input boxes for the number
of products and the number of runs for the simulation. Notice that the error checking code
is used for both of these input boxes. ClearPrev then uses the number of products to re-
dimension some arrays and takes the user to the input sheet. Once the input sheet
appears, the Main procedure performs a loop to display the input form for each product.
The product number label on the form is updated in each loop along with the default value
of the product name.
The input form procedures record all of the input values on the input sheet. (See Figure
CS13.11.) Notice that the variable i used in the loop in the Main procedure to show the
input form is used in the input form procedures to determine on which row on the input
sheet values will be recorded. This variable also indexes the arrays to store the stochastic
input parameters. This code also performs some error checking to ensure that the value
for the time horizon worst case input is less than or equal to 10.
The Main procedure ends by calling the FormatSheets and RunSim procedures.
CASE STUDY 13 Capital Budgeting 11
The RunSim procedure performs the simulation calculations. (See Figure CS13.12.) For
each simulation run, each product’s production development cost, time horizon, and sales
volume values are updated with the triangular distribution function. The formulas on the
simulation calculation sheet are then updated, and the resulting NPV and profit values are
recorded on the simulation details sheet. When all of the runs are complete, the RunSim
procedure calls the CreateResults procedure.
CASE STUDY 13 Capital Budgeting 12
The Triang function procedure generates a possible value from the triangular distribution
function using the best case, worst case, and most likely case values as parameters. (See
Figure CS13.12.) These parameter values are passed to the Triang function procedure
using the corresponding arrays for product development cost, time horizon, and sales
volume. (Refer to Section CS16.1.1 for details about the triangular distribution function.)
The CreateResults procedure displays the results on the results sheet. (See Figure
CS13.13.) First, it first creates some dynamic range names on the simulation details
sheet. Then, with these range names, it finds the minimum, maximum, and average NPV
and profit values for each product. It next loops over all of the average NPV and profit
values to find the product with the best NPV and the product with the best profit.
CASE STUDY 13 Capital Budgeting 13
Figure CS13.12 The RunSim procedure and the Triang function procedure.
The FormatSheets procedure creates tables for each product on various sheets. (See
Figure CS13.14.) It begins by creating tables for each product on the simulation
CASE STUDY 13 Capital Budgeting 14
calculations sheet. It also creates some dynamic range names on this sheet; these names
are used in the formulas for the simulation calculations. FormatSheets then references the
input values from the input sheet on these new tables on the simulation calculation sheet.
It then creates columns for storing the simulation results on the simulation details sheet
and also updates some of its dynamic range names. Finally, it formats the results sheet by
creating the tables for each product to store the results. Notice that for each product,
tables are created by copying and pasting an initial table that is never cleared from the
sheet.
Initializes the application and prompts the user with the input
Main
boxes and the input form.
ClearPrev Clears the previous values and tables from all the sheets.
Summary
Record the deterministic input values to the input sheet;
Input form procedures record the stochastic input parameters to the input sheet and
the arrays.
Creates the tables for all the products on all the sheets;
FormatSheets
creates the dynamic range names.
Triang function Uses the triangular distribution function to generate values for
procedure the stochastic input.
Navigational For the “End,” “View Output Details,” “View Sim Calc,” and
CASE STUDY 13 Capital Budgeting 17
Figure CS13.16 The buttons on the results sheet; both “Re-solve” and “Return to Input”
lead the user to the re-solve options.
Figure CS13.18 The buttons on the input sheet; “Start Simulation” re-solves the
application.
CS13.6 Summary
In this application, the user can consider which of several possible future
products would be most beneficial to invest in.
This application requires five worksheets: the welcome sheet, the input sheet, the
simulation calculations sheet, the simulation details sheet, and the results sheet.
For this application’s user interface, we use navigational buttons, input boxes,
and a user form.
Several procedures in this application collect the input for the model and solve
the model by running a simulation.
The user can re-solve this application by pressing the “Re-solve” button on the
results sheet or the “Start Simulation” button on the input sheet.
CS13.7 Extensions
Add to the results sheet the product that has the highest probability of having a
NPV greater than or equal to the desired NPV.
Add histograms to the results sheet that illustrate the frequency with which each
product’s profit and NPV values were achieved. (Remember to also add to the
ClearPrev procedure so that each histogram is deleted for the previous
products.)
Restructure this application to solve the capital budgeting problem with an integer
programming model. Which procedures change and which can be retained?
Which sheets change and which can be retained?