OHLC Resampling (Tick to Bar) with Polars - Quant Researcher Interview Question
Difficulty: Medium
Category: time_series
Asked at: Jump Trading, Citadel, Two Sigma, Tower Research, HRT
Topics: polars, data-processing, market-microstructure
Problem Description
Converting high-frequency tick data into OHLCV (Open, High, Low, Close, Volume) bars is a critical preprocessing step for market microstructure analysis and strategy backtesting. Utilizing the Polars library allows for high-performance, memory-efficient resampling of large datasets through its dynamic grouping capabilities.
Task
Implement the function solution(df) that accepts a Polars DataFrame containing tick data and downsamples it into 1-minute OHLCV bars. The function must return a DataFra
Practice this medium researcher interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.