Jan. 28, 2019

Based on literature on designing stock trading strategies we should consider testing both an in-sample (IS) and an out-of-sample (OOS) trading interval before going live. Some even suggest another testing interval as an additional step after OOS to make sure that the trading strategy will not break down going forward.

But even that is not enough. As soon as a strategy will go live, its CAGR will start to decay. At the very least, trading strategies that are programmed to be linear will do so.

The following equation resumes the task to be done:

_{0}∫^{T} **H**_{a }d**P **= _{0}∫^{n} **H**_{a }d**P** + _{n}∫^{n+k} **H**_{a }d**P **+ _{n}_{+k}**∫ ^{n}**

^{+k+φ}

**H**_{a }d

**+**

**P**_{n}

_{+k}

_{+φ}

**∫**^{n}^{+k+φ+ψ}

**H**_{a }d

**P**where the total task has been divided into four phases: IS + OOS + Paper Trading + Live Trading. It starts with the IS interval with its stopping time n, is followed by the OOS interval up to *k*. From *k* to *φ* you have the paper trading phase which still does not produce any real cash in the trading account. It is only from *n* + *k* + *φ* that the trading strategy might go live. These are stopping times, numbers in the sequence of trades where you switch from one phase to next.

Every step of the way strategy Ha had to prove itself worthwhile. Yet, the market, at every step is evolving with periods of short uptrends and downtrends but still within a long-term upward bias.

That you base the stopping times on time intervals does not change the problem, it remains the same: *n* is changed for *t*, and the other symbols represent time intervals instead of a number in the sequence of trades.

There is only one phase that has importance, and it is the one that will be trading live (*n + k + φ*) or (*t + k + φ*) onward). All that precedes is just to give you the confidence needed to apply the trading strategy live. The last trading interval should be the longest trading interval, if not the one to last for a very long time. Should it break down going forward, then all that preceded it (IS, OOS, PT) was "technically" worthless and done for absolutely nothing at all. Even worse, you would have lost part if not all your initial trading capital as well.

This goes back to how do you detect and execute trades in such a manner that you fulfill your objectives when the only important part is the live trading phase?

We will ignore all the preliminary phases and concentrate on the live trading interval: _{n}_{+k}_{+φ}**∫ ^{n}**

^{+k+φ+ψ}

**H**_{a }d

**= m ∙ z_bar, and declare**

**P***m*as the number of trades and

*z_bar*as the average profit per trade. This has the same meaning as when using (

*n ∙ x_bar*), in the general case.

Whatever the past, the live trading section will have its average profit per trade too. Its CAGR can be expressed as: [(F_{0} + m ∙ z_bar ) / F_{0}]^{(1/t)} -1 = CAGR. Or, put another way: m ∙ z_bar = F_{0} ∙ ((1+CAGR)^{t} -1. The equation contains your initial stake, the achieved CAGR and time which are apparently the only things that matter. And it all translates to:* m ∙ z_bar*.

Any combination of *m ∙ z_bar* that can satisfy the last equation is a solution to the desired CAGR. You want 20% CAGR for 20 years on $1,000,000. Then, m ∙ z_bar = $37,337,600. We can immediately deduce that it will take more than one trade to get there, otherwise, *z_bar* alone will have to generate the $37,337,600 profit.

Doing 1,000,000 trades with a net average profit of $37.34 per trade could do the job. That is 198.4 trades per day. Let's use 200 trades per day for further exploration. This would make the initial bets equal to $5,000 each on which an average profit of 0.75% per trade would meet the objective. That is less than a 1% move per trade.

Any *m ∙ z_bar* combination meeting the objective qualifies whatever the trading strategy used to achieve them. You want to do it with one trade per month, then you will need an average return per month per trade of 15.56%. Look at the behavior of your trading strategy, determine what makes it tick and then find ways to increase not only *m* but *z_bar* as well.

Here is an old chart that illustrates this:

All points on the blue line have the same value: *n ∙ x_bar.* You can scale it to the level you want. The curve will stay the same. Whatever type of strategy that resides on that line produces the same outcome, the same trading account balance.

It makes those two numbers *n* and *x_bar* the most important ones of your trading strategy. It means that whatever your trading strategy does, it will end up with those two numbers. And therefore, all efforts should be extended to make them both as large as you can. The rest might just be window dressing, cosmetic code having no real impact on the final outcome.

Note: for a better view of the formulas, this part is also available in **HTLM** format.

**Related Files**:

**Trading Stocks Generate Its Own Problems – Part I, Part II, Part III, Part IV**

Created...January 28, 2019, © Guy R. Fleury. All rights reserved