https://github.com/scottroot/scottstock
Yahoo stock data and analysis in R
https://github.com/scottroot/scottstock
Last synced: 11 days ago
JSON representation
Yahoo stock data and analysis in R
- Host: GitHub
- URL: https://github.com/scottroot/scottstock
- Owner: scottroot
- Created: 2020-02-21T18:51:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-24T15:59:01.000Z (over 6 years ago)
- Last Synced: 2025-10-24T21:02:06.756Z (9 months ago)
- Language: R
- Size: 310 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scottstock
Yahoo stock data and analysis in R
# Purpose
Get Yahoo stock data into a dataframe in R more quickly and easily for students
# Usage
scottstock(ticker, frequency, start_date, end_date)
# Arguments
#### ticker
The stock symbol you want: "MSFT", or you can specify multiple by c("MSFT", "FB")
#### frequency
The type of data you want to pull: "daily", "weekly", "monthly", "yearly"
#### start_date
The earliest date from which you want to pull data: "MM-DD-YYYY" surrounded by quotes
#### end_date
The latest date from which you want to pull data: "MM-DD-YYYY" surrounded by quotes
# References
This script is a wrapper for Marcelo Perlin's BatchGetSymbols package that also automates analysis and regression commands.
# Examples
myStock <- scottstock("MSFT","monthly",
"01-01-2019", "12-31-2019")