'How to get a quote for a specific date using Yahoo Finance

Seems like it should be a simple problem. I'm using Matlab to build a stock database and analyses toolkit.

I'm using Matlab functions to get a table of data, using a URL like the following:

http://ichart.finance.yahoo.com/table.csv?s=aapl&a=00&b=01&c=2011&d=03&e=04&f=&ignore=.csv

That works just fine to get standard stats (open, close, volume, ect). I can't figure out how to add other yahoo finance stats though like moving averages. Can I modify the above URL to add other stats to the download? Or is there a way to modify a single quote query to include a date? I'm trying to modify the url below to no avail.

http://finance.yahoo.com/d/quotes.csv?s=aapl&f=m4m3

Thanks for the help!



Solution 1:[1]

The scripts at http://luminouslogic.com/matlab-stock-market-scripts are pretty helpful for working with Yahoo Finance in Matlab. Download the dates and prices you need and then use http://www.mathworks.com/help/toolbox/finance/tsmovavg.html to calculate a moving average.

UPDATE

It looks like you can use m4 to get the moving average. Check out the documentation at http://www.gummy-stuff.org/Yahoo-data.htm . Your url above is correct--you might need to comma separate the parameters.

UPDATE 2

Check out this question: source of historical stock data

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community