You are on page 1of 45

Jaya engineering college

DEPARTMENT OF MASTER OF BUSINESS ADMINISTRATIONS


(Batch: 2022 - 2024)

BA5211- DATA ANALYSIS AND BUSINESS MODELLING LAB

Prepared and Submitted


By

Name
Reg.No:

FOR THE COURSE OF MBA II SEMESTER


ANNA UNIVERSITY PRACTICAL EXAMINATION
DEPARTMENT OF MASTER OF BUSINESS ADMINISTRATIONS
(Batch: 2022 - 2024)

Certified to be the Bonafide ______________________________________ record done by

Mr. /Ms. ______________________________, University Register Number __________________

during his/her M.B.A Course _____ year _____ semester in this department during the period from

march 2022 to May 2022 for the award of Degree, Master of Business Administration from Anna

University.

Faculty–in–charge Head of Department

Submitted for MBA Practical Examination held on ________________.

Jaya Engineering College.

Date:

Place:

Internal Examiner External Examiner


INDEX
E.NO DATE TITLE PAGE SIGNATURE

NO

1 Descriptive Statistics
2 Hypothesis – Parametric
3(a) Correlation
&
3(b) Regression
4 Forecasting

5(a) Risk Analysis


&
5(b) Sensitivity Analysis
6 Revenue Management

7(a) Transportation
&
7(b) Assignment
8 Inventory Models

9 Networking Models
10 Portfolio Selection
11 Queuing Theory
EX NO: 01 DESCRIPTIVE STATISTICS
DATE:

AIM:
To find the descriptive statistics for given set of values.
PROCEDURE:
STEP 1: Open Microsoft excel document.

STEP 2: Enter the values in spreadsheet. To generate descriptive statistics for the given
score, execute the following steps.

Right click on data  customise quick access tool bar  add-ins  Analysis tool pack
 go  check analysis tool pack  Ok. Now the Data Analysis option is been displayed
under Data
STEP 3: On data tab, click data analysis.

STEP 4: Select descriptive analysis and click ok.

STEP 5: Select the range [A2:A15] as input range.

STEP 6: Select cell C1 as output range.

STEP 7: Make sure that the summary statistics is checked

STEP 8: Click OK.

STEP 9: Now the result will be displayed on spreadsheet.


RESULT:
Thus the descriptive statistics for a given set of values is found out.
EX NO: 02 HYPOTHESIS – PARAMETRIC
DATE:

AIM:

To find out one sample T-test – Hypothesis parametric for a given set of values.
PROCEDURE:

STEP 1: Open Microsoft excel window.

STEP 2: Enter the values in the spreadsheet.

To generate T-test: one sample assuming unequal variance, execute the following steps.

STEP 3: On the data tab, click Data Analysis.

STEP 4: Click T-test: one – sample assuming unequal variance.

STEP 5: Under Input column, in variable range 1, select the external value cells and in
variable range 2, select dummy values.

STEP 6: Enter hypothesis mean difference as 20.

STEP 7: Check the label

STEP 8: Select any cell for Output range.


STEP 9: Click OK
STEP 10: Now the result is displayed on spreadsheet.

RESULT:
Thus the one sample T-Test is found out for given values.
EX NO: 03(a) CORRELATION
DATE:

AIM:
To find the correlation between two sets of variable.
PROCEDURE:
STEP 1: Enter the paired score for each subject on the excel spreadsheet.
STEP 2: After the data has been entered, place the cursor, where you want the correlation
coefficient (pearson’s) appear and click the tab.
STEP 3: Now move the cursor to the function unread f(x) button. Click OK.
STEP 4: A dialog box will appear. Click on statistical from by section and CORREL on right
screen after you made selection. Click next on dialog box.

STEP 5: Enter the call range for first variable in arrange box.

STEP 6: The correlation for two variables will appear in all you selected.
RESULT:
Thus the correlation between two sets of variable is found.
EX NO: 03(b) REGRESSION
DATE:

AIM:

To find the regression for given set of variables.

PROCEDURE:

STEP 1: Enter the given data.

STEP 2: Click on data analysis and select regression.

STEP 3: In input range X, select X values

In input range Y, select Y values.


STEP 4: Select new worksheet ply and check residuals box and click ok.

STEP 5: Now the result displays as given.

RESULT:
Thus the regression has been successfully obtained.
EXPT NO: 04 FORECASTING
DATE:

