Sabtu, 03 Februari 2018

[smf_addin] Digest Number 4302

15 Messages

Digest #4302
1a
1b
Re: Yahoo History Errors by "Randy Harmelink" rharmelink
2b
Re: SMF @ Windows XP/Excel2007 by "Randy Harmelink" rharmelink
3b
Re: Problem with smfGetYahooHistory by "Randy Harmelink" rharmelink
4.2
Re: smfPricesByDates -- Array Formula by "Randy Harmelink" rharmelink
5b
Re: Timed recalculation GetPortfolio by "Randy Harmelink" rharmelink

Messages

Mon Jan 29, 2018 12:59 pm (PST) . Posted by:

antoine61

Hello,


I'm getting errors with the RCHGetYahooHistory function. This used to work perfectly well until now. Are you aware of any issues at Yahoo?


Thanks

Mon Jan 29, 2018 1:07 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

More details, please.

There have been significant changes to Yahoo's historical quotes in the
past few months, so it's impossible for me to answer a question related to
how it "used to work", especially since you don't indicate the type of
errors you're getting.

In any case, you probably should be using the new smfGetYahooHistory()
function.

On Mon, Jan 29, 2018 at 1:53 PM, antoine@
​...
wrote:

> I'm getting errors with the RCHGetYahooHistory function. This used to
> work perfectly well until now. Are you aware of any issues at Yahoo?
>
>
>

Tue Jan 30, 2018 6:35 pm (PST) . Posted by:

antoine61

Thanks for the feedback, Randy. The problem is gone. I don't know what caused the issue. Maybe this happened while I was upgrading to the new January 24 2018 version?

Regards,

Wed Jan 31, 2018 6:20 am (PST) . Posted by:

antoine61

Thanks for the quick reply, Randy.

False alarm, everything is fine and back to normal now. I don't know what happened but the function is now working as expected. Maybe it was an issue while I was updating the add-in to the new 2018-01-24 version? Or maybe there was some glitch at Yahoo which has now been resolved?


Anyway, thanks again!

Tue Jan 30, 2018 11:46 pm (PST) . Posted by:

JCHyjun

I use IE8, it checks WWW page every time. SMF takes all info from Yahoo for me using smfGetYahooPortfolioView but does not work (I get "--").

Wed Jan 31, 2018 7:46 am (PST) . Posted by:

"Randy Harmelink" rharmelink

What do you get with:

=RCHGetElementNumber("Version")
=smfGetYahooPortfolioView("MMM","15",,0)
=RCHGetWebData("
https://query1.finance.yahoo.com/v7/finance/quote?symbols=MMM")

On Sat, Jan 27, 2018 at 11:05 PM, jchyjun@
​...
wrote:

>
> I use IE8, it checks WWW page every time. SMF takes all info from Yahoo
> for me using smfGetYahooPortfolioView but does not work (I get "--").
>

Wed Jan 31, 2018 7:43 pm (PST) . Posted by:

lewglenn

Seems to be a problem with smfGetYahooHistory. When I use the following code (with StartDate = 4/14/2003 and EndDate = 1/31/2018) Yahoo is adding several entries:
for dates 1/1/2018 and 1/15/2018 (which shouldn't exist); the values for the adjusted closing values of EFA on these dates correspond to the values on the previous dates, i.e., the value shown for 1/1/2018 is the same as that for 12/29/2017 and the value shown for 1/15/2018 is the same as shown for 1/12/2018.

I'm guessing that this is a Yahoo problem and not the fault with the function call but I'd appreciate your verifying the result that I'm getting.

Range("D1:E20000") = smfGetYahooHistory("EFA", StartDate, EndDate, "d", "dc", , 1, 20000, 2)
'Adjust title
Range("E1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Adj Close_" & SelPack
Columns("E:E").Select
Selection.ColumnWidth = 14.22
Range("E1:E1").Select
Selection.Font.Bold = True

Columns("D").Select
Selection.NumberFormat = "mm/d/yyyy"

Wed Jan 31, 2018 11:22 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

The EFA date combinations are working fine here.

Offhand, I would suspect you are in a far different timezone than EST. I am
just picking up the UNIX dates as stated. At some point, I'll need to add
the timezone adjustment. What do you get with:

=RCHGetWebData("https://finance.yahoo.com/quote/MMM/history","gmtOffset",30)

Adding in the GMTOffset to all dates is on my list of things to look at,
but isn't a high priority. Sorry.

On Wed, Jan 31, 2018 at 5:32 PM, lewglenn@
​...
wrote:

>
> Seems to be a problem with smfGetYahooHistory. When I use the following
> code (with StartDate = 4/14/2003 and EndDate = 1/31/2018) Yahoo is adding
> several entries:
> for dates 1/1/2018 and 1/15/2018 (which shouldn't exist); the values for
> the adjusted closing values of EFA on these dates correspond to the values
> on the previous dates, i.e., the value shown for 1/1/2018 is the same as
> that for 12/29/2017 and the value shown for 1/15/2018 is the same as shown
> for 1/12/2018.
>
> I'm guessing that this is a Yahoo problem and not the fault with the
> function call but I'd appreciate your verifying the result that I'm getting.
>
> Range("D1:E20000") = smfGetYahooHistory("EFA", StartDate, EndDate, "d",
> "dc", , 1, 20000, 2)
> 'Adjust title
> Range("E1").Select
> Application.CutCopyMode = False
> ActiveCell.FormulaR1C1 = "Adj Close_" & SelPack
> Columns("E:E").Select
> Selection.ColumnWidth = 14.22
> Range("E1:E1").Select
> Selection.Font.Bold = True
>
> Columns("D").Select
> Selection.NumberFormat = "mm/d/yyyy"
>
>

Thu Feb 1, 2018 2:42 am (PST) . Posted by:

"Higrm" higrm

Hi Lew,first off, I would question why you need 15 years worth of data, but that isn't my business.  Second, I would suggest you stop using "Select" and "ActiveCell" in you macros.  Third, when I extract a smaller set of data, just 13 months, I have no values on the 15th or 1st of Jan. 2018. See my attached screenprint. (I repeated the test again with your full time range and still didn't get values on the 1st or 15th of Jan. 2018)
Cheers,Higrm


On Thursday, February 1, 2018, 4:55:23 AM GMT+1, lewglenn@yahoo.com [smf_addin] <smf_addin@yahoogroups.com> wrote:

 
Seems to be a problem with smfGetYahooHistory. When I use the following code (with StartDate = 4/14/2003 and EndDate = 1/31/2018) Yahoo is adding several entries:
for dates 1/1/2018 and 1/15/2018 (which shouldn't exist); the values for the adjusted closing values of EFA on these dates correspond to the values on the previous dates, i.e., the value shown for 1/1/2018 is the same as that for 12/29/2017 and the value shown for 1/15/2018 is the same as shown for 1/12/2018.

I'm guessing that this is a Yahoo problem and not the fault with the function call but I'd appreciate your verifying the result that I'm getting.

Range("D1:E20000") = smfGetYahooHistory("EFA", StartDate, EndDate, "d", "dc", , 1, 20000, 2)
'Adjust title
    Range("E1").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "Adj Close_" & SelPack
    Columns("E:E").Select
    Selection.ColumnWidth = 14.22
    Range("E1:E1").Select
    Selection.Font.Bold = True
    
    Columns("D").Select
    Selection.NumberFormat = "mm/d/yyyy&quot;

Thu Feb 1, 2018 9:41 am (PST) . Posted by:

lewglenn

Very strange. Tried the exact same code this morning and the problem went away! Also note that I have used this code many many times in the past, without any problems.

Anyway, thanks for your reply.

Thu Feb 1, 2018 9:42 am (PST) . Posted by:

"Yahoo!" lewglenn

Problem disappeared this morning when I ran the EXACT same code.
I'm guessing that it was a temporary glitch with Yahoo.
Thanks for your prompt reply, Randy.


On Thursday, February 1, 2018, 8:13:58 AM PST, Randy Harmelink rharmelink@gmail.com [smf_addin] <smf_addin@yahoogroups.com> wrote:

 

The EFA date combinations are working fine here.
Offhand, I would suspect you are in a far different timezone than EST. I am just picking up the UNIX dates as stated. At some point, I'll need to add the timezone adjustment. What do you get with:
=RCHGetWebData("https://finance.yahoo.com/quote/MMM/history","gmtOffset",30)

Adding in the GMTOffset to all dates is on my list of things to look at, but isn't a high priority. Sorry.
On Wed, Jan 31, 2018 at 5:32 PM, lewglenn@​... wrote:

Seems to be a problem with smfGetYahooHistory. When I use the following code (with StartDate = 4/14/2003 and EndDate = 1/31/2018) Yahoo is adding several entries:
for dates 1/1/2018 and 1/15/2018 (which shouldn't exist); the values for the adjusted closing values of EFA on these dates correspond to the values on the previous dates, i.e., the value shown for 1/1/2018 is the same as that for 12/29/2017 and the value shown for 1/15/2018 is the same as shown for 1/12/2018.

I'm guessing that this is a Yahoo problem and not the fault with the function call but I'd appreciate your verifying the result that I'm getting.

Range("D1:E20000") = smfGetYahooHistory("EFA", StartDate, EndDate, "d", "dc", , 1, 20000, 2)
'Adjust title
    Range("E1").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "Adj Close_" & SelPack
    Columns("E:E").Select
    Selection.ColumnWidth = 14.22
    Range("E1:E1").Select
    Selection.Font.Bold = True
    
    Columns("D").Select
    Selection.NumberFormat = "mm/d/yyyy&quot;

#yiv7926606663 #yiv7926606663 -- #yiv7926606663ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv7926606663 #yiv7926606663ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv7926606663 #yiv7926606663ygrp-mkp #yiv7926606663hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv7926606663 #yiv7926606663ygrp-mkp #yiv7926606663ads {margin-bottom:10px;}#yiv7926606663 #yiv7926606663ygrp-mkp .yiv7926606663ad {padding:0 0;}#yiv7926606663 #yiv7926606663ygrp-mkp .yiv7926606663ad p {margin:0;}#yiv7926606663 #yiv7926606663ygrp-mkp .yiv7926606663ad a {color:#0000ff;text-decoration:none;}#yiv7926606663 #yiv7926606663ygrp-sponsor #yiv7926606663ygrp-lc {font-family:Arial;}#yiv7926606663 #yiv7926606663ygrp-sponsor #yiv7926606663ygrp-lc #yiv7926606663hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv7926606663 #yiv7926606663ygrp-sponsor #yiv7926606663ygrp-lc .yiv7926606663ad {margin-bottom:10px;padding:0 0;}#yiv7926606663 #yiv7926606663actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv7926606663 #yiv7926606663activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv7926606663 #yiv7926606663activity span {font-weight:700;}#yiv7926606663 #yiv7926606663activity span:first-child {text-transform:uppercase;}#yiv7926606663 #yiv7926606663activity span a {color:#5085b6;text-decoration:none;}#yiv7926606663 #yiv7926606663activity span span {color:#ff7900;}#yiv7926606663 #yiv7926606663activity span .yiv7926606663underline {text-decoration:underline;}#yiv7926606663 .yiv7926606663attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv7926606663 .yiv7926606663attach div a {text-decoration:none;}#yiv7926606663 .yiv7926606663attach img {border:none;padding-right:5px;}#yiv7926606663 .yiv7926606663attach label {display:block;margin-bottom:5px;}#yiv7926606663 .yiv7926606663attach label a {text-decoration:none;}#yiv7926606663 blockquote {margin:0 0 0 4px;}#yiv7926606663 .yiv7926606663bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv7926606663 .yiv7926606663bold a {text-decoration:none;}#yiv7926606663 dd.yiv7926606663last p a {font-family:Verdana;font-weight:700;}#yiv7926606663 dd.yiv7926606663last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv7926606663 dd.yiv7926606663last p span.yiv7926606663yshortcuts {margin-right:0;}#yiv7926606663 div.yiv7926606663attach-table div div a {text-decoration:none;}#yiv7926606663 div.yiv7926606663attach-table {width:400px;}#yiv7926606663 div.yiv7926606663file-title a, #yiv7926606663 div.yiv7926606663file-title a:active, #yiv7926606663 div.yiv7926606663file-title a:hover, #yiv7926606663 div.yiv7926606663file-title a:visited {text-decoration:none;}#yiv7926606663 div.yiv7926606663photo-title a, #yiv7926606663 div.yiv7926606663photo-title a:active, #yiv7926606663 div.yiv7926606663photo-title a:hover, #yiv7926606663 div.yiv7926606663photo-title a:visited {text-decoration:none;}#yiv7926606663 div#yiv7926606663ygrp-mlmsg #yiv7926606663ygrp-msg p a span.yiv7926606663yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv7926606663 .yiv7926606663green {color:#628c2a;}#yiv7926606663 .yiv7926606663MsoNormal {margin:0 0 0 0;}#yiv7926606663 o {font-size:0;}#yiv7926606663 #yiv7926606663photos div {float:left;width:72px;}#yiv7926606663 #yiv7926606663photos div div {border:1px solid #666666;min-height:62px;overflow:hidden;width:62px;}#yiv7926606663 #yiv7926606663photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv7926606663 #yiv7926606663reco-category {font-size:77%;}#yiv7926606663 #yiv7926606663reco-desc {font-size:77%;}#yiv7926606663 .yiv7926606663replbq {margin:4px;}#yiv7926606663 #yiv7926606663ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv7926606663 #yiv7926606663ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv7926606663 #yiv7926606663ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv7926606663 #yiv7926606663ygrp-mlmsg select, #yiv7926606663 input, #yiv7926606663 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv7926606663 #yiv7926606663ygrp-mlmsg pre, #yiv7926606663 code {font:115% monospace;}#yiv7926606663 #yiv7926606663ygrp-mlmsg * {line-height:1.22em;}#yiv7926606663 #yiv7926606663ygrp-mlmsg #yiv7926606663logo {padding-bottom:10px;}#yiv7926606663 #yiv7926606663ygrp-msg p a {font-family:Verdana;}#yiv7926606663 #yiv7926606663ygrp-msg p#yiv7926606663attach-count span {color:#1E66AE;font-weight:700;}#yiv7926606663 #yiv7926606663ygrp-reco #yiv7926606663reco-head {color:#ff7900;font-weight:700;}#yiv7926606663 #yiv7926606663ygrp-reco {margin-bottom:20px;padding:0px;}#yiv7926606663 #yiv7926606663ygrp-sponsor #yiv7926606663ov li a {font-size:130%;text-decoration:none;}#yiv7926606663 #yiv7926606663ygrp-sponsor #yiv7926606663ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv7926606663 #yiv7926606663ygrp-sponsor #yiv7926606663ov ul {margin:0;padding:0 0 0 8px;}#yiv7926606663 #yiv7926606663ygrp-text {font-family:Georgia;}#yiv7926606663 #yiv7926606663ygrp-text p {margin:0 0 1em 0;}#yiv7926606663 #yiv7926606663ygrp-text tt {font-size:120%;}#yiv7926606663 #yiv7926606663ygrp-vital ul li:last-child {border-right:none !important;}#yiv7926606663

Thu Feb 1, 2018 8:19 pm (PST) . Posted by:

davie_001

Trying to expand this array to include fifty securities and fifty dates.


Can you advise the array formula to put in Cell C3 to include the range of tickers from, say B3 to B62, and the columns C2 to Z2?


I highlighted this range, and pasted: =smfPricesByDates($B3,C$2:z$2) into the Excel entry line.


Pressed CTRL-SHIFT-ENTER and the array formula displayed the prices for the B3 ticker across the date range I'd put in the Row 2, and repeated the same data in every row below 3 for all the tickers in column B.


Tried putting in a range like $B3:$B62 in the first field, but looks like the function uses only one cell there.


Do I need to manually enter the adjusted formula in B4, and repeat the CSE to add another ticker, then repeat the exercise for every new ticker row below that?


Please offer the generic cell entry for C3 that would allow me to have a full array grid for a highlighted range of

of tickers and dates?


Thank you,


Dave...

Thu Feb 1, 2018 8:40 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

The first parameter can only refer to a single ticker symbol. You'd have to
array-enter the formula over a range for a single ticker and then simply
copy that formula downward for the other ticker symbols.

Once you've array-entered the formula over C3:Z3, just highlight the range
C3:C62 and hit the ctrl+d shortcut to copy downward. I use the ctrl+d
shortcut a lot. It's a very handy shortcut. :)

Note that it will take a while for all of those to populate. Probably
several minutes, as the Yahoo historical quotes process is much slower
these days. On a similar spreadsheet, I use toggle switches to trigger
whether they will calculate. When I save the workbook, all toggle switches
are set to zero so that no calculations are done when I open the workbook.

For example:

=IF(D3<>1,"--",IFERROR(smfPricesByDates(B3,$U$2:$AV$2),"--"))

On Thu, Feb 1, 2018 at 3:58 PM, dahook@
​...
wrote:

>
> Trying to expand this array to include fifty securities and fifty dates.
>
> Can you advise the array formula to put in Cell C3 to include the range of
> tickers from, say B3 to B62, and the columns C2 to Z2?
>
> I highlighted this range, and pasted: =smfPricesByDates($B3,C$2:z$2) into
> the Excel entry line.
>
> Pressed CTRL-SHIFT-ENTER and the array formula displayed the prices for
> the B3 ticker across the date range I'd put in the Row 2, and repeated the
> same data in every row below 3 for all the tickers in column B.
>
> Tried putting in a range like $B3:$B62 in the first field, but looks like
> the function uses only one cell there.
>
> Do I need to manually enter the adjusted formula in B4, and repeat the CSE
> to add another ticker, then repeat the exercise for every new ticker row
> below that?
>
> Please offer the generic cell entry for C3 that would allow me to have a
> full array grid for a highlighted range of
> of tickers and dates?
>
>

Sat Feb 3, 2018 4:36 am (PST) . Posted by:

rho49m

There used to be a VB app that allowed one to update the spreadsheet after a set time interval. Does anything similar exist with the GetPortfolio function?

Sat Feb 3, 2018 9:46 am (PST) . Posted by:

"Randy Harmelink" rharmelink

I'm not a fan of something that does automatic updates. It only takes a
second to update it manually.

However, the VBA code to do that type of thing would be in
the RCHGetYahooQuotes-Example-Timed-Update.xls template from the web site.
It would just be a matter of using the smfGetYahooPortfolioView() function
in the workbook instead.

On Sat, Feb 3, 2018 at 5:31 AM, rho49m@
​...
wrote:

> There used to be a VB app that allowed one to update the spreadsheet after
> a set time interval. Does anything similar exist with the GetPortfolio
> function?
>
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar