PROGRAMATICALLY
GETTING STOCK DATA WITH R
SCHWANNDEN KUO
SCHWANNDEN KUO
DATASTREAM IS NOT PERFECT
▸ Datastream has a nice interface
when looking at data, but a bad
one when fetching data with excel.
▸ It is extremely slow when fetching
large amount of data.
▸ Slow is fine, but sometimes it
crashes for fetching too many data.
SCHWANNDEN KUO
DATASTREAM IS NOT PERFECT
▸ If I want all stock data from
NASDAQ listing, I can’t select all
symbols, because symbol strings
are too long, it exceeds excel’s limit.
▸ Even if I create my own token for
the list of symbol, Datastream
fetches all data at once, filling up
the entire RAM, causing the
computer to crash.
▸ Slow is fine, but crash is not
acceptable.
USE R TO GET THE
DATA
github.com/schwannden/
stock.data
DOWNLOAD RSTUDIO
https://www.rstudio.com/
DOWNLOAD R SCRIPT
github.com/schwannden/stock.data
RUN SCRIPT
SCHWANNDEN KUO
MINIMAL SETUP
SCHWANNDEN KUO
MY SETUP
SCHWANNDEN KUO
MY SETUP
USE DATA TO
CREATE WEBSITE
github.com/schwannden/
statock
SCHWANNDEN KUO
WHY WEBSITE
▸ platform independent
▸ highly customisable
▸ just for fun
▸ don’t repeat yourself
▸ live at:

statock.schwannden.com

Programatically getting stock data with R