AIM:
To describe the formula syntax and usage of forecast function in Microsoft excel.
PROCEDURE:
STEP 1: Enter the following data.

STEP 2: In A6, enter =forecast(A6,A2:A5,B2:B5) and click enter


STEP 3: Now the output displays in A6.

RESULT:
Thus we get the predicted value of known Y using forecast analysis for the year March 2013
RISK ANALYSIS AND SENSITIVE ANALYSIS
EX NO: 05(a) RISK ANALYSIS
DATE:

AIM:
To use risk analysis and evaluating an investment proposal, a new business, a budget, a
proposal involving financial risk or a scientific study.
PROCEDURE:
STEP 1. Enter the Data in the Excel Sheet
 Label the first row in Columns A, B, and C as Project Name or Activity, Probability and
Consequence and fill in the name each project or activity and your estimated probability
and impact values on the subsequent rows.
STEP 2. Select the Chart Style
 Choose from the ribbon the Insert Tab
 Select Scatter Chart
 Choose Scatter Chart with only Markers (a blank chart will appear)
STEP 3. Sync the Data to the Chart
 From the Chart Tools on the ribbon, select Design
 Choose Select Data
 Select Add to enter the data for the first project or activity
 Change the Series Name to cell A1
 Set Series X values to cell B2 and Series Y values to cell C2
(To enter cell values click in the chart image on the right and then click on the cell with the
data.)
Your skeleton template will now look like this, and you can proceed with formatting the
legend, data points, axes, and plot area.
STEP 4. Delete the Legend (the legend is not necessary because each data point will be
labeled)
 Right click on the legend
 Choose delete

STEP 5. Label the Data Point


 Right click on the data point
 Choose Add Data Label
 Check the Series Name and uncheck the Y axis and then click Reset Label Text
STEP 6. Set Each Axis Range from 0 to 100
 Right click each axis
 Choose Format Axis
 Set Min to 0
 Set Max to 100

STEP 7. Key in the Title and Axis Names


 Right click over the text
 Select Text Edit and type
 Title - Risk Assessment
 X axis - Remote Probability Certain
 Y axis - Insignificant Consequence Critical

STEP 8. Format the Plot Area


 Right Click anywhere in the Plot Area
 Choose Format Plot Area (The selection box to the left will appear.)
 Click on the Gradient circle
 On the first stop on the Gradient Bar switch the color to Red
 Change the Direction to Linear Diagonal

RESULT:
Thus the Risk analysis is successfully executed.
EX NO: 05(b) SENSITIVE ANALYSIS
DATE:

AIM:

To gain the insight into which assumptions are critical, (i.e) which assumptions affect
choice using sensitive analysis.

PROCEDURE:

STEP 1: Enter the given data.

STEP 2: Now select the cells E5:J11

STEP 3: Click data  what if analysis  data cell  new row input cell.

STEP 4: Now a new window opens. In row input cell, enter B5 (chair sold/ 1000) and in
column input cell, enter B6 (price per chair/$150)
STEP 5: Now ‘0’ appears in cells E7:J11

STEP 6: In E5, enter ‘=B17’. 40000 is displayed in cells E7:J11

STEP 7: Now enter the consecutive number of chairs in F7:F11 and consecutive price/chairs
in E7:J7
STEP 8: Now the output is displayed

RESULT:
Thus the sensitivity analysis is successfully executed.
EX NO: 06 REVENUE MANAGEMENT
DATE:

AIM:

To increase the profit generated from a supply chain assets by using revenue
management.

PROCEDURE:

STEP 1: Enter the given data

STEP 2: Select the value of revenue

STEP 3: Click insert  line  line with markers


STEP 4: Now a new window opens. In the left side, click on revenue and click ok. In the
right side, click on edit and click on year column in access label range and click ok

STEP 5: Click on data  add trend line  exponential  forecast  forward ‘2’
periods and check display equation in chart.
STEP 6: Click line style  width = 3

STEP 7: Now the output appears as given.

RESULT:
Thus the revenue management has been successfully executed.
TRANSPORTATION AND ASSIGNMENT
EX NO: 07(a) TRANSPORTATION
DATE:

TRANSPORTATION
AIM:
To use the solver option in excel to find the number of units to ship from each factory to
each customer that minimize total cost.
PROCEDURE:
STEP 1: Enter the following data.

STEP 2: In A8, enter total cost.


