Being Warren Buffett a classroom and computer simulation
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 n n 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 Horton - MOSAIC Being Warren Buffett 2
Overview n n n 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 Horton - MOSAIC Being Warren Buffett 3
Objectives n n n 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 Horton - MOSAIC Being Warren Buffett 4
Background information n n 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: Investment Green Red White n Expected annual return 8. 3% SD(annual return) 20% 71% 132% 0. 8% 4% Question: Which of the three investments seems the most attractive to the members of your group? Horton - MOSAIC Being Warren Buffett 5
Dice outcomes n The investments rise or fall based on the outcomes of a 6 -sided die: Outcome Green Red White 1 0. 8 0. 05 0. 95 2 0. 9 0. 2 1 3 1. 1 1 1 4 1. 1 3 1 5 1. 2 3 1 6 1. 4 3 1. 1 Horton - MOSAIC Being Warren Buffett 6
Example: n 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) Horton - MOSAIC Round Green Red White Start $1000 Return 1 0. 9 3 1 Value 1 $ 900 $3000 $1000 Return 2 1. 1 0. 2 1. 1 Value 2 $ 990 $ 600 $1100 Being Warren Buffett 7
Repeat the process for 20 years n n n 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 Horton - MOSAIC Being Warren Buffett 8
Group results form Horton - MOSAIC Being Warren Buffett 9
Usually, red doesn’t do as well as green Horton - MOSAIC Being Warren Buffett 10
But occasionally it wins big! Horton - MOSAIC Being Warren Buffett 11
Expected returns for 20 years n 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 n We’d always want to pick RED, no? n n n Horton - MOSAIC Being Warren Buffett 12
Observed returns (using simulation) n n Used R to simulate 5000 20 -year histories, available as “res. csv” Observed Q 1, median, Q 3 q q q n 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) q q q GREEN: 5. 9% RED: 72. 7% WHITE: 25. 0% Horton - MOSAIC Being Warren Buffett 13
Another strategy (“pink”) n n 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 Horton - MOSAIC Being Warren Buffett 14
How to implement PINK 3 $3000 0. 05 $150 Horton - MOSAIC Being Warren Buffett 1 $1000 Pink $1000 2 $2000 0. 525 $1050 15
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. 2, 1. 4) red = c(0. 05, 0. 2, 1, 3, 3, 3) white = c(0. 95, 1, 1, 1. 1) years = 20; numsims = 5000 n = years*numsims Horton – Causeweb - 2009 Being Warren Buffett 16
Implementation in R (cont. ) library(Hmisc) process = function(color) { xmat = matrix(r. Multinom(matrix(rep(1/6, 6), 1 , 6), nrow=numsims) res = rep(1000, numsims) # starting investment for (i in 1: years) { res = res*color[xmat[, i]] } return(res) } Horton – Causeweb - 2009 Being Warren Buffett 17
Implementation in R (cont. ) pink = function(col 1, col 2) { xmat 1 = matrix(r. Multinom(matrix(rep(1/6, 6), 1 , 6), nrow=numsims) xmat 2 = matrix(r. Multinom(matrix(rep(1/6, 6), 1 , 6), nrow=numsims) res = rep(500, numsims) for (i in 1: years) { redtmp = res*col 1[xmat 1[, i]] whitetmp = res*col 2[xmat 2[, i]] res = (redtmp+whitetmp)/2 } return(res*2) } Horton – Causeweb - 2009 Being Warren Buffett 18
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[pi nkres<50000]) # plotting on a log scale may be worth investigating results = data. frame(greenres, redres, whiteres, pinkres) write. csv(results, "res. csv") Horton – Causeweb - 2009 Being Warren Buffett 19
Connections to reality and thoughts on “pink” n GREEN performs like the US stock market (adjusted for n n 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!” Horton - MOSAIC Being Warren Buffett 20
Boxplots of results (needs rescaling) $80 billion! Horton – MOSAIC Being Warren Buffett 21
Boxplots of results (where returns <=$50, 000) Horton - MOSAIC Being Warren Buffett 22
Implementation in SAGE (kudos to Randy P. ) http: //www. sagenb. org/home/pub/2184 Horton – Causeweb - 2009 Being Warren Buffett 23
Teaching materials and checklist n n n 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) Horton - MOSAIC Being Warren Buffett 24
Extensions and assessment n n The activity was developed for use in both an MBA and Ph. D 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 Horton - MOSAIC Being Warren Buffett 25
Conclusions n n 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) Horton - MOSAIC Being Warren Buffett 26
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
- Slides: 27