Rate of return of stock index
The return from one day to the next is based on the Day's closing price.  To be clear - opening prices can be quite different from the prior day close. In your example, they are pretty close, but this is not always the case. Just pull a larger data set to observe this.  The above aside, dividends are not reflected in the index, so, after a dividend has occurred, you'd need to account for this if you are looking for true total return. In 2011, the S&P closed at 1257.60 vs a 2010 year end 1257.64. The return, however was 2.11%, not zero, after accounting for the dividends. To me, articles that suggest the yearly return was zero are inaccurate and misleading.
The 5% to 6.5% loan rates are a bit high. You'll probably want to pay those off first, and make it one of your priorities as soon as you have a 6-month savings fund. This should probably take precedence over savings for retirement, unless you're giving up a 401(k) match. Pay extra on the highest-interest loan until it's all paid off, then switch to the next one down, and accelerate the payoff as much as you can. If you're looking at a loan at 6% and a payoff date in 8 years or so (2020), am extra dollar paid now will save you ~$0.60. Not a bad return in general, and an excellent return for something that's zero-risk. The other loans, at 2-3%, are different. An extra dollar paid now on a 2% loan will save you $0.17 over 8 years. That's a pretty mediocre return. If you have a good, stable job and good job prospects, and a decent family support network, and few commitments like children and mortgages, and a low cost of living... generally, the things that help you have a high tolerance for risk... then you should consider investing your money in the stock market instead of paying off these loans any earlier than you need to. (Broad index funds and the like, not individual stocks). That is true. You will not be able to reconstruct the value of the index from the data returned with this script.  I initially wrote this script because I wanted data for a lot of stocks and I wanted to perform PCA on the stocks currently included in the index. "There is a lot of interesting information that can be found in a fund's prospectus. I have found it very helpful to read books on the issue, one I just finished was ""The Boglehead's Guide to Investing"" which speaks mostly on mutual and index funds. Actively managed funds mean that someone is choosing which stocks to buy and which to sell. If they think a stock will be ""hot"" then they buy it. Research has shown that people cannot predict the stock market, which is why many people suggest index based funds. An index fund generally tracks a group of companies. Example: an index fund of the S&P 500 will try to mimic the returns that the S&P 500 has. Overall, managed funds are more expensive than index funds because the fund manager must be paid to manage it. Also, there is generally more buying and selling so that also increases the tax amount you would owe. What I am planning on doing is opening a Roth IRA with Vanguard, as their funds have incredibly low fees (0.2% on many). One of the most important things you do before you buy is to figure out your target allocation (% of stocks vs % of bonds). Once you figure that out then you can start narrowing down the funds that you wish to invest in." "MD-Tech's answer is correct. Let me only point out that there are easier ways to invest in the DJIA index without having to buy individual stocks. You can buy a mutual fund or ETF that will track the index and your return will be almost identical to the performance of the underlying index. It's ""almost"" identical because the fund will take a small management fee, you will have to pay annual taxes on capital gains (if you hold the investment in a taxable account), and because the fund has to actually invest in the underlying stocks, there will be small differences due to rounding and timing of the fund's trades. You also ask: Assuming that I calculated those numbers correctly, is this gain   approximately better, equal to, or worse than an average investment   for that timespan? While people argue about the numbers, index funds tend to do better than average (depends on what you call ""average"", of course). They do better than most actively managed funds, too. And since they have low management fees, index funds are often considered to be an important part of a long-term investment portfolio because they require very little activity on your part other than buying and holding." Still working on exact answer to question....for now: (BONUS) Here is how to pull a graphical chart with the required data: Therefore: As r14 = the indicator for RSI.  The above pull would pull Google,   6months, line chart, linear, large, with a 50 day moving average, a   200 day exponential moving average, volume, and followed up with RSI. Reference Link:  Finance Yahoo! API's What's a good proxy for the return of the market when utilizing CAPM for a WACC build up? I know I could rip data from Domadaran, but I'd like to calculate it for myself. Maybe S&amp;P 500 earnings yield plus the 10yr? Also don't like taking the round assumption of 7%. "lol, please, calculate the correlation and let me know how close to 1 it is. And then let me know what kind of sensible economic model looks like SPX Level = const + beta * Fed Balance Sheet Level. That's a great way to just throw useful statistical inference out the fucking window.  Edit: I'd also like to make it abundantly clear that this is a monumentally retarded ""correlation"" to consider in the first place. The Fed balance sheet prior to 2008 was relatively tiny and unchanging, and yet the stock market was just as volatile in prior years." Do what's outlined here. The capital asset pricing model will reveal how an asset (a stock in this instance) performed relative to the market performance for that time period. This by itself will answer your assignment's question but allowing you to traverse much deeper in the intricate details of the field. You'll learn a few interesting things on the way! Good luck :)