Kamis, 07 Februari 2013

[smf_addin] Digest Number 2498

15 New Messages

Digest #2498
1a
GetTablecell by "Steven" stevenletzer
1b
Re: GetTablecell by "Randy Harmelink" rharmelink
1c
Re: GetTablecell by "Steven" stevenletzer
1d
Re: GetTablecell by "Randy Harmelink" rharmelink
2a
VIX options quote not working by "joshi_mandar" joshi_mandar
2b
Re: VIX options quote not working by "Randy Harmelink" rharmelink
2c
Re: VIX options quote not working by "joshi_mandar" joshi_mandar
2d
2e
Re: VIX options quote not working by "Randy Harmelink" rharmelink
3a
3c
Re: "x" in column head to prevent refresh by "Randy Harmelink" rharmelink
3d
Re: "x" in column head to prevent refresh by "Randy Harmelink" rharmelink
4
Historical Data by "dertom4ever" dertom4ever
5
Dividend yield discrepancy by "aeonf22" aeonf22

Messages

Wed Feb 6, 2013 9:50 am (PST) . Posted by:

"Steven" stevenletzer

For some reason I have not been able to master finding info in a row below the tag. For example: http://www.advfn.com/p.php?pid=qkquote&btn=s_ok&s_symbol_select=OTCBB%3AABBY&symbol=bp

The tags are:
Name: Symbol: Stock Market: Type: ISIN: Description:

BP P.L.C. NYSE:BP New York Stock Exchange Equity US0556221044

But the info is in the next line. I know this is basic.

Help please

Wed Feb 6, 2013 9:56 am (PST) . Posted by:

"Randy Harmelink" rharmelink

Not quite so basic, because there is no row below the tag. They have the
header AND the data in the same table cell. So:

=RCHGetTableCell("
http://www.advfn.com/p.php?pid=qkquote&btn=s_ok&s_symbol_select=OTCBB%3AABBY&symbol=bp
",0,">Name")

...would return:

Name:
BP P.L.C.

...because the table cell actually contains:

Name:
BP P.L.C.

When assumptions don't pan out, you do need to look the the source code of
the web page to find out what the details of the coding are. And,
unfortunately, they can change that coding. :(

On Wed, Feb 6, 2013 at 10:49 AM, Steven stevenletzer@yahoo.com> wrote:

> For some reason I have not been able to master finding info in a row below
> the tag. For example:
> http://www.advfn.com/p.php?pid=qkquote&btn=s_ok&s_symbol_select=OTCBB%3AABBY&symbol=bp
>
> The tags are:
> Name: Symbol: Stock Market: Type: ISIN: Description:
>
> BP P.L.C. NYSE:BP New York Stock Exchange Equity US0556221044
>
> But the info is in the next line. I know this is basic.
>
> Help please
>

Wed Feb 6, 2013 10:14 am (PST) . Posted by:

"Steven" stevenletzer

So I would have to know the sting OTCBB%3AABBY, which would be differnt for each symbol?

--- In smf_addin@yahoogroups.com, Randy Harmelink wrote:
>
> Not quite so basic, because there is no row below the tag. They have the
> header AND the data in the same table cell. So:
>
> =RCHGetTableCell("
> http://www.advfn.com/p.php?pid=qkquote&btn=s_ok&s_symbol_select=OTCBB%3AABBY&symbol=bp
> ",0,">Name")
>
> ...would return:
>
> Name:
> BP P.L.C.
>
> ...because the table cell actually contains:
>
> Name:
BP P.L.C.
>
> When assumptions don't pan out, you do need to look the the source code of
> the web page to find out what the details of the coding are. And,
> unfortunately, they can change that coding. :(
>
> On Wed, Feb 6, 2013 at 10:49 AM, Steven wrote:
>
> > For some reason I have not been able to master finding info in a row below
> > the tag. For example:
> > http://www.advfn.com/p.php?pid=qkquote&btn=s_ok&s_symbol_select=OTCBB%3AABBY&symbol=bp
> >
> > The tags are:
> > Name: Symbol: Stock Market: Type: ISIN: Description:
> >
> > BP P.L.C. NYSE:BP New York Stock Exchange Equity US0556221044
> >
> > But the info is in the next line. I know this is basic.
> >
> > Help please
> >
>

Wed Feb 6, 2013 12:43 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

No, I just used the URL you gave me. I think the only thing you actually
need is:

http://www.advfn.com/p.php?pid=qkquote&symbol=bp

On Wed, Feb 6, 2013 at 11:14 AM, Steven stevenletzer@yahoo.com> wrote:

> So I would have to know the sting OTCBB%3AABBY, which would be differnt
> for each symbol?
>
> --- In smf_addin@yahoogroups.com, Randy Harmelink wrote:
> >
> > Not quite so basic, because there is no row below the tag. They have the
> > header AND the data in the same table cell. So:
> >
> > =RCHGetTableCell("
> >
> http://www.advfn.com/p.php?pid=qkquote&btn=s_ok&s_symbol_select=OTCBB%3AABBY&symbol=bp
> > ",0,">Name")
>

Wed Feb 6, 2013 1:43 pm (PST) . Posted by:

"joshi_mandar" joshi_mandar

Hello. I am trying to get quote for $17 call option May expiration for VIX. I tried my usual formula of smfGetOptionQuotes("VIX May 13 17 call","l",0,"Y"). But it wasn't working because VIX has non-standard expiration dates.

I looked at this thread (http://finance.dir.groups.yahoo.com/group/smf_addin/message/16801?o=1&d=-1) and tried this smfGetOptionQuotes("VIX 5/22 2013 17 call","l",0,"Y"). But that too is not working. It returns "Error". Any suggestions?

Wed Feb 6, 2013 2:17 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

That's because Yahoo isn't consistent on their ticker symbol usage for VIX.
The web pages with the listed options are ^VIX, while the option quotes
themselves use a VIX prefix. The workaround you cited still works, but only
for the near-month options, because of how Yahoo redirects a VIX request to
^VIX. That is, both:

http://finance.yahoo.com/q/op?s=VIX&m=2013-05
http://finance.yahoo.com/q/op?s=VIX&m=2013-02

...get redirected to:

http://finance.yahoo.com/q/op?s=^VIX

...which only lists the February options. So, this does still work:

=smfGetOptionQuotes("VIX 2/13 2013 $15 Call", "l")

Otherwise, You'll need to use OptionsXPress as your data source with that
function for VIX.

Or, if you want to use Yahoo, you can write your own retrieval functions.
For example:

=RCHGetTableCell("http://finance.yahoo.com/q/op?s=
^VIX&m=2013-05",1,"VIX130522C00017000")

That's basically how smfGetOptionQuotes() gets it's options quotes --
except that the two VIX symbols are different usages there.

Hmmm. Shouldn't be too hard to program around the ticker symbol issue...I
just uploaded beta version 2.1.2013.02.06 of the add-in to the "Works in
Progress" folder with that fix. But you won't be able to use "May" as your
expiration month, since VIX has a different monthly expiration date than
normal options. But either of these would work with the updated code:

=smfGetOptionQuotes("VIX 5/22 13 $17 call","l",0,"Y")
=smfGetOptionQuotes("VIX 5/22 2013 $17 call","l")

I wonder why they use a non-standard date for VIX?

On Wed, Feb 6, 2013 at 2:22 PM, joshi_mandar joshi_mandar@hotmail.com>wrote:

> Hello. I am trying to get quote for $17 call option May expiration for
> VIX. I tried my usual formula of smfGetOptionQuotes("VIX May 13 17
> call","l",0,"Y"). But it wasn't working because VIX has non-standard
> expiration dates.
>
> I looked at this thread (
> http://finance.dir.groups.yahoo.com/group/smf_addin/message/16801?o=1&d=-1)
> and tried this smfGetOptionQuotes("VIX 5/22 2013 17 call","l",0,"Y"). But
> that too is not working. It returns "Error". Any suggestions?
>

Wed Feb 6, 2013 2:51 pm (PST) . Posted by:

"joshi_mandar" joshi_mandar

That works. Thanks a lot for implementing your work around. BTW, I have been using the add-in for a month now. And absolutely love it. Thanks for developing it.

--- In smf_addin@yahoogroups.com, Randy Harmelink wrote:
>
> That's because Yahoo isn't consistent on their ticker symbol usage for VIX.
> The web pages with the listed options are ^VIX, while the option quotes
> themselves use a VIX prefix. The workaround you cited still works, but only
> for the near-month options, because of how Yahoo redirects a VIX request to
> ^VIX. That is, both:
>
> http://finance.yahoo.com/q/op?s=VIX&m=2013-05
> http://finance.yahoo.com/q/op?s=VIX&m=2013-02
>
> ...get redirected to:
>
> http://finance.yahoo.com/q/op?s=^VIX
>
> ...which only lists the February options. So, this does still work:
>
> =smfGetOptionQuotes("VIX 2/13 2013 $15 Call", "l")
>
> Otherwise, You'll need to use OptionsXPress as your data source with that
> function for VIX.
>
> Or, if you want to use Yahoo, you can write your own retrieval functions.
> For example:
>
> =RCHGetTableCell("http://finance.yahoo.com/q/op?s=
> ^VIX&m=2013-05",1,"VIX130522C00017000")
>
> That's basically how smfGetOptionQuotes() gets it's options quotes --
> except that the two VIX symbols are different usages there.
>
> Hmmm. Shouldn't be too hard to program around the ticker symbol issue...I
> just uploaded beta version 2.1.2013.02.06 of the add-in to the "Works in
> Progress" folder with that fix. But you won't be able to use "May" as your
> expiration month, since VIX has a different monthly expiration date than
> normal options. But either of these would work with the updated code:
>
> =smfGetOptionQuotes("VIX 5/22 13 $17 call","l",0,"Y")
> =smfGetOptionQuotes("VIX 5/22 2013 $17 call","l")
>
> I wonder why they use a non-standard date for VIX?
>
> On Wed, Feb 6, 2013 at 2:22 PM, joshi_mandar wrote:
>
> > Hello. I am trying to get quote for $17 call option May expiration for
> > VIX. I tried my usual formula of smfGetOptionQuotes("VIX May 13 17
> > call","l",0,"Y"). But it wasn't working because VIX has non-standard
> > expiration dates.
> >
> > I looked at this thread (
> > http://finance.dir.groups.yahoo.com/group/smf_addin/message/16801?o=1&d=-1)
> > and tried this smfGetOptionQuotes("VIX 5/22 2013 17 call","l",0,"Y"). But
> > that too is not working. It returns "Error". Any suggestions?
> >
>

Wed Feb 6, 2013 3:53 pm (PST) . Posted by:

"Michael" mfgrames

Randy,

I have tried your new beta version, because I was also having problems
with VIX. However, the new version does not run, and produces an error
for me, such as "library missing" and brings up the debugger. I have
switched back to the previous beta version, which seems to run fine.

Mike

On 2/6/2013 5:17 PM, Randy Harmelink wrote:
>
> That's because Yahoo isn't consistent on their ticker symbol usage for
> VIX. The web pages with the listed options are ^VIX, while the option
> quotes themselves use a VIX prefix. The workaround you cited still
> works, but only for the near-month options, because of how Yahoo
> redirects a VIX request to ^VIX. That is, both:
>
> http://finance.yahoo.com/q/op?s=VIX&m=2013-05
> http://finance.yahoo.com/q/op?s=VIX&m=2013-02
>
> ...get redirected to:
>
> http://finance.yahoo.com/q/op?s=^VIX
>
> ...which only lists the February options. So, this does still work:
>
> =smfGetOptionQuotes("VIX 2/13 2013 $15 Call", "l")
>
> Otherwise, You'll need to use OptionsXPress as your data source with
> that function for VIX.
>
> Or, if you want to use Yahoo, you can write your own retrieval
> functions. For example:
>
> =RCHGetTableCell("http://finance.yahoo.com/q/op?s=^VIX&m=2013-05",1,"VIX130522C00017000")
>
> That's basically how smfGetOptionQuotes() gets it's options quotes --
> except that the two VIX symbols are different usages there.
>
> Hmmm. Shouldn't be too hard to program around the ticker symbol
> issue...I just uploaded beta version 2.1.2013.02.06 of the add-in to
> the "Works in Progress" folder with that fix. But you won't be able to
> use "May" as your expiration month, since VIX has a different monthly
> expiration date than normal options. But either of these would work
> with the updated code:
>
> =smfGetOptionQuotes("VIX 5/22 13 $17 call","l",0,"Y")
> =smfGetOptionQuotes("VIX 5/22 2013 $17 call","l")
>
> I wonder why they use a non-standard date for VIX?
>
> On Wed, Feb 6, 2013 at 2:22 PM, joshi_mandar joshi_mandar@hotmail.com
> joshi_mandar@hotmail.com>> wrote:
>
> Hello. I am trying to get quote for $17 call option May
> expiration for VIX. I tried my usual formula of
> smfGetOptionQuotes("VIX May 13 17 call","l",0,"Y"). But it wasn't
> working because VIX has non-standard expiration dates.
>
> I looked at this thread
> (http://finance.dir.groups.yahoo.com/group/smf_addin/message/16801?o=1&d=-1)
> and tried this smfGetOptionQuotes("VIX 5/22 2013 17
> call","l",0,"Y"). But that too is not working. It returns
> "Error". Any suggestions?
>
>
>

Wed Feb 6, 2013 8:27 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

My reply evidently went directly to Mike instead of to the Yahoo group.

If anyone else tries 2.1.2012.02.06 -- let me know if you get the same
compiler error, or whether it works. I've seen several other messages that
it worked correctly, and can't see anything wrong on this end, so I'm
wondering if it's an isolated case.

Note that you do have to exit EXCEL before updating the XLA file, since
add-ins are loaded when EXCEL starts up.

------------------------------

Hmmm. Not sure what to tell you. I went into the add-in and the VBA
environment compiles it successfully. And the UCase() function is not
something new -- I have been using that in numerous places for some time.
And my template that uses that particular function is working fine...

One thing I saw from a Google search on the topic had this advice:

"In the VBE, go to Tools > References. In the dialog, you will probably see
a reference marked as "MISSING". Resolve that missing reference - just
uncheck it if it's not needed - and you should then find all is well (with
the UCase, although not necessarily with other things - it depends what it
was that was missing)."

I haven't changed the references, at least not intentionally.

On Wed, Feb 6, 2013 at 4:38 PM, Michael mike@grames.net> wrote:
Randy,

I have tried your new beta version, because I was also having problems with
VIX. However, the new version does not run, and produces an error for me,
such as "library missing" and brings up the debugger. I have switched
back to the previous beta version, which seems to run fine.

Mike

Wed Feb 6, 2013 11:06 pm (PST) . Posted by:

"bingouser" bingouser

I recall seeing a post that mentioned using an "x" in the column header for a particular function to prevent the column from refreshing. I haven't been able to find it with a search. Could someone point me in the right direction?

Thanks.

Wed Feb 6, 2013 11:09 pm (PST) . Posted by:

"bingouser" bingouser

Also, is there an smf function or other convenient way to convert columns to rows? It would be easier to have the data in the same row as each ticker instead of columns.

--- In smf_addin@yahoogroups.com, "bingouser" wrote:
>
> I recall seeing a post that mentioned using an "x" in the column header for a particular function to prevent the column from refreshing. I haven't been able to find it with a search. Could someone point me in the right direction?
>
> Thanks.
>

Thu Feb 7, 2013 12:07 am (PST) . Posted by:

"Randy Harmelink" rharmelink

That's for the smfUpdateDownloadTable macro, not a function...

On Thu, Feb 7, 2013 at 12:06 AM, bingouser bingouser@yahoo.com> wrote:

> I recall seeing a post that mentioned using an "x" in the column header
> for a particular function to prevent the column from refreshing. I haven't
> been able to find it with a search. Could someone point me in the right
> direction?
>

Thu Feb 7, 2013 12:13 am (PST) . Posted by:

"Randy Harmelink" rharmelink

Depending on what functions you're using, the EXCEL Transpose() function
may do what you want. But you may need to use the (undocumented) pDim1 and
pDim2 parameters to specify how many rows and columns of output you'll
want. Otherwise, they default to the dimensions of the range, which
wouldn't be correct if you're going to transpose the data.

For example, two get RCHGetYahooQuotes() for five items for two companies,
with each company in a column, you'd do something like this, array-entered
in a 5-row by 2-column range:

=TRANSPOSE(RCHGetYahooQuotes("MMM,IBM","sl1d1ab",,,,2,5))

Note that the "2,5" tells RCHGetYahooQuotes() to create a 2-row by 5-column
output array, which is what you need before you'll be transposing it to be
a 5-row by 2-column range..

On Thu, Feb 7, 2013 at 12:09 AM, bingouser bingouser@yahoo.com> wrote:

> Also, is there an smf function or other convenient way to convert columns
> to rows? It would be easier to have the data in the same row as each ticker
> instead of columns.
>

Thu Feb 7, 2013 3:18 am (PST) . Posted by:

"dertom4ever" dertom4ever

Hi all,

just wondering if you can access historical data about companies/stocks through any of the functions of the add-in. I am talking about more than just the stock prices and volume, which I know can be accessed through rchgetyahoohistory(). I am talking about historical earnings or at least earnings per share (parameter "e") for the last quarters/years.

I tried to experiment a little with, for example:

=rchgetyahooquotes("aapl";"e";"MRQ")
=rchgetyahooquotes("aapl";"e";"mrq-5")
=rchgetyahooquotes("aapl";"e(mry-4)")

or something like that but nothing seemed to work. However, I think you get the idea of what i'm trying to do here (mrq=most recent quarter, mry=mr year...)

Can you access this data in any particular way through the add-in?

Thanks!

Thu Feb 7, 2013 3:28 am (PST) . Posted by:

"aeonf22" aeonf22

Hello all.

using the =RCHGetYahooQuotes(BP,"y") function for example I get a DIV yield of 4.5
When I go to yahoo quotes manually to compare, I get a yield of 4.9:
http://finance.yahoo.com/q?s=bp&ql=1

another example is RWR
functions returns a value of 2.9%, yahoo states 3.05%
GE is another example.

Does anyone have an explanation for this ?

In addition I have a problem with the =RCHGetElementNumber function
no matter what I try, I get "Undefined" as an answer.
Any ideas ?

Tidak ada komentar:

Posting Komentar