library(quantmod)
## Warning: package 'quantmod' was built under R version 4.1.3
## Loading required package: xts
## Warning: package 'xts' was built under R version 4.1.3
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 4.1.3
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Loading required package: TTR
## Warning: package 'TTR' was built under R version 4.1.3
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(dygraphs)
## Warning: package 'dygraphs' was built under R version 4.1.3
library(tseries)
## Warning: package 'tseries' was built under R version 4.1.3
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.6 v dplyr 1.0.8
## v tidyr 1.2.0 v stringr 1.4.0
## v readr 2.1.2 v forcats 0.5.1
## Warning: package 'ggplot2' was built under R version 4.1.3
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::first() masks xts::first()
## x dplyr::lag() masks stats::lag()
## x dplyr::last() masks xts::last()
getSymbols(Symbols = "DELL",from='2016-08-17',auto.assign = T)
## [1] "DELL"
tail(DELL)
## DELL.Open DELL.High DELL.Low DELL.Close DELL.Volume DELL.Adjusted
## 2022-09-23 35.66 36.16 34.80 35.52 2881200 35.52
## 2022-09-26 35.07 35.66 34.63 34.70 3611400 34.70
## 2022-09-27 35.31 35.68 34.55 34.72 3306600 34.72
## 2022-09-28 34.51 35.40 34.51 35.29 2908400 35.29
## 2022-09-29 34.68 34.93 33.81 34.19 4703500 34.19
## 2022-09-30 34.33 34.96 34.09 34.17 3041100 34.17
str(DELL)
## An 'xts' object on 2016-08-17/2022-09-30 containing:
## Data: num [1:1542, 1:6] 12.2 12.3 12 12.1 12.3 ...
## - attr(*, "dimnames")=List of 2
## ..$ : NULL
## ..$ : chr [1:6] "DELL.Open" "DELL.High" "DELL.Low" "DELL.Close" ...
## Indexed by objects of class: [Date] TZ: UTC
## xts Attributes:
## List of 2
## $ src : chr "yahoo"
## $ updated: POSIXct[1:1], format: "2022-10-02 13:13:53"
chartSeries(DELL, TA=NULL)

barChart(DELL)

dygraph(DELL$DELL.Close,main = 'Time series of DELL stock price'
,ylab = 'Currency in USD')