For more clarification, there are about 252 trading days in a year. On average, looking at the history of the stock market, what percentage of these days are "up" days for the market.

Say you want data on the Dow. Go to http://finance.yahoo.com, click on Dow, then click on Historical Prices. Set the date range and click Get Prices.
Highlight the resulting table, Ctl-C to Copy, and then Ctl-V to paste into a spreadsheet program such as MS Excel. It may take several pages to get all of the data.
Simplest way: In the spreadsheet program, create another column, call it Change, next to the last column of numbers (Adjusted Close). Calculate this column as the value directly to the left, minus the value above and to the left. Count the minus signs (down days) and the zeros. Subtract from the number of rows and you'll get the pluses.
A more elegant way, if you are intimate with how to do formulas in your program, is to do an IF statement that does the following: IF the Adjusted Close is greater than the previous Adjusted Close, then enter 1; otherwise, enter 0. At the bottom of this column, have it calculate the sum. That will be the number of UP days.
Best of success.




Ask a question or leave a reply