Physics307L F08:People/Muehlmeyer/Finance

From OpenWetWare

Jump to: navigation, search

Contents

Purpose of Our Finance lab

SJK 16:42, 19 December 2008 (EST)
16:42, 19 December 2008 (EST)Justin, I'm really glad you and Der took on this project.  Sorry for my huge delay in looking at it, but I hope to look at it more carefully after the semester.
16:42, 19 December 2008 (EST)
Justin, I'm really glad you and Der took on this project. Sorry for my huge delay in looking at it, but I hope to look at it more carefully after the semester.

The purpose of this lab is to study rate growth in the stock market, to learn how to attain good financial data and to analyze it. We will do this by asking a question:

If one makes a ten year investment in the stock market, what should one expect, based on historical analysis, to be one's rate of growth?

Questions that come about from this question:

  • What financial data/market would be a good indicator for such a broad question?

-Stock indices are created for the purpose of tracking sectors of the economy. An index is constructed by averaging the prices of specific companies chosen. We decided to use the Dow jones Industrial Average with a time frame of its entire lifetime so that we can say that our determined averages are a good representation of the entire history of the stock market. Of course the Dow Jones does not represent the entire stock market, but it is generally taken to be the main indicator of its health.

  • Where do we get this data?

-The source of our data is: http://finance.yahoo.com. This website was used by Dr. Boyd in his MATLAB class last fall.

  • How do we simulate "investment" with the historical data in hand?

-This question proved to be the challenge of our discussion. We knew that if we wanted unbiased results, we needed to simulate random investment times. We will do this by creating random time frames of specified intervals. We need to run many of these random investment intervals in order for us to say that this result represents the trends of the stock market.

-We initially chose 10-year windows in order to compare to a 10-year US security bond. When creating the code to do this, we ended up discussing whether we should take least-squares fits of each window, or to take 10-year "snapshots," which find the slope from the two stock prices at the endpoints of the window. Snapshots make sense in that a person investing during that exact time period would see exactly that rate of growth. Least-squares fits show more of a trend over the 10 years, so that someone who invested only 9 years, 10 months might see growth closer to the fit than the snapshot.

We will analyze these two methods seperately to compare: least squares fit and "snap shots" over the entire course of the DJIA. The data below was analyzed in parts. My lab partner Alexander did the "least squares" method using MATLAB. I used EXCEL to analyze the "snap shot" method. We hoped to see similarities, and are not sure what difference to expect. The exploration of this is the purpose of my summary.


This purpose of course evolved after much deliberation, one can read what we learned on the way about finance and see how our lab evolved in my lab notes:

Finance Lab Notes

The source of our data is: http://finance.yahoo.com

Data

Snap Shot Method

My part of the analysis was the "snap shot" method wherein I found the slope of the line between the start and end date of the price plot for random intervals. I did this for the same exact windows as my partner Alexander who did the least squares method. The windows were 10-, 20-, 30-, 40-, and 50-year windows, all with 100 randomly-generated iterations. I then did 20 trials of these 100 iterations and averaged. To simulate random investment it was necessary to create a function that would randomly choose a start date, such that the end date (a specified distance from that start date) would not exceed the dimensions of our stock data matrix. I then used excel indexing to get the price values of those start and end dates. This gives us two points between whcih we can do a simple rise over run function to get the slope. The slope presented in the plot can safely be said then to be a reasonable expectation for ones rate of growth on his investment if he invested at any random time, and waited for the given time interval. Please see my excel file for the data analysis in the lab manual.


Snap Shot Window Average Slope after 100 iterations and 20 Trials ($/week)
10 Year 2.997432
20 Year 2.286577
30 Year 2.002178
40 Year 1.891791
50 year 1.999209

Least Squares Method

The least squares method actually fits a best fit line to the interval, and when this is done for many random intervals, and averaged, the result then represents the expected rate of growth over the entire stock market for that specific time interval. The diagrams depict the best fit line for one iteration of the specified time interval.


Slope Data [$/week] Sample Window
10 Year Window
1) 2.4689 ± 0.0007 11) 2.6043 ± 0.0007
2) 3.1063 ± 0.0011 12) 3.2287 ± 0.0011
3) 2.5977 ± 0.0008 13) 2.1363 ± 0.0009
4) 2.4893 ± 0.0007 14) 2.8116 ± 0.0008
5) 2.8451 ± 0.0007 15) 2.3922 ± 0.0005
6) 2.1571 ± 0.0007 16) 2.7420 ± 0.0009
7) 3.0676 ± 0.0009 17) 3.1118 ± 0.0008
8) 3.4700 ± 0.0009 18) 2.4796 ± 0.0009
9) 2.1050 ± 0.0006 19) 2.3554 ± 0.0009
10) 2.2250 ± 0.0008 20) 2.0223 ± 0.0009
20 Year Window
1) 2.9810 ± 0.0003 11) 2.5314 ± 0.0003
2) 2.8751 ± 0.0004 12) 2.5233 ± 0.0003
3) 2.1529 ± 0.0003 13) 2.0260 ± 0.0003
4) 2.5026 ± 0.0002 14) 2.8666 ± 0.0003
5) 2.3646± 0.0002 15) 2.8161 ± 0.0003
6) 3.5018 ± 0.0004 16) 2.0481 ± 0.0003
7) 2.3696 ± 0.0002 17) 2.8723 ± 0.0003
8) 2.7557 ± 0.0003 18) 2.6072 ± 0.0003
9) 2.0702 ± 0.0003 19) 3.0362 ± 0.0004
10) 2.6607 ± 0.0003 20) 1.8809 ± 0.0003
30 Year Window
1) 1.6386 ± 0.0002 11) 1.7714 ± 0.0002
2) 1.6168 ± 0.0002 12) 1.9832 ± 0.0002
3) 1.9087 ± 0.0002 13) 1.7668 ± 0.0002
4) 1.4801 ± 0.0002 14) 1.2027 ± 0.0002
5) 1.8070 ± 0.0002 15) 2.0399± 0.0002
6) 2.3613 ± 0.0002 16) 1.9900 ± 0.0002
7) 1.9316 ± 0.0002 17) 2.1310 ± 0.0002
8) 2.3433 ± 0.0002 18) 2.3271 ± 0.0002
9) 2.1834 ± 0.0002 19) 2.1681 ± 0.0002
10) 1.6845 ± 0.0002 20) 1.9814 ± 0.0002
40 Year Window
1) 1.2491 ± 0.0002 11) 1.5066 ± 0.0002
2) 1.6391 ± 0.0002 12) 1.6332 ± 0.0002
3) 1.4006 ± 0.0002 13) 1.7675 ± 0.0002
4) 1.6526 ± 0.0001 14) 1.7078 ± 0.0002
5) 1.8456 ± 0.0002 15) 1.4713 ± 0.0002
6) 1.4773 ± 0.0002 16) 1.6195 ± 0.0002
7) 1.5594 ± 0.0001 17) 1.6892 ± 0.0002
8) 1.5667 ± 0.0002 18) 1.5924 ± 0.0002
9) 1.6973 ± 0.0001 19) 1.7595 ± 0.0002
10) 1.3066 ± 0.0002 20) 1.3776 ± 0.0002
50 Year Window
1) 1.5937 ± 0.0001 11) 1.4359 ± 0.0002
2) 1.3238 ± 0.0002 12) 1.4196 ± 0.0002
3) 1.5460 ± 0.0001 13) 1.5010 ± 0.0001
4) 1.4301 ± 0.0002 14) 1.6835 ± 0.0002
5) 1.4891 ± 0.0002 15) 1.4429 ± 0.0001
6) 1.3474 ± 0.0001 16) 1.4743 ± 0.0001
7) 1.6312 ± 0.0002 17) 1.4178 ± 0.0001
8) 1.4696 ± 0.0002 18) 1.5034 ± 0.0002
9) 1.5794 ± 0.0001 19) 1.4420 ± 0.0001
10) 1.3559 ± 0.0001 20) 1.3633 ± 0.0001


The averages for the 20 Trials are:

Snap Shot Window Average Slope after 100 iterations and 20 Trials ($/week)
10 Year 2.782245
20 Year 2.441755
30 Year 1.915845
40 Year 1.575945
50 year 1.472495

Conclusion

The least squares method has lower averages, and this is expected, since the least squares method accounts for the changes within the time interval, not just the endpoints like the "snap shot" method. The slopes follow the actual trends of the market better. In other words, it accounts for any random time of investment, and is probably more accurate. However, it does not tell us directly the rate of growth expected for that given time interval. So in conclusion, the two methods prove to give results that represent two different things entirely:

Least Squares Method: Gives the average rate of growth of the stock market.

"Snap Shot" Method: Tells me what rate of growth I should expect if I invest at a random time over a specified time interval.

They are two different things.

Luckily we acquired numbers that are reasonable close, and it is obvious that our methods were coordinated properly over the same data.

It is also safe to say, just by giving the two tables a glance, that the rate of growth that one expects of any investment over any time in the stock market is something between 1-3 $/week per share. This is why long term investment is almost universally considered/guaranteed to give positive returns on one's investment. Retirement IRA's and Education IRA's are all based on this concept. Of course, if one really wants to see extreme rates of growth, all that one has to do is decrease his time frame window. This of course is a full time job/hobbie for many investors who purchase and sell stock on a daily or weekly basis.

Personal tools