Daily historical data SP500 total return (with dividends)

Discussion in 'Educational Resources' started by Timetwister, Dec 12, 2015.

  1. I'm looking for daily historical data (adjusted close price is enough) of the SP500 including dividends. Something like this but including dividends: http://finance.yahoo.com/q/hp?s=^GSPC+Historical+Prices

    Could anyone help me? I know I could just download the SPY data (from 1993), or from CBOE (www.cboe.com/micro/buywrite/dailypricehistory.xls, from1988) but I'd like to have a bigger sample size.

    Thanks in advance.
     
  2. Check out "Quandl", they have the data (for free).
    Below is a code snip for my extraction of dividend data:
    " $url = 'https://www.quandl.com/api/v1/datasets/SEC/DIV_' .$sym_mod.'.csv?auth_token='.$quandlAuthToken;"
    Line above is dynamically producing an URL, which is subsequently used to pull out the data. Note: I am using their api interface, and tacking on the symbol, then an authorization token. (in this line "$sym_mod" is the portion related to the symbol name.) The Quandl interface also provides access to the yahoo data you reference.
    Example for spy: "https://www.quandl.com/api/v1/datasets/SEC/DIV_SPY.csv?"
     
  3. Thank you. I'm not familiarized with Quandl, so it's a bit confusing, it seems like I have to download an add-in for excel or something like that. From which years does it provide the kind of information that I'm looking for?
     
  4. Timetwister:
    This mechanism accesses the complete history (available to quandl). In the example link earliest dividend data is "1993-03-19,0.213"
    I pull the data down (via a Perl program) and store locally as .csv files, which I then process with my backtest tool. The .csv files can be opened with Excel if you like.
    The link above is for Dividends. Different references are needed to access the daily price data.
    Please note that the original link you provide from yahoo can be used to extract the dividend information from the price and adjusted price columns, but seem to recall not having identical format for all security symbols I was interested in, so handle the Dividend and the daily pricing separately.
     
  5. I see, thanks. But I'm looking for older data. As you say, if I wanted information from 1993 I could just download it from Yahoo.
     
  6. jharmon

    jharmon

    Have you tried S&P?
     
  7. jharmon

    jharmon

    SPY was listed in 1993 - you can't get trading data on something prior to it listing.
     
  8. hs.png
     
    jharmon likes this.
  9. I'm asking about the SP500, not SPY...
     
    #10     Dec 15, 2015