About this question
Easy · statistical_analysis · Quant Researcher interview question · statistics, correlation, pandas, data_processing
Understanding the relationship between asset returns is fundamental for portfolio construction and risk management. While Pearson correlation measures linear dependence, Spearman rank correlation offers a robust alternative that assesses monotonic relationships and mitigates the impact of outliers. Comparing these two metrics allows analysts to detect non-linear dependencies and potential data anomalies. Task Implement a function solution(x, y) that computes the Pearson and Spearman correlation