Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

googleFinanceData

Historical Price Data Download from Google Finance


Description

Download historical time series from Google Finance

Usage

googleFinanceData(sym, current = TRUE, sy = 2005, sm = 1, sd = 1, ey,
  em, ed)

Arguments

sym

A character string for a (tradeable) symbol

current

A logical switch to indicate whether the current time is the endtime

sy

An integer value for the start year, default is 2005

sm

An integer value for the start month, default is 1

sd

An integer value for the start date, default is 1

ey

An optional integer value for the end year, required if current is false

em

An optional integer value for the end month, required if current is false

ed

An optional integer value for the end day, required if current is false

Details

The function uses an (unofficial) older CGI-style interface at Google to download historical data.

Value

A data.table object with a key on date

Author(s)

Dirk Eddelbuettel

See Also

The post at https://chrisconlan.com/download-historical-stock-data-google-r-python/ provided the initial starting point


dang

'Dang' Associated New Goodies

v0.0.13
GPL (>= 2)
Authors
Dirk Eddelbuettel with contributions by Brodie Gaslam, Kevin Denny, Kabira Namit, Colin Gillespie, R Core, Josh Ulrich, and others.
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.