cran / BatchGetSymbols

:exclamation: This is a read-only mirror of the CRAN R package repository. BatchGetSymbols — Downloads and Organizes Financial Data for Multiple Tickers
1 stars 0 forks source link

Time lag of last day's prices #4

Open AlexSiormpas opened 4 years ago

AlexSiormpas commented 4 years ago

I'm using the below script to fetch SP500 stock prices. I want to automate and run the process every day once the market is closed. How many hours should I leave from the time the market close until the data for the last day become available through BatchGetSymbols() function?

#---- Get the tickers for the all the S&P stock prices ----
    SP500 <- GetSP500Stocks()
    tickers <- SP500$Tickers

#---- Import historical stock data for all stocks ----
    future::plan(future::multisession, workers = floor(parallel::detectCores()/2))
    Stocks <- BatchGetSymbols(tickers = tickers,
                             first.date = as.Date("2005-01-01"),
                             last.date = Sys.Date(),
                             thresh.bad.data = 0.95,
                             do.fill.missing.prices = TRUE,
                             do.complete.data=TRUE,
                             freq.data='daily',
                             do.parallel=TRUE)
gaborcsardi commented 4 years ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Thanks!

nba2020 commented 4 years ago

Thank you! I'll get in touch with the author. What does read only mirror means? I'm new to coding/Github :)

gaborcsardi commented 4 years ago

https://r-pkg.org/services#github