Guides · Updated

How to get a free daily price file for a stock or ETF

The Research Lab runs on practice data until you add a real price history. Getting one takes a couple of minutes.

Open a study and add your file →

What you need

A CSV file with one row per trading day and columns for the date and the open, high, low and closing prices. Volume is optional. The lab needs at least 250 days; several years is better. Column order and date style do not matter, and prices written with a $ sign are read as they are.

Option 1: Google Sheets

  1. Open a new sheet at sheets.google.com.
  2. In cell A1 type =GOOGLEFINANCE("NYSEARCA:SPY","all",DATE(2016,1,1),TODAY(),"DAILY") and press Enter. Daily prices fill in below.
  3. For another investment, change the name in quotes. Toronto-listed shares start with TSE:, for example TSE:RY.
  4. Choose File, then Download, then Comma-separated values (.csv).

Option 2: Nasdaq.com

  1. Go to nasdaq.com and search for a U.S.-listed stock or ETF.
  2. Open its Historical Quotes page.
  3. Pick a time range, such as 5Y or MAX.
  4. Use the “Download historical data” link. The file that arrives can be added to the lab as it is.

Many brokers and charting sites also let you export a chart’s daily history. Any of them will do.

Add it to a study

  1. Open the moving average or pairs trading study in the Research Lab.
  2. Open “Use a real price file”.
  3. Choose your file, type its ticker, and press “Add this file”.

The study runs on it straight away. The file stays in your browser and is not sent to Market Thread. For pairs trading, add two files.

Two things to know

Common questions

Can I download historical prices from Yahoo Finance for free?
Yahoo Finance’s help pages say that downloading historical data needs a paid Gold subscription. The two options above are free at the time of writing.
Why does the Research Lab not load prices for me?
Free market-data sources do not allow a public website to show or hand out their prices. A file you download yourself, for your own use, avoids that problem and stays on your device.
How much history do I need?
At least 250 trading days, which is about one year. The studies split the history into a training period and a test period, so five to ten years gives a much more meaningful result.

Try it

Reading about a rule is not the same as watching it run. The study is free, needs no account, and starts on practice data.

Open a study and add your file →

More guides

Educational explanation with illustrative examples. Not financial advice, and not a recommendation to use any strategy.