Load the libraries
library("readr")
library(wbstats)
library(quantmod)
## 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
Return the daily stock price during 2024-10-01 ~ 2025-01-31
getSymbols("MSFT", src="yahoo",from = "2024-10-01", to = "2025-02-01")
## [1] "MSFT"
How many days did we obtain?
dim(MSFT)
## [1] 84 6
Find the time period with the highest open prices
plot(MSFT$MSFT.Open)
