Jumat, 19 Mei 2017

[smf_addin] Digest Number 4013

15 Messages

Digest #4013
1.1
Re: Update on Yahoo Historical Quotes by "Randy Harmelink" rharmelink
1.2
Re: Update on Yahoo Historical Quotes by "Randy Harmelink" rharmelink
1.4
Re: Update on Yahoo Historical Quotes by "Randy Harmelink" rharmelink
1.6
1.7
Re: Update on Yahoo Historical Quotes by "Joe Williams" joseph_c_williams
1.9
Re: Update on Yahoo Historical Quotes by "Joe Williams" joseph_c_williams
1.10
Re: Update on Yahoo Historical Quotes by mthmu3uhchaa4cu3fj53vppa7f2ab7cx7srhngvp
1.12
Re: Update on Yahoo Historical Quotes by "Gerard Trofub" trofub

Messages

Thu May 18, 2017 7:24 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

They do have splits applied, but not dividends. So I had to add the
dividend adjustment process. Easy enough to pull out if they add it later.
I won't hold my breath. MMM appears to have data back to 1986. So no longer
the 1970 they used to have.

But when I look at the oldest data, applying my calculated dividend and
split adjustment factors against the unadjusted price they quote does give
me my closing price, so I think it's verifying the continued the full
stream of dividends and splits.

It does take longer to retrieve the data. That web page is now nearly a
half megabyte of data. And extracting from a JSON data stream instead of a
CSV means a lot more data to be wading through, and a lot more verbiage.

On Thu, May 18, 2017 at 5:13 PM, earladamy@gmail.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Do you have any idea yet on the historical limits for extracting data with
> the proposed smfGetYahooHistory()? Would I be correct in assuming that
> adjusted close can be calculated as: close * split adjustment * dividend
> adjustment?
>
> FWIW, I have been running test downloads with Quandl's Quote Media
> ($50/month) and am finding that each symbol request requires 2-3 times as
> long as Y did to download history. I am already running across low volume
> ETF symbols carried by Y which are missing from QM. Two major pluses so far
> from the QM effort: data is available one hour after the close and I have a
> workable "Plan B" if Y thwarts download efforts.
>
>
>

Thu May 18, 2017 8:19 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

I'm done looking at things until tomorrow. The last two problems I spent
time investigating turned out to be Yahoo data problems:

1. The recent 1/10 split by RNN was adjusted by Yahoo as if it were a
10-for-1 split.
2. ^GSPC errors out on data past 6/29/16 because Yahoo has "null" values
for data items on that date.

For those of you chomping at the bit, I just uploaded these files:

http://ogres-crypt.com/SMF/Works-In-Progress/RCH_Stock_Market_Functions.xla
http://ogres-crypt.com/SMF/Works-In-Progress/smfGetYahooHistory-Example-By-Parameter.xls

I have also changed the smfPricesByDates() function to use the new
smfGetYahooHistory(), so it should work as well. I'm not publishing these
on the website pages because I expect there will need to be updates.

I've tried so many combinations of parameters today that I'm going
bug-eyed. A few fresh sets of eyes might help. I'm sure others will try
things I wouldn't even think of trying. That's the problem with testing
your own code -- you're really just testing your own assumptions.

It might be easiest to exit EXCEL, rename the current XLA, and grab the new
one. And start up EXCEL again. That way, it's easy to reverse by just
exiting EXCEL and renaming the two files. It is noticeably slower, due to
the size of the files, About a half-second to a second or so longer per
request. But I'm also running slower here on the new desktop, with a newer
version of EXCEL and Windows.

On Thu, May 18, 2017 at 6:16 PM, marksimms@verizon.net [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Sounds great. ETA on the modifications ?
>
>
>

Thu May 18, 2017 10:39 pm (PDT) . Posted by:

"V A" viewasia

Could you please share information on the flags (data items) being passed for the data pull? I'm trying to understand if the closing price is the adjusted closing price.

Documentation Link > RCHGetYahooHistory-Function.html doesn't address the new flags

From: "Randy Harmelink rharmelink@gmail.com [smf_addin]" <smf_addin@yahoogroups.com>
To: smf_addin@yahoogroups.com
Sent: Thursday, May 18, 2017 8:19 PM
Subject: Re: [smf_addin] Re: Update on Yahoo Historical Quotes

  I'm done looking at things until tomorrow. The last two problems I spent time investigating turned out to be Yahoo data problems:

1. The recent 1/10 split by RNN was adjusted by Yahoo as if it were a 10-for-1 split.
2. ^GSPC errors out on data past 6/29/16 because Yahoo has "null"  values for data items on that date.

For those of you chomping at the bit, I just uploaded these files:

http://ogres-crypt.com/SMF/Works-In-Progress/RCH_Stock_Market_Functions.xla
http://ogres-crypt.com/SMF/Works-In-Progress/smfGetYahooHistory-Example-By-Parameter.xls

I have also changed the smfPricesByDates() function to use the new smfGetYahooHistory(), so it should work as well. I'm not publishing these on the website pages because I expect there will need to be updates.
I've tried so many combinations of parameters today that I'm going bug-eyed. A few fresh sets of eyes might help. I'm sure others will try things I wouldn't even think of trying. That's the problem with testing your own code -- you're really just testing your own assumptions.

It might be easiest to exit EXCEL, rename the current XLA, and grab the new one. And start up EXCEL again. That way, it's easy to reverse by just exiting EXCEL and renaming the two files. It is noticeably slower, due to the size of the files, About a half-second to a second or so longer per request. But I'm also running slower here on the new desktop, with a newer version of EXCEL and Windows.

On Thu, May 18, 2017 at 6:16 PM, marksimms@verizon.net [smf_addin] <smf_addin@yahoogroups.com> wrote:

Sounds great. ETA on the modifications ?

#yiv2913837266 #yiv2913837266 -- #yiv2913837266ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv2913837266 #yiv2913837266ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv2913837266 #yiv2913837266ygrp-mkp #yiv2913837266hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv2913837266 #yiv2913837266ygrp-mkp #yiv2913837266ads {margin-bottom:10px;}#yiv2913837266 #yiv2913837266ygrp-mkp .yiv2913837266ad {padding:0 0;}#yiv2913837266 #yiv2913837266ygrp-mkp .yiv2913837266ad p {margin:0;}#yiv2913837266 #yiv2913837266ygrp-mkp .yiv2913837266ad a {color:#0000ff;text-decoration:none;}#yiv2913837266 #yiv2913837266ygrp-sponsor #yiv2913837266ygrp-lc {font-family:Arial;}#yiv2913837266 #yiv2913837266ygrp-sponsor #yiv2913837266ygrp-lc #yiv2913837266hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv2913837266 #yiv2913837266ygrp-sponsor #yiv2913837266ygrp-lc .yiv2913837266ad {margin-bottom:10px;padding:0 0;}#yiv2913837266 #yiv2913837266actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv2913837266 #yiv2913837266activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv2913837266 #yiv2913837266activity span {font-weight:700;}#yiv2913837266 #yiv2913837266activity span:first-child {text-transform:uppercase;}#yiv2913837266 #yiv2913837266activity span a {color:#5085b6;text-decoration:none;}#yiv2913837266 #yiv2913837266activity span span {color:#ff7900;}#yiv2913837266 #yiv2913837266activity span .yiv2913837266underline {text-decoration:underline;}#yiv2913837266 .yiv2913837266attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv2913837266 .yiv2913837266attach div a {text-decoration:none;}#yiv2913837266 .yiv2913837266attach img {border:none;padding-right:5px;}#yiv2913837266 .yiv2913837266attach label {display:block;margin-bottom:5px;}#yiv2913837266 .yiv2913837266attach label a {text-decoration:none;}#yiv2913837266 blockquote {margin:0 0 0 4px;}#yiv2913837266 .yiv2913837266bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv2913837266 .yiv2913837266bold a {text-decoration:none;}#yiv2913837266 dd.yiv2913837266last p a {font-family:Verdana;font-weight:700;}#yiv2913837266 dd.yiv2913837266last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv2913837266 dd.yiv2913837266last p span.yiv2913837266yshortcuts {margin-right:0;}#yiv2913837266 div.yiv2913837266attach-table div div a {text-decoration:none;}#yiv2913837266 div.yiv2913837266attach-table {width:400px;}#yiv2913837266 div.yiv2913837266file-title a, #yiv2913837266 div.yiv2913837266file-title a:active, #yiv2913837266 div.yiv2913837266file-title a:hover, #yiv2913837266 div.yiv2913837266file-title a:visited {text-decoration:none;}#yiv2913837266 div.yiv2913837266photo-title a, #yiv2913837266 div.yiv2913837266photo-title a:active, #yiv2913837266 div.yiv2913837266photo-title a:hover, #yiv2913837266 div.yiv2913837266photo-title a:visited {text-decoration:none;}#yiv2913837266 div#yiv2913837266ygrp-mlmsg #yiv2913837266ygrp-msg p a span.yiv2913837266yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv2913837266 .yiv2913837266green {color:#628c2a;}#yiv2913837266 .yiv2913837266MsoNormal {margin:0 0 0 0;}#yiv2913837266 o {font-size:0;}#yiv2913837266 #yiv2913837266photos div {float:left;width:72px;}#yiv2913837266 #yiv2913837266photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv2913837266 #yiv2913837266photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv2913837266 #yiv2913837266reco-category {font-size:77%;}#yiv2913837266 #yiv2913837266reco-desc {font-size:77%;}#yiv2913837266 .yiv2913837266replbq {margin:4px;}#yiv2913837266 #yiv2913837266ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv2913837266 #yiv2913837266ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv2913837266 #yiv2913837266ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv2913837266 #yiv2913837266ygrp-mlmsg select, #yiv2913837266 input, #yiv2913837266 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv2913837266 #yiv2913837266ygrp-mlmsg pre, #yiv2913837266 code {font:115% monospace;}#yiv2913837266 #yiv2913837266ygrp-mlmsg * {line-height:1.22em;}#yiv2913837266 #yiv2913837266ygrp-mlmsg #yiv2913837266logo {padding-bottom:10px;}#yiv2913837266 #yiv2913837266ygrp-msg p a {font-family:Verdana;}#yiv2913837266 #yiv2913837266ygrp-msg p#yiv2913837266attach-count span {color:#1E66AE;font-weight:700;}#yiv2913837266 #yiv2913837266ygrp-reco #yiv2913837266reco-head {color:#ff7900;font-weight:700;}#yiv2913837266 #yiv2913837266ygrp-reco {margin-bottom:20px;padding:0px;}#yiv2913837266 #yiv2913837266ygrp-sponsor #yiv2913837266ov li a {font-size:130%;text-decoration:none;}#yiv2913837266 #yiv2913837266ygrp-sponsor #yiv2913837266ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv2913837266 #yiv2913837266ygrp-sponsor #yiv2913837266ov ul {margin:0;padding:0 0 0 8px;}#yiv2913837266 #yiv2913837266ygrp-text {font-family:Georgia;}#yiv2913837266 #yiv2913837266ygrp-text p {margin:0 0 1em 0;}#yiv2913837266 #yiv2913837266ygrp-text tt {font-size:120%;}#yiv2913837266 #yiv2913837266ygrp-vital ul li:last-child {border-right:none !important;}#yiv2913837266

Thu May 18, 2017 11:07 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Oops...for now, the parameters:

pStartDate = Start date. It can be a string (e.g. "5/18/2017") or an EXCEL
serial date. Defaults to a year ago.

pEndDate = Ending date. Also can be a string or EXCEL serial date. Defaults
to tomorrow. I've even used "12/31/2020".

pPeriod = Time period of data == "d" (daily), "w" (weekly, on Fridays),
:"m" (monthly, at start of month), "q" (quarterly, at start of quarter),
"a" (annual, at start of year), "v" = (dividends, with the ex-dividend
dates), "s" (splits, with the ex-dividend dates)/. Defaults to daily. Only
a single character can be sent.

pItems -- Data items desired. Defaults to "dohlcvufgxs", or Date, adjusted
Open, adjusted High, adjusted Low. adjusted Close, Volume, unadjusted
close, dividend adjust Factor, (g=) split adjustment factor, eX-dividend
amount, Split ratio. "t" for Ticker is also valid. When pPeriod is "v" or
"s", this string isn't used, EXCEPT to see if a ticker was requested -- in
that case, the three fields returned -- Ticker, Date, dividend/split
amount. Otherwise, you can specify as many of these as you want, in any
order. For example, "dcut" would return Date, adjusted Close, Unadjusted
Close, and Ticker.

pNames -- Whether a header row should be used, with field names inserted.
Defaults to a value of 1, but can be set to 0.

pResort -- Defaults to 0, but setting to 1 will resort the data so oldest
data is at the top.

pRows, pCols -- generally not used. They can set the size of the data range
to be returned.They default to the size of the range the format was
array-entered over. These are used mainly for other VBA routines that call
this function, since a worksheet range wouldn't apply. I may default them
later.

Example:

=smfGetYahooHistory("MMM")
=smfGetYahooHistory("MMM","1/1/2000",,"v")
=smfGetYahooHistory("MMM","5/12/2017","5/12/2017","d","u",0)

The first gets the whole year's worth of everything except Ticker output.
The second gets dividend payments since 1/1/2000. The third gets a single
value -- the unadjusted close on 5/12/2017.

Something like this:

=AVERAGE(smfGetYahooHistory("MMM",,,,"c",0,,50,1))

...would get you the 50-day average of the adjusted close.

On Thu, May 18, 2017 at 10:13 PM, V A viewasia@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> Could you please share information on the flags (data items) being passed
> for the data pull? I'm trying to understand if the closing price is the
> adjusted closing price.
>
> Documentation Link
> <http://ogres-crypt.com/SMF/Documentation/viewer.php?name=RCHGetYahooHistory-Function.html>
> > RCHGetYahooHistory-Function.html doesn't address the new flags
>
> ------------------------------
> *From:* "Randy Harmelink rharmelink@gmail.com [smf_addin]" <
> smf_addin@yahoogroups.com>
> *To:* smf_addin@yahoogroups.com
> *Sent:* Thursday, May 18, 2017 8:19 PM
> *Subject:* Re: [smf_addin] Re: Update on Yahoo Historical Quotes
>
>
> I'm done looking at things until tomorrow. The last two problems I spent
> time investigating turned out to be Yahoo data problems:
>
> 1. The recent 1/10 split by RNN was adjusted by Yahoo as if it were a
> 10-for-1 split.
> 2. ^GSPC errors out on data past 6/29/16 because Yahoo has "null" values
> for data items on that date.
>
> For those of you chomping at the bit, I just uploaded these files:
>
> http://ogres-crypt.com/SMF/Works-In-Progress/RCH_Stock_
> Market_Functions.xla
> http://ogres-crypt.com/SMF/Works-In-Progress/
> smfGetYahooHistory-Example-By-Parameter.xls
>
> I have also changed the smfPricesByDates() function to use the new
> smfGetYahooHistory(), so it should work as well. I'm not publishing these
> on the website pages because I expect there will need to be updates.
>
> I've tried so many combinations of parameters today that I'm going
> bug-eyed. A few fresh sets of eyes might help. I'm sure others will try
> things I wouldn't even think of trying. That's the problem with testing
> your own code -- you're really just testing your own assumptions.
>
> It might be easiest to exit EXCEL, rename the current XLA, and grab the
> new one. And start up EXCEL again. That way, it's easy to reverse by just
> exiting EXCEL and renaming the two files. It is noticeably slower, due to
> the size of the files, About a half-second to a second or so longer per
> request. But I'm also running slower here on the new desktop, with a newer
> version of EXCEL and Windows.
>
> On Thu, May 18, 2017 at 6:16 PM, marksimms@verizon.net [smf_addin] <
> smf_addin@yahoogroups.com> wrote:
>
>
> Sounds great. ETA on the modifications ?
>
>

Fri May 19, 2017 7:49 am (PDT) . Posted by:

navelhunt

Maybe i missed something, but the function in the XLA add in is called RCHgetYahooHistory and you refer to smfgetYahooHistory. I know its being rewritten, but where can i get the smf function or should i just rename the " rch" into "smf"? thanks

Fri May 19, 2017 7:51 am (PDT) . Posted by:

"Eric Stats" ehstats

Randy, when you say it will just used the new function, what new function
is that and is it available. You may have already explained this in
another chain, but I've looked and I'm not seeing it; however, there are
many emails and it is confusing for a novice like me. Thanks, Eric.

On Thu, May 18, 2017 at 10:27 AM, Randy Harmelink rharmelink@gmail.com
[smf_addin] <smf_addin@yahoogroups.com> wrote:

>
>
> smfPricesByDates() will return -- it will just use the new function to get
> the data and extract as it always did.
>
> On Thu, May 18, 2017 at 8:20 AM, Eric Stats ericstats@gmail.com
> [smf_addin] <smf_addin@yahoogroups.com> wrote:
>
>>
>> I use smfPricesByDates. Will that formula still work after Yahoo makes
>> some adjustments or what service do you recommend to use to get historical
>> quotes? Thanks, Eric
>>
>
>
>

--
Eric Stats, CFA
801-552-6631

Fri May 19, 2017 8:01 am (PDT) . Posted by:

"Joe Williams" joseph_c_williams

Everything seems to be working fine based on your latest upload:

My old calls were:

RchGetYahooHistory(C1,YEAR(A1),MONTH(A1),DAY(A1),YEAR(A1),MONTH(A1),DAY(A1),"d","A",0)

The new calls are:

smfGetYahooHistory(C1,A1,A1,"d","c",0)

Of course, execution is much slower due to the increased compute load.

=======

I notice two differences:

1) Yahoo now supplies the current day's price on the historical prices list
during market hours for ETFs.

