Since we have seen many PCA based algorithms in the forum but there hasn't been a proper research to support them here is an Alphalens based analysis of PCA method.
If anybody has meaningful improvements on the PCA factor let us know.
Since we have seen many PCA based algorithms in the forum but there hasn't been a proper research to support them here is an Alphalens based analysis of PCA method.
If anybody has meaningful improvements on the PCA factor let us know.
Two notable algorithms that use PCA are:
The way they compute PCA is slightly different than the factor presented above, but the general method is the same.
if you wonder how the second algorithm reached the incredible 4.5 sharpe is due to these reasons:
- it uses PCA intraday (it uses the current price, which makes a big difference compared to using last night close price, which is what the Pipeline factor uses)
- the sectors with few stocks (less than 30) are not traded
- the selected stock universe
- no slippage and no limit on the tradeable volume per minute
Hi @Luca,
Thanks again for sharing this! Very much appreciated.
Not being very familiar with PCA, I'd be curious if you'd be willing to share your experience and opinion on the usefulness of PCA. What are the main pros and cons? Would PCA be suitable/competitive in the Contest in your view?
Also, with the second algorithm (Pravin's intraday one), I'm wondering what the reason is for liquidating everything at the close, other than avoiding over-night risk (should be minimal in a Long/Short since you're effectively hedged, no?). I can understand liquidating some positions, like the ones that are no longer part of the predictive model, but everything? Wouldn't it be better to keep any position that is still part of the model by the market close, if the strategy is just going to open up those positions again in the morning anyway (to avoid transaction costs)? Maybe I just don't understand his strategy well enough (or at all, haha)? A shame he's no longer part of the Q community.
I haven't been able to achieve a high enough alpha with PCA so that it could survive commissions and slippage. Still my interest is combining multiple factors together and since PCA has alpha I can combine it with other signals (not feasible on Quantopian IDE by the way, due to the limited amount of computing resources and platform design decisions, but I play a lot with the Research environment).
There is a tradeoff when you trade a factor: on one side you want to rebalance not very often to avoid slippage/commissions, but on the other side the predictive power of a factor decays with time, so the more time you wait the less alpha you are able to capture. Probably Pravin noticed that the alpha after one day was too low, so he decided to exit the positions before market close when the alpha was still reasonable. So I believe Pravin decided to keep the strategy intraday to maximize alpha (but then the performance are killed by slippage + commissions, it's so hard to find alpha signals that live more than few hours)....but I might be wrong.
Thank you for your insight @Luca, very much appreciated!
In my very limited experience with ML, that has been my experience as well. I'd be interested in an ML model that can accurately predict (>50% of the times) the best factor weight for each alpha factor, but so far I haven't been able to find anything that seem to beat a simple zscoring equal weighting...
Regarding Pravin's algo, I wonder if it would make sense to rebalance twice per day (once after open, and second time sometime before the close), rather than just close ALL positions at the end of the day. Perhaps I'm paranoid, but I tend to be very sceptical of high turnover intraday algos that does very well within the limitations of Q's backtester or live simulation (I love both, but I think they have their limitations), especially with only minute bars at the most granular level. I worry that most of the returns are coming from somewhere else rather than from actual alpha. My reasoning being that if there really was any intraday high-turnover alpha to be found, it would have already been arbitraged away by the ultra low latency HFT folks (i.e. people much smarter than me).
Then again I could be wrong.
I encourage you to try your hypothesis on Pravin algo, at the end of the day you want to try it yourself, don't trust on what people write :) My thoughts on Pravin's algo might be wrong and also I worked on this long time ago and I might have forgotten important details.
I agree on your points regarding intraday algos and even if they actually have alpha they have limited capacity (there is only that much you can trade in few hours, because the more you invest the more you suffer from lack of liquidity and slippage cost) so they might be more interesting for retail traders.
@Joakim Arvidsson, regarding intraday algos have a look here