yahoo_finance_db.rb

USAGE

This library uses the module "yahoo_finance.rb" to download indexes, stockes, symbols, quote data from the Yahoo web site and then add them in a MySQL database. The module 'ruby-dbi' is used and so it shouldn't be hard to use an other database (postgres, interbase, oracle, ...)

Examples:

To add a new index (new entries in the tables yahoo_index, yahoo_symbol, yahoo_index_simbol)

require "yahoo_finance_db" index = "^DJI" a = YahooFinanceDB.new('DBI:Mysql:yahoo_finance', 'root','') i = YahooIndex.new( index ) a.addIndex( i )

INSTALLATION

Copy this file in the rubylib directory (for example "/usr/lib/ruby/1.6")

Create a new MySql database with the name "yahoo_finance"

mysqladmin -u root create yahoo_finance

and populate it with

mysql -u root yahoo_finance <yahoo_finance.sql

REQUIREMENTS

I've tested this library with a Debian Linux 3.0 and

See yahoo_finance.rb for other requirements

TO DO

A web interface to see the data stored in the database and to build some useful charts

HISTORY

AUTHOR

E-MAIL: matteo.redaelli@libero.it

WEB: http://digilander.iol.it/reda

LICENSE

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

The C library at the core of this Perl module can additionally be redistributed and/or modified under the terms of the "GNU Library General Public License".

DISCLAIMER

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more detail