Grant, I continued to investigate your two CVXPY strategies. Here is some added analysis.
Refer to the chart in the previous post. Column 2 show some portfolio metrics of the original version of your programs. The strategy of interest is the Long - Short Algo (panels 1 and 3). The Long Only - Mean Reversion strategy (panel 2) can be viewed as just part of the also ran like not warranting the added risk for the lesser return than panel 1.
In the third panel version, you increased the number of selectable trade candidates (doubled), and thereby increased the number of trade opportunities. However, these changes did not improve the overall picture. On the contrary, it slightly reduced performance. The move also increased frictional costs. We can't say that the metrics displayed for the original versions in panels 1 and 3 are that different. In panel 3, I used a different random seed number than pi (nice touch btw). but, that could not have had that much of an impact. I also reinstated frictional costs.
Based on performance results alone, I would say that the CVXPY method used is not significantly different than having bought an index equivalent (SPY). Technically, all that work but nothing to show for it. All the generated alpha being eaten up by the frictional costs on thousands and thousands of trades.
I had to find out why the modification I made to your programs increased performance. In my last post I proposed a tentative solution with the equation: A(t) = A(0) + (1+z)∙n∙u∙PT, as I increased z, I would be improving performance. There was some kind of linear relationship in there. After further analysis, it is more like: A(t) = A(0) + (1+z)^t ∙n∙u∙PT.
And since z was the only number that was changed from test to test, I had to conclude that (1+z)^t was the only reason for the performance improvement. The boost in panel 3 compared to panel one was that you increased the number of trade opportunities which could be taken advantage of resulting in an increased number of trades.
I made other tests. I wanted to extract if it was indeed (1+z)^t or simply (1+z)? In the beginning the difference is not that large, it is only with time that the difference will show. Therefore, I made successive tests going back 5, 6, 7, 8, 9 and 10 years. What I wanted to see was if I would get an expanding spread above the benchmark? And it is what I got. Confirming that (1+z)^t was at play.
I was left with WHY? One explanation was that if A(t) = A(0)∙(1+r)^t, was a CAGR representation of the portfolio, where r was the benchmark return, then, z to be accounted for must have had for impact: A(t) = A(0)∙(1+r+z)^t. That is what made the difference. As I increased z, it increased general performance over time, imperceptibly at first, but still at a compounding rate. The more I increased z, as shown by the other columns in the presented chart, the more the performance would increase. It did this for all the tests. I did not test for upper limits, but a napkin calculation showed they were in sight.
The only reason for the improved performance was: (1+z)^t. Evidently, with z=0, you are back to square one.
After having done all that, I reached the conclusion that there was nothing in the original CVXPY methodology as presented. In the sense that it does not perform better than a benchmark, its alpha tends to zero: (α → 0).
With such a conclusion, I might as well find another strategy candidate with a better alpha potential. A strategy with some built in alpha will have for equation: A(t) = A(0)∙(1+r+α)^t, which I can then transform into: A(t) = A(0)∙(1+r+α+z)^t, leading to even higher performance levels since α and z can be expressed in CAGR terms.
So, sorry on that one. I find it is simply not enough to build on.