limit_positions function

Limit per-date selections to top-K (legacy API)