g=d&ignore=.csv

T

tinybears

Hey,

Someone who knows what g=d&ignore=.csv means in the following code?

StrURL = "URL;http://table.finance.yahoo.com/table.csv?"
StrURL = StrURL & "s=" & Aandeel & "&a=" & a & "&b=" & b
StrURL = StrURL & "&c=" & c & "&d=" & d & "&e=" & e
StrURL = StrURL & "&f=" & f & "&g=d&ignore=.csv"
 
J

joeu2004

tinybears said:
Someone who knows what g=d&ignore=.csv means in the
following code?
StrURL = "URL;http://table.finance.yahoo.com/table.csv?"
StrURL = StrURL & "s=" & Aandeel & "&a=" & a & "&b=" & b
StrURL = StrURL & "&c=" & c & "&d=" & d & "&e=" & e
StrURL = StrURL & "&f=" & f & "&g=d&ignore=.csv"

Looks like a snippet of VBA code. Would you please post either
a pointer to that VBA macro or the complete macro(s).

I have been wanting to do exactly what I suspect that VBA code
does, namely import and manipulate those results within an Excel
spreadsheet. But I do not really know what to do. For example,
when I use similar URLs in IE myself, I get a prompt to continue
or not. (Perhaps due to desirable security levels on my PC.)
I do not know how to deal with or avoid that in a macro. I also
do not know what function to pass that URL to, where to find
the data after the operation, and how to access and manipulate
the data effectively. I would like to look at VBA examples that
do that with exactly that URL.

Anyway, based on empirical experience, I can tell you that
"&g=d" means "get daily results". You can use "&g=w" and
"&g=m" for weekly and monthly results respectively.

One caveat: apparently Yahoo eliminates entries that indicate
dividend distributions and splits. So it is impossible to use the
unadjusted columns and make your own adjustments for (just)
splits. Yahoo's adjusted column takes dividend distributions
into account, as well as splits. If that is what you want, great!

In past experiments, I thought I had learned that "&ignore=.csv"
was necessary in order for the data to be imported into an Excel
spreadsheet. I thought it meant: do not use the application
associated with the ".csv" extension (e.g. Notepad). But today,
I tried both with and without it, and it behaved the same.

Sorry that I cannot be too helpful. But I do hope you can help
me by posting the complete source of the VBA macro(s).
 
T

tinybears

Can you get me some information about that splits and such. I know the
financial meaning, but how can I change it to get the normal close
price?

thx
 
J

joeu2004

tinybears said:
Can you get me some information about that splits and such.
I know the financial meaning, but how can I change it to get
the normal close price?

I am not sure what you mean by "normal close price". Do
you mean the price not adjusted for splits; or do you mean
the price adjusted for splits, but not adjusted for dividends?

In the Yahoo output, the Close column is the price not adjusted
for splits (and dividends). The Adjusted Close column is
adjusted for splits and dividends.

(Note: When I say "splits", I really mean stock distributions
that change the value of outstanding stock proportionally.
This would include spin-offs.)

If you knew the distribution date of the split and the split
ratio, you could adjust the number in Close column for all
prices before the distribution date. For example, for HPQ,
the distribution date of the most-recent split was 30 Oct 2000.
Looking at Yahoo's historical quotes for HPQ around that date,
you can see that the close on 30 Oct is 45.81, and the close
on 27 Oct is 87.19, with a stock split distribution on 30 Oct.
Since the split ratio is 2:1, the split-adjusted closing price on
27 Oct is 87.19/2 = 43.59.

But if you look at the Adjusted Close for 27 Oct, you will see
40.13, not 43.59. This is because Yahoo is also adjusting the
closing prices for cash dividends as well as stock dividends.
Although that might be useful when computing the "total return",
it is usually not useful when analyzing price growth rate and
standard deviation (volatility).

However, whereas the online Yahoo historical quote shows
the split ratio on the distribution date, it is not included in the
table.finance.yahoo.com results. Consequently, there is no
ironclad way to determine the split ratio from that output and
make adjustments yourself.

Of course, you could do this manually (or with a macro), if
you find the stock dividend distribution dates and ratios yourself.
But that is probably unacceptable if you have a large number
of different stocks in your portfolio, and you want to automate
the adjustments when you capture the data.

Caveat: There might be some way to get the stock split
information in the table.finance.yahoo.com output -- perhaps
some "&..." option. If there is, I do not know what it is. I
asked about it in this forum, and I do not recall getting an
answer. Yahoo should be able to provide the answer. But I
have never succeeded in getting a response from them :-(.
 
Top