Click here to load reader
Upload
perry
View
103
Download
23
Tags:
Embed Size (px)
DESCRIPTION
Using Microsoft Excel Solver Function. A quick review of the power of Solver. What is “Solver”. Solver is a built-in function (routine) Solver is good for what-if, trend, and other relationships Using historical data Solver will try to optimize a solution - PowerPoint PPT Presentation
Citation preview
Using Microsoft Excel Using Microsoft Excel Solver FunctionSolver Function
A quick review of the power A quick review of the power of Solverof Solver
What is “Solver”What is “Solver”
• Solver is a built-in function (routine)Solver is a built-in function (routine)• Solver is good for what-if, trend, and Solver is good for what-if, trend, and
other relationshipsother relationships• Using historical data Solver will try to Using historical data Solver will try to
optimize a solutionoptimize a solution• You can use Solver much like You can use Solver much like
regression analysis regression analysis
Where is Solver Where is Solver located?located?
Select SolverSelect Solver
You might need to add You might need to add Solver through Add-Solver through Add-
Ins…Ins…
Solver Dialog-boxSolver Dialog-box
What Do All Those Options What Do All Those Options Mean?Mean?
• SSeet Target Cell:t Target Cell:– This is the cell where you will have the This is the cell where you will have the
computer optimize the calculationcomputer optimize the calculation• Equate To:Equate To:
– Choice of Max, Min, or Value of… Choice of Max, Min, or Value of… (typically this is set to Min)(typically this is set to Min)
What Do All Those Options What Do All Those Options Mean?Mean?
• BBy Changing Cells:y Changing Cells:– These are the “weighting factors” These are the “weighting factors”
(Parameter Values) that the computer will (Parameter Values) that the computer will use to fit the equationuse to fit the equation
• SSuubject to the Constraints:bject to the Constraints:– You can set logical statements like A>B, You can set logical statements like A>B,
or A>0or A>0
FITDATA.XLSFITDATA.XLS
Raw Raw DataData
Model Model ValuesValues
Error Error CalculationsCalculations
Fitting Fitting TermsTerms
Solver Dialog-box: FITDATA.XLSSolver Dialog-box: FITDATA.XLSMinimize the sum Minimize the sum
of the errorsof the errors
Parameter ValuesParameter Values
Area where you are able to Area where you are able to add constraints (like A>B, add constraints (like A>B,
A>0A>0
FITDATA.XLS ExampleFITDATA.XLS Example
• Solver will try to minimize the sum of Solver will try to minimize the sum of the squares of errors (this example)the squares of errors (this example)– This means the better the fit of the This means the better the fit of the
“Parameter Values” the less error “Parameter Values” the less error introduced into the solutionintroduced into the solution
This Cell is minimizedThis Cell is minimized
And Solver does this by solving And Solver does this by solving (calculating) the target cell value as (calculating) the target cell value as small as possible buy adjusting the small as possible buy adjusting the “Parameter Values” of the Changing “Parameter Values” of the Changing Cells Cells
Enter EquationEnter Equation
Enter Equation (one you determine, or want to try)Enter Equation (one you determine, or want to try)
Then Fill Down Y_Model, Then Fill Down Y_Model, sq. error, and sq. devs. sq. error, and sq. devs. Columns (for each row Columns (for each row
you have raw data)you have raw data)
Then Verify Solver SettingsThen Verify Solver Settings
Parameters A, B, & C_ Parameters A, B, & C_ will be changed by will be changed by
SolverSolver
Settings: Minimize Settings: Minimize Sum of ErrorsSum of Errors
To minimizeTo minimize
Click Click SSolveolve
Solver will Run Yielding this Solver will Run Yielding this ResultResult
This example yielded a perfect fit, note RThis example yielded a perfect fit, note R22 & graph & graph
Compared to RegressionCompared to RegressionRegression
y = 1.0000xR2 = 1.0000
0.0000
0.5000
1.0000
1.5000
2.0000
2.5000
3.0000
3.5000
0.0000 0.5000 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000
X
Y
Solver ~ RegressionSolver ~ Regression• The Two ~ MatchThe Two ~ Match• Solver can do more complex equations Solver can do more complex equations
and relationshipsand relationships
• The following example is PrepaymentsThe following example is Prepayments– Seven major terms were usedSeven major terms were used
• COFI, 30-Yr , COFI Teaser, Spread between COFI, 30-Yr , COFI Teaser, Spread between COFI & 30-Yr, Spread between COFI & COFI COFI & 30-Yr, Spread between COFI & COFI Teaser, SeasonalityTeaser, Seasonality
– Then a three month look-back for each rate was addedThen a three month look-back for each rate was added
Prepayments in SolverPrepayments in Solver
Note 16-Different X-terms mapping to 1-Y term (prepayments)!Note 16-Different X-terms mapping to 1-Y term (prepayments)!
Very Complex! But easy to do!Very Complex! But easy to do!
EmpoweredEmpowered• Now that you are empowered with the Now that you are empowered with the
Power of Excel Solver what do you Power of Excel Solver what do you want solve?want solve?