Skip to content

Quotes yahoo fin -> db > R > results

7 messages · Fabian Lorenz, julien cuisinier, Joe Conway +2 more

#
On 06/29/2011 07:45 AM, Fabian Lorenz wrote:
For one possible way from within PostgreSQL see:

http://www.joeconway.com/presentations/pgday-lightning-2009.07.19.r00.pdf

HTH,

Joe
#
On 29 June 2011 at 16:45, Fabian Lorenz wrote:
| I'm trying to collect data automatically from yahoo finance to a mysql or
| postgresql  for further R data process.
| 
| Anybody knows how about?

I can help with the first part in a fully automated fashion, see

   http://dirk.eddelbuettel.com/code/beancounter.hyml

Key features:

 - automated setup for either MySQL, Postgresql, SQLite or ODBC: creates the
   schema, loads sample data etc (but you still need to take care of the
   backend and things like ODBC drivers)

 - cross-platform for Windows, OS X, Linux

 - Written in Perl, mostly around 1999 to 2001; I still maintain it in the
   sense of fixing bugs, I have not added features in years

 - I (and others) use it for automated data download given a portfolio; for
   me it then creates a daily email with daily PNL and Risk Estimates for my
   little retail portfolios; "growing" the time series database is a (nice
   and desired) side-effect

 - Can also backpopulate for assets where Yahoo offers history (ie most
   stocks, no options, no fx)

 - Is used as a backend for some (non-R) charting software

I have been meaning to 

  a) rewrite it in R and/or 

  b) write R analysis modules

but I have a "writer's block" as I know so much that could be done leveraging
things like PortfolioAnalytics and PerformanceAnalytics that I still haven't
done it yet.  Would make a great student project for an investment analysis
with R class ...

Hope this helps, feel free to ping me off-list if interested.

Dirk
#
On 29 June 2011 at 11:00, Dirk Eddelbuettel wrote:
|
| On 29 June 2011 at 16:45, Fabian Lorenz wrote:
| | I'm trying to collect data automatically from yahoo finance to a mysql or
| | postgresql  for further R data process.
| | 
| | Anybody knows how about?
| 
| I can help with the first part in a fully automated fashion, see
| 
|    http://dirk.eddelbuettel.com/code/beancounter.hyml

Sorry:  http://dirk.eddelbuettel.com/code/beancounter.html

Dirk
 
| Key features:
| 
|  - automated setup for either MySQL, Postgresql, SQLite or ODBC: creates the
|    schema, loads sample data etc (but you still need to take care of the
|    backend and things like ODBC drivers)
| 
|  - cross-platform for Windows, OS X, Linux
| 
|  - Written in Perl, mostly around 1999 to 2001; I still maintain it in the
|    sense of fixing bugs, I have not added features in years
| 
|  - I (and others) use it for automated data download given a portfolio; for
|    me it then creates a daily email with daily PNL and Risk Estimates for my
|    little retail portfolios; "growing" the time series database is a (nice
|    and desired) side-effect
| 
|  - Can also backpopulate for assets where Yahoo offers history (ie most
|    stocks, no options, no fx)
| 
|  - Is used as a backend for some (non-R) charting software
| 
| I have been meaning to 
| 
|   a) rewrite it in R and/or 
| 
|   b) write R analysis modules
| 
| but I have a "writer's block" as I know so much that could be done leveraging
| things like PortfolioAnalytics and PerformanceAnalytics that I still haven't
| done it yet.  Would make a great student project for an investment analysis
| with R class ...
| 
| Hope this helps, feel free to ping me off-list if interested.
| 
| Dirk
| 
| -- 
| Gauss once played himself in a zero-sum game and won $50.
|                       -- #11 at http://www.gaussfacts.com
#
There are also examples that do this in package vinnette guides for TSPostgreSQL and TSMySQL, but not automated in the sense of a cron job.

Paul
====================================================================================

La version fran?aise suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential information, and the Bank of
Canada does not waive any related rights. Any distribution, use, or copying of this
email or the information it contains by other than the intended recipient is
unauthorized. If you received this email in error please delete it immediately from
your system and notify the sender promptly by email that you have done so. 

------------------------------------------------------------------------------------

Le pr?sent courriel peut contenir de l'information privil?gi?e ou confidentielle.
La Banque du Canada ne renonce pas aux droits qui s'y rapportent. Toute diffusion,
utilisation ou copie de ce courriel ou des renseignements qu'il contient par une
personne autre que le ou les destinataires d?sign?s est interdite. Si vous recevez
ce courriel par erreur, veuillez le supprimer imm?diatement et envoyer sans d?lai ?
l'exp?diteur un message ?lectronique pour l'aviser que vous avez ?limin? de votre
ordinateur toute copie du courriel re?u.