Kamis, 01 Agustus 2019

[smf_addin] Digest Number 4591

5 Messages

Digest #4591
1c
Re: Historical monthly stock prices by "Randy Harmelink" rharmelink
1d
Re: Historical monthly stock prices by "Randy Harmelink" rharmelink

Messages

Wed Jul 31, 2019 7:05 am (PDT) . Posted by:

turley.muller

Use HLCU - U being the unadjusted closing price. Divide the unadjusted closing price by the adjusted closing price. That will give you a ratio. Multiply the high and low prices by that ratio.

Wed Jul 31, 2019 7:24 am (PDT) . Posted by:

seongkook_berry

Thanks Randy. I get your point but I work as a regulator and our model uses unadjusted monthly high and low prices (I can't change the inputs). I know the default is to return unadjusted prices but they are still adjusted for dividends.

Going back to my ENBL example, adding the $0.318 dividend issued in February to the February high price ($16.14) gives you $16.46. But yahoo finance shows a February high price of $16.49, which is the number I want. Is there a function to pull the raw prices from yahoo finances historical data?

Wed Jul 31, 2019 8:34 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

You'll need to do as tmuller2 suggests, retrieving daily data and
manipulating it.

As far as the model, GIGO. :(

On Wed, Jul 31, 2019 at 7:30 AM seongkook_berry@... wrote:

>
> Thanks Randy. I get your point but I work as a regulator and our model
> uses unadjusted monthly high and low prices (I can't change the inputs). I
> know the default is to return unadjusted prices but they are still adjusted
> for dividends.
>
> Going back to my ENBL example, adding the $0.318 dividend issued in
> February to the February high price ($16.14) gives you $16.46. But yahoo
> finance shows a February high price of $16.49, which is the number I want. Is
> there a function to pull the raw prices from yahoo finances historical data?
>
>
>

Wed Jul 31, 2019 8:39 am (PDT) . Posted by:

"Randy Harmelink" rharmelink

You could try array-entering this over a range:

=RCHGetHTMLTable("
https://finance.yahoo.com/quote/ENBL/history?period1=1397199600&period2=1564556400&interval=1mo&filter=history&frequency=1mo","Adj
Close")

....but you'd be limited to the number of rows in the table that initially
get displayed when the web page comes up.

On Wed, Jul 31, 2019 at 7:30 AM seongkook_berry@... wrote:

>
> Thanks Randy. I get your point but I work as a regulator and our model
> uses unadjusted monthly high and low prices (I can't change the inputs). I
> know the default is to return unadjusted prices but they are still adjusted
> for dividends.
>
> Going back to my ENBL example, adding the $0.318 dividend issued in
> February to the February high price ($16.14) gives you $16.46. But yahoo
> finance shows a February high price of $16.49, which is the number I want. Is
> there a function to pull the raw prices from yahoo finances historical data?
>
>

Wed Jul 31, 2019 10:00 am (PDT) . Posted by:

seongkook_berry

I did a couple of examples and, unfortunately, turley's method won't work because the close prices are adjusted for splits. The high and low prices from yahoo finance and the smfGetYahooHistory function are the same when no dividend is issued. The problem I had was the function returned an adjusted price when a dividend was issued in the same month. However, using the ratio would also include stock splits, which gives me a different number from the high and low prices from yahoo finance.

I can use Randy's suggestion to use GetHTMLTable. It requires some data manipulation but it at gets me the prices I want.


Thanks guys! I appreciate the help.
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar