Senin, 11 September 2017

[smf_addin] Digest Number 4143

8 Messages

Digest #4143

Messages

Sun Sep 10, 2017 9:15 pm (PDT) . Posted by:

joelfp2000

Randy,


Thanks again for all of your help.


I have been experiencing a problem with the Yahoo historical quotes. For some reason the last row in the array (which is the earliest date for my query) reflects a 0 for the closing price if I am searching for monthly data. It works just fine for daily, weekly or quarterly data. The two columns I display in my array are D (date) and C (closing price). I have used adjusted close, open, etc...regardless, I still receive a 0 for my earliest date closing price.


Have you experienced this? Any ideas on how to correct or what I am doing wrong?


Thanks in advance!


Joel.

Sun Sep 10, 2017 9:43 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Can you give me a sample formula?

I no longer use anything other than the daily data because last time I
looked they weren't doing price adjustment correctly for weekly and
monthly. The quarterly is actually an extraction the add-in does from
monthly data, so I'm surprised that would not also give you the zero
values...?

One of the things on my "ToDo" list (long at the moment) is to look at
changing the smfPricesBetween() function to do more than one time period.
For example, an ending date and a time frame instead of a ending date and a
starting date. Since it does the extractions from daily data, it shouldn't
have the Yahoo adjustment errors.

On Sun, Sep 10, 2017 at 9:15 PM, joel.andrews@
​...
wrote:

> I have been experiencing a problem with the Yahoo historical quotes. For
> some reason the last row in the array (which is the earliest date for my
> query) reflects a 0 for the closing price if I am searching for monthly
> data. It works just fine for daily, weekly or quarterly data. The two
> columns I display in my array are D (date) and C (closing price). I have
> used adjusted close, open, etc...regardless, I still receive a 0 for my
> earliest date closing price.
>
> Have you experienced this? Any ideas on how to correct or what I am doing
> wrong?
>
>
>

Mon Sep 11, 2017 7:41 am (PDT) . Posted by:

joelfp2000

Randy,

Here is the formula that I use.
=smfGetYahooHistory(C14,C15,C16,C17,C18,C19,C20)



C14 is the ticker (^GSPC)
C15 is beginning date which is 9/11/2012
C16 is ending date which is 9/11/2017
C17 is the period (m)
C18 is the data items (dc)
C19 is the header (1)
C20 is the adjustment (0)




example for ^GSPC


Date Close
2017-09-11 2,482.45
2017-09-01 2,461.43
2017-08-01 2,471.65
2017-07-01 2,470.30
2017-06-01 2,423.41
....

2012-12-01 1,426.19

2012-11-01 1,416.18
2012-10-01 1,412.16
2012-09-01 0.00


Any suggestions?


Joel










Mon Sep 11, 2017 10:21 am (PDT) . Posted by:

"Craig Passow" passow

It's your start date; as shown, it comes after the date showing zero.
Make it 9/1/2012.

On 9/11/2017 9:41 AM, joel.andrews@lpl.com [smf_addin] wrote:
>  
>
> Randy,
>
>
> Here is the formula that I use.
> =smfGetYahooHistory(C14,C15,C16,C17,C18,C19,C20)
>
> C14 is the ticker (^GSPC)
> C15 is beginning date which is 9/11/2012
> C16 is ending date which is 9/11/2017
> C17 is the period (m)
> C18 is the data items (dc)
> C19 is the header (1)
> C20 is the adjustment (0)
>
>
> example for ^GSPC
>
> Date        Close
> 2017-09-112,482.45
> 2017-09-012,461.43
> 2017-08-012,471.65
> 2017-07-012,470.30
> 2017-06-012,423.41
> ....
> 2012-12-011,426.19
> 2012-11-011,416.18
> 2012-10-011,412.16
> 2012-09-010.00        
>
> Any suggestions?
>
> Joel
>
>
>
>
>

Mon Sep 11, 2017 11:51 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

The problem is that your starting date is later than the start of the
month, so there is no data for that month. Your starting date should be at
the start of a month. Yahoo returns all zero price values for the last row
of monthly data if your starting date is mid-month. The add-in is just
returning what Yahoo is sending.

For example:

https://finance.yahoo.com/quote/%5EGSPC/history?period1=1502434800&period2=1505113200&interval=1mo&filter=history&frequency=1mo

On Mon, Sep 11, 2017 at 7:41 AM, joel.andrews@
​...
wrote:

>
> Here is the formula that I use.
> =smfGetYahooHistory(C14,C15,C16,C17,C18,C19,C20)
>
> C14 is the ticker (^GSPC)
> C15 is beginning date which is 9/11/2012
> C16 is ending date which is 9/11/2017
> C17 is the period (m)
> C18 is the data items (dc)
> C19 is the header (1)
> C20 is the adjustment (0)
>
>
> example for ^GSPC
>
> Date Close
> 2017-09-11 2,482.45
> 2017-09-01 2,461.43
> 2017-08-01 2,471.65
> 2017-07-01 2,470.30
> 2017-06-01 2,423.41
> ....
> 2012-12-01 1,426.19
> 2012-11-01 1,416.18
> 2012-10-01 1,412.16
> 2012-09-01 0.00
>
> Any suggestions?
>

Sun Sep 10, 2017 10:26 pm (PDT) . Posted by:

lefthand43

Thanks Randy. This is helping.

I've been using GetHistoricalData() for years but it stopped working about a year ago. Just curious, apparently this has been obsoleted... I'll plan to use RCHGetYahooHistory() ... it just has a lot of extra bells and whistles that I don't need.




Mon Sep 11, 2017 11:26 am (PDT) . Posted by:

zacharycal

Randy,


I am using the get Yahoo! History to get monthly data. I am trying to get the adjusted close, but when I look at the data, it's giving me the actual close. I have tried each combination of "C" or "A" for the data items and "1" or "0" for the Adjust line.


I looked through the message boards and could not find a solution, but maybe I missed something.


Any help would be appreciated. As always, thanks for all your help and work on this.

Zach


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

Tidak ada komentar:

Posting Komentar