I use getSymbols.yahoo to get a time-series of a stock price. I usually set some starting point in the past (lets say a date a year ago) and always the latest possible price from the last trading day. Everything works fine but for one thing. If I want to include the latest close price, I have a problem with that. Even though the US stock exchanges close at 4:00 pm ET, and you can also see the latest close price already on yahoo finance website for any stock you look up; I am unable to get a time series with the latest close price.
For example, today if I try to download stock prices after 4:00 pm ET, I will only get prices up to the 8th of December. Only after few hours past trading (my experience is 4 hours and more) I will be successful and my time-series will include. Why there is such a delay for the latest close price to download? No matter what kind of stock I am interested in, there is always this delay problem.
getSymbols
is accessing historical data (from CSI) which is updated a few hours after the closing of the markets. What you want is getQuote
, which gives you the latest quotes (even realtime). So if you want for instance update some indicators during market hours or right after the close you should append the quote you receive with getQuote
- after some data manipulation -, to the data you receive with getSymbols
. Have a look at ?getQuote
for different quote formats available.