21
$\begingroup$

Are there any free data source for historical US equity data? Yahoo finance has daily prices but I'm looking for something more granular and goes back 2 or more years (doesn't have to be close to tick data, hourly is fine).

I've looked through Data sources online, there isn't much on stock market data.

$\endgroup$

11 Answers 11

7
$\begingroup$

You can consider the following two methods:

This package allows you to [1] retrieve intra-daily stock price data from Google Finance, [2] calculate the VWAP at the end of each trading day and [3] transform intra-daily data to a daily format.

You can adjust this to your own preferences by 'seeing' the code as: http://www.google.com/finance/getprices?q=TICKER&x=EXCHANGE&i=INTERVAL&p=PERIOD&f=d,c,h,l,o,v.

Where:

TICKER: is the unique ticker symbol

EXCHANGE: is where the security is listed on

Hint: to track these inputs, for instance for the Dow Jones Industrial Average, you search the security of interest at Google Finance and then you can find at the top: (INDEXDJX:.DJI) which obviously refers to (EXCHANGE:TICKER).

INTERVAL: defines the frequency (60 = 60 seconds)

PERIOD: is the historical data period (see also Google Finance), here 10d refers to the past 10 days (up to current time).

$\endgroup$
3
  • 1
    $\begingroup$ how do you exactly mean? when I look at the data from the spreadsheet google.com/finance/… I see data per 60 seconds intra-daily? $\endgroup$ Apr 13, 2012 at 2:42
  • $\begingroup$ Thanks, that is a useful source. How far back does the minute data go back? I tried with one stock, requesting 720d, but it only went back 18 days (March 26th to April 13th). Is there a way to specify start and/or end date and make multiple requests to get it further back? $\endgroup$ Apr 15, 2012 at 2:00
  • $\begingroup$ Answering my own question, Google Finance keeps 15 days of intraday data, 3 years of EOD daily data (I couldn't find an authoritative source, but a few blogs gave these numbers). $\endgroup$ Apr 16, 2012 at 0:11
4
$\begingroup$

Open an account with IB, and you can get access to equity, options for free, via their API.

$\endgroup$
9
  • $\begingroup$ I thought of this too, but I'm not sure it counts as "free" since you would need at least USD 5,000 (for an IRA) or 3,000 if you are less than 21 years old. $\endgroup$ Feb 11, 2011 at 18:46
  • $\begingroup$ the data subscription itself is free, but yeah, conditional on having an account with them :-( $\endgroup$
    – glyphard
    Feb 11, 2011 at 18:57
  • 1
    $\begingroup$ Unfortunately, ignoring the discussion of what counts as free, IB sucks for historical data: interactivebrokers.com/php/apiUsersGuide/apiguide/api/… (Even hourly data is only kept for one month.) $\endgroup$ Dec 14, 2011 at 0:27
  • 1
    $\begingroup$ @DarrenCook Flat-out wrong. They keep 1 year of historical data for equities. If you want hourly data, then you can only request 1 month at a time, but you can make 60 requests every 10 minutes. If you use R, look at IBrokers:::reqHistory for a wrapper to download 365 days of minutely data. (IB even offers 1 second bars if you're patient enough to respect the 60 requests every 10 minutes pacing rule) $\endgroup$
    – user508
    Apr 8, 2012 at 17:25
  • 1
    $\begingroup$ @DarrenCook. You couldn't get TRADES data for a week ago because IB does not provide that for FX. Try using whatToShow="BID", or whatToShow="ASK". Or, use the twsInstrument package (on R-Forge) to get 1 minute Bid, Ask, Mid snapshots (look at twsInstrument:::reqTBBOhistory) $\endgroup$
    – user508
    Apr 14, 2012 at 0:31
3
$\begingroup$

You can find free historical intraday data for US equities, including tick data (last sales), bar aggregates (second, minute, hour), and order book (MBP, MBO) at Databento. Each account gets a free credit that covers historical intraday data.

The data goes back to 2018 and can be accessed via HTTP API or Python client.

$\endgroup$
2
$\begingroup$

Stooq has intraday data for the stock market

http://stooq.com/db/h/

http://www.quantshare.com/sa-426-6-ways-to-download-free-intraday-and-tick-data-for-the-us-stock-market

$\endgroup$
2
  • $\begingroup$ You should add comments on the quality of the tools you propose. Are they good? Why? Have you ever used them? $\endgroup$
    – SRKX
    Nov 12, 2012 at 23:58
  • $\begingroup$ I tried Yahoo, Google, Stooq and Finam for Forex. For Stooq and Finam, the data is ok, no major problems found. $\endgroup$
    – Atom
    Jun 14, 2013 at 11:04
1
$\begingroup$

Intraday data can be downloaded at Yahoo Finance or Google Finance. Or use third party apps that already do that HQD http://www.ashkon.com/downloader.html

$\endgroup$
1
$\begingroup$

You can find intraday data at http://investing.com. You can use the investpy Python package to pull the data: https://pypi.org/project/investpy/

$\endgroup$
0
$\begingroup$

Yahoo and Google finance have been progressively restricting API access (impacting most bulk-download apps) and forcing users to go directly to their sites which only offer end-of-day data. It is hard to find decent sources of historical intraday data, FirstRateData has some good datasets for 10 years of 1-minute data for most US tickers.

If you need tick-level data, I'd suggest TickData.com.

$\endgroup$
0
$\begingroup$

Try checking out IEX Cloud or AlphaVantage. Both have free stock APIs but as they're free, there are message request limitations.

$\endgroup$
0
$\begingroup$

You might find some useful answers here (including code): Can I download today's open/close/high/low data for all stocks (in bulk)?

Ps: if you search Pandas_DataReader documentation, there is a guide on how to download intraday data also.

$\endgroup$
0
$\begingroup$

EDIT: Hi, I'm incredibly sorry. I'm archiving tendollardata.com and chartsonlygoup.com (link), as of April 1, 2021. All data will only be up to December 31, 2020. I feel compelled to be on a new mission now (link). Quant StackExchange is the only place I've advertised my sites.

I really suggest buying the data (from the vendors listed on the megathread What data sources are available online?, or mine https://tendollardata.com/product/historical-minute-data-historical-intraday-data-dataset-all-us-equities-etfs-sp-500-tech-stocks/). I wasted years of my life extracting data. It's not worth the upkeep.

If you really are allergic to spending money on something that should be free (I can empathize), have a look at ThinkorSwim's platform too, which charts intraday price for singular days.

ToS software is much more usable than InteractiveBrokers (less crashes, faster). Tradingview also allows for viewing intraday price, but the lookback is 2 months (not 2 years).

$\endgroup$
0
$\begingroup$

If you only need a small amount of intraday historical data, some exchanges will offer free samples if you reached out to them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.