270 likes | 433 Views
Being Warren Buffett: a classroom and computer simulation of the stock market. June 30, 2010 Nicholas J. Horton Department of Mathematics and Statistics Smith College, Northampton, MA nhorton@smith.edu http://www.math.smith.edu/~nhorton. Acknowledgements and references.
E N D
Being Warren Buffett: a classroom and computer simulation of the stock market June 30, 2010 Nicholas J. Horton Department of Mathematics and Statistics Smith College, Northampton, MA nhorton@smith.edu http://www.math.smith.edu/~nhorton
Acknowledgements and references • Activity developed by Robert Stine and Dean Foster (Wharton School, University of Pennsylvania) • Published paper: “Being Warren Buffett: A classroom simulation of risk and wealth when investing in the stock market”, The American Statistician (2006), 60:53-60. • More information, the handout form and copy of the TAS paper can be found at: http://www-stat.wharton.upenn.edu/~stine • A copy of these notes plus the R code to run the simulation and results from 5000 simulations can be found at: http://www.math.smith.edu/~nhorton/buffett Being Warren Buffett
Overview • The concepts of expected value and variance are challenging for students • A hands-on simulation can help to fix these ideas, in the context of the stock market • Allows students to experience variance first-hand, in a setting where long tails exist • Can be implemented using dice (and calculators) in a classroom setting • Computer generation of results complements and extends the analytic and hand simulations Being Warren Buffett
Objectives • Understanding discrete random variables to model stock market returns • Calculate and interpret expectations for return from a given investment strategy • Calculate and interpret standard deviations of returns from a given investment strategy • Compare the risk and return for these strategies • Spark thinking about diversification and rebalancing of investments • Build complementary empirical and analytic problem solving skills Being Warren Buffett
Background information • Imagine that you have $1000 to invest in the stock market, for 20 years • Three investment possibilities are presented to students working in groups of 2 or 3: • Question: Which of the three investments seems the most attractive to the members of your group? Being Warren Buffett
Dice outcomes • The investments rise or fall based on the outcomes of a 6-sided die: Being Warren Buffett
Example: • Suppose on the first roll your team gets the following outcomes (Green 2) (Red 5) (White 5), then on the second roll, you get (Green 4) (Red 2) (White 6) Being Warren Buffett
Repeat the process for 20 years • 1 student to roll the dice (green, red and white) • 1 student to determine the return and calculate the new value on the results handout • 1 student to supervise and catch errant dice • At the end of class, each team enters their results on the classroom computer • Find out who are the “Warren Buffett’s” of the class Being Warren Buffett
Group results form Being Warren Buffett
Usually, red doesn’t do as well as green Being Warren Buffett
But occasionally it wins big! Being Warren Buffett
Expected returns for 20 years • Use property that the expectation of a product is the product of the expectation • GREEN: $1000*(1.083)^20= $ 4,927 • RED: $1000*(1.710)^20= $45,700,632 • WHITE: $1000*(1.008)^20= $ 1,173 • We’d always want to pick RED, no? Being Warren Buffett
Observed returns (using simulation) • Used R to simulate 5000 20-year histories, available as “res.csv” • Observed Q1, median, Q3 • GREEN: $2,058 $3,621 $6,269 • RED: $ 0 $ 16 $1,993 • WHITE: $1,011 $1,141 $1,321 • Percentage ending with less than initial investment ($1000) • GREEN: 5.9% • RED: 72.7% • WHITE: 25.0% Being Warren Buffett
Another strategy (“pink”) • Consider a strategy where you balance investments between RED (dangerous) and WHITE (boring) each year • Call this “PINK” • Smaller average returns, but far less variable • Can be calculated using existing rolls (average returns), using space on the results form Being Warren Buffett
How to implement PINK Pink $1000 3 1 2 $1000 $3000 $2000 0.05 1 0.525 $150 $1000 $1050 Being Warren Buffett
Implementation in R # Becoming Warren Buffett simulator (Foster et al TAS) # Nicholas Horton, nhorton@smith.edu # $Id: buffett.R,v 1.2 2010/06/29 13:01:17 nhorton Exp $ green = c(0.8, 0.9, 1.1, 1.1, 1.2, 1.4) red = c(0.05, 0.2, 1, 3, 3, 3) white = c(0.95, 1, 1, 1, 1, 1.1) years = 20; numsims = 5000 n = years*numsims Being Warren Buffett
Implementation in R (cont.) library(Hmisc) process = function(color) { xmat = matrix(rMultinom(matrix(rep(1/6,6), 1 , 6), n), nrow=numsims) res = rep(1000,numsims) # starting investment for (i in 1:years) { res = res*color[xmat[,i]] } return(res) } Being Warren Buffett
Implementation in R (cont.) pink = function(col1,col2) { xmat1 = matrix(rMultinom(matrix(rep(1/6,6), 1 , 6), n), nrow=numsims) xmat2 = matrix(rMultinom(matrix(rep(1/6,6), 1 , 6), n), nrow=numsims) res = rep(500,numsims) for (i in 1:years) { redtmp = res*col1[xmat1[,i]] whitetmp = res*col2[xmat2[,i]] res = (redtmp+whitetmp)/2 } return(res*2) } Being Warren Buffett
Implementation in R (cont.) greenres = process(green) redres = process(red) whiteres = process(white) pinkres = pink(red,white) boxplot(greenres,redres,whiteres,pinkres) boxplot(greenres,redres[redres<50000],whiteres,pinkres[pinkres<50000]) # plotting on a log scale may be worth investigating results = data.frame(greenres,redres,whiteres,pinkres) write.csv(results,"res.csv") Being Warren Buffett
Connections to reality and thoughts on “pink” • GREEN performs like the US stock market (adjusted for inflation) • WHITE represents the (inflation adjusted) performance of US Treasury Bills • Quote from authors: “We made up RED. We don’t know of any investment that performs like RED. If you know of one, please tell us so we can make PINK!” Being Warren Buffett
Boxplots of results (needs rescaling) $80 billion! Being Warren Buffett
Boxplots of results (where returns <=$50,000) Being Warren Buffett
Implementation in SAGE (kudos to Randy P.) http://www.sagenb.org/home/pub/2184 Being Warren Buffett
Teaching materials and checklist • Copies of handout describing the simulation (one per student) • Copies of results sheet (one per group) • Set of three die (though one will work in a pinch, one set per group) • Remind students to bring calculators (or run this in a lab rather than lecture) • Time requirements: between 50 and 80 minutes (depending in part on whether you calculate expected values, motivate the simulation parameters in terms of historical inflation and stock returns and whether “pink” is introduced) Being Warren Buffett
Extensions and assessment • The activity was developed for use in both an MBA and PhD program • The paper introduces concepts of “volatility drag” and “volatility adjusted return” as more advanced topics (potentially applicable as a project at the end of a undergraduate probability class), as well as connections to calculus • Verifying the expected value and standard deviation of one of the investment strategies is a straightforward homework assignment (other assessments possible) • Students without formal exposure to expectations of discrete random variables can still fully participate in the simulation Being Warren Buffett
Conclusions • Hands-on activity is popular with students • Helps to reinforce important but often confused concepts in the context of a real world application • Small group work helps to address questions as they arise • Students turn in results to allow review of results (in addition to immediate display of summary and graphical statistics) Being Warren Buffett
Being Warren Buffett: a classroom and computer simulation of the stock market June 30, 2010 Nicholas J. Horton Department of Mathematics and Statistics Smith College, Northampton, MA nhorton@smith.edu http://www.math.smith.edu/~nhorton