Selasa, 23 Agustus 2016

[smf_addin] Digest Number 3780

3 Messages

Digest #3780
1b
Re: Problems with Yahoo historical quotes by "Randy Harmelink" rharmelink
2a
Re: Getting Press Releases from Yahoo by "Randy Harmelink" rharmelink

Messages

Mon Aug 22, 2016 9:40 am (PDT) . Posted by:

cancerfixer

I've come across a curious problem with yahoo's historical results. This does NOT seem to be a problem with the stock market functions. It seems to represent a change in the way yahoo is rendering it's historical results, or else a data glitch for one ticker.


If you array enter the smf for yahoo historical prices for Next Era Energy ( =RCHGetYahooHistory("NEE") ), it does not return data from before 6/9/16
It doesn't matter if you request weekly, daily, or monthly. All it retrieves is 2 months of data, regardless of the dates you input
the request works fine for IBM ( =RCHGetYahooHistory("IBM") ), or 99% of other tickers


The csv download links for NEE (from the yahoo download hyperlink) produce the same incomplete results, regardless of the requested date range
(http://chart.finance.yahoo.com/table.csv?s=NEE&a=2&b=17&c=1980&d=7&e=22&f=2016&g=d&ignore=.csv)
All you get is prices from 6/9/16 to the present


And if you use the "v" option for dividends only, you get no result at all - just the "Date" and "Dividend"; header titles, and blank data beneath
The same happens if you try to import the data from yahoo's embedded link, which produces no results at all when the download file is opened


But here's the rub: On Yahoo's new history web page, if you select NEE and the desired dates and interval, it will show you daily data all the way back to 1980 for either quotes or dividends - but only on the visible web page. Good luck trying to scrape the data from the page source. I know it's buried in there somewhere, but I am unable to find it at all. I believe it may be dynamically rendered via a script


Since the same date-limits are encountered with both the smf and the yahoo page links, it seems to be a problem with Yahoo. They seem to only provide complete data on their visible web page, and NOT on the download link that the smf uses.


Perhaps it is because NEE went through a corp action/merger last year. But other companies with mergers/actions, etc do not seem to have this problem.


I hope it is just a thing with NEE. Anyone else encountered this with other tickers?


Mon Aug 22, 2016 10:22 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

I've not noticed any issues with historical data on the stocks I'm using.
But I do get the same results you're seeing with NEE.

So my vote would be Yahoo glitch on that company. Especially since their
"Download Data" link gives the same results. That CSV file is what the
add-in uses to get the data, so it's going to be limited to what Yahoo
provides...

On Mon, Aug 22, 2016 at 9:40 AM, cancerfixer@
​...wrote:

> I've come across a curious problem with yahoo's historical results. This
> does NOT seem to be a problem with the stock market functions. It seems to
> represent a change in the way yahoo is rendering it's historical results,
> or else a data glitch for one ticker.
>
> If you array enter the smf for yahoo historical prices for Next Era Energy
> ( =RCHGetYahooHistory("NEE") ), it does not return data from before
> 6/9/16
>
> It doesn't matter if you request weekly, daily, or monthly. All it
> retrieves is 2 months of data, regardless of the dates you input
>
> the request works fine for IBM ( =RCHGetYahooHistory("IBM") ), or 99%
> of other tickers
>
> The csv download links for NEE (from the yahoo download hyperlink) produce
> the same incomplete results, regardless of the requested date range
>
> (http://chart.finance.yahoo.com/table.csv?s=NEE&a=2&b=17&
> c=1980&d=7&e=22&f=2016&g=d&ignore=.csv)
>
> All you get is prices from 6/9/16 to the present
>
> And if you use the "v" option for dividends only, you get no result at all
> - just the "Date" and "Dividend"; header titles, and blank data beneath
>
> The same happens if you try to import the data from yahoo's embedded link,
> which produces no results at all when the download file is opened
>
> But here's the rub: On Yahoo's new history web page, if you select NEE and
> the desired dates and interval, it will show you daily data all the way
> back to 1980 for either quotes or dividends - but only on the *visible* web
> page. Good luck trying to scrape the data from the page source. I know
> it's buried in there somewhere, but I am unable to find it at all. I
> believe it may be dynamically rendered via a script
>
> Since the same date-limits are encountered with both the smf and the yahoo
> page links, it seems to be a problem with Yahoo. They seem to only provide
> complete data on their visible web page, and NOT on the download link that
> the smf uses.
>
> Perhaps it is because NEE went through a corp action/merger last year. But
> other companies with mergers/actions, etc do not seem to have this problem.
>
> I hope it is just a thing with NEE. Anyone else encountered this with
> other tickers?
>

Mon Aug 22, 2016 1:19 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Bloomberg is a pretty easy extraction:

=smfGetTagContent("http://www.bloomberg.com/quote/QLGC:US
","time",$B5,"data-group=""press-releases""")
=smfGetTagContent("http://www.bloomberg.com/quote/QLGC:US
","a",2*$B5,"data-group=""press-releases""")

Just have $B5 vary from 1 to n, when n is the number of releases you want
(or are available).

However, it did show me an error in the smfGetTagContent() routine. When I
pass that HTML tag of "a", the first one it finds is an "article" HTML tag.
That because it looks for the start as "<a". I'll have to fix that so it's
looking for "<a " OR "<a>". When I do that, the "2*$B5" above will just
need to be "$B5". I just wanted you to be aware of the issue, as it may
look strange after I make the change.

On Sun, Aug 21, 2016 at 11:25 AM, jcdelrio@procesando.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> I did not know that extracting info from the new Yahoo pages was so
> complicated.
>
> Actually, what I am interested on is to get press releases of stocks in
> our portfolio. My purpose is to track what does it happen to them.
>
> For instance, we own Qlogic. Yahoo still keeps its page (
> http://finance.yahoo.com/quote/QLGC), though it was acquired and removed
> from Nasdaq last week. But there is no info in Reuters right now:
> www.reuters.com/finance/stocks/QLGC/key-developments returns "page not
> found".
>
> Another possible idea is to get the data from Bloomberg:
> http://www.bloomberg.com/quote/QLGC:US has also a section called "Press
> releases" and is still shown. Can I get the info from there?
>
> My idea is to track the press releases that are published for our
> portfolio (of less than one hundred stocks).
>
> Randy, do you have any suggestion?
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Poskan Komentar