About this question

Forward Fill with Limit

Medium · data_manipulation · Quant Researcher interview question · pandas, preprocessing, time_series, data_cleaning

Forward filling is a standard preprocessing technique in financial time series analysis used to handle missing data caused by illiquidity or data feed interruptions. To prevent the propagation of stale pricing information into signal generation or risk models, practitioners often impose a limit on how many consecutive periods a last valid observation can be carried forward. Task Implement a function solution that performs a forward fill operation on a pandas DataFrame, propagating the last vali