Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Order Optimal Portfolio and Implementation Shortfall

One of the core components of the overall strategy that produces these results in actual trading is the deployment of advanced execution algorithms designed to implement large two sided lists whilst minimizing or entirely eliminating implementation shortfall.

A Dynamic Implementation algo reduces factor risks quickly, then trades passively using a multi day trading horizon if desired. The execution algorithm itself is "list-aware" and opportunistic only when crossing the spread or accessing lit markets results in a substantial price improvement. Otherwise, executions are constrained by non-linear parameters in order to minimize cash exposures while also managing correlation spikes at the same time

Depending on the PM's or Trader’s objectives, at least 4 different urgencies should be selected to frontload/backload the trading and allow for different levels of risk tolerances. At the same time, the actual execution optimizer (the one used in real world trading) is allowed greater flexibility to chart an adaptive execution path across every single constituent given the PM's expectations and risk tolerance. Highly paid PM's earn their take because they know how to exploit these tools for the benefit of their investors. To take this edge away by forcing execution strategies into a tiny box is counter-intuitive, especially because it prevents the very thing which it is purportedly trying to achieve: optimum portfolio execution .

Another important "reality" that is neglected by "order optimum portfolio" pertains to list-based algo strategies engineered to execute across the entire dark liquidity landscape. These are important tactics that enable significantly safer means of ordering optimized portfolios than simple cash constraints because they are designed to opportunistically execute list trades to reduce portfolio cost and risk while balancing cash and beta exposures. Successful risk management requires efficient utilization of dark liquidity.

While these same constraints can be hard coded using "order optimal portfolio" to run a forward test, when transitioning the model into production, realized implementation shortfall is often substantial to the point of triggering extreme risk control parameters that are only supposed to act as a last line of defense in cases of extreme beta imbalances. While it is easy to avoid cash imbalance, beta imbalance across a portfolio of 550 - 650 constituents is an entirely different matter. I believe this reality was a key contributing factor to Q's May 2019 "pivot" where selected strategies became "signals". The use of "order optimal portfolio" is an honest attempt by Q to guide developers towards tuning their execution parameters as closely as possible to complex adaptive execution algorithms used by the global trading desk. In other words, an algorithm, even when it is "code complete", really is not complete at all, and the lessons were learned the hard way.

One way to operationalize the cost-risk trade-off is via an optimization. In addition, traders may have other objectives that must be satisfied, such as maintaining beta- or cash-neutrality. For an optimization to be practical, it must incorporate these constraints in a way that generates intuitive solutions, as opposed to only solving the problem mathematically without considering the consequence of trading. Instead, the algorithm should use the same cost-risk approach when determining how quickly to satisfy these additional cash or beta constraints.

Consider a common scenario in which a trader wants to manage both total risk and beta risk explicitly. The "order optimal portfolio" method only takes total risk into consideration and typically results in a solution with a slow decrease in beta exposure, since the optimizer may find it more efficient to lower total risk by managing the stock-specific portion of risk as opposed to beta. Specifically, if the basket has some positions that have large stock-specific risk, the optimizer may decide to take more beta exposure in order to reduce the imbalance in the stock-specific portion. If, on the other hand, the optimization directly incorporated the trader’s secondary consideration to neutralize beta exposure, the result would be a trading strategy that reduced beta risk much more rapidly .

Absent having real world access to the same types of portfolio construction algorithms designed specifically to address implementation shortfall, an entry submitted for consideration of an allocation has only the logic available with "order optimal portfolio" but in reality, this does not even begin to address implementation shortfall. Seasoned portfolio managers who also wear the hat of execution traders know exactly what I am referring to here. The ability to manage risk by controlling the composition of a trade basket allows portfolio trades to be executed passively, over a relatively long time period (e.g., hours). Therefore, an optimal trading strategy must consider not only the differences in cost and risk across stocks, but also how cost and risk vary over time. Similarly, price volatility also exhibits a time-varying pattern. In general, the price of a stock is most volatile in early morning, especially around the open. As the day goes on, volatility tapers off, but often with a slight increase just prior to the close. As was the case with time-varying cost, a portfolio algorithm must also consider time-varying volatility in its risk estimate in order to specify the optimal trading schedule.

2 responses

@Pej, most interesting. I want to know more. What would be other aspects to consider in the making of such a trading strategy? BTW, your tearsheets are most impressive.

Could you redo the tearsheets with the added round_trips=True option ? This would be:

bt.create_full_tear_sheet(round_trips=True, hide_positions='True', live_start_date='10-01-2018')  

I would like to see some of those numbers.

Another big issue with this algo is that it forces the alpha rebalancing and trading balancing at the same time. But in reality, especially if Q is after mid turnover, high capacity strategies, medium turnover investors rebalance their alpha say on a weekly basis, and trade towards those alpha weights on a daily basis.

for a decent capacity strategy that has a medium term holding period, it is likely to take more than just one day (subject to the default 10% daily turnover limit) to get set in some of the stocks. So ideally one should trade daily until you get to the desired weight. However, within this algo framework, in order to trade daily, you are forced to rebalance your alpha daily too. There are stocks that are already at your weekly desired weight, yet you are now forcing them to rebalance as well simply because of some tiny price moves or some tiny changes in other stocks. One should leave those stocks as they are and just trade the remaining of the stocks which have yet reached their weekly target weight.

i have to emphasize that Q is really shooting their foot on this one. Have to emphasize here that decent size capacity + medium turnover => means it takes more than one day for some of your holdings to get set + also means that one shouldn't change the alpha daily, because by default a low decay strategy's alpha shouldn't be rebalanced so frequently, it is causing unnessarily turnover.

so the end product of this algo is that Q is getting all of the strategies that are unnecessaily turning over. Or getting all of the strategies that sit at the lower end of the capacity spectrum or higher turnover of the spectrum (within its allowed limit)