Professional Documents
Culture Documents
All S&P500
All S&P500
1/11/2022
Data Extraction
This study focused on all the S&P 500 comapanies. The dataset was obtained live from both wikipedia and
yahoo finance using webscraping technique.
Descriptive statistics
I used the Adjusted daily prices of S&P 500 stocks. The top 10 companies with the higest range are
“NVR”,“AMZN”, “GOOG”,“GOOGL” ,“BKNG” , “AZO” ,“CMG”,“MTD”,“TSLA”,“BLK”.
## # A tibble: 10 x 2
## Ticker rang
## <chr> <dbl>
## 1 NVR 5384.
## 2 AMZN 3623.
## 3 GOOG 2797.
## 4 GOOGL 2779.
## 5 BKNG 2473.
## 6 AZO 1950.
## 7 CMG 1858.
## 8 MTD 1608.
## 9 TSLA 1227.
## 10 BLK 865.
These ranges represent the difference between the minimum and maximum price of these 10 stocks from
January 4th, 2010 to January 6th, 2022.
the overall summary statistics of the top 10 S&P 500 stocks with the highest range can be seen below:
## NVR AMZN GOOG GOOGL
## Min. : 575.3 Min. : 108.6 Min. : 217.2 Min. : 218.3
## 1st Qu.: 900.4 1st Qu.: 258.0 1st Qu.: 373.2 1st Qu.: 375.0
## Median :1594.1 Median : 593.6 Median : 706.6 Median : 725.2
## Mean :2058.6 Mean :1069.6 Mean : 872.4 Mean : 876.8
## 3rd Qu.:3086.0 3rd Qu.:1752.5 3rd Qu.:1140.5 3rd Qu.:1146.3
## Max. :5959.3 Max. :3731.4 Max. :3014.2 Max. :2996.8
##
## BKNG AZO CMG MTD
## Min. : 175.2 Min. : 154.4 Min. : 86.43 Min. : 94.1
## 1st Qu.: 694.9 1st Qu.: 382.4 1st Qu.: 324.63 1st Qu.: 197.9
## Median :1287.7 Median : 664.7 Median : 454.28 Median : 336.3
## Mean :1311.3 Mean : 698.5 Mean : 590.94 Mean : 480.3
## 3rd Qu.:1860.4 3rd Qu.: 833.7 3rd Qu.: 688.04 3rd Qu.: 652.8
## Max. :2648.2 Max. :2104.0 Max. :1944.05 Max. :1702.5
##
1
## TSLA BLK
## Min. : 3.16 Min. :102.5
## 1st Qu.: 17.54 1st Qu.:174.1
## Median : 46.15 Median :305.4
## Mean : 124.74 Mean :344.7
## 3rd Qu.: 66.89 3rd Qu.:437.3
## Max. :1229.91 Max. :967.0
## NA's :122
The ggplot below shows an upward trend for all the 10 stocks from January 2010 to January 2022.
1500
2000 2000
1000
1000
2000 300
0
2010 2015 2020 2010 2015 2020
Date
2
6000
Ticker
AMZN
AZO
4000
BKNG
Adj_close
BLK
CMG
GOOG
GOOGL
2000
MTD
NVR
TSLA
3
Top 10 with highest risks
## AMD AAL PENN APA FCX NFLX UAL MRO
## 12.703827 11.005572 10.523110 10.409478 10.354418 10.004569 9.400819 9.232551
## RCL MU
## 9.126235 9.012439
Correlation Analysis
The top 10 high return stocks are all highly correlated. This means a shock in one might lead to a shock in
the others.
## corrplot 0.84 loaded
##
## Attaching package: 'rstatix'
## The following object is masked from 'package:timeSeries':
##
## filter
## The following object is masked from 'package:stats':
##
## filter
## # A tibble: 10 x 11
## rowname NFLX DXCM NVDA ABMD DPZ URI ALGN AMD AVGO FTNT
## * <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 NFLX 1 0.92 0.9 0.91 0.98 0.9 0.95 0.89 0.96 0.88
## 2 DXCM 0.92 1 0.94 0.72 0.93 0.87 0.89 0.96 0.91 0.95
## 3 NVDA 0.9 0.94 1 0.75 0.91 0.92 0.94 0.97 0.92 0.97
## 4 ABMD 0.91 0.72 0.75 1 0.89 0.8 0.88 0.69 0.86 0.72
## 5 DPZ 0.98 0.93 0.91 0.89 1 0.91 0.94 0.89 0.97 0.9
## 6 URI 0.9 0.87 0.92 0.8 0.91 1 0.95 0.86 0.94 0.91
## 7 ALGN 0.95 0.89 0.94 0.88 0.94 0.95 1 0.9 0.95 0.92
## 8 AMD 0.89 0.96 0.97 0.69 0.89 0.86 0.9 1 0.9 0.95
## 9 AVGO 0.96 0.91 0.92 0.86 0.97 0.94 0.95 0.9 1 0.91
## 10 FTNT 0.88 0.95 0.97 0.72 0.9 0.91 0.92 0.95 0.91 1
4
Energy(CMS), Linde(LIN), Consolidated Edison(ED), American Electric Power(AEP). The value at risk for
Verizon Communications(VZ) is 5.36 and the expected shortfall is 6.36. This means considering the monthly
extreme values (extreme losses), if a loss is to occur in the next trading day (January 7th, 2022), verizon
share holders would have lost at least 5.35%. If that happens the average expected lost would be 6.33%.
Notice that Verizon Communications(VZ), PepsiCo(PEP), Duke Energy(DUK), Consolidated Edison(ED)
are part of the top 10 less volatile stocks and they fall in the utilities and communication companies.
From the Block maxima plot below of Verizon(VZ) the finding of a relatively stable(less volatile) stock
throughout the sample period is mirrored in this graph exept for some few cases where we had some spikes.
Hence, the assumption of identically distributed block maxima might be met. PepsiCo(PEP) appears to
be more stable than Verizon exept for an isolated case that happens toward the end of the sample period
(around 2020). Both stocks have recorded high losses around 2020.
10
5
5
Maximum Monthly Losses of PepsiCo
8
7
6
Block Maxima
5
4
3
2
1
6
## [1] 2.3663518 1.2625433 0.2541478
##
## $se
## [1] 0.12076529 0.09911149 0.07453710
Probability Plot Quantile Plot
15
Empirical
Model
0.6
5
0.0
Empirical Model
25
0.20
f(z)
10
0.00
0
Return Period z
7
Profile Log−likelihood
−550
5 10 15 20 25 30
Return Level
Profile Log−likelihood
−1e+06
Shape Parameter
## $conv
## [1] 0
##
## $nllh
## [1] 217.7727
##
## $mle
## [1] 1.5881418 0.8096606 0.2537908
##
## $se
## [1] 0.07864498 0.06487649 0.08112234
8
Probability Plot Quantile Plot
7
Empirical
Model
0.6
4
0.0
1
0.0 0.2 0.4 0.6 0.8 1.0 2 4 6 8 10
Empirical Model
15
0.3
f(z)
0 5
Return Period z
−350
5 10 15 20 25 30
Return Level
Profile Log−likelihood
−1e+06
Shape Parameter
9
Conclusion
This study focused on all the five hundred and six (506) S&P 500 companies. While there was no data
available for two of the compnies, I first focused on the 503 companies with available data, however little
for some. I found that the top 10 most valued companies(high range price) include NVR, AMZN, GOOG,
GOOGL, BKNG , AZO, CMG, MTD, TSLA, BLK. Overall these stocks shows no sign of slow down when it
comes down to their prices.
Some of the companies were founded and listed to the stock exchange just of recent and so do not have
available data. Focusing our study on the 442 S&P 500 stocks that have available data from January
5th 2010 to January 6th 2022. Of the 442 stocks, I found that the top 10 companies with the highest
return include: Netflix(NFLX), Dexcom( DXCM), Nvidia(NVDA), Abiomed(ABMD), Domino’s Pizza(DPZ),
United Rentals(URI), Align Technology(ALGN), Advanced Micro Devices(AMD). It was also revealed from
the correlation analysis that these comapnies are highly correlated. The top 10 less volatile stocks are:
Johnson & Johnson(JNJ), Procter & Gamble(PG), PepsiCo(PEP),Verizon Communications(VZ), Coca-
Cola(KO),Colgate-Palmolive(CL), Kimberly-Clark(KMB),Duke Energy(DUK),Waste Management(WM),
Consolidated Edison(ED). None of the most valued companies made it to the highest return or less volatile
list.
While digging deep our study with extreme value analysis, the Block Maxima approach shows that the top
10 S&P 500 stocks with the lowest Value at risk(VaR) and Expected shortfall(ES) are: Verizon Communica-
tions(VZ), PepsiCo(PEP), Xcel Energy(XEL), Duke Energy(DUK), Southern Company(SO), Public Service
Enterprise Group(PEG), CMS Energy(CMS), Linde(LIN), Consolidated Edison(ED), American Electric
Power(AEP).
Recommendation
For a long term investment, stable or less risky stocks, I would recommend Verizon Communications(VZ),
PepsiCo(PEP), Duke Energy(DUK), Consolidated Edison(ED). These four companies fall in the utilities
and communication cathegory. Therefore the top 10 most reliable and stable S&P 500 companies would
be in the Electric utilities, communication and comsumer staples(soft drink) and should include Verizon
Communications(VZ), PepsiCo(PEP), Xcel Energy(XEL), Duke Energy(DUK), Southern Company(SO),
Public Service Enterprise Group(PEG), CMS Energy(CMS), Linde(LIN), Consolidated Edison(ED), American
Electric Power(AEP). This study shows how stable these companies and sector/industry are and how unlikely
a huge or extreme loss would occur. It’s important to avoid holding a portfolio made up of all or many of the
high return stocks since they are all highly correlated.
10