I have a factor that posts nice returns over a 1-5 day time horizon and diminishes thereafter. My question is how do I set my algorithm to sell within this time horizon (say on day 2) that is consistent with the contest-constraint requiring the use of order_optimal_portfolio?
Similar posts (see links below) use ordering methods other than order_optimal_portfolio, which would disqualify them from contest. I'd like to save myself the woe of writing an algorithm that I have to later refactor. Any guidance is appreciated. Thanks.
Links to other posts: