# The Search For Profits - Part 2¶

The first post in the Quantopian forum discussing the stock trading strategy presented in Part one of this article stated: $\textit{"...I present a strategy that one could trade, but looking at the tear sheet and the equity curve I suspect that this strategy in}$ $\textbf{its current form}$ $\textit{and the current market}$ $\textbf{does not perform}"$. Emphasis added.

This was like someone throwing away a trading strategy simply because he knew it would not perform, or was not good enough to merit further investigation. I like stuff like that. You can start with a debugged program, declared, probably by its author, as worth nothing, and go from there. So, whatever outcome after your modifications, you will be held responsible for its performance results.

Also, it gives me a great opportunity to show that the methods discussed in my book can prevail. They can transform an ordinary trading strategy into a much better one. It was the whole purpose of that book in the first. To help anyone transform their own trading strategies to do more. The least I could do was to show that it can be done, and with ease.

My previous article ended with portfolio model equations.

It also concluded with:

... $\textit{even if you have a working trading strategy, it can do more. And, it is easy to push for more}$.

I hope Part one illustrated the point.

Any trading strategy can be expressed as: $$A(t) = A(0) + n \cdot u \cdot \overline{PT}$$

All I did was add some pressure to the trading strategy's signature:

$$A(t) = A(0) + (1+g)^t \cdot n \cdot u \cdot \overline{PT}$$

It was sufficient to achieve more to have $g>0$.

Repeating what was said in the previous article. Quantopian is searching for low drawdown stock trading strategies. Its stated goal being to margin them as high as 6 times.

This particular stock trading strategy does that, but by leveraging 2 times. It gets its 3 times leverage from the ETFs. This explains in part the outperformance.

Quantopian's portfolio restrictions focus on near zero beta and low volatility portfolio. The previously presented strategy was marginally acceptable. Its beta was 0.38 compared to the stated limit of $\pm$ 0.30. Also, the drawdown is higher than wished for. However, there are attenuating circumstances.

Evidently, if you want to margin 6 times, the drawdown figure better be small. Six times a small drawdown near 0.10, could still be something close to 0.60. Hopefully less, but still, tending to it. And higher if you exceed that 0.10 figure.

There are other ways of doing this.

For instance, leverage 2 times 3 times leverage ETFs.

The following strategy can do the 6 times job too. In a different way. Here, it will follow equation:

$$A(t) = A(0) + (1+g)^t \cdot n \cdot u \cdot \overline{PT}$$

One does not need to increase $g$ by much. Even a small nudge with reverbarate over the net portfolio liquidation line presented on Quantopian charts. For instance, I increased $g$ by $1.5\%$, and since it is compounded over the entire trading interval, it will simply generate more profits.

I know the answer even before doing the simulation. What I do not know is by how much? What will be the real impact? How much more profit will it generate? Will it be worth the effort? How much added risk will I have to take? What will be the increase in drawdown for the added return? All questions that need to be answered.

And there, only a simulation will be able to answer those questions.

So, here it is:

In [1]:
# Get backtest object
bt = get_backtest('589565808996b96184dc4f78')

# Create all tear sheets
bt.create_full_tear_sheet()

100% Time: 0:00:01|###########################################################|
Entire data start date: 2011-01-03
Entire data end date: 2017-02-02

Backtest Months: 72

Performance statistics Backtest
annual_return 1.15
annual_volatility 0.44
sharpe_ratio 1.95
calmar_ratio 4.16
stability_of_timeseries 0.98
max_drawdown -0.28
omega_ratio 1.41
sortino_ratio 3.04
skew 0.14
kurtosis 3.03
tail_ratio 1.14
common_sense_ratio 2.45
information_ratio 0.11
alpha 0.81
beta 0.50
Worst Drawdown Periods net drawdown in % peak date valley date recovery date duration
0 27.57 2016-10-24 2016-11-14 2017-01-23 66
1 22.71 2015-02-02 2015-03-11 2015-04-14 52
2 18.76 2013-05-02 2013-06-24 2013-07-11 51
3 18.29 2016-04-01 2016-05-18 2016-07-01 66
4 18.26 2013-08-05 2013-10-15 2013-12-20 100

[-0.052 -0.101]

/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.py:3834: RuntimeWarning: Invalid value encountered in percentile
RuntimeWarning)

Stress Events mean min max
US downgrade/European Debt Crisis 2.04% -11.76% 14.95%
Fukushima 0.24% -3.51% 4.55%
EZB IR Event 0.04% -6.64% 7.41%
Apr14 0.70% -7.86% 4.39%
Oct14 0.46% -4.92% 4.57%
Fall2015 -0.00% -9.45% 6.62%
Recovery 0.48% -11.76% 14.95%
New Normal 0.28% -11.52% 13.83%