A simple command line interface app built in Ruby.
HindSite has one function that can be called from the terminal eod-history-for
. The function takes a date
and a stock code
as arguments. It returns a link to an image file that contains the total return and maximum drawdown for the given stock for a time period that begins with the given date and ends with the current date.
eod-history-for 2018-10-20 HD
returns the calculated values for the HD
stock from the time period which starts at 2018-10-20
and finishes at todays date.
- Requires Ruby 2.5 and Bundler.
- You will need a Quandl account.
- You will need an imgflip account.
- Clone the Repo
cd hindsight
bundle install
touch config/api_key.rb
- fill out the new config file using
api_key.rb.example
as a guide. rspec
- make sure all the test are green :Dbundle exec ruby app/hindsight.rb
to start the programeod-history-for
+ date + stock code
- There is currently no error handling for input so be sure to format dates correctly.
- Currenlty there are only unit tests. An integration test, with mocked API calls, is probably worth adding.