Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:HKUDS AI Trader US Stock Intraday Price Data

From Leeroopedia
Revision as of 15:03, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/HKUDS_AI_Trader_US_Stock_Intraday_Price_Data.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Financial_Data, US_Stocks, Data_Storage
Last Updated 2026-02-09 14:00 GMT

Overview

Static JSON data files containing 60-minute intraday OHLCV price data for 102 Nasdaq-100 constituent stocks and the QQQ ETF, used as local data sources for US market backtesting.

Description

The US stock intraday price data files store historical 60-minute bar data for individual Nasdaq-100 securities. Each file follows the Alpha Vantage intraday JSON schema with a Meta Data header and a Time Series (60min) object keyed by timestamp. One alternate-prefixed file (Adaily_prices_QQQ.json) stores a copy of the QQQ benchmark data.

Usage

These files are consumed by the local price lookup tool (tool_get_price_local.py) during agent backtesting runs on the US stock market. They are produced by the Alpha Vantage data fetching pipeline (get_daily_price.py and get_interdaily_price.py) and stored under data/.

Code Reference

Source Location

  • Repository: HKUDS_AI_Trader
  • Directory: data/
  • File count: 103 files (102 stocks + 1 alternate QQQ)

Files Covered

Pattern Count Example
daily_prices_{TICKER}.json 102 daily_prices_AAPL.json, daily_prices_NVDA.json
Adaily_prices_QQQ.json 1 Adaily_prices_QQQ.json

Schema

{
    "Meta Data": {
        "1. Information": "Intraday (60min) open, high, low, close prices and volume - DATA DELAYED BY 15 MINUTES",
        "2. Symbol": "AAPL",
        "3. Last Refreshed": "2025-11-10 15:00:00",
        "4. Interval": "60min",
        "5. Output Size": "Full size",
        "6. Time Zone": "US/Eastern"
    },
    "Time Series (60min)": {
        "2025-10-30 15:00:00": {
            "1. open": "271.0884",
            "2. high": "271.5979",
            "3. low": "270.7337",
            "4. close": "271.1184",
            "5. volume": "11077995"
        }
    }
}

I/O Contract

Inputs

Name Type Required Description
(none) Static data files; no runtime inputs

Outputs

Name Type Description
Meta Data JSON object Symbol, interval, last refresh timestamp, time zone
Time Series (60min) JSON object Timestamp-keyed OHLCV records with string-typed numeric values

Usage Examples

import json

# Load a US stock intraday price file
with open("data/daily_prices_AAPL.json", "r") as f:
    data = json.load(f)

symbol = data["Meta Data"]["2. Symbol"]
time_series = data["Time Series (60min)"]

# Get the most recent closing price
latest_ts = max(time_series.keys())
close_price = float(time_series[latest_ts]["4. close"])
volume = int(time_series[latest_ts]["5. volume"])
print(f"{symbol} closed at ${close_price:.2f} (vol: {volume:,}) at {latest_ts}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment