

This means that the data is saved locally and only missing portions are downloaded, if needed.Īll dates are compared to a benchmark ticker such as SP500 and, whenever an individual asset does not have a sufficient number of dates, the software drops it from the output. You can, for example, download data for all stocks in the SP500 index with a simple call to yf_collection_get("SP500") Ī session-persistent smart cache system is available by default. Ret_adjusted_prices: The arithmetic or log return (see input type_return) for the closing stock prices Ĭumret_adjusted_prices: The accumulated arithmetic/log return for the period (starts at 100%).įetches daily/weekly/monthly/annual stock prices/returns from yahoo finance and outputs a dataframe (tibble) in the long format (stacked data) Ī new feature called collections facilitates download of multiple tickers from a particular market/index. Ret_adjusted_prices: The arithmetic or log return (see input type_return) for the adjusted stock prices Price_adjusted: The stock price adjusted for corporate events such as splits, dividends and others – this is usually what you want/need for studying stocks as it represents the real financial performance of stockholders Volume: The financial volume of the day/period, in the unit of the exchange Price_close: The close/last price of the day/period Price_high: The highest price of the day/period Price_open: The opening price of the day/period

Ref_date: The reference day (this can also be year/month/week when using argument freq_data) Ticker: The requested tickers (ids of stocks) The returned data contains the following columns:

For example, price data for GM (NASDAQ/US) is measured in dollars, while price data for PETR3.SA (B3/BR) is measured in Reais (Brazilian currency). All price data is measured at the unit of the financial exchange. The main function of the package, yfR::yf_get, returns a dataframe with the financial data.
