Rabu, 30 November 2016

[smf_addin] Digest Number 3855[1 Attachment]

10 Messages

Digest #3855
1a
1b
Re: IBD json extraction by "Randy Harmelink" rharmelink
1c
2a
Re: Yahoo Elements by "Randy Harmelink" rharmelink
2b
Re: Yahoo Elements by justy_sports
2c
Re: Yahoo Elements by "Randy Harmelink" rharmelink
2d
Re: Yahoo Elements by "Andrew Hills" andrew.hills@hunterfield.com.au

Messages

Tue Nov 29, 2016 7:25 pm (PST) . Posted by:

justy_sports

You could do something like this:

Cell A1: =RCHGetWebData("http://research.investors.com/services/PsyChartService.svc/summary?type=highlowratio&frequency=1")


Cell A2: =MID(A1,FIND("Price";,A1)+7,100)


Cell A3: =LEFT(A2,FIND(",",A2)-1)

Tue Nov 29, 2016 7:34 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

Try:

=smfWord(RCHGetWebData("
http://research.investors.com/services/PsyChartService.svc/summary?type=highlowratio&frequency=1
","""Price"":"),1,",")

Or, to get the actual value:

=smfConvertData(smfStrExtr(RCHGetWebData("
http://research.investors.com/services/PsyChartService.svc/summary?type=highlowratio&frequency=1
"),"""Price"":",","))

On Tue, Nov 29, 2016 at 8:06 PM, sirons1962@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Is there a way to pull the data from this:
>
> http://research.investors.com/services/PsyChartService.svc/
> summary?type=highlowratio&frequency=1
>
> which leads to a json item, I think, which is this:
>
> {"GetSummaryResult":{"ErrorMessage":"","Frequency":
> 1,"HasError&quot;:false,"Price";:3.34,"Price2":0,"Price2Change&quot;:
> 0,"PriceChange":0.2652,"Type":3,"Updated":"&#92;/Date(1480320000000-0800)\/"}}
>
> I am looking to get the "Price":3.34 out of it.
>
>

Tue Nov 29, 2016 8:26 pm (PST) . Posted by:

sirons1962

Thank you both for the quick responses!

Tue Nov 29, 2016 7:28 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

Interesting. For the last 3 items, I get:

Year Ago EPS</td><td class="Ta(end)" data-reactid="369"><span
data-reactid="370">1.66</span></td><td class="Ta(end)"
data-reactid="371"><span data-reactid="372">2.05</span></td><td
class="Ta(end)" dat

<span data-reactid="370">1.66</span>

1.66

That means the source code being delivered to you is different than the
source code being sent to me. You appear to be in the middle of JSON code.
When I load the web page, it appears to be dynamically loading, so I
wouldn't have expected a finished web page like I'm receiving...

Not sure what's going on.

It may have something to do with the version of IE or O/S that is running?
But that gives me nothing to test.

Hmmm. Grasping at straws here, but what do you get with the original URL on:

=RCHGetWebData("http://finance.yahoo.com/q/ae?s=MMM",,50)

=RCHGetWebData("http://finance.yahoo.com/q/ae?s=MMM","Year Ago EPS",200)

=smfGetTagContent("http://finance.yahoo.com/q/ae?s=MMM","td",1,"Year Ago
EPS")

I'm assume all "Error" values, because of the redirection?

On Tue, Nov 29, 2016 at 7:18 PM, justy_sports@
​...wrote:

>
> *=RCHGetWebData("http://finance.yahoo.com/quote/MMM/analysts
> <http://finance.yahoo.com/quote/MMM/analysts>",,500)* <!DOCTYPE
> html><html id="atomic" class="NoJs ie-11 desktop" lang="en-US"><head
> prefix="og: http://ogp.me/ns#"><script>window.performance &&
> window.performance.mark && window.performance.mark('PageStart');</script><meta
> charset="utf-8"/><title>MMM Analyst Opinion | Analyst Estimates | 3M
> Company Common Stock Stock - Yahoo Finance</title><meta name="keywords"
> content="recommendation,analyst,analyst rating,strong buy,strong
> sell,hold,buy,sell,overweight,underweight,upgrade,downgrade,price
> target,EP
>
> =RCHGetWebData("http://finance.yahoo.com/quote/MMM/analysts","Year Ago
> EPS",200) Year Ago EPS","YEAR_AGO_SALES":"Year Ago
> Sales","YORIG_TITLE":"Yahoo Originals","YOY":"yoy","YTD":"YTD","YTD_RETURN":"YTD
> Return","YTD_RETURN_MKT":"Year-to-Date Return
> (Mkt)","YTD_RETURN_PCT":"Year-to
>
> =smfGetTagContent("http://finance.yahoo.com/quote/MMM/analysts","td",1,"Year
> Ago EPS") Error
>
> =smfGetTagContent("http://finance.yahoo.com/quote/MMM/analysts","span",1,"Year
> Ago EPS") Error
>
>
>

Tue Nov 29, 2016 7:50 pm (PST) . Posted by:

justy_sports

For those 3, I get:

<!DOCTYPE html><html id="atomic&quot; class="NoJs ie-11


Year Ago EPS","YEAR_AGO_SALES":"Year Ago Sales","YORIG_TITLE":"Yahoo Originals","YOY":"yoy","YTD":"YTD","YTD_RETURN":"YTD Return","YTD_RETURN_MKT":"Year-to-Date Return (Mkt)","YTD_RETURN_PCT":"Year-to


Error


When I view the source code of the web page, I don't see HTML tags, which would explain why #3 returns Error. I'm concerned that somehow I am seeing some beta version of Yahoo Finance that utilizes dynamic content...







Tue Nov 29, 2016 8:24 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

It looks like the URL redirection is working, so you just get the source
code from the new URL.

Try this to extract the data from the retrieved JSON data:

=smfConvertData(smfStrExtr(LEFT(smfWord(RCHGetWebData("
https://query2.finance.yahoo.com/v10/finance/quoteSummary/
"&C$5&"?formatted=true&modules=financialData,earningsHistory,earningsTrend&corsDomain=
finance.yahoo.com"),$B6,"yearAgoEps"":"),20),":",","))

...where C$5 contains the ticker symbol and $B7 varies from 2 to 5 for the
four data items on the line in the table.

For MCD, I get all four items. For MMM, I get the first 2 and the last 2
are blank (which Yahoo is displaying as N/A:

MMM MCD
1
2 1.66 1.31
3 2.05 1.23
4 4.98
5 5.69
That's cells B5:D10 in EXCEL, and the formula above is what I was using in
cell C6 (i.e. MMM and 1). It can just be copied to fill out the table once
the first row and first column have been manually entered.

On Tue, Nov 29, 2016 at 8:50 PM, justy_sports@
​...wrote:

>
> For those 3, I get:
>
> <!DOCTYPE html><html id="atomic&quot; class="NoJs ie-11
>
> Year Ago EPS","YEAR_AGO_SALES":"Year Ago Sales","YORIG_TITLE":"Yahoo
> Originals","YOY":"yoy","YTD":"YTD","YTD_RETURN":"YTD
> Return","YTD_RETURN_MKT":"Year-to-Date Return
> (Mkt)","YTD_RETURN_PCT":"Year-to
>
> Error
>
> When I view the source code of the web page, I don't see HTML tags, which
> would explain why #3 returns Error. I'm concerned that somehow I am seeing
> some beta version of Yahoo Finance that utilizes dynamic content...
>
>
>

Tue Nov 29, 2016 9:35 pm (PST) . Posted by:

"Andrew Hills" andrew.hills@hunterfield.com.au

Yes, I'm having similar issues with similar Yahoo Element numbers. Yahoo data is unstable.....unfortunately.

> On 30 Nov. 2016, at 7:24 am, justy_sports@yahoo.com [smf_addin] <smf_addin@yahoogroups.com> wrote:
>
> I receive "Error" when I try =RCHGetElementNumber("MMM",599)
>
>
> My version is - Stock Market Functions add-in, Version 2.1.2016.09.02 (C:\Program Files\SMF Add-in; Windows (32-bit) NT 6.01; 15.0; www; Local; 1)
>
> smfGetAParms - YahooAE;Earnings Estimates -- Year Ago EPS -- FY1;http://finance.yahoo.com/q/ae?s=~~~~~;3;EARNINGS EST;YEAR AGO EPS; ; ;0;0;0;0
>
> I have a colleague experiencing the same issue on his computer... might we have an outdated definition file? I tried removing all definition files and re-downloading the current versions but that did not help.
>
>
>

Tue Nov 29, 2016 9:12 pm (PST) . Posted by:

mff2805

hi,
i have a list of stock names and i am ttrying to find an automated way of getting a ticker symbol for each. at least a best guess ticker symbol. Any ideas?
names look like
WABCO Holdings Wabtec Wabtec Corp/DE Waters Corp Wayfair, Class A Webster Financial WellCare Health Plans Welltower Inc West Pharmaceutical Services Westamerica Bancorporation WestRock Co
thanks much
Mike


Tue Nov 29, 2016 9:54 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

​Take a look at the attached workbook. This extracts data from the JSON
results that Yahoo uses to populate the tickers and symbols when you type a
company name in the search field on the finance page.​ For example, take a
look at this URL of JSON results for "wabco":

http://finance.yahoo.com/_finance_doubledown/api/resource/searchassist;gossipConfig=%7B%22url%22:%7B%22host%22:%22s.yimg.com%22,%22path%22:%22/xb/v6/finance/autocomplete%22,%22query%22:%7B%22appid%22:%22yahoo.com%22,%22nresults%22:10,%22output%22:%22yjsonp%22,%22region%22:%22US%22,%22lang%22:%22en-US%22%7D,%22protocol%22:%22https%22%7D,%22isJSONP%22:true,%22queryKey%22:%22query%22,%22resultAccessor%22:%22ResultSet.Result%22,%22suggestionTitleAccessor%22:%22symbol%22,%22suggestionMeta%22:[%22symbol%22,%22name%22,%22exch%22,%22type%22,%22exchDisp%22,%22typeDisp%22]%7D;searchTerm=wabco

On Tue, Nov 29, 2016 at 10:12 PM, mff3429@comcast.net [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> i have a list of stock names and i am ttrying to find an automated way of
> getting a ticker symbol for each. at least a best guess ticker symbol.
> Any ideas?
> names look like
> WABCO Holdings Wabtec Wabtec Corp/DE Waters Corp Wayfair, Class A
> Webster Financial WellCare Health Plans Welltower Inc West
> Pharmaceutical Services Westamerica Bancorporation WestRock Co
>
Attachment(s) from Randy Harmelink
1 of 1 File(s)

Tue Nov 29, 2016 10:40 pm (PST) . Posted by:

mff2805

THIS HELPS QUITE A BUNCH. SOMETIMES I HAVE TO MAKE ADJUSTMENTS TO THE NAME, SUCH AS DELETING "clASS a", ETC. THANKS FOR THE QUICK RESPONSE. I NEVER WOULD HAVE FIGURED IT OUT

oops Sorry for the CapLock.
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Poskan Komentar