I've been using Alphalens to tune my algo, and my short/long strategy is based on quantiles. How would I go about using these with the Optimize API? For example, only consider the quantile (0) for short positions and quantile (1) for long positions.
Thanks
edit:
It appears I might want to use these within the constraints?
class LongOnly(asset_or_assets, max_error_display=10)
Constraint for assets that cannot be held in short positions.
Parameters: asset_or_assets (Asset or iterable[Asset]) -- The asset(s) that must be long or zero.
class ShortOnly(asset_or_assets, max_error_display=10)
Constraint for assets that cannot be held in long positions.
Parameters: asset_or_assets (Asset or iterable[Asset]) -- The asset(s) that must be short or zero.