About this question

Sample Weights from Label Concurrency

Medium · backtesting · Quant Researcher interview question · backtesting, sample-weights, concurrency, afml, label-weighting

Overlapping data labels in financial time series are non-i.i.d., which can inflate the performance of machine learning models during backtesting. To correct for this, sample weights can be derived from label concurrency, effectively down-weighting periods with a high density of overlapping observations. This approach ensures each moment in time contributes more equally to the model's training. Task Implement the function solution(t0: listfloat, t1: listfloat) -> listfloat that calculates sample