Minggu, 15 April 2018

[smf_addin] Digest Number 4323

15 Messages

Digest #4323
1b
Re: Getting data from gurufocus by "Randy Harmelink" rharmelink
1d
Re: Getting data from gurufocus [1 Attachment] by "Randy Harmelink" rharmelink
1f
Re: Getting data from gurufocus by "Randy Harmelink" rharmelink
1h
Re: Getting data from gurufocus by "Randy Harmelink" rharmelink
2b
Re: Elements 3237 & 3242 by "Randy Harmelink" rharmelink
2d
Re: Elements 3237 & 3242 by "Randy Harmelink" rharmelink
2e
Setup to Get Elements re Dividends by "Pieter van Leeuwen" pietertvl
2f
Re: Setup to Get Elements re Dividends by "Randy Harmelink" rharmelink
2g
Re: Setup to Get Elements re Dividends by "Pieter van Leeuwen" pietertvl

Messages

Sat Apr 14, 2018 4:11 am (PDT) . Posted by:

lawrence.leesh

Could you pls tell me which regions you are subscribed for? I could replicate the problem with a stock in your subscribed region. Thanks.

Sat Apr 14, 2018 10:59 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Just the USA. But AAPL works for me in that formula

On Sat, Apr 14, 2018 at 4:11 AM, lawrence.leesh@
​...
wrote:

>
> Could you pls tell me which regions you are subscribed for? I could
> replicate the problem with a stock in your subscribed region. Thanks.
>
>
>

Sat Apr 14, 2018 1:27 pm (PDT) . Posted by:

lawrence.leesh

The formula works for me too for US stocks. Don't know why it doesn't work for this Chinese stock. Would you be able to identify the problem with this attached file?

Sat Apr 14, 2018 2:01 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The formula works fine for me on the HTML web page you sent. I get this:

Henan Lingrui Pharmaceutical Co., Ltd. is a Chinese company engaged in the
development, production and distribution of pharmaceuticals. The Company's
products include tablets, capsules, injections and other medicines.<br
/><br />Henan Lingrui Pharmaceutical Co., Ltd. is a Chinese company engaged
in the development, production and distribution of pharmaceuticals. The
Company's products include tablets, capsules, injections and other
medicines.

Are you sure you have the GuruFocus security cookie set up in the IE object
within EXCEL?

What do you get with:

=LEFT(smfGetTagContent("https://www.gurufocus.com/stock/shse:600285
","div",-1,"Location:"),100)
=RCHGetWebData("https://www.gurufocus.com/stock/shse:600285","
Location:",100)

On Sat, Apr 14, 2018 at 1:27 PM, lawrence.leesh@
​...
wrote:

>
> The formula works for me too for US stocks. Don't know why it doesn't work
> for this Chinese stock. Would you be able to identify the problem with this
> attached file?
>
>

Sat Apr 14, 2018 4:23 pm (PDT) . Posted by:

lawrence.leesh

I got Error for both the new formulas you wrote.

Would it be an issue with the GuruFocus security cookie if I managed to retrieve AAPL within the same spreadsheet?

Sat Apr 14, 2018 5:10 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The "Error" result means it can't even find "Location:" on the web page, so
you're probably getting a "You don't have access" type of message being
returned.

As far as I know, the main "AAPL" web page doesn't require a security
cookie of any kind. However, the main web pages of foreign stocks do.

What do you get with:

=RCHGetWebData("https://www.gurufocus.com/stock/aapl","Premium Member",100)
=RCHGetWebData("https://www.gurufocus.com/stock/shse:600285","Premium
Member",100)

Both tell me that my Premium Membership covers the USA:

Premium Member' /> Premium Member until 2019-01-11) , which covers
<b>USA</b>...

On Sat, Apr 14, 2018 at 4:23 PM, lawrence.leesh@
​...
wrote:

>
> I got Error for both the new formulas you wrote.
>
> Would it be an issue with the GuruFocus security cookie if I managed to
> retrieve AAPL within the same spreadsheet?
>
>

Sat Apr 14, 2018 7:19 pm (PDT) . Posted by:

lawrence.leesh

This is pretty strange. I got the messages below for your two new formulas. Premium Members Only"><div class="warning">This feature is only available for Premium Members, pleas
Premium Members Only"><div class="warning">This feature is only available for Premium Members, pleas


However, when I retrieved the 2016 EPS for the stock I got this.
0.6





Sat Apr 14, 2018 11:32 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Right. So you haven't created the security cookies. So you'll have limited
access to USA data and even less access to other regions.

Log in to GuruFocus using the EXCEL IE object (keyboard shortcut alt+d+d+w).

On Sat, Apr 14, 2018 at 7:19 PM, lawrence.leesh@
​...
wrote:

>
> This is pretty strange. I got the messages below for your two new formulas.
> Premium Members Only"><div class="warning">This feature is only available
> for Premium Members, pleas
> Premium Members Only"><div class="warning">This feature is only available
> for Premium Members, pleas
>
> However, when I retrieved the 2016 EPS for the stock I got this.
> 0.6
>
>
>

Sat Apr 14, 2018 4:27 pm (PDT) . Posted by:

e_bartsch

Randy:

This issue has returned.


These formulas:


=RCHGetElementNumber(MMM,3237)


and


=RCHGetElementNumber(MMM,3242)


return the error message #VALUE.


Any ideas?


Eric



Sat Apr 14, 2018 4:44 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

As written, the #VALUE error would be because the first parameter needs to
be a string or a cell reference, such as:


=RCHGetElementNumber("MMM";,3237)

If you don't use the double quotes, it will assume MMM is a defined name.
If it doesn't exist, it causes a #VALUE error.

In any case, those two elements are no longer available, because Google
Finance is no longer a viable data source.

On Sat, Apr 14, 2018 at 4:26 PM, eabartsch@
​...
wrote:

>
> This issue has returned.
>
> These formulas:
>
> ​​
> =RCHGetElementNumber(MMM,3237)
>
> and
>
> =RCHGetElementNumber(MMM,3242)
>
> return the error message #VALUE.
>
> Any ideas?
>
>
>

Sun Apr 15, 2018 7:02 am (PDT) . Posted by:

e_bartsch

Randy:

Thanks.


I was using those two elements to compute Last Qtr. Free Cash Flow.


Any substitutes come to mind? I'm wondering of Morningstar has something like this.


Sun Apr 15, 2018 10:26 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Take a look at the elements list. Also, AdvFN or GuruFocus? Maybe Yahoo's
new JSON files?

MorningStar is always a last choice for me.

On Sun, Apr 15, 2018 at 7:02 AM, eabartsch@
​...
wrote:

>
> Thanks.
>
> I was using those two elements to compute Last Qtr. Free Cash Flow.
>
> Any substitutes come to mind? I'm wondering of Morningstar has something
> like this.
>
>

Sun Apr 15, 2018 3:10 pm (PDT) . Posted by:

"Pieter van Leeuwen" pietertvl

Hi Randy

Looking at the Get Elements Function for the first time. Have been using YahooPortfolioView, which is working well for OHLC quotes.

What's the best way to do something similar for dividend data? 250 tickers, four elements, more or less.

Example from Get Elements documentation implies an array entry retrieval setup may work, but example link is 404.

Can I use an Array Entried format to report back a grid of results? Names down, elements across?

I want to run company names down the B column.

Plan on using 989, 990, 4929 and 13863 (Div, Yld, Payout, Co. Name) on row 9.

And what element if there is one, returns the ticker symbol (as confirmation) ?

So far, my initial attempt to set this up is reporting all #VALUE s. None of the symbol names are in quotes.

Here is the arrayed cell entry formula.

=RCHGetElementNumber(B11:B255,D9:G9)

The Version cell reports back ....

Stock Market Functions add-in, Version 2.1.2017.11.02 (C:\SMF Add-in; Windows (32-bit) NT 6.01; 12.0; ; ; 1)



Thanks for any guidance!

Pieter

..

<http://geo.yahoo.com/serv?s=97359714/grpId=18094620/grpspId=1705632198/msgId=34789/stime=1523813190>
<http://y.analytics.yahoo.com/fpc.pl?ywarid=515FB27823A7407E&a=10001310322279&js=no&resp=img&cf12=CP>

Sun Apr 15, 2018 4:18 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

You cannot array-enter RCHGetElementNumber() over a range to get multiple
data items. I'm not sure what from the documentation would imply that?

Most of the array-entered functions are for data sources that provide
multiple data items for multiple tickers in a single Internet access.
There's no reason to do that for RCHGetElementNumber(), because each ticker
symbol you use would need to go get its own individual web page anyway. So
there would be no speed advantage for me to allow an array-entered
capability. Especially since array-entered ranges are difficult to edit and
cannot be sorted.

If you're creating a table like that, I would suggest looking at the
smfUpdateDownloadTable macro. It can place values into the table when you
run the macro, so there is no automatic recalculation. You are in control
of which columns, rows, or ranges get updated when the macro runs. This is
especially handy on data items that don't change often, like dividend or
financial statement data.

In fact, my smfUpdateDownloadTable dividend worksheet does the next
earnings announcements and estimated ex-dividend dates. But it's still a
work in progress that I'm playing around with. I use it as the source of
data for my workbooks that want such information, rather than re-retrieving
it from the Internet every time I need it. This way, I update my source
workbook and do all my data retrievals there. Then everything runs off of
it. It makes it a 2-step process, but speeds up the workbooks downstream.
At least for the universe of tickers I've defined. Right now, it looks
something like this:

*Ticker* *TimeStamp*

*GuruFocusNext EarnDate*

*GuruFocusEx-DividendDate*

*GuruFocusEx-DividendAmount*

*YahooEx-DividendDate*

*BestEx-DividendDate*

*FutureEx-DividendDate* *Flag*
*NUE* 2018-02-11 02:38 2018-04-20 2017-12-28 $0.38 2017-03-29 2018-03-29
2018-03-29 ****
*CSCO* 2018-02-11 02:38 2018-02-15 2018-01-04 $0.29 2017-04-04 2018-04-04
2018-04-04 ****
The "Flag" column indicates it is an estimated ex-dividend date and not a
published one.

One reason NOT to release something like that is people start building
their own databases. That's not a bad thing if you're dealing with a couple
dozen stocks, but it's an unfair burden on the free data sources when
someone wants to do it for hundreds or thousands of tickers. I get nervous
even with your 250 ticker symbols. For the four element numbers you
mention, you'd end up retrieving 500 web pages. There is no confirmation
element number for any elements.

*Aren't the data items you want available with Yahoo Portfolio View or
Barchart Portfolio View?* I haven't looked at those fields in detail,
although in the past Yahoo has been slow on updating dividend items. That's
why mine above uses published data items from GuruFocus. I only use Yahoo
historical quotes to find out when the ex-dividend date was last year.

On Sun, Apr 15, 2018 at 3:10 PM, 'Pieter van Leeuwen' pieter_biz@
​...
wrote:

>
> Looking at the Get Elements Function for the first time. Have
> been using YahooPortfolioView, which is working well for OHLC quotes.
>
> What's the best way to do something similar for dividend data?
> 250 tickers, four elements, more or less.
> ​
>
> Example from Get Elements documentation implies an array entry
> retrieval setup may work, but example link is 404.
>
>
>
> Can I use an Array Entried format to report back a grid of
> results? Names down, elements across?
>
> I want to run company names down the B column.
>
> Plan on using
> ​​
> ​​
> 989, 990, 4929 and 13863 (Div, Yld, Payout, Co. Name) on row 9.
>
> And what element if there is one, returns the ticker symbol (as
> confirmation) ?
>
>
>
> So far, my initial attempt to set this up is reporting all #VALUE
> s. None of the symbol names are in quotes.
>
> Here is the arrayed cell entry formula.
>
>
>
> =RCHGetElementNumber(B11:B255,D9:G9)
>
>
>
>
>
> The Version cell reports back ....
>
> Stock Market Functions add-in, Version 2.1.2017.11.02 (C:\SMF Add-in;
> Windows (32-bit) NT 6.01; 12.0; ; ; 1)
>
>
>
> Thanks for any guidance!
>
>
>
> Pieter
>

Sun Apr 15, 2018 4:51 pm (PDT) . Posted by:

"Pieter van Leeuwen" pietertvl

Gotcha ... will review all. Thanks so much.

I'm not sure what from the documentation would imply that?

I think I read more into this example than I should have.

How do I use RCHGetElementNumber() to create a grid to compare multiple companies?

Create the following entries in a new workbook:

A1: "#"
B1: "Element"
C1: "MMM"
D1: "JNJ"
A2: 941
A3: 942
B2: =RCHGetElementNumber(B$1,$A2)

Copy B2 down and right to fill out the table.

***************

I get nervous even with your 250 ticker symbols.

Understood .... will try to pare that down.

P

From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com]
Sent: Sunday, April 15, 2018 4:19 PM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Setup to Get Elements re Dividends

You cannot array-enter RCHGetElementNumber() over a range to get multiple data items. I'm not sure what from the documentation would imply that?

Most of the array-entered functions are for data sources that provide multiple data items for multiple tickers in a single Internet access. There's no reason to do that for RCHGetElementNumber(), because each ticker symbol you use would need to go get its own individual web page anyway. So there would be no speed advantage for me to allow an array-entered capability. Especially since array-entered ranges are difficult to edit and cannot be sorted.

If you're creating a table like that, I would suggest looking at the smfUpdateDownloadTable macro. It can place values into the table when you run the macro, so there is no automatic recalculation. You are in control of which columns, rows, or ranges get updated when the macro runs. This is especially handy on data items that don't change often, like dividend or financial statement data.

In fact, my smfUpdateDownloadTable dividend worksheet does the next earnings announcements and estimated ex-dividend dates. But it's still a work in progress that I'm playing around with. I use it as the source of data for my workbooks that want such information, rather than re-retrieving it from the Internet every time I need it. This way, I update my source workbook and do all my data retrievals there. Then everything runs off of it. It makes it a 2-step process, but speeds up the workbooks downstream. At least for the universe of tickers I've defined. Right now, it looks something like this:

Ticker

TimeStamp

GuruFocus
Next Earn
Date

GuruFocus
Ex-Dividend
Date

GuruFocus
Ex-Dividend
Amount

Yahoo
Ex-Dividend
Date

Best
Ex-Dividend
Date

Future
Ex-Dividend
Date

Flag

NUE

2018-02-11 02:38

2018-04-20

2017-12-28

$0.38

2017-03-29

2018-03-29

2018-03-29

****

CSCO

2018-02-11 02:38

2018-02-15

2018-01-04

$0.29

2017-04-04

2018-04-04

2018-04-04

****

The "Flag" column indicates it is an estimated ex-dividend date and not a published one.

One reason NOT to release something like that is people start building their own databases. That's not a bad thing if you're dealing with a couple dozen stocks, but it's an unfair burden on the free data sources when someone wants to do it for hundreds or thousands of tickers. I get nervous even with your 250 ticker symbols. For the four element numbers you mention, you'd end up retrieving 500 web pages. There is no confirmation element number for any elements.

Aren't the data items you want available with Yahoo Portfolio View or Barchart Portfolio View? I haven't looked at those fields in detail, although in the past Yahoo has been slow on updating dividend items. That's why mine above uses published data items from GuruFocus. I only use Yahoo historical quotes to find out when the ex-dividend date was last year.

On Sun, Apr 15, 2018 at 3:10 PM, 'Pieter van Leeuwen' pieter_biz@

​....

wrote:

Looking at the Get Elements Function for the first time. Have been using YahooPortfolioView, which is working well for OHLC quotes.

What's the best way to do something similar for dividend data? 250 tickers, four elements, more or less.



Example from Get Elements documentation implies an array entry retrieval setup may work, but example link is 404.

Can I use an Array Entried format to report back a grid of results? Names down, elements across?

I want to run company names down the B column.

Plan on using

​​

​​

989, 990, 4929 and 13863 (Div, Yld, Payout, Co. Name) on row 9.

And what element if there is one, returns the ticker symbol (as confirmation) ?

So far, my initial attempt to set this up is reporting all #VALUE s. None of the symbol names are in quotes.

Here is the arrayed cell entry formula.

=RCHGetElementNumber(B11:B255,D9:G9)

The Version cell reports back ....

Stock Market Functions add-in, Version 2.1.2017.11.02 (C:\SMF Add-in; Windows (32-bit) NT 6.01; 12.0; ; ; 1)



Thanks for any guidance!

Pieter

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

Tidak ada komentar:

Posting Komentar