Prepare a daily price CSV for a historical comparison
Use a plain UTF-8 CSV with one row for each recorded day and these five column names. This three-day example contains fictional prices.
date,open,high,low,close 2020-01-02,25,27,24,25 2020-01-03,25,26,22,23 2020-01-06,23,24,19,20
Download the fictional example CSV.
Check one row before importing
Write the date as year-month-day. All prices must be positive numbers in the same units. The day's high must be at least as large as open, close and low. Its low must be at most the open and close. Enter one row per date.
Keep the gap
The sample skips the weekend of January 4–5. Leave out dates with no observation. Filling them with the previous price would introduce observations that your source did not report.
Verify the result
Compare the first and last observations. A $100 purchase at the first close of $25 is worth $80 at the last close of $20, before fees and taxes. If your result differs, check the dates and whether you used closes or another price. See the calculation step by step.
Open the calculator