2) If the current day's price is requested for all other (non-etf) stocks
during market hours, the functionnow returns "Error" whereas before it
returned zero.

=======

If the Yahoo historical table contains zeros, the function stops retrieving
data:

see VFINX on 6/29/2016

=======

Am I correct in saying that, starting with a dividend factor of 1.0000
(call it DF) and then working backwards, DF stays constant until a dividend
is declared (call it D). Then, the dividend day's adjusted closing price
(call it C) is used to calculate a new DF (which will stay constant until
the next dividend is encountered):

DF(new) = DF(old) * (1 - D/C)

=======

I can't express strongly enough my appreciation for all you do for us.

Fri May 19, 2017 8:10 am (PDT) . Posted by:

navelhunt

Joe, Where do you find that smfGetYahooHistory function? It is not included in the RCH stock market functions add-in (there is still the old RCH function)
thanks.



Fri May 19, 2017 8:20 am (PDT) . Posted by:

"Joe Williams" joseph_c_williams

navelhunt:

Look at Randy's post a couple of messages back: it contains these links:

http://ogres-crypt.com/SMF/Works-In-Progress/RCH_Stock_Market_Functions.xla
http://ogres-crypt.com/SMF/Works-In-Progress/smfGetYahooHistory-Example-By-Parameter.xls

Fri May 19, 2017 8:54 am (PDT) . Posted by:

mthmu3uhchaa4cu3fj53vppa7f2ab7cx7srhngvp

Everything seems to be working fine based on your latest upload:


My old calls were:


RchGetYahooHistory(C1,YEAR(A1),MONTH(A1),DAY(A1),YEAR(A1),MONTH(A1),DAY(A1),"d","A",0)


The new calls are:


smfGetYahooHistory(C1,A1,A1,"d","c",0)


Of course, execution is much slower due to the increased computing load.


Am I correct in saying that, starting with a dividend factor of 1.0000 (call it DF) and then working backwards, DF stays constant until a dividend is declared (call it D). Then, the dividend day's adjusted closing price (call it C) is used to calculate a new DF (which will stay constant until the next dividend is encountered):


DF(new) = DF(old) * (1 - D/C)


I can't express strongly enough my appreciation for all you do for us.

Fri May 19, 2017 9:01 am (PDT) . Posted by:

tonyestep

Hooray for Randy! Randy, I will test and report back asap, but to compound my miseries my whole county lost power last night, so I'm on my pad from the coffee shop. But all sounds great -- thank you so much!

Fri May 19, 2017 10:17 am (PDT) . Posted by:

"Gerard Trofub" trofub

Have a look on randy's mail dated may 18, 2017 8:19 on this subject for this new function. I am going to test it.
And many thanks from french friends.

Envoyé de mon iPad

> Le 19 mai 2017 à 18:01, tonyestep@yahoo.com [smf_addin] <smf_addin@yahoogroups.com> a écrit :
>
> Hooray for Randy! Randy, I will test and report back asap, but to compound my miseries my whole county lost power last night, so I'm on my pad from the coffee shop. But all sounds great -- thank you so much!
>
>
>

Fri May 19, 2017 4:24 am (PDT) . Posted by:

halstian1

Hi Randy

Is it possible to use the Google workaround
=smfGetCSVFile("https://www.google.com/finance/historical?q= https://www.google.com/finance/historical?q="&B6&"&startdate="&TEXT(C6,"mmm+dd,+yyyy&quot;)&"&enddate="&TEXT(D6,"mmm+dd,+yyyy&quot;)&"&output=csv";)



but to exclude the header table?


Thanks


Fri May 19, 2017 7:38 am (PDT) . Posted by:

raig002

Hi:


I am using =smfGetOptionExpirations() function to retrieve option expiration dates,
and I am having trouble to retrieve the correct exp. dates, for exmple for JNJ
I get the wrong exp. date, in this case, I get 6/16/2017(June,16 2017),
instead of 5/19/2017 (May 19, 2017), which is the correct one.
I am trying to automate options but I am having hard time retrieving free data from Yahoo, because
it is not reliable or wrong data.


Is there a different function to retrieve option exp. dates?


Somebody knows where can I get real time data for options, and retrieve to EXCEL
similar to SMF add-in?. I can pay for monthly subscription.


Thanks a lot.


Fri May 19, 2017 10:27 am (PDT) . Posted by:

rr76012

Randy what version of windows and excel are you using?


If you don't mind answering. On your computer how much RAM do you use and what intel chip do you use?


I have to upgrade my computer but I don't know how fast a computer and memory to buy?


I really only use a computer for your smfaddin in excel and reading email?


Thanks,


rr76012




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

Tidak ada komentar:

Posting Komentar