Plunge into the word of securities!
- Ruby 2.5.1p57
- Bundler 1.16.1
Install required dependencies from the Gemfile:
bundle install
To query the Quandl WIKIP Stock Price API you need a token. To obtain a token you just need to create a free account with Quandl.
To use the script, move to the lib/ directory (until I will have time to create a proper gem) and run the pc (plunge command line) ruby file.
Get the monthly average of a security with the -a option:
ruby pc.rb -t <your_token> -a GOOGL
Get the days in which the data set would provide the highest amount of profit for each security if purchased at the day’s low and sold at the day’s high:
ruby pc.rb -t <your_token> -m GOOGL
Get the days where the volume was more than 10% higher than the security’s average volume:
ruby pc.rb -t <your_token> -bd GOOGL
Or find that out all together:
ruby pc.rb -t <your_token> -a -m -bd GOOGL
Before running the test, place your token in a file named token in the main project directory.
Run the tests with the command rspec
or bundle exec rspec
if you didn't install rspec globally in your system.
- Query API to return directly all the data we need when possible, rather than queriying multiple times for different days.
- Fix cache