rsquaredacademy / yahoofinancer

Obtain historical and near real time data from Yahoo Finance
https://yahoofinancer.rsquaredacademy.com
Other
13 stars 2 forks source link

adj_close #17

Open mg64ve opened 1 week ago

mg64ve commented 1 week ago

Hello, could you please just explain me why adj_close is a list?

image

Thanks. Regards.

aravindhebbali commented 1 week ago

Looks like a bug. Will push the fix to the development version.

library(yahoofinancer)
aapl_ticker <- Ticker$new('aapl')
aapl_data <- aapl_ticker$get_history(start = "2023-01-01", end = "2023-12-31")
str(aapl_data)
#> 'data.frame':    250 obs. of  7 variables:
#>  $ date     : POSIXct, format: "2023-01-03 14:30:00" "2023-01-04 14:30:00" ...
#>  $ volume   : int  112117500 89113600 80962700 87754700 70790800 63896200 69458900 71379600 57809700 63646600 ...
#>  $ high     : num  131 129 128 130 133 ...
#>  $ low      : num  124 125 125 125 130 ...
#>  $ open     : num  130 127 127 126 130 ...
#>  $ close    : num  125 126 125 130 130 ...
#>  $ adj_close: num  124 125 124 128 129 ...

Created on 2024-11-17 with reprex v2.1.1