Créer une présentation
Télécharger la présentation

Télécharger la présentation
## About the Exam

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**About the Exam**• No cheat sheet • Bring a calculator • You may NOT use the calculator on your phone or iPad or computer or other media device • Short essay answers • Math problems to be solved • Know all materials covered including last Thursday’s lecture on simulation • Materials presented in Lab will also be include in the exam**Materials for Lecture 14**• Chapters 4 and 5 • Chapter 16 Sections 3.2-3.7.3 • Lecture 14 Bernoulli.xlsx • Lecture 14 Normality Test.xlsx • Lecture 14 Simulation Model with Simetar.xlsx • Lecture 14 Normal.xlsx • Lecture 14 Simulate a RegModel.xlsx • Lecture 14 View Distributions.xlsx • Lecture 14 Theta UPES.xlsx**Steps for Simulating Random Variables**• Must assume a probability distribution (shape) • Normal, Beta, Empirical, GRKS, etc. • Estimate parameters required to define and simulate the assumed distribution • Here are the parameters for selected distributions • Normal ( Mean, Std Deviation ) • Beta ( Alpha, Beta, Min, Max ) • Uniform ( Min, Max ) • Empirical ( Si, F(Si) ) • GRKS (Min, Middle, Max) • Often times we assume several distribution forms, estimate their parameters, simulate them, and pick the one which best fits the data**Steps for Parameter Estimation**• Step 1: Check for the presence of a trend, cycle or structural pattern • If present remove it & work with the residuals (ẽt) • If no trend or structural pattern, use actual data (X’s) • Step 2: Estimate parameters for several assumed distributions using the X’s or the residuals (ẽt) • Step 3: Simulate the different distributions • Step 4: Pick the best match based on • Mean, Standard Deviation -- use validation tests • Minimum and Maximum • Shape of the CDF vs. historical series • Penalty function =CDFDEV() to quantify differences**Parameter Estimator in Simetar**• Use Theta Icon in Simetar • Estimate parameters for 16 parametric distributions • Select MLE method of parameter estimation • Provides equations for simulating distributions**Parameter Estimator in Simetar**• Results for Theta Estimate parameters for 16 distributions • Selected MLE in this example • Provides equations for simulating distributions based on a common USD**Which is the Best Distribution?**• Use Simetar function =CDFDEV(History, SimData) • Perfect fit has a CDFDEV value of Zero • Pick the distribution with the lowest CDFDEV**Use the “View Distributions.xlsx”**• For a random variable with 10 observations can estimate the parameters and view the shape of the distribution**Stochastic Simulation**• Purpose of simulation is to estimate the unknown probability distribution for a KOV so decision makers can make a better decision • We simulate because we cannot observe and measure the KOV distribution directly • We want to test alternative values for control variables • Business simulation models are basically an equation to calculate profit Profit = (Price * Quantity) – (VC * Quantity) - FC Profit = * - VC * - FC**Stochastic Simulation for Economists**• In economics we use simulation because we can not experiment on live subjects, a business, or the economy without injury • In other fields they can create an experiment • Health sciences they feed (or treat) lots of lab rats on different chemicals to see the results • Animal science researchers feed multiple pens of steers, chickens, cows, etc. on different rations • Engineers run a motor under different controlled situations (temp, RPMs, lubricants, fuel mixes) • Vets treat different pens of animals with different meds • Agronomists set up randomized block treatments for a particular seed variety with different fertilizer levels • All of these are just different iterations of “models”**Iterations, How Many are Enough?**Specify the number of iterations in the Simetar simulation engine Specify the output variables’ names and location • Change the number of iterations based on the nature of the problem -- 500 is adequate. • Some studies use 1,000’s because they are using a Monte Carlo sampling procedure which is less precise than the Latin hypercube • Simetar uses a Latin hypercube so 500 is an adequate sample size**Definitions**• Stochastic Model – means the model has at least one random variable • Monte Carlo simulation model – same as a stochastic simulation model • Two ways to sample or simulate random values • Monte Carlo – draw random values for the variables purely at random • Latin Hyper Cube – draw random values using a systematic approach so we are certain that we sample ALL regions of the probability distribution • Monte Carlo sampling requires larger number of iterations to insure that model samples all regions of the probability distribution • For a U(0,1) the CDF is straight line • MC has bias from straight line • LHC is the straight line • This is with 500 iterations • Simetar default is LHC**Simulating Random Variables**• Normal distribution used frequently, particularly when simulating residuals for a regression model • Parameters for a Normal distribution • Mean expressed as Ῡ or Ŷ • Standard Deviation σ • Assume yield is a random variable and we have a production function, such as: • Ỹ = a + b1 Fertilizer + b2 Water + ẽ • Deterministic component is: a + b1 Fertilizer + b2 Water • Stochastic component is: ẽ • Stochastic component, ẽ, is assumed to be distributed Normal • Mean of zero • Standard deviation of σe • See Lecture 14 Simulate a Reg Model.XLSX**When to Use the Normal Distribution**• Use the Normal distribution if you have lots of observations and have tested for normality • BUT watch for infeasible values from a Normal distribution (negative yields and prices)**Problems with the Normal**• It is easy to use, so it is often used when it is not appropriate • It does not allow for extreme events (Black Swans) • No way to account for record breaking outliers because the distribution is defined by Mean and Std Dev. • Std Dev is the “average” deviation from the mean and averages out BS’s • Market outliers are washed away in the average • It is the foundation for Sigma 6 • So Sigma 6 suffers from all of the problems above • Creates a false sense of security because it never sees a record braking outlier**How to Test for Normality**• Simetar provides an easy to use procedure for testing Normality that includes: • S-W – Shapiro-Wilks • A-D – Anderson-Darling • CvM – Cramer-von Mises • K-S – Kolmogornov-Smiroff • Chi-Squared • Simetar’s Hypothesis Testing Icon provides a tab to “Test for Normality”**Simulating a Normal Distribution**• Review the Normal Distribution =NORM( Mean, Standard Deviation) =NORM( 10,3) =NORM( A1, A2) • Standard Normal Deviate (SND) =NORM(0,1) or =NORM() • SND is the Z-score for a standard normal distribution allowing you to simulate any Normal distribution • SND is used as follows: Ỹ = Mean + Standard Deviation * NORM(0,1, [USD]) Ỹ = Mean + Standard Deviation * SND Ỹ = A1 + (A2 * A3) where a SND is in cell A3**Truncated Normal Distribution**The values in the [ ] are optional but the positions are fixed and critical • General formula for the Truncated Normal =TNORM( Mean, Std Dev, [Min], [Max],[USD] ) • Truncated Downside only =TNORM( 10, 3, 5) • Truncated Upside only =TNORM( 10, 3, , 15) • Truncated Both ends =TNORM( 10, 3, 5, 15) • Truncated both ends with a USD in general form =TNORM( 10, 3, 5, 15, [USD])**Example Model of Net Returns for a Business Model**- Stochastic Variables -- Yield and Price - Management Variables -- Acreage and Costs (fixed and variable) - KOV -- Net Returns - Write out the equations and exogenous values Equations and their order**Program a Simulation Model in Excel/Simetar -- Input Data**Section of the Worksheet • See Lecture 14 Simulation Model with Simetar.XLSX**Program Model in Excel/Simetar -- Generate Random**Variables and Simulate Profit**PDF for Bernoulli B(0.75)**CDF for Bernoulli B(0.75) 1 .25 .25 .75 0 0 1 X 1 X PDF and CDF for a Bernoulli Distribution. Bernoulli Distribution • Parameter is ‘p’ or the probability that the random variable is 1.0 or TRUE • Simulate Bernoulli in Simetar as • = Bernoulli(p) • = Bernoulli(0.25) • Lecture 14 Bernoulli.XLSX examples follow**Equilibrium Displacement Model Forecasting**• Elasticities of demand and supply can be used to forecast changes in price, quantity demanded and quantity supplied • Small changes in the exogenous variables allows one to forecast the dependent variable • This method is simple and reliable for small changes from equilibrium • Information needed: • A Baseline of equilibrium quantities and prices • Own and cross elasticities for demand and supply • Residuals from trend (or a structural model) for the dependent variable if the forecast is to be stochastic**Equilibrium Displacement Model Forecasting**• Baseline prices and quantities are available from FAPRI, USDA, and some private consulting firms • Here is an example of the corn S&U from the FAPRI March 2013 Baseline**Equilibrium Displacement Model Forecasting**• To forecast a price change given a change in quantity supplied Price1 = P0 * [1+ {Price Flex *( Q1 - Q0) / Q0) } ] + ẽ P0 and Q0 are baseline values Q1 is assumed change Price ?P1 P0 Demand Q/UT Q0 Q1**Equilibrium Displacement Model Forecasting**To forecast the Q Supplied given a change in price Qt Supplied1 = Qs0 * [1 + {Es *( P1 - P0) / P0) } ] + ẽ P0 and Q0 are baseline values P1 is assumed change Price Supply P1 P0 Q/UT Q0 ?Q1**Equilibrium Displacement Model Forecasting**• We can expand the supply response equation by including cross elasticities Qt Supplied x = Qsx0 * (1 + {[Exs *( Px1 - Px0) / Px0)] +[Exs,yp *( Py1 - Py0) / Py0)] + [Exs,zp *( Pz1 - Pz0) / Pz0)] } ) + ẽ Where x is the own crop (say, corn), y is the price of soybeans, and z is the price of wheat The supply response equation can be expanded to contain cross elasticities for all other crops Note: Ex,ypis the elasticity of corn supply with respect to the price of soybeans**Equilibrium Displacement Model Forecasting**• The general form for an elasticity of demand equation can be used to forecast quantity exported, or quantity demanded for ethanol or any other quantity demanded All we need is the Baseline quantity demanded, corresponding baseline price and the own and cross elasticities QD1 = QD0 * (1 + {ED for exports * ( P1 - P0) / P0)}) + ẽ Price P0 P1 Demand for Exports Q/UT Q0 ?Q1**Equilibrium Displacement Model Forecasting**• This method of forecasting is widely used in agricultural economics • Particularly useful for policy analysis and consulting • This is why economists place so much emphasis on estimating unbiased elasticities**· Determ forecast**· Prob forecast Probabilistic Forecasting (PF) - PF are inter-temporal forecasts of a random variable with stochastic components - PF involves simulating an econometrically estimated forecast equation with the appropriate risk - Purpose is to evaluate the risk in a forecast - Readings: Chapter 15 - Lecture 16 Probabilistic Forecasting.XLS - Lecture 16 Probabilistic Time Series.XLS Lecture 16