About this question
Medium · statistical_analysis · Quant Researcher interview question · statistical-analysis, granger-causality, time-series, hypothesis-testing, numpy, scipy
The Granger causality test is a statistical hypothesis test for determining whether one time series is useful in forecasting another. In quantitative finance, it is widely used to assess the predictive power of a signal, such as an alternative dataset, on an asset's returns. This implementation identifies the optimal lag that maximizes the test's F-statistic across a range of possible lags. Task Implement the function solution(y: listfloat, x: listfloat, max_lag: int) to perform a Granger causa