R – Scrape List Of ETF’s From Nasdaq.Com

Using the package data.table and the function fread() we can read a .csv file that is hosted on the internet without downloading it to our hard drive.

# Obtain List of ETFS From nasdaq.com
# Andrew Bannerman 10.4.2017


# Read ETF list csv file from nasdaq.com
# Use fread() from data.table package 
# install.packages("data.table")
read.data <- fread("http://www.nasdaq.com/investing/etfs/etf-finder-results.aspx?download=Yes")

# Subset Column 1, Symbol Column
symbol.col <- read.data$Symbol

# Export symbol column as .txt file 
write.table(symbol.col,"C:/R Projects/Data/etf_list_nasdaq_dot_com/etf.list.txt",append=TRUE,quote=FALSE,row.names=FALSE,col.names=FALSE)

# Count ETF tickers 

As of date 10.4.2017 there is a total of 1726 ETF’s listed on nasdaq.com.

Author: Andrew Bannerman

Integrity Inspector. Quantitative Analysis is a favorite past time.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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