Download presentation
Presentation is loading. Please wait.
Published byRoderick Palmer Modified over 9 years ago
1
Analyzing financial data in an Introductory Statistics Course Kelly Fitzpatrick, CFA Assistant Professor of Mathematics County College of Morris Kfitzpatrick@ccm.edu
2
Abstract Students today are very brand savvy; they have their favorite cell phone company, coffee shop, social media outlet or clothing store. Many of these companies are publicly traded on an exchange and students will enjoy analyzing the dataset (prices or returns) of their favorite companies. This webinar will cover how to download financial data from Yahoo Finance and the Bureau of Labor Statistics. We will also cover a gambit of analysis tools that can be used to analyze financial data; from box and whisker plots, correlation and regression analysis to hypothesis testing. We will look at the effects of the Deep Horizon / BP Oil Spill of 2010, differences in Facebook and Apple stock and the domestic and international unemployment rates. Students will enjoy analyzing real world data that is interesting to them.
3
#2 Use Real Data #3 Stress conceptual understanding #4 Foster active learning in the classroom #5 Use technology for developing conceptual understanding and analyzing data Personalize and individualize your datasets GAISE Report Recommendations:
4
Objectives for this webinar How to download data from Yahoo Finance How to download data from Bureau of Labor Statistics How to analyze stock prices / stock returns How to analyze the unemployment rates Using financial data in the introductory statistics class Plotting Detection of outliers Binomial Probability Hypothesis Testing Correlation Analysis Regression Analysis Anova What topic are you most interested in covering today?
5
British Petroleum (BP) is the largest oil and gas producer in the United States and the second largest company in the United Kingdom. BP is one of the most widely held stocks in the United Kingdom, with about 30% of the population holding BP stock in their portfolios. Analyze the data below and investigate for yourself the effects that the 2010 oil spill in the Gulf of Mexico has had on the stock price. Price data for BP goes back as far as 1991. Analyzing the effects of BP Oil Spill
6
www.yahoo.com – Finance – Quote Lookup Go – Historical Prices
10
Scroll down to the bottom of the page and select “Download to Spreadsheet”
11
DateOpenHighLowCloseVolumeAdj Close 12/1/201439.6241.5934.8838.361089220036.663708 11/3/201442.9443.0839.1939.32669640037.581257 10/1/201443.8444.1439.4543.46725950040.939796 9/2/201447.5748.1143.843.95959990041.401382 8/1/201448.6649.3946.7747.84468090045.065804 7/1/201452.953.4848.748.97424600045.574661 6/2/201450.7653.4849.8752.75344710049.092575 5/1/201450.5651.5650.2150.45419350046.952045 4/1/201448.3150.7747.1450.62463740046.57114
12
Formatting issues that need to be addressed 1. Too much information- delete information that is not needed highlight columns that are not needed and delete them 2. Reverse chronological order- oldest price to most recent price select all of the data home tab – hit sort and filter – oldest to newest 3. Adding the daily returns =(today’s price – yesterdays price)/yesterdays price 4. Save the file in the format you need. CSV is the default DateOpenHighLowCloseVolumeAdj Close 12/1/201439.6241.5934.8838.361089220036.663708 11/3/201442.9443.0839.1939.32669640037.581257 10/1/201443.8444.1439.4543.46725950040.939796 9/2/201447.5748.1143.843.95959990041.401382 8/1/201448.6649.3946.7747.84468090045.065804 7/1/201452.953.4848.748.97424600045.574661 6/2/201450.7653.4849.8752.75344710049.092575 5/1/201450.5651.5650.2150.45419350046.952045 4/1/201448.3150.7747.1450.62463740046.57114 3/3/201449.3949.8746.2948.1634400044.252705 2/3/201446.7351.0245.8350.61575310046.561943 1/2/201448.4349.246.6246.89614690042.633633
13
DateCloseReturns 1/3/200053.75 2/1/200047.0625-12% 3/1/200053.2513% 4/3/200051-4% 5/1/200054.56257% 6/1/200056.6254% 7/3/200052.3125-8% 8/1/200055.256% 9/1/200053-4% 10/2/200050.9375-4% 11/1/200047.4375-7% 12/1/200047.8751% 1/2/200151.58% 2/1/200149.6-4% 3/1/200149.620% 4/2/200154.089% 1.Deleted unnecessary information 2.Reverse chronological order-check it 3.Created the return column 4.Delete the first entry 5.Save the file in the format you need DateCloseReturns 2/1/200047.0625-12% 3/1/200053.2513% 4/3/200051-4% 5/1/200054.56257% Editing the Source File
15
BP Returns Mean0% Standard Deviation.07 = 7%
16
Critical Value Test: If calculated r > cv data is ND.97 17<.993 conclude data is NOT ND
17
P(x=E).5 0 (1-.5) 5 The probability of success Success Part Failure Part The Combination Rule P(x=all failure) 3.13%
18
Breakeven If a stock’s return is down (negative) 30% in one month and the following month the stock’s return is up (positive) 30% are you back to your original value? 1. Yes 2. No
19
Analyzing the Unemployment Rates This is a “house hold survey”, door to door, n = 50,000 Reported monthly on the first Friday of the month Seasonally adjusted Three questions are asked: 1. Are you currently employed? 2. Are you not employed but actively looking for work? 3. Are you not employed and not actively looking for work? (not in the labor force) Students, stay at home moms, discouraged workers are considered not in the labor force
20
Calculating the Unemployment Rate 1. 18,000 are employed and currently working 2. 2,000 are not employed but looking 3. 30,000 are not in the labor force- stay at home moms, students, discouraged workers 4. The rate of unemployment will be = 2,000/(18,000+2,000) =.10 = 10%
21
www.bls.gov - Data Tools – Top Pics
25
Labor Force Statistics from the Current Population Survey Original Data Value Series Id:LNS14000000 Seasonally Adjusted Series title:(Seas) Unemployment Rate Labor force status:Unemployment rate Type of data:Percent or rate Age:16 years and over Years: 2005 to 2015 YearJanFebMarAprMayJunJulAugSepOctNovDec 20055.35.45.2 5.15.0 4.95.0 4.9 20064.74.84.7 4.6 4.7 4.54.44.54.4 20074.64.54.44.54.44.64.74.64.7 5.0 20085.04.95.15.05.45.65.86.1 6.56.87.3 20097.88.38.79.09.49.5 9.69.810.09.9 20109.8 9.9 9.69.4 9.5 9.49.89.3 20119.29.0 9.19.09.19.0 8.88.68.5 20128.3 8.2 8.07.8 7.77.9 20138.07.77.57.67.5 7.37.2 7.06.7 20146.66.76.66.26.36.16.26.15.95.75.85.6 20155.75.5 5.45.55.3 Unformatted Dataset- Original File
26
YearAverage 19955.6 19965.4 19974.9 19984.5 19994.2 20004.0 20014.7 20025.8 20036.0 20045.5 20055.1 20064.6 20074.6 20085.8 20099.3 20109.6 20118.9 20128.1 20137.4 20146.2 Editing the Source File 1.Deleted unnecessary information 2.Reverse chronological order-check it 3.Created the average column, simplify dataset 4.Save the file in the format you need
27
Looking at Boxplots for different time periods 1950s1960s1970's1980s1990s2000s 5.215.544.987.185.623.97 3.286.695.957.626.854.74 3.035.575.69.717.495.78 2.935.644.869.66.915.99 5.595.165.647.516.15.54 4.374.518.487.195.595.08 4.133.797.775.414.61 4.33.847.056.184.944.62 6.843.566.075.494.55.8 5.453.495.855.264.229.28
29
Hypothesis Testing Determine at a 5% significance level if the average monthly Unemployment rate from year 2010 is greater then the historical average of 5.7%. R Code for Student’s T-test: t.test(data, alternative = c(“greater"), mu = 5.7, conf.level = 0.95) One Sample t-test data: data t = 61.8571, df = 10, p-value = 1.482e-14 alternative hypothesis: true mean is greater than 5.7 95 percent confidence interval: 9.521025 Inf sample estimates: mean of x 9.636364 If the p-value < alpha reject the Null 0 <.05 Reject the Null Conclude: The average monthly unemployment rate in 2010 greater than the historical mean. YearJanFebMarAprMayJunJulAugSepOctNovDecAverage 20109.8 9.9 9.69.4 9.5 9.49.89.3 9.6
30
Which Country has the highest unemployment rate in 2014? 1.Italy 2.France 3.Greece 4.Spain
31
Reference- “The Economist”, August 30 th 2014, page 76-77 CountryUnemploymentRateInterestRate10YearMiseryIndexCountryUnemploymentRateInterestRate10YearMiseryIndex United States6.22.388.58Russia4.99.3514.25 China4.14.028.12Sweden7.11.498.59 Japan3.70.54.2Switzerland3.20.563.76 Britain6.42.58.9Turkey8.89.0817.88 Canada72.059.05Australia6.43.339.73 Euroarea11.50.9112.41HongKong3.31.935.23 Austria51.146.14India8.88.5517.35 Belgium8.51.239.73Malaysia2.83.956.75 France10.21.2511.45Pakistan6.213.3319.53 Germany6.70.917.61Singapore22.34.3 Greece27.25.6732.87SouthKorea3.43.046.44 Italy12.32.3914.69Taiwan41.625.62 Netherlands8.21.19.3Thailand1.23.334.53 Spain24.52.1526.65Brazil4.911.4616.36 CzechRepublic7.41.218.61Chile6.54.3110.81 Denmark5.11.236.33Columbia9.26.6215.82 Hungry7.94.3312.23Mexico5.27.7512.95 Norway3.32.355.65Venezuela7.115.8122.91 Poland11.93.0614.96Isreal6.22.498.69 SouthAfrica25.57.7633.26
33
Analyzing a portfolio of stocks Data is from 1/2013 to 4/2013- daily returns AppleDisneyFacebookGeneralElecticTargetWalmart -1.260.22-0.82-1.122.28-0.64 -2.791.913.560.470.70.38 -0.59-2.342.29-0.331.19-0.96 0.27-0.41-1.22-1.09-1.080.28 -1.560.045.260.24-0.76-0.03 1.240.022.321.050.22-0.31 -0.61-0.411.34-0.19-0.40.39 AppleDisneyFacebookGeneralElecticTargetWalmart Apple1.000.100.040.08-0.130.01 Disney0.101.000.080.430.160.11 Facebook0.040.081.000.11-0.07-0.16 GeneralElectic0.080.430.111.000.150.11 Target-0.130.16-0.070.151.000.47 Walmart0.010.11-0.160.110.471.00 Raw Data Correlation Matrix
35
Regression Analysis-Anova You want to predict the price of Target what stock will give you the best results?
36
Top 20 Jobs for New Graduates Where do you think the job of “Statistician” ranks in the list of the top 20 jobs for new graduates based on mean salary, share of occupation that is under the age of 35 and projected job growth? 1. 1 st to 5 th 2. 6 th to 10 th 3. 11 th to 15 th 4. 16 th to 20 th
37
Jobs for statisticians are expected to grow 27% more than double the average of all other jobs.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.