Pulls down historical market data (daily quotes) for Equities from Yahoo Finance and saves to a postgres database.
- mkdir mktdatahst-wkspc
- cd mktdatahst-wkspc
- export GOPATH=
pwd
- mkdir src
- go get github.com/lib/pq
- go install github.com/lib/pq
- go get github.com//mktdata-hist
- go install github.com//mktdata-hist
create table if not exists daily_quotes_hst (symbol varchar(10), trade_dt date, open real, high real, low real, close real, volume integer, adj_close real);
- cp src/github.com//mktdata-hist/config.json bin/
- edit config.json to specify , symbols, years and database url
- cd bin
- ./mktdata-hst
When run on new year, logic will skip getting quotes for last day of the past year. As a workaround, delete all of the past year data and rerun the program.