STEP 3: Select A8:B8 and give all borders.
STEP 4: In B8, apply colour.
STEP 5: Copy A2:F6 and paste it in A11:F15.

STEP 6: In B7, enter =SUM(B3:B5) and after the result appears, drag in C6, D6, E6 and in
G3, enter = SUM(B3:E3) and drag till G5.Then delete B3:E5.

STEP 7: In B8, enter =SUMPRODUCT(B3:E5,B12:E14) and now answer is displayed as 0.

STEP 8: Click Data  solver  set target cell =B8 and then check minimum option and in
next box, enter B3:E5. Click on subject to constrain and then click Add

To add solver option, right click on Data  Add ins  Solver Add-in  Go  Check solver
Add-in  ok. Now the solver option is been displayed under data option.
STEP 9: Now in cell reference, enter G3:G5 and select <= and in subject to constrain, click
F3:F5. Click add. Again in cell reference add B7:E7, select >= and in subject to constrain
enter B6:E6. Click ok. Now a dialog box is displayed as given below.

STEP 10: Now check assume linear model and assume non negative and click ok.

STEP 11: Now the result is displayed as shown in B8.

RESULT:
Thus the transportation problem has been successfully executed.
EX NO: 07(b) ASSIGNMENT

DATE:
AIM:

To use the solver option in excel to find the assignment of persons to tasks that minimize the
total cost.

PROCEDURE:

STEP 1: Enter the given data.

STEP 2: Enter B2:D2 in F2 and drag till F4, Enter B2:D4 in B6 and drag till D6.

STEP 3: Select the cells A1:D4,copy and paste it in A10:D13.

STEP 4: Delete the value of cells B2:D4.

STEP 5: In B7, enter “=SUMPRODUCT(B2:D4,B11:D13). Now the answer appear as 0.


STEP 6: Go to data  solver  set target cell as B7, check minimum option. In by change
variable cells, enter B2:D4 and click guess.

STEP 7: Click on subject to constrain and click add. Now a new window opens.

In cell reference enter F2:F4, Select = , and in constrain enter E1:E4. Click ADD.

In cell reference enter B6:D6, Select = , and in constrain enter B5:D5. Click ADD.

In cell reference enter B2:D4, Select bin , and in constrain binary appears. Click OK.

STEP 8: Now click solve option and check keep solver solution and click ok
STEP 9: Now the result appears as 25 in B6.

RESULT:
Now the assignment problem has been successfully executed.
EX NO: 08 INVENTORY MODEL
DATE:
AIM:

PROCEDURE:
STEP 1: Enter the following data.

STEP 2: Click on customize quick access toolbar  choose command from (developer tab)
 insert control  check show quick access toolbar below ribbon  add  ok.

STEP 3: Select C2  in quick access toolbar click insert control  combo box (second
option)
STEP 4: Fix that Cell C2.
STEP 5: Right Click Cell C2 then GoTo Format Control
STEP 6 : Window opens enter the values for Input Range H2:H6(PRODUCT A TO
PRODUCT E)
STEP 7: Cell Link as B2
STEP 8: Then drop down lines as 5.
STEP 9:Then put tick mark in 3-D shading

STEP 10: then press ok.


STEP 11: Apply formula in the Cell D2 =index (H2:I6, B2, 2) press enter
STEP 12: Enter value 12 in the Cell A2 then give formula in the Cell E2 as =D2*A2.
STEP 13: Finally you may check the values are changing by choosing the option from the
description.
RESULT:
Thus the inventory values has been food and it is executed successfully
EX NO: 09 NETWORKING MODEL
DATE:

AIM:

To find critical path method using excel.

PROCEDURE

STEP 1: Enter the following data.

STEP 2: Activities with no predecessor activity will have early start as 0.

Enter 0 in B5 & C5.

STEP 3: For all activities early finish = early start + duration (time= t).

Enter =B5+B4 in B6 and drag till H6.

STEP 4: For activities with one predecessor activity, Early start = Early finish.

Enter =B6 in D5, =C6 in E5, =C6 in F5

STEP 5: For activities with more than one predecessor activity, early start= MAX(early
finish of all predecessor activity)

Enter =MAX(D6:E6) in G5, enter =MAX(D6:F6) in H5


STEP 6: To find time of completion (TOC), enter =MAX(B6:H6) in I5, answer is displayed
as 10.

STEP 7: To obtain successor activity, invert predecessor activity.

Enter 3 in B7; 4,5 in C7; 6,7 in D7; 6,7 in E7; 7 in F7; 0 in G7& H7

STEP 8: To determine late start and late finish, where there is no successor activity, enter
TOC value

Enter =I6 in G9 & H9

STEP 9: In all activities, late start = late finish – duration.

Enter =H9-H4 in H8 and drag till B8.

STEP 10: To determine late finish,

(i) If only one successor activity, late finish = late start of successor activity.

Enter =H8 in F9

(ii) When more than one successor activity, Late finish = MIN(late start)

Enter = MIN(G8:H8)Vin E9 & D9; =MIN(E8:F8) in C9; =B9 in D8.

STEP 11: To calculate slack variable, Late Finish – Early Finish.

Enter =B9-B6 in B10 and drag till H10.

STEP 12: To find critical activity and critical path,

In B11, enter =IF(B10=0,”YES”,” “) and drag till H11.

The result displays as given below.


RESULT:

Thus the critical path method has been successfully executed in Excel.
EX NO: 10 PORTFOLIO SELECTION
DATE:

AIM :

To use the solver in Excel to compute efficient portfolios.

PROCEDURE :

The Solver AddIn


The solver is an Excel Add‐In created by Frontline Systems (www.solver.com) that can be
used to solve general optimization problems that may be subject to certain kinds of
constraints. In this note we show how it can be used to find portfolios that minimize risk
subject to certain constraints. The solver add‐in must be activated before it can be used within
Excel. In Excel 2007, you activate addins by clicking on the office button and then clicking
on the Excel Options box at the bottom of the menu. This opens the Excel options dialogue
box. Click Add‐Ins, which displays the available Add‐Ins for Excel. Make sure the Solver
Add‐In is an Active Application Add‐In.

Matrix Algebra in Excel


Excel has several built‐in array formulas that can perform basic matrix algebra operations.
The main functions are listed in table below

1. Array - Function Description


2. MINVERSE Compute- inverse of matrix
3. MMULT Matrix – multiplication
4. TRANSPOSE- Compute transpose of matrix
To evaluate an array function in Excel, you must use the magic key stoke combination:
<CTRL>‐<SHIFT>‐ <ENTER> (hold down all three keys at once then release).
Example Data
In the Data tab of the spreadsheet 3firmExample.xls is the example monthly return data on
three assets: Microsoft, Nordstrom and Starbucks. The monthly means and covariance matrix
of the returns are computed and these are referenced as the input data on the portfolio tab as
illustrated in the screen shot below.
In the spreadsheet, cells colored light blue contain input data (fixed
data not created by some formula) and cells colored tan contain output data (data created by
applying some formula). Also, some cells are explicitly named. For example the range of
cells B3:B5 is named muvec. If these cells are highlighted then muvec will appear in the
Name Box in the upper left hand corner of the spreadsheet. Similarly, the range of cells
E3:G5 is named sigma. For matrix algebra calculations, it is convenient to use named ranges
in array formulas.

The Global Minimum Variance Portfolio


The global minimum variance portfolio solves the optimization problem 2
min σ p,m = ′Σ s.t. ′ =1
m
m m m1
This optimization problem can be solved easily using the solver with matrix algebra
functions. The screen shot of the portfolio tab below shows how to set‐up this optimization
problem in Excel. The range of cells D10:D12 is called mvec and will contain the weights in
the minimum variance portfolio once the solver is run and the solution to the optimization
problem is found. Before the solver is to be run, these cells should contain an initial guess of
the minimum variance portfolio. A simple guess for this vector whose weights sum to one is
mmsft = 0.3,mnord = 0.3,msbux = 0.4.
To use the solver, a cell containing the function to be maximized or minimized must be
specified. Here, this cell is F10 which contains the array formula
{=MMULT(TRANSPOSE(mvec),MMULT(sigma,mvec))}
which evaluates the matrix algebra formula for the variance of a portfolio: 2
p,m σ =m′Σm.
Notice that the formula is surrounded by curly braces {}. This indicates that <CTRL>‐
<Shift>‐<Enter> was used to evaluate the formula so that it is to be interpreted as an array
formula. If you don’t see the curly braces then the formula will not be evaluate correctly. We
also need a cell to contain a formula that will be used to impose the constraint that the
portfolio weights sum to one: 1. msft nord sbux m′1 = m + m + m = This formula is specified
in cell E10 as =SUM(mvec)
The solver add‐in is located on the data tab of the top menu ribbon in the right hand corner.
To run the solver, click the cell containing the formula you want to optimize (cell F10, and
named sig2px) and then click on the solver button. This will open up the solver dialogue box
as shown below.

The field named Set Target Cell must contain either the name or the reference to the cell
containing the formula to optimize. You have three choices for the type of optimization: Max,
Min and Value of. Here, we want to minimize the portfolio variance so Min should be
selected. Next, we must specify the cells containing the variables which are being optimized.
These are specified in the By Changing Cells field. Here, we can type in the name mvec or
specify the range of cells D10:D12. Finally, we must Add the constraint that the weights sum
to one. We do this by clicking the Add button, which opens the Add Constraint dialogue box
show below. The Cell Reference contains the cell (E10) that has the formula for the
constraint
m′1 = mmsft + mnord + msbux = 1.
We specify the value of the constraint, 1, in the Constraint field. Once everything is filled in,
click OK to go back to the solver dialogue. The complete dialogue should look like one
shown below.

To run the solver, click the Solve button. The computation is generally very fast. If
successful, you should see the following dialogue box

The message “Solver found a solution. All constraints and optimality conditions are satisfied”
means that the first and second order conditions for a minimum are satisfied. Click the Keep
Solver Solution option button and then click OK. Your spreadsheet should look like the one
below. The global minimum variance portfolio has 44% in Microsoft, 36% in Nordstrom and
19% in Starbucks. The expected return on this portfolio is given in cell C13 (called mupx)
and is computed using the formula p,m μ = m′μ . The Excel array formula is
{=MMULT(TRANSPOSE(mvec),muvec)} The portfolio standard deviation in cell C14 is the
square root of the portfolio variance, sig2px, in cell F10.
Minimum Variance Portfolio subject to Target Expected Return
A minimum variance portfolio with target expected return equal to 0 μ solves the
optimization problem2 ,
0 min s.t. and 1 y p y
σ = y′Σy y′μ = μ y′1 =
This optimization problem can also be easily solved using the solver with matrix algebra
functions. The screenshot below shows how to set‐up this optimization problem in Excel
where the target expected return is the expected return on Microsoft (4.27%). The range of
cells K10:K12 is called yvec and will contain the weights in the efficient portfolio once the
solver is run and the solution to the optimization problem is found. Before the solver is to be
run, these cells should contain an initial guess of the minimum variance portfolio. A simple
guess for this vector whose weights sum to one is ymsft = 0.3, ynord = 0.3, ysbux = 0.4. The
cell containing the formula for portfolio variance, 2p, y σ = y′Σy , is in cell O10 which
contains the array formula {=MMULT(TRANSPOSE(yvec),MMULT(sigma,yvec))} We
also need two additional cells to contain formulas that will be used to impose the constraints
that the portfolio expected return is equal to the target return, p, y 0 μ = y′μ = μ , and that the
portfolio weights sum to one, 1. msft nord sbux y′1 = y + y + y = These formulas are specified
in cells L10 and N10, which contain the Excel formulas =SUM(yvec) and
{=MMULT(TRANSPOSE(yvec),muvec)}, respectively.
To run the solver, click cell O10 (called sig2py) and then click on the solver button. Make
sure the solver dialogue box is filled out to look like the one below. Notice that there are now
two constraints specified. The first one imposes y′1 = ymsft + ynord + ysbux =1, and the
second one imposes , 0 0.0475 p y msft μ = y′μ = μ = μ = . To run the solver, click the Solve
button. You should see a dialogue box that says that the solver found a solution and that all
optimality conditions are satisfied. Keep the solution and click OK. Your spreadsheet should
look like the one below.
The efficient portfolio has weights 0.83, 0.09, 0.26. msft nord sbux y = y = − y = Notice that
Nordstrom is sold short in this portfolio because it has a negative weight. The expected return
on this portfolio is equal to the target expected return (see cell N10 named mupy) and the
weights sum to one. Notice that the standard deviation of this portfolio (see cell P10) is
smaller than the standard deviation of Microsoft (see cell C3).
Computing the Efficient Frontier of Risky Assets
The efficient frontier of risky assets can be constructed from any two efficient portfolios. A
natural question to ask is which two efficient portfolios should be used? I find that the
following two efficient portfolios leads to the easy creation of the efficient frontier:
1. Efficient portfolio 1: global minimum variance portfolio
2. Efficient portfolio 2: efficient portfolio with target expected return equal to the highest
average return among the assets under consideration. For the current example, the asset with
the highest average return is Microsoft (average return is 4.27%) and we already computed
the efficient portfolio with target expected return equal to the average return on Microsoft.
Given any two efficient portfolios with weight vectors m and y the convex combination
z =α ⋅m+ (1−α ) ⋅ y
for any constant α is also an efficient portfolio. The expected return and variance of this
portfolio are
,,,
22222
,,,
(1 )
(1 ) 2 (1 )
pzpmpy
p z p m p y my
μαμαμ
σασασαασ
=⋅+−⋅
= + − + −,
where the covariance between the returns on portfolios m and y is computed using σ my = m
′Σy . To create the efficient frontier, create a grid of α values starting at 1 and decrease in
increments of 0.1. Use as many values in the grid as necessary to make a nice plot. A
screenshot of the part of the spreadsheet to create these portfolios is shown below. Consider
the first convex combination with α =1. This portfolio is the global minimum variance
portfolio. The cell P20 contains the formula =N20*mupx+O20*mupy for the expected
portfolio return, and the cell Q20 contains the formula
=N20^2*sig2px+O20^2*sig2py+2*N20*O20*sigmaxy for the portfolio variance. The
covariance term sigmaxy is computed in the cell R9 (not shown) which contains the array
formula {=MMULT(MMULT(TRANSPOSE(mvec),sigma),yvec)}. The cells S20:U20 give
the weights in the convex combination computed using the array formula
{=TRANSPOSE(N20*D10:D12+O20*K10:K12)}.
The efficient frontier can be plotted by making a scatter plot with the expected return values
(cellsP20:P50) on the y‐axis and the standard deviation values (cells R20:R50) on the
horizontal axis.
Computing the Tangency Portfolio
The tangency portfolio is the portfolio of risky assets that has the highest Sharpe’s slope. This
portfolio can be found by solving the optimization problem
( )1/2 max f s.t. 1
t
′μ − r
′=
′Σ
t
t1
tt
This optimization problem can also be easily solved using the solver with matrix algebra
functions. The screenshot below shows how to set‐up this optimization problem in Excel. The
range of cells D33:D35 is called tvec and will contain the weights in the tangency portfolio
once the solver is run and the solution to the optimization problem is found. Before the solver
is to be run, these cells should contain an initial guess of the minimum variance portfolio. A
simple guess for this vector whose weights sum to one is 0.3, 0.3, 0.4. msft nord sbux t = t = t
= The computation of Sharpe’s slope is broken down into two pieces. The first piece is the
numerator of Sharpe’s slope, p,t f f μ − r = t′μ − r , and is computed in cell F33 using the
array formula {=MMULT(TRANSPOSE(tvec),muvec)‐rf}. The second piece is the square of
the denominator of Sharpe’s slope, 2 p,t σ = t′Σt , and is computed in cell G33 using the array
formula {=MMULT(TRANSPOSE(tvec),MMULT(sigma,tvec))}. Finally, Sharpe’s slope is
evaluated in cell H33 using the formula =F33/SQRT(G33). This is the cell that is passed to
the solver.
To run the solver, click cell H33 and then click on the solver button. Make sure the solver
dialogue box is filled out to look like the one below. Make sure that the Max button is
selected because we want to maximize the Sharpe’s slope. To run the solver, click the Solve
button. You should see a dialogue box that says that the solver found a solution and that all
optimality conditions are satisfied. Keep the solution and click OK. Your spreadsheet should
look like the one below. The tangency portfolio has weights tmsft =1.03,tnord = −0.32,tsbux
= 0.30. Notice that Nordstrom is sold short in this portfolio because it has a negative weight.
The expected return on this portfolio, p,t μ = t′μ , is given in cell C36 (called mut) and is
computed using the array formula
{=MMULT(TRANSPOSE(tvec),muvec)}.
Computing Efficient Portfolios of TBills and Risky Assets
From the mutual fund separation theorem, the efficient portfolios of T‐Bills and risky assets
are combinations of T‐Bills and the tangency portfolio. The expected return and standard
deviation values of these portfolios are computed using
( ) tan tan
tan tan
e
pff
e
p
rxr
x
μμ
σσ
=+−
=
A screenshot of the spreadsheet where these portfolios are computed is given below. The
portfolio with xtan = 0 is shown in the cells J34:L34. The expected return is computed in cell
K34 and is given by the formula =rf+J34*(mut‐rf). The standard deviation is computed in cell
L34 and is given by the formula =J34*sigt. The named range sigt is the standard deviation of
the tangency portfolio and is given in cell C37.
Efficient Portfolios with No Short Sales Constraints
In many situations short sales of assets are not allowed. Recall, a short sale of an asset occurs
when you borrow the asset and then sell it. The proceeds of the short sale are usually used to
finance the purchase of other assets. Because the asset was borrowed it eventually has to be
returned. You do this by repurchasing the asset at some time in the future and then returning
the asset to whomever you borrowed it from. You make a profit on a short sale if the price of
the asset drops during the period of time you have borrowed the asset because you repurchase
the asset for a price less than for what you originally sold it. In the context of portfolio theory,
when you short sell an asset the corresponding portfolio weight is negative. Hence, when
short sales are prohibited all of the portfolio weights must be constrained to be positive. This
type of non‐negativity constraint is easy to impose in the solver.
Minimum Variance Portfolio subject to Target Expected Return with No Short Sales
A minimum variance portfolio with target expected return equal to 0 μ and no short sales
solves the optimization problem 2
, 0 min s.t. , 1 and 0 y p y i
σ = y′Σy y′μ = μ y′1 = y ≥
This optimization problem can also be easily solved using the solver with matrix algebra
functions. The screenshot below shows how to set‐up this optimization problem in Excel
where the target expected return is the expected return on Microsoft (4.27%). Previously, we
solved this problem where we allowed for short sales. In that case, the efficient portfolio was
0.83, 0.09, 0.26. msft nord sbux y = y = − y = Notice that Nordstrom was sold short in that
portfolio. Now we want to impose the no short sales restrictions. We set up the Excel
spreadsheet exactly how we did before. The only difference occurs in how we use the solver.
We add an additional constraint that forces all of the portfolio weights to be positive. The
screen shot below shows the initial set‐up. The range of cells AC5:AC7 is called wvec and
will contain the weights in the efficient portfolio once the solver is run and the solution to the
optimization problem is found. Before the solver is to be run, these cells should contain an
initial guess of the minimum variance portfolio. The cell containing the formula for portfolio
variance, 2 p,w σ = w′Σy , is in cell AG5 which contains the array formula
{=MMULT(TRANSPOSE(wvec),MMULT(sigma,wvec))}

The cells AD5 and AF5 contain the Excel formulas =SUM(wvec) and
{=MMULT(TRANSPOSE(wvec),muvec)} that will be used to impose the restrictions that
the portfolio weights sum to one and that the portfolio expected return is equal to the target
return. To run the solver, click cell AG5 and then click on the solver button. Make sure the
solver dialogue box is filled out to look like the one below. To add the no short sales
constraints, click the Add button to open the Add Constraint dialogue. The no short sales
constraints inequality constraints on the elements of wvec: Click OK. The final solver
dialogue should look like the one below. You should see a dialogue box that says that the
solver found a solution and that all optimality conditions are satisfied. Keep the solution and
click OK. Your spreadsheet should look like the one below. The efficient portfolio has 100%
in Microsoft and 0% in the other assets.

RESULT: Thus the Portfolio Selection has been successfully executed.


EX NO: 11 QUEUING THEORY
DATE:

AIM:

To Demonstrate Queuing Theory.

PROCEDURE:

We have developed a free Erlang C calculator to help with your call centre planning.

This is a simple Excel spreadsheet tool that allows you to work out how many agents you will
need.  You just need to enter your call volume and the service level that you would like to
achieve.  The calculator then looks at the agent capacity you would need to achieve the
service level.
And because it is all done in an Excel spreadsheet it makes it pretty easy for you to model
different call volumes across the course of the day.
The calculator is based on Microsoft Excel with a bit of nifty software programming from
Joanne Sparkes at Expedio Spreadsheets using a mathematical technique called Erlang
Theory*. Jo has coded it from scratch and it seems instinctive to use.
To get the calculator to work you will need to have macros enabled on your computer.  
In excel select Tools > Options > Security > Macro Security and then select medium.
RESULT:
Thus the Queuing Theory has been successfully demonstrated.

You might also like