About this question
Medium · time_series · Quant Researcher interview question · finance, statistics, pandas, correlation
Understanding dynamic relationships between assets is crucial for risk management and portfolio construction. The rolling correlation matrix captures how asset co-movements evolve over time, allowing for adaptive hedging and diversification strategies. Task Implement a function solution(prices, window) that calculates the pairwise Pearson correlation matrix of simple returns for a set of assets based on the most recent window periods. The function must sort asset tickers alphabetically to deter