rank_within_sector: Rank Indicators Within Each Sector
Description
Ranks stocks within their sector for sector-neutral strategies. Enables
selecting best stocks from each sector regardless of sector performance.
Optimized using matrix operations within groups.