Downloading Lists of Datasets
To download your daily collection of stock prices from Yahoo! Finance, first create a list of those stocks you want to update:
Click the List Wizard icon
,
and
.
Then click on
, and select the datasets you wish to update.
Then
. Give it a name such as “yahoo_stocks”.
Then create a command set:

Then go to “File”, “Save Command Set” and give it a name such as “acquire_yahoo_stocks”. That works for acquiring data, but how do update data:

You might then save this command set as “update_yahoo_stocks”. Then all you have to do every day is go to “File”, “Load Command Set” and pick this one and press the play button. However there are a few things to be mindful of:
1. This command set will only update Yahoo postings from “today back 0” to “today”. If you’ve missed a few days or are updating Friday prices on Saturday, then you have to change the zero in “today back 0” to something else, such as 1 or 5.
2. You may ask, why not just do “today back 5”? Well the problem there is that if Yahoo has not yet posted today’s price, you will only get the last 4 days, and you will not know unless you check each price. By using “today back 0” you will get an error message listing the ones that did not update. Those unfulfilled requests will also appear in the List Wizard’s
, which can be edited (there may be multiple attempts at updating a particular dataset), and saved. I suggest you save the edited failed list as “fails”. Then in the command set, change the second line from:
:for #1 :in yahoo_stocks to
:for #1 :in fails
Press the autoplay button again, and you should get the remainder of your list. However note that Yahoo can frequently be quite late on updating certain datasets.
----------------------------
Note that the above command set will update stocks that you already have some history on. What do you do about adding a list of new stocks?
Again, go to the List Wizard, and create a list of those stocks you wish to acquire. You can type the symbols in, or simply copy them in from another source. Save that list as “acquire_stocks”. Then create the following command set and save it as “data_new_stocks”:

This command set has 2 parts. The first will go out and get your stocks from Yahoo. The second will adjust the price data for dividends and splits. Note that Yahoo data has 6 columns, the first 4 are the reported prices, the 5th is volume, and the 6th is the close adjusted for dividends and splits. In this routine we use the ratio of the 6th column to the 4th column to adjust the open, high, low and close. The final output is a 4-column dataset fully adjusted.
Here’s the text of the above command set, which you can simply copy to your own command palate:
reset
:for #1 :in acquire_stocks
#1 gets ('yahoo' getdata '#1' 20030301 20041228)
:endfor
:stop
reset
:for #1 :in acquire_stocks
#1 gets (((#1 cols 1 2 3 4)/(#1 col 4))*(#1 col 6))
:endfor
:stop
Note that if you also want to use the daily volume, you will also need to acquire column 5 from the Yahoo! site. Try it yourself, but if you need help, don’t be afraid to ask.