Skip to content

aschlesener/stock-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stock-analyzer

StockAnalyzer calculates stock data using the Quandl WIKI stock price API.

Given a list of securities and a date range, StockAnalyzer will calculate the following information:

  • Average monthly open and close prices
  • Maximum daily profit
    • Day within dataset that would produce the maximum daily profit, if purchased at that day's low and sold at that day's high
  • Busiest days
    • >10% average volume for that security
  • Biggest loser
    • Security with the most days where the closing price was less than the opening price

Usage

Prerequisites: Go. You also must have an API key from Quandl. You can get one by signing up for a free account at Quandl

go get github.com/aschlesener/stock-analzyer
cd $GOPATH/src/github.com/aschlesener/stock-analyzer/cmd
go build
./cmd -apiKey="YOUR QUANDL API KEY HERE"

By default, the average monthly open and close prices are displayed. To calculate the other available data, select one of the following flags:

-maxDailyProfit
-busiestDays
-biggestLoser

Tests

First install the testify library:

go get github.com/stretchr/testify

Then run tests:

cd analyzer
go test -cover

License

MIT

About

A Golang stock analyzer using the Quandl API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages