Cross-Sectional Analysis through Rank-based Dynamic Portfolios