How does historical data get adjusted for dividends, exactly?
Various types of corporate actions will precipitate a price adjustment.  In the case of dividends, the cash that will be paid out as a dividend to share holders forms part of a company's equity.  Once the company pays a dividend, that cash is no longer part of the company's equity and the share price is adjusted accordingly. For example, if Apple is trading at $101 per share at the close of business on the day prior to going ex-dividend, and a dividend of $1 per share has been declared, then the closing price will be adjusted by $1 to give a closing quote of $100. Although the dividend is not paid out until the dividend pay date, the share price is adjusted at the close of business on the day prior to the ex-dividend date since any new purchases on or after the ex-dividend date are not entitled to receive the dividend distribution, so in effect new purchases are buying on the basis of a reduced equity.   It will be the exchange providing the quote that performs the price adjustment, not Google or Yahoo.  The exchange will perform the adjustment at the close prior to each ex-dividend date, so when you are looking at historical data you are looking at price data that includes each adjustment. If you download the historical data from Yahoo, you will see two different close prices. The one labeled 'Close' is simply the price that was quoted on that particular day. The one labeled 'Adj Close' is the close price that has been adjusted for any splits and dividends that have occurred after that date.  For example, if a stock splits 10:1 on a particular date, then the adjusted close for all dates prior to that split will have been divided by 10. If a dividend is paid, then all dates prior will have that amount subtracted from their adjusted quote. Using the adjusted close allows you to compare any two dates and see the true relative return. According to Active Equity Management by Zhou and Jain: When a stock pays dividend, the adjusted price in Yahoo makes the following adjustment: Let T be the ex-dividend date (the first date that the buyers of a stock will not receive the dividend) and T-1 be the last trading day before T. All prices before T are adjusted by a multiplier (C_{T-1} - d_T)/C_{T-1}, where C_{T-1} is the close price at T-1 and d_T is the dividend per share. This, of course means that the price before T decreases. "I had  both closing price and adjusted price of Apple showing the same amount after ""download data"" csv file was opened in excel. https://finance.yahoo.com/quote/AAPL/history?period1=1463599361&period2=1495135361&interval=div%7Csplit&filter=split&frequency=1d Its frustrating. My last option was to get the dividends history of the stock and add back to the adjusted price to compute the total return for a select stock for the period."
What you're referring to is the yield.  The issue with these sorts of calculations is that the dividend isn't guaranteed until it's declared.  It may have paid the quarterly dividend like clockwork for the last decade, that does not guarantee it will pay this quarter.   Regarding question number 2.  Yield is generally an after the fact calculation.  Dividends are paid out of current or retained earnings.  If the company becomes hot and the stock price doubles, but earnings are relatively similar, the dividend will not be doubled to maintain the prior yield; the yield will instead be halved because the dividend per share was made more expensive to attain due to the increased share price.   As for the calculation, obviously your yield will likely vary from the yield published on services like Google and Yahoo finance.  The variation is strictly based on the price you paid for the share.  Dividend per share is a declared amount.  Assuming a $10 share paying a quarterly dividend of $0.25 your yield is: Now figure that you paid $8.75 for the share. Now the way dividends are allocated to shareholders depends on dates published when the dividend is declared.  The day you purchase the share, the day your transaction clears etc are all vital to being paid a particular dividend.  Here's a link to the SEC with related information: https://www.sec.gov/answers/dividen.htm I suppose it goes without saying but, historical dividend payments should not be your sole evaluation criteria.  Personally, I would be extremely wary of a company paying a 40% dividend ($1 quarterly dividend on a $10 stock), it's very possible that in your example bar corp is a more sound investment. Additionally, this has really nothing to do with P/E (price/earnings) ratios. "It's easy for me to look at an IRA, no deposits or withdrawal in a year, and compare the return to some index. Once you start adding transactions, not so easy. Here's a method that answers your goal as closely as I can offer: SPY goes back to 1993. It's the most quoted EFT that replicates the S&P 500, and you specifically asked to compare how the investment would have gone if you were in such a fund. This is an important distinction, as I don't have to adjust for its .09% expense, as you would have been subject to it in this fund. Simply go to Yahoo, and start with the historical prices. Easy to do this on a spreadsheet. I'll assume you can find all your purchases inc dates & dollars invested. Look these up and treat those dollars as purchases of SPY. Once the list is done, go back and look up the dividends, issues quarterly, and on the dividend date, add the shares it would purchase based on that day's price. Of course, any withdrawals get accounted for the same way, take out the number of SPY shares it would have bought. Remember to include the commission on SPY, whatever your broker charges.  If I've missed something, I'm sure we'll see someone point that out, I'd be happy to edit that in, to make this wiki-worthy.  Edit - due to the nature of comments and the inability to edit, I'm adding this here. Perhaps I'm reading the question too pedantically, perhaps not. I'm reading it as ""if instead of doing whatever I did, I invested in an S&P index fund, how would I have performed?"" To measure one's return against a benchmark, the mechanics of the benchmarks calculation are not needed. In a comment I offer an example - if there were an ETF based on some type of black-box investing for which the investments were not disclosed at all, only day's end pricing, my answer above still applies exactly. The validity of such comparisons is a different question, but the fact that the formulation of the EFT doesn't come into play remains. In my comment below which I removed I hypothesized an ETF name, not intending it to come off as sarcastic. For the record, if one wishes to start JoesETF, I'm ok with it." You would have to compare your backtesting to what you will be doing in real trading, and try to have the backtesting as close to your real trading as possible. Note: you may never get the backtesting to match your real trading exactly but you need to get as close as possible. The whole purpose of backtesting is to check if your trading strategies - your signals, entries and exits, and your stops - are profitable over various market conditions. As you would be using actual closes to do your real trading you should be using this to also do your backtesting. Rather than using adjusted data to get an idea of your total return from your backtesting, you can always add the value of the dividends and other corporate actions to the results from using the actual data. You may even find a way to add any dividends and other corporate action to your results automatically, i.e. any dividend amount added to your total return if the stock is held during the ex-dividend date. If you are using adjusted data in your backtesting this may affect any stops you have placed, i.e. it may cause your stop to be triggered earlier or later than in real trading. So you will need to determine how you will treat your stops in real trading.  Will you adjust them when there is corporate action such as dividends?  Or will you leave them constant until actual prices have gone up? If you will be leaving your stops constant then you should definitely be using actual data in your backtesting to better match your real trading. "There are people (well, companies) who make money doing roughly what you describe, but not exactly. They're called ""market makers"". Their value for X% is somewhere on the scale of 1% (that is to say: a scale at which almost everything is ""volatile""), but they use leverage, shorting and hedging to complicate things to the point where it's nothing like a simple as making a 1% profit every time they trade. Their actions tend to reduce volatility and increase liquidity. The reason you can't do this is that you don't have enough capital to do what market makers do, and you don't receive any advantages that the exchange might offer to official market makers in return for them contracting to always make both buy bids and sell offers (at different prices, hence the ""bid-offer spread""). They have to be able to cover large short-term losses on individual stocks, but when the stock doesn't move too much they do make profits from the spread. The reason you can't just buy a lot of volatile stocks ""assuming I don't make too many poor choices"", is that the reason the stocks are volatile is that nobody knows which ones are the good choices and which ones are the poor choices. So if you buy volatile stocks then you will buy a bunch of losers, so what's your strategy for ensuring there aren't ""too many""? Supposing that you're going to hold 10 stocks, with 10% of your money in each, what do you do the first time all 10 of them fall the day after you bought them? Or maybe not all 10, but suppose 75% of your holdings give no impression that they're going to hit your target any time soon. Do you just sit tight and stop trading until one of them hits your X% target (in which case you start to look a little bit more like a long-term investor after all), or are you tempted to change your strategy as the months and years roll by? If you will eventually sell things at a loss to make cash available for new trades, then you cannot assess your strategy ""as if"" you always make an X% gain, since that isn't true. If you don't ever sell at a loss, then you'll inevitably sometimes have no cash to trade with through picking losers. The big practical question then is when that state of affairs persists, for how long, and whether it's in force when you want to spend the money on something other than investing. So sure, if you used a short-term time machine to know in advance which volatile stocks are the good ones today, then it would be more profitable to day-trade those than it would be to invest for the long term. Investing on the assumption that you'll only pick short-term winners is basically the same as assuming you have that time machine ;-) There are various strategies for analysing the market and trying to find ways to more modestly do what market makers do, which is to take profit from the inherent volatility of the market. The simple strategy you describe isn't complete and cannot be assessed since you don't say how to decide what to buy, but the selling strategy ""sell as soon as I've made X% but not otherwise"" can certainly be improved. If you're keen you can test a give strategy for yourself using historical share price data (or current share price data: run an imaginary account and see how you're doing in 12 months). When using historical data you have to be realistic about how you'd choose what stocks to buy each day, or else you're just cheating at solitaire. When using current data you have to beware that there might not be a major market slump in the next 12 months, in which case you won't know how your strategy performs under conditions that it inevitably will meet eventually if you run it for real. You also have to be sure in either case to factor in the transaction costs you'd be paying, and the fact that you're buying at the offer price and selling at the bid price, you can't trade at the headline mid-market price. Finally, you have to consider that to do pure technical analysis as an individual, you are in effect competing against a bank that's camped on top of the exchange to get fastest possible access to trade, it has a supercomputer and a team of whizz-kids, and it's trying to find and extract the same opportunities you are. This is not to say the plucky underdog can't do well, but there are systematic reasons not to just assume you will. So folks investing for their retirement generally prefer a low-risk strategy that plays the averages and settles for taking long-term trends." So a major problem with looking at historical stock data on these graphs is that they set the stock price based off of current market volumn. If I was to say look at Majesco Entertainment (COOL) in june of 2016. It would say that the stock as trading between $5-6. In reality it was between .50-$1.  But in august there was a 6:1 reverse split. So June's value based on todays current share count would be about $5-6 per one share. 1988 for home depot must have been a really bad year for them, and because of all the splits they've had over the years already screws that estimate of what one share is worth. There's a lot of variance in 1988, but you have to be looking at only 1988. 87 and 89 really screws the the chart's scale. You can create something like that by: You'll have to determine the PE ratio manually from the financial statements.  To get the PE ratio for each company, you can try the Edgar database, though I doubt it goes as far back as 1950. This blog has a graph of the DJIA PE ratio from 1929 - 2009. If you want to monitor how well you did in choosing your investments you will want to use stock prices that account for the dividends and splits and other changes (not just the closing price).  The adjusted close will include these changes where the straight close will not include them.  Using the adjusted close you will get your true percentage change.  For example I have a stock called PETS that paid an $0.18 dividend in July 2015. The adjusted closes before that day in July are all $0.18 lower per share.  Say the closing price had been unchanged at $20.00.  The close prices would say I made no profit, but the adjusted closing price would say I made $0.18 per share on this investment because the adjusted close would read $19.82 in June 2015 but would read $20.00 in August 2015 (just like the closing price).  The adjusted close allows me to know my true profit per share. At this time, Google Finance doesn't support historical return or dividend data, only share prices.  The attributes for mutual funds such as return52 are only available as real-time data, not historical.   Yahoo also does not appear to offer market return data including dividends. For example, the S&P 500 index does not account for dividends--the S&P ^SPXTR index does, but is unavailable through Yahoo Finance.