[ Polars market data Parquet guide ]

Lazy-load date-partitioned OHLCV files and read only the columns your research needs.

[ Why Polars works well here ]

Parquet is columnar, typed, and supports column pruning. MarketParquet files are already Snappy-compressed Parquet, partitioned by trading date, and readable directly by Polars.

[ Lazy scan daily files ]

  import polars as pl

  df = pl.scan_parquet("by_date/stock_daily/2024/*.parquet")
  signals = (
      df.filter(pl.col("symbol") == "SPY")
        .select(["date", "symbol", "close", "volume"])
        .sort("date")
        .collect()
  )

[ Cross-sectional volume screen ]

  import polars as pl

  top = (
      pl.scan_parquet("stock_daily_2024-01-15.parquet")
        .sort("volume", descending=True)
        .select(["symbol", "close", "volume"])
        .head(10)
        .collect()
  )

[ Related ]

stock data hub · browse stock daily · pricing · intraday stock data · DuckDB guide