Re: reliability problem with Finance::QuoteHist::Yahoo



On 2008-07-14, smallpond <smallpond@xxxxxxxx> wrote:
Ted wrote:
I have been able to get this package to work sometimes. However,
invariably it fails on me part way through my script, after
downloading data for from one to four ticker symbols. The error is:

Can't use an undefined value as an ARRAY reference at C:/Perl/site/lib/
Finance/QuoteHist/Generic.pm line 863.

I have no information about how an undefined value is being passed
deep into the code of a package I didn't write. I took a quick look
into Generic.pm and yahoo.pm, but found no enlightenment so far
(there's a lot of code there).

Sometimes it arises when quotes() is executed, and at other times, it
occurs when dividends() is executed.
...

Without even looking at your code my guess is that Yahoo! is not particularly
pleased about providing an ad-sponsored service to web-scrapers. Part of the
reason that free services change their page format is to block people from
doing this. Yahoo! changes their page format fairly frequently and I'm willing
to bet that their web programmers have access to CPAN. If you need 7000 quotes
then its pretty clearly not for your personal portfolio. Maybe time for your
company to invest in a quote service.

If you have good software, configured to do intensive filtering, data
for 7000 tradables can be easily managable for an individual trader.
On the other hand, if an individual trader needs a reliable and accurate
data feed for automated analysis, a free yahoo service is probably a
poor choice.

It sounds like the package in question is not as robust as it could be,
allowing the user to encounter a run-time undefined value error instead
of producing a good error message. However, yahoo changing the server's
behavior or data format seems a likely initial cause of the problem.


--

.



Relevant Pages

  • Re: Web browser question
    ... it seems that you are working to get stock quotes from ... the Yahoo finance. ... ' Loop until the page is fully loaded ... Do Until .ReadyState = 4 ...
    (microsoft.public.excel.programming)
  • Re: Telecom Digest archives questions [TELECOM]
    ... I find mbox to be a very useful format. ... One of my major frustrations with Yahoo groups is the lack of any bulk ... download capability, or any way of importing group archives into a ...
    (comp.dcom.telecom)
  • Re: fat32 partition gone to another dimension
    ... > It's not clear to me though if this is a Linux problem or a Microsoft ... But now I am trying to format the disk under linux using mkdosfs. ... Do you Yahoo!? ...
    (Debian-User)
  • alternative to Yahoo commodity quotes???
    ... Yahoo does not provide current quotes for these metals. ... price for the spot market. ... up in Yahoo Finance, you get one single price from the end of day on ...
    (comp.lang.php)
  • Re: yahoo mail wont work at all
    ... Or format of the server name? ... characters for 'denshi', plus the 'katakana' characters for 'mail' ... You _do_ have to subscribe to Yahoo! ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)