Back to EODHD APIs in Google Sheets
SheetXAI logo
EODHD APIs logo
EODHD APIs · Google Sheets Guide

Bulk Pull Historical OHLCV Data Into a Google Sheet for Backtesting

2026-05-14
5 min read

The Scenario

It's Sunday evening and you're staring at a Google Sheet with 40 tickers you've been curating for three months. The momentum backtest you've been meaning to run needs 5 years of daily price history for each one — open, high, low, close, volume, all in separate tabs, all date-aligned. The analysis itself will take a few hours. But first, the data has to get in.

The bad version:

  • Open the EODHD portal, search ticker one, download the CSV, import it into the sheet, rename the tab, fix the date format so it matches the others.
  • Repeat that sequence 39 more times — logging into the portal each time, adjusting the date range filter manually because the default is always wrong, cleaning the column headers that vary slightly between tickers.
  • Realize around ticker 28 that two of the early tabs have date columns formatted differently than the rest, meaning any cross-tab formula you write will silently return errors for those rows.

This is hours of setup before a single calculation runs. The backtest is ready in principle. What's missing is the infrastructure to feed it — and nobody hired you to build data pipelines.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the watchlist, understands the structure, and calls EODHD once per ticker through its built-in integration — creating a tab for each, writing the aligned time series, and using consistent column headers across all of them. No config file, no per-ticker loop, no date normalization pass.

Pull 5 years of daily OHLCV data from EODHD for every ticker in column A of my 'Watchlist' sheet and create a separate tab for each ticker with date, open, high, low, close, and volume columns.

What You Get

  • One new tab per ticker, named after the ticker symbol
  • Columns: Date, Open, High, Low, Close, Volume — consistent across every tab
  • Dates formatted uniformly, ready for cross-tab formulas
  • Any ticker that returns an error (delisted, wrong exchange suffix) flagged in a note rather than silently missing

What If the Data Is Not Quite Ready

The ticker list has inconsistent exchange suffixes

Some tickers in column A are plain symbols (AAPL), others have exchange suffixes (SIE.XETRA). EODHD requires the right format for each exchange.

Review every ticker in column A of my 'Watchlist' sheet, look up the correct EODHD exchange code for any that are missing a suffix using EODHD's instrument search, and update column A before pulling the price history.

You need adjusted closes only, not full OHLCV

The backtest only needs adjusted closing prices to avoid split distortions. Full OHLCV would add noise to the tab structure.

For each ticker in column A of my 'Watchlist' sheet, pull 5 years of daily adjusted closing prices from EODHD and write the results into a single tab called 'Adjusted Close' with one column per ticker and dates in column A.

The date range needs to start after an IPO

Several tickers on the list went public after the 5-year window starts. Pulling from 2019 for a 2022 IPO returns an error that breaks the tab.

Pull 5 years of daily OHLCV data from EODHD for each ticker in column A of my 'Watchlist' sheet, but for any ticker where data starts later than the requested start date, begin from the first available date and note the actual start date in row 1 of that tab.

Full backtest prep: normalize, align, and build the return matrix

The backtest framework needs a clean return matrix — one tab per ticker is fine for inspection, but the model reads a single matrix of daily returns across all tickers.

Pull 5 years of daily adjusted close prices from EODHD for every ticker in column A of my 'Watchlist' sheet, create individual ticker tabs, then build a 'Return Matrix' tab with dates in column A and one column per ticker showing the daily percentage return, filling any missing dates with the prior day's value.

The pattern is to ask for the raw pull and the derived output in a single prompt — SheetXAI handles the intermediate steps.

Try It

Get the 7-day free trial of SheetXAI and open any Google Sheet with a ticker watchlist, then ask it to build your price history tabs from EODHD. Once that's done, try the spoke on pulling macroeconomic indicators — or head back to the EODHD APIs overview to see the full list of tasks.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more