🚧 Website under development — Still working on the Sections and Content.
Back to Projects
Data & Research Tools

US Markets OHLC Data Downloader

A Python-based GUI tool for downloading and preparing historical intraday OHLCV data for US equities using the Alpaca Market Data API. Built to make market-data collection easier for trading research, technical analysis, backtesting, and quantitative workflows.

PythonUS MarketsMarket DataOHLCVAlpacaBacktesting

Overview

The US Markets OHLC Data Downloader is a Python-based desktop tool built to make the process of collecting historical intraday market data for US equities simpler and more practical.

The application connects to the Alpaca Market Data API, fetches historical OHLCV data for selected US stocks, cleans and formats the data, and exports it as a CSV file.

The idea behind the project is simple: instead of manually downloading and preparing market data every time I want to work on a stock, the tool provides a quick way to generate a clean, analysis-ready dataset.

The datasets can then be used for technical analysis, backtesting, quantitative research, charting, or other market-data projects.

What It Does

The tool allows the user to:

  • Enter a US stock ticker
  • Select an intraday timeframe
  • Select a historical date range
  • Fetch the data directly from Alpaca
  • Convert timestamps to US/Eastern time
  • Keep only regular US market hours
  • Clean and arrange the downloaded data
  • Export the final dataset as a CSV file

The supported intraday timeframes are:

  • 1 Minute
  • 5 Minutes
  • 15 Minutes

Data Cleaning

One of the main purposes of the project is to turn the raw API response into a cleaner dataset that is easier to work with.

After the data is downloaded, the application:

  1. Converts the returned data into a pandas DataFrame.
  2. Converts timestamps to the US/Eastern timezone.
  3. Filters the dataset to regular trading hours from 09:30 to 16:00.
  4. Sorts the observations by timestamp.
  5. Keeps the relevant market-data fields.
  6. Saves the result as a CSV file.

The final dataset contains:

  • Timestamp
  • Symbol
  • Open
  • High
  • Low
  • Close
  • Volume
  • Trade Count
  • VWAP

This makes the output suitable for further analysis without having to perform the same basic cleaning steps manually. The data can then be imported into Python, Excel, pandas, or other tools for further analysis.

Why I Built It

Market-data collection is often one of the more repetitive parts of quantitative and technical research.

When working with historical intraday data, the actual research often starts only after the data has been downloaded, cleaned, and placed into a usable format.

I built this project as a simple utility to reduce that preparation work.

Rather than trying to create a large trading platform, the goal was to keep the tool focused:

Fetch the data → clean it → save it → use it for research.

Disclaimer

This project is intended for educational and research purposes only.

It is not financial advice and does not provide trading recommendations.

Repository

The complete source code is available on GitHub:

US Markets OHLC Data Downloader

https://github.com/yash-sarawgi/US-Markets-OHLC-Data-Downloader

Fundamentals
Draw Desk