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
- Open a new sheet at sheets.google.com.
- In cell A1 type
=GOOGLEFINANCE("NYSEARCA:SPY","all",DATE(2016,1,1),TODAY(),"DAILY")and press Enter. Daily prices fill in below. - For another investment, change the name in quotes. Toronto-listed shares start with
TSE:, for exampleTSE:RY. - Choose File, then Download, then Comma-separated values (.csv).
Option 2: Nasdaq.com
- Go to nasdaq.com and search for a U.S.-listed stock or ETF.
- Open its Historical Quotes page.
- Pick a time range, such as 5Y or MAX.
- 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
- Open the moving average or pairs trading study in the Research Lab.
- Open “Use a real price file”.
- 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
- Adjusted or not. Most free downloads are corrected for share splits but leave out dividends. Over many years that understates what holding the investment really returned, so a rule that sits in cash can look better against it than it should.
- Terms of use. Price data belongs to its provider. Downloading it for your own study is the usual permitted use; republishing it is not. Check the terms of the source you use.
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.
More guides
Educational explanation with illustrative examples. Not financial advice, and not a recommendation to use any strategy.