Bovespa Ingestion
An importer/parser of BM&F Bovespa historical stock quotations files.
Introduction
Installing
Install bundler:
`$ gem install bundler`
Enter the cloned dir and fetch dependencies:
`$ bundle install`
Edit config/database.yml and run the installer:
`$./bin/bovespa-parser install`
Running
Run the application with real BM&F Bovespa historical file, just use the 'import' command and pass the file path as argument, for instance:
$ ./bin/bovespa-parser import sample/DemoHistoricalStockExchange12022003.txt
Testing
Simply do:
$ rake
Getting real historical data files
To get daily historical stock quotation data files, just go BM&F Bovespa website and download it (or follow this shortcut URI: BM&F Bovespa Historical Files ). A login is necessary and fill in a captcha field.
Contributing
Submitting a Pull Request
- Fork the repository.
- Create a topic branch.
- Write a failing test to capture existing bug or lack of feature.
- Run tests with
rake
to verify that test fails. - Implement your feature or bug fix.
- Ensure tests pass.
- If it's a new feature or a bug fix, please add an entry to the changelog file.
- Add, commit, and push your changes.
- Submit a pull request.
Prerequisites
Tested with Ruby 1.9.3.
It uses Postgres as development database instead of Sqlite3 because it is faster to import several stock quotations (1000+).
Boring legal stuff
(the MIT license)
Copyright (c) 2013 Felipe Seixas and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.