Quant Interview Practice Questions
题目详情
The Lee-Ready algorithm is a foundational technique in market microstructure for inferring the direction of trades using only trade price and quote data. By classifying trades as buyer-initiated or seller-initiated based on their relationship to the bid-ask midpoint and previous price movements, researchers can analyze liquidity and order flow toxicity. Task Implement the function classify_trades(trade_prices, quote_bids, quote_asks) to determine trade direction (Buy: 1, Sell: -1, Unknown: 0) u