Minggu, 12 April 2015

[smf_addin] Digest Number 3381

10 Messages

Digest #3381

Messages

Sat Apr 11, 2015 4:25 am (PDT) . Posted by:

"eric" ericckyuen

Hi Randy

I can't capture the stock data from this web :
*http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1
<http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1>*

with using Function :

=smfGetTagContent("
http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1,"span",1,">MKT
Cap")

Besides, I would like to capture the price change percentage of "+1.147%"
from the web. How can I use smfStrExtr() Function or using excel function
MID(smfGetTagContent...,) instead.

I also find when I open the spreadsheet every time, it load & renew all
data with a lot of time and even hang the excel. Any setting could improve?

Many thanks for your help please.

Best Regards,

Eric

Sat Apr 11, 2015 8:19 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Except for the missing double quote, your formula worked for me. But try:

=smfConvertData(smfGetTagContent("
http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1","span",1,">MKT
Cap"))

=smfConvertData(smfStrExtr(RCHGetTableCell("
http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1
",1,"id=""StkDetailMainBox"""),"(",")"))

If you're getting data from a lot of web pages, it will take some time for
everything to update. You can combine data requests in the
RCHGetYahooQuotes() function, but not if you're doing a lot of functions
similar to the above two.

On Sat, Apr 11, 2015 at 4:25 AM, eric ericckyuen@... wrote:

>
> I can't capture the stock data from this web :
> *http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1
> <http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1>*
>
> with using Function :
>
> =smfGetTagContent("
> http://www.etnet.com.hk/www/eng/stocks/realtime/quote.php?code=1,
> "span",1,">MKT Cap")
>
> Besides, I would like to capture the price change percentage of "+1.147%"
> from the web. How can I use smfStrExtr() Function or using excel function
> MID(smfGetTagContent...,) instead.
>
> I also find when I open the spreadsheet every time, it load & renew all
> data with a lot of time and even hang the excel. Any setting could improve?
>
>
>

Sat Apr 11, 2015 5:28 am (PDT) . Posted by:

fincoolio

Hello Randy and everyone,


Any suggestions on this one? This doesn't seem to work very well -- it picks up tickers that aren't even on the page which is strange.


For the formula below I want to see: GOOG but I'm getting AAPL instead


=smfGetTagContent("http://finance.yahoo.com/q?s=aapl&fr=uh3_finance_web&uhb=uhb2","strong",1,"also viewed:")



when changing the reference to 2, I get PCLN but as you can see below I should be getting AMZN.


>People viewing <b>AAPL</b> also viewed:<span> <a href="/q?s=GOOG&reco=1 http://finance.yahoo.com/q?s=GOOG&reco=1"><strong>GOOG</strong></a> <a href="/q?s=AMZN&reco=1 http://finance.yahoo.com/q?s=AMZN&reco=1"><strong>AMZN</strong></a> <a href="/q?s=PCLN&reco=1 http://finance.yahoo.com/q?s=PCLN&reco=1"><strong>PCLN</strong></a> <a href="/q?s=BIDU&reco=1 http://finance.yahoo.com/q?s=BIDU&reco=1"><strong>BIDU</strong></a> <a href="/q?s=NFLX&reco=1 http://finance.yahoo.com/q?s=NFLX&reco=1"><strong>NFLX</strong></a> <a href="/q?s=MSFT&reco=1 http://finance.yahoo.com/q?s=MSFT&reco=1"><strong>MSFT</strong>



Sat Apr 11, 2015 8:28 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

AAPL is the correct extraction based on the source code of the web page
that I see:

also viewed:<span> <a href="/q?s=APPL&reco=1"><strong>APPL</strong></a>
<a href="/q?s=PCLN&reco=1"><strong>PCLN</strong></a> <a
href="/q?s=GOOG&reco=1"><strong>GOOG</strong></a> <a
href="/q?s=AMZN&reco=1"><strong>AMZN</strong></a> <a
href="/q?s=MA&reco=1"><strong>MA</strong></a> <a
href="/q?s=CMG&reco=1"><strong>CMG</strong></a></span></div>

Perhaps different refreshes of that web page return a different order of
the ticker symbols? Plus, the values may change quite often?

If you're using the beta version of the add-in, you can use the new
smfStripHTML() utility function like this:

=smfStripHTML(smfGetTagContent("
http://finance.yahoo.com/q?s=aapl&fr=uh3_finance_web&uhb=uhb2","span",1,"also
viewed:"))

...and get the whole list without HTML code:

APPL PCLN GOOG AMZN MA CMG

On Sat, Apr 11, 2015 at 5:28 AM, scasty@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

> Any suggestions on this one? This doesn't seem to work very well -- it
> picks up tickers that aren't even on the page which is strange.
>
> For the formula below I want to see: GOOG but I'm getting AAPL instead
>
> =smfGetTagContent("
> http://finance.yahoo.com/q?s=aapl&fr=uh3_finance_web&uhb=uhb2","strong",1,"also
> viewed:")
>
> when changing the reference to 2, I get PCLN but as you can see below I
> should be getting AMZN.
>
> >People viewing <b>AAPL</b> also viewed:<span> <a href="
> /q?s=GOOG&reco=1 <http://finance.yahoo.com/q?s=GOOG&reco=1>"><strong>
> GOOG</strong></a> <a href="/q?s=AMZN&reco=1
> <http://finance.yahoo.com/q?s=AMZN&reco=1>"><strong>AMZN</strong></a> <a
> href="/q?s=PCLN&reco=1 <http://finance.yahoo.com/q?s=PCLN&reco=1>">
> <strong>PCLN</strong></a> <a href="/q?s=BIDU&reco=1
> <http://finance.yahoo.com/q?s=BIDU&reco=1>"><strong>BIDU</strong></a> <a
> href="/q?s=NFLX&reco=1 <http://finance.yahoo.com/q?s=NFLX&reco=1>">
> <strong>NFLX</strong></a> <a href="/q?s=MSFT&reco=1
> <http://finance.yahoo.com/q?s=MSFT&reco=1>"><strong>MSFT</strong>
>
>
>
>

Sat Apr 11, 2015 8:32 am (PDT) . Posted by:

fincoolio

Thanks very much Randy, yes its probably a refresh issue. I will check out the beta addin -- sounds like exactly what I need.

Sat Apr 11, 2015 4:34 pm (PDT) . Posted by:

fincoolio

Hey Randy, I installed the beta version of the add-in and am really impressed. I noticed the drop-down menu from right clicking. If you are taking requests, a great feature for the add-in would somehow be able to right click a cell in Excel and have it call up a corresponding webpage like Yahoo Finance. Or is there something like that available already from somewhere else? The HTML snip feature worked great, thanks.

Sat Apr 11, 2015 4:47 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The drop-down menu was suggested and mostly implemented by Andrei
Radulescu-Banu, another user of the add-in.

The ability to click through to a web page is already within normal EXCEL.
Just do something like:

=HYPERLINK("http://finance.yahoo.com/q/ks?s=MMM","Yahoo Key Statistics for
MMM")

...or even:

=HYPERLINK("http://finance.yahoo.com/q/ks?s=MMM
",RCHGetElementNumber("MMM",941))

And, BTW, with the beta version of the add-in, you can automatically call
the smfStripHTML() and smfConvertData() functions directly from
smfGetTagContent(). For example:

=smfGetTagContent("
http://finance.yahoo.com/q?s=aapl&fr=uh3_finance_web&uhb=uhb2","span",1,"also
viewed:",,,,1)

The last "1" parameter tells the function to first call smfStripHTML() and
then call smfConvertData() to attempt to convert whatever is left into a
numeric value.

On Sat, Apr 11, 2015 at 4:34 PM, scasty@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

> Hey Randy, I installed the beta version of the add-in and am really
> impressed. I noticed the drop-down menu from right clicking. If you are
> taking requests, a great feature for the add-in would somehow be able to
> right click a cell in Excel and have it call up a corresponding webpage
> like Yahoo Finance. Or is there something like that available already from
> somewhere else? The HTML snip feature worked great, thanks.
>
>

Sat Apr 11, 2015 7:59 pm (PDT) . Posted by:

voller_mond

Hello,


I am calling this:
=smfGetOptionQuotes("msft may 2015 $42 Call","6",,"OX2")



to get implied volatility for the specified call and it gives me "error".


What am I doing wrong here?


Sun Apr 12, 2015 12:37 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

Are you using the beta version of the add-in? "May 2015" will not work with
the older version of the add-in, because they changed the monthly add-in
expiration dates in February to be on a Friday instead of a Saturday, to
match the weekly options.

Otherwise, you should be able to manually code the date, as in:

=smfGetOptionQuotes("msft 5/15 2015 $42 Call","6",,"OX2")

On Sat, Apr 11, 2015 at 7:59 PM, dscheste@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

> I am calling this:
>
> =smfGetOptionQuotes("msft may 2015 $42 Call","6",,"OX2")
>
> to get implied volatility for the specified call and it gives me "error".
>
> What am I doing wrong here?
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar