Free Data: Alternative to Yahoo Finance

Alpha Vantage have an API that offers free data. They have intraday data which spans the last 10 to 15 days at resolutions of 1min, 5min, 15min, 30min, 60min.

Daily, weekly, and monthly data which spans the past 20 years.

We can use R to interact with the aplha advantage API. We use the fread() command from the data.table package to directly download data to a data frame within R.

Note: insert your own Alpha Vantage API code inside the URL

GE <- fread("") #fread() data.table for downloading directly to a data frame
GE$timestamp <- ymd(GE$timestamp)   #Lubridate to change character date to date format
GE <- arrange(GE,timestamp)   #dplyr to sort data frame by date ascending order 

#Plot GE Data
plot(GE$timestamp,GE$close,type="l",main="Alpha Vantage - GE Close Prices")


There are different variables that go into the alpha advantage URL and for full usage you may visit the documentation page.

Download Multiple .csv Files To Hard Drive

If we want to download multiple files at one time. We can self specify them in a vector and use a loop to download each file name in that vector.

# Download multiple .csv files to hard drive
# Self specify symbols in a vector
file.list <- c("DDM","MVV","QLD","SAA","SSO","TQQQ","UDOW","UMDD","UPRO","URTY","UWM", "BIB", "FINU","LTL","ROM", "RXL", "SVXY","UBIO","UCC","UGE","UPW","URE","USD","UXI","UYG","UYM","DOG","DXD","MYY","MZZ","PSQ","QID","RWM","SBB","SDD","SDOW","SDS","SH","SPXU","SQQQ","SRTY","TWM","SMDD","UVXY","VIXM","VIXY")

for (i in 1 : length(file.list)) { <-  file.list[i]
  url <- paste0("",,"&outputsize=full&apikey=YOUR_API_KEY_HERE&datatype=csv")
               destfile <- paste0("D:/R Projects/",
                        , ".csv")
               download.file(url, destfile, mode="wb")


Or if we can find a list of symbols online we can import those into R and iterate through each symbol and download each file to our hard drive.

Import 1700 ETF Symbols From – Download .csv To Hard Drive

In this case we can read an ETF list of 1700 symbols from
Then we can download each symbol to our hard drive:

# Read ETF list csv file from
# Use fread() from data.table package
# install.packages("data.table")
require(data.table) <- fread("")

# Make vector of symbol names
symbol.names <-$Symbol

# Count Total ETF tickers

for (i in 1 : length(symbol.names)) { <-  symbol.names[i]
  url <- paste0("",,"&outputsize=full&apikey=YOUR_API_CODE_HERE&datatype=csv")
  destfile <- paste0("D:/R Projects/",
           , ".csv")
  download.file(url, destfile, mode="wb")

Also to note.. you may import a symbol list from your hard drive. The same principal applies.


Author: Andrew Bannerman

Integrity Inspector. Quantitative Analysis is a favorite past time.

One thought on “Free Data: Alternative to Yahoo Finance”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s