About this question
Easy · statistical_analysis · Quant Researcher interview question · market-microstructure, transaction-costs, statistics, time-series
Roll's (1984) model provides a method to estimate the effective bid-ask spread from a time series of transaction prices, a common task in transaction cost analysis. The model leverages the negative serial autocorrelation in price changes caused by 'bid-ask bounce' to infer the spread. This technique is crucial for historical cost modeling, especially for OTC instruments where explicit quote data is unavailable. Task Implement the function solution(prices: list) -> float to calculate the Roll im