##This is the Stock Visualzation to compare the Price, PE, Dividend, and Market Cap. You can improve the forcast and the profit year by year.

#Import Stock

## Loading required package: xts
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## Loading required package: TTR
## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo

#Select “XOM”,“MSFT”,“JNJ”,“GE”,“CVX”,“WFC”,“PG”,“JPM”,“VZ”,“PFE”,“T”,“IBM”,“MRK”,“BAC”,“DIS”,“ORCL”,“PM”,“INTC”,“SLB”

#Rename column

##      Stock                Time   Last       PE  EPS_Next    Dividend
## XOM    XOM 2021-01-22 16:00:01  47.43 60.96401 24.575130 0.072334230
## MSFT  MSFT 2021-01-22 16:00:01 225.95 36.44943 30.207218 0.009290127
## JNJ    JNJ 2021-01-22 16:00:02 163.55 25.71541 18.192436 0.024237929
## GE      GE 2021-01-22 16:00:02  11.11 31.56250 29.236841 0.003613370
## CVX    CVX 2021-01-22 16:00:02  91.73       NA 25.551533 0.054994020
## WFC    WFC 2021-01-22 16:00:02  31.90 77.80488  9.876161 0.038125000
## PG      PG 2021-01-22 16:00:01 130.00 24.56538 21.558872 0.023799712
## JPM    JPM 2021-01-22 16:00:02 133.79 15.06644 11.808473 0.026700288
## VZ      VZ 2021-01-22 16:00:01  57.47 13.00226 11.540161 0.043181423
## PFE    PFE 2021-01-22 16:00:01  36.55 23.76463 11.790322 0.041118420
## T        T 2021-01-22 16:00:01  28.93 19.03290  9.155063 0.072147064
## IBM    IBM 2021-01-22 16:00:01 118.61 19.04158  9.317361 0.049449302
## MRK    MRK 2021-01-22 16:00:02  80.98 17.88428 12.477659 0.029317567
## BAC    BAC 2021-01-22 16:00:01  31.55 16.87166 11.267857 0.022662890
## DIS    DIS 2021-01-22 16:00:04 172.78       NA 36.222220 0.005137786
## ORCL  ORCL 2021-01-22 16:00:02  60.36 18.25771 12.897436 0.015683712
## PM      PM 2021-01-22 16:00:02  80.68 16.34853 13.886403 0.057912210
## INTC  INTC 2021-01-22 16:00:01  56.66 11.46964 11.779626 0.021133527
## SLB    SLB 2021-01-22 16:00:02  24.41       NA 28.057470 0.036171973
##        Market_Cap
## XOM  2.005449e+11
## MSFT 1.708295e+12
## JNJ  4.305519e+11
## GE   9.732216e+10
## CVX  1.765812e+11
## WFC  1.321939e+11
## PG   3.201224e+11
## JPM  4.079792e+11
## VZ   2.378160e+11
## PFE  2.031595e+11
## T    2.061552e+11
## IBM  1.056883e+11
## MRK  2.048818e+11
## BAC  2.729331e+11
## DIS  3.134678e+11
## ORCL 1.817373e+11
## PM   1.256446e+11
## INTC 2.302096e+11
## SLB  3.397945e+10

#Check the data

##                     Time   Last       PE  EPS_Next    Dividend   Market_Cap
## XOM  2021-01-22 16:00:01  47.43 60.96401 24.575130 0.072334230 2.005449e+11
## MSFT 2021-01-22 16:00:01 225.95 36.44943 30.207218 0.009290127 1.708295e+12
## JNJ  2021-01-22 16:00:02 163.55 25.71541 18.192436 0.024237929 4.305519e+11
## GE   2021-01-22 16:00:02  11.11 31.56250 29.236841 0.003613370 9.732216e+10
## CVX  2021-01-22 16:00:02  91.73       NA 25.551533 0.054994020 1.765812e+11
## WFC  2021-01-22 16:00:02  31.90 77.80488  9.876161 0.038125000 1.321939e+11

#Visualization of Stock Performance #Visualization of PE

## Warning: Removed 3 rows containing missing values (position_stack).
## Warning: Removed 3 rows containing missing values (geom_text).

#Visualization of dividend #Visualization of market cap