Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Scrape Yahoo Financial Historical- Process Dataset - format and create dynamic page

by Anonymous Monk
on Sep 20, 2012 at 20:01 UTC ( #994747=note: print w/ replies, xml ) Need Help??

Comment on Re: Scrape Yahoo Financial Historical- Process Dataset - format and create dynamic page
Re^2: Scrape Yahoo Financial Historical- Process Dataset - format and create dynamic page
by Anonymous Monk on Sep 21, 2012 at 13:19 UTC
    Finance::QuoteHist::Yahoo is perfect ... and very fast ... Thank you very much. I was dreading the thought of using LWP::Simple for all of this... Now I just find an Excel (like) formula module and I'll be dangerous... Thanks again.
    #!/usr/bin/perl use Finance::QuoteHist::Yahoo $q = new Finance::QuoteHist::Yahoo ( symbols => "SPY", start_date => '01/01/2012', end_date => 'today', ); # Values foreach $row ($q->quotes()) { ($symbol, $date, $open, $high, $low, $close, $volume) = @$row; print "$symbol, $date, $open, $high, $low, $close, $volume \n"; }

    SPY, 2012/09/07, 144.0100, 144.3900, 143.8800, 144.3300, 107272100
    SPY, 2012/09/10, 144.1900, 144.4400, 143.4600, 143.5100, 86458500
    SPY, 2012/09/11, 143.6000, 144.3700, 143.5600, 143.9100, 88760000
    SPY, 2012/09/12, 144.3900, 144.5500, 143.9000, 144.3900, 87640900
    SPY, 2012/09/13, 144.3700, 147.0400, 143.9900, 146.5900, 225470200
    SPY, 2012/09/14, 146.8800, 148.1100, 146.7600, 147.2400, 169777000
    SPY, 2012/09/17, 146.9400, 147.1900, 146.3700, 146.7400, 119427800
    SPY, 2012/09/18, 146.4900, 146.8100, 146.2500, 146.6200, 98326600
    SPY, 2012/09/19, 146.7900, 147.1700, 146.4100, 146.7000, 128318300
    SPY, 2012/09/20, 146.0300, 146.7900, 145.6300, 146.7100, 153955400

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994747]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-10-02 05:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls