Nov. 1, 2021 

However you want to trade stocks, the objective is to extract money from the process and not give it back.

It might not matter much how it is done as long as it is done (honestly and safely, evidently).

The methods used will depend on your knowledge and understanding of the game you intend to play, your trading capital, and your trading skills. This free trading strategy (Creating your own index fund) is the same as used in Part I and Part II. As said, I found the strategy interesting for the simplicity of its stock selection process, its pure-rebalancing play, and its overall performance.

Rebalancing every week at a scheduled time is an administrative decision requiring a single line of code (case in point: see program line 18). The strategy does not ask for your opinion, your forecast, or how stocks are doing. Not even how you feel. Nonetheless, rebalancing does its job and it does have consequences and limitations.

Any trading strategy using some form of rebalancing will inherit some of the traits discussed here. For example, it is common practice to floor the number of shares purchased in order to avoid exceeding assigned weights, which could otherwise lead to added margin fees.

Rebalancing could execute a lot of partial trades (here 60,000+) when making these inventory adjustments to return portfolio weights to their preset or newly determined values. 


          Note: also available as PDF file           


The Stock Selection

QQQ is composed of the top 100 highest weighted by market cap stocks on NASDAQ. They got there because they prospered and got big. They stay there because they get bigger. Those who flatter at the task of staying up there are replaced. They really are money-making machines, representative of the whole US economy.

In a single ETF, you have stealth portfolio diversification. These 100 companies have invested in their respective futures. They have thousands and thousands of employees, real estate holdings, products and services to sell, bonds, debts, proprietary stuff, and a lot more.

We have, in QQQ, an all-in-one package, the same bet as Mr. Buffett's bet on America. The stock selection process has been delegated to the issuer and manager of QQQ. And your input is not required or even solicited.

What you know is that QQQ has the top 100 richest companies listed on NASDAQ. And that is also a group of stocks you should follow, the stocks that tend to rise the most. You are in this game for the money, not to stagnate around. You have other things to do. You want stocks that are mostly moving up, not down, even though there is a play there too.

You could buy QQQ outright and hold it for the duration, or trade its components as with this strategy, hoping for a better return, which might not materialize, but where you could certainly approach QQQ's own overall long-term performance level.

Your portfolio would be tracking a tracker, which is tracking a market index. Therefore, almost evidently, you should get close to the same market index results.

In the previous article, weekly rebalancing was shown as almost mimicking QQQ's overall performance. The point was made that truncating the decimal part of the number of shares to be traded had an impact on overall performance. The impact was made more visible when using smaller initial capital, but nevertheless, it applies all over.

QQQ's composition will change with time. Stocks failing to maintain their top 100 status are replaced with newcomers. We should expect that most of those changes occur near the bottom of this 100 list. This, at times, could generate more than 100 trades in a single week due to adding in the replacements.

As a trader or investor, your expectation is that those top 100 stocks will continue to grow, thus deriving your own bet on America.

Is QQQ risky? For one thing, it will not go down to zero overnight since it would require that all of its 100 constituent stocks go bankrupt. You will not see that next week either, almost surely... Can a component go bankrupt? For sure, but it will not happen while it is part of QQQ since it will lose its top 100 status and be liquidated and replaced long before that ever happens. Does QQQ only go up? Evidently, no, but over the long haul, it will fluctuate on its way up, even if, at times, considerably. Explicitly saying there will be drawdowns, and that is more than almost surely...

The Rebalancing

The scheduled rebalancing is mostly trading over a core position. Any price move that changes a stock's weighing is “corrected”, forcing a partial trade of at least one share if the move is greater than 1/qi%, as demonstrated in Part II.

It was shown that adding more capital generated more profits than expected. The reason was simple: with more money, more partial trades could qualify. The one share threshold was easier to reach with increasing position size since 1/qi% was getting smaller percentage-wise as qi increased. Buying 10 shares of a 100-dollar stock will require at least a 10% move to buy another share, a $10 move. Buying 100 shares would only require a 1% price move or only going up by $1 to add another share.

It was shown that the strategy turned 100k into 830k, generating a 19.01% CAGR over its 12.24-year simulation interval (latest simulations). In contrast, increasing the initial stake to 1 million generated 10.0 million with a 20.6% CAGR. Something better than most long-term market averages.

The performance difference was mostly attributed to the truncation of the decimal part on the number of shares to be traded. Nothing was required except providing the initial cash and monitoring the program while it ran (on schedule once a week).

Other Tests

I had to do more tests, which you can do too. Copy the program, change its initial cash, and run it freely on the QuantConnect website. It will give you the same results with all the details and nuances expressed here. Proving to yourself (the only person where it really matters) that it all holds together. You will find that there is simple math underneath it all.

A simulation tries to answer the question: if I had done this or that in the past, what would have been the outcome? Once a simulation has been performed, you immediately get the next most important question: can this thing continue going forward? Hence, your own bet on America.

Your Own Index Fund

The table above shows the outcome of such tests. In the top panel, only the initial capital was changed, nothing else, while in the bottom panel, only the impact of leverage was considered. What should we take out of these results?

Test #1 served as the basis with its 100k start. It is the one described in prior posts (here, with a few days added). It managed a 19.33% CAGR, making 28,972 trades with an average net profit per trade of $30.04.

Test #2 raised the ante to 1 million. It generated a 20.75% CAGR doing 56,913 trades with an average net profit per trade of $176.95. Increasing the position size increased the number of partial trades by 27,941, showing that the truncation is not such a trivial problem.

Test #3 raised the bar even higher with its 10 million initial stake. It generated a 20.99% CAGR doing 63,800 trades with an average profit per trade of $1,615.12. We only have 100 stocks that can rebalance on a weekly basis. Over the trading interval, if all stocks participated every week, that would be 63,800 potential trades (638 weeks times 100). Therefore, with a 10 million initial capital, the strategy is reaching its full potential in its expected number of trades. Is this understandable? Yes.

The Math

You put more on the line; your portfolio outcome should be proportional. The payoff matrix equation is the same. F(t) = F0 + Σ(H ∙ ΔP).

You put up 10 times more money; it will multiply the quantities traded by 10. It is that simple: 10 ∙F(t) = 10 ∙ [F0 + Σ(H ∙ ΔP)].

Prices will not change. They are the same for all. Moreover, all 100 stocks are scheduled for trading at 10:01 am once a week, making all exits and entries at the then-current trading price.

Using QQQ, the same 100 stocks will be traded for either portfolio: 10 ∙ F(t) = 10 ∙ F0 + Σ(10 ∙ H ∙ ΔP). Where you traded 10 shares, you would now trade 100, and instead of requiring a 10% price move to purchase another share, you would now only need a 1% move to do the same. The difference in profit, from expected, must come from somewhere. Over the short time span of a week, a 1% price move is more likely than a 10% move, thus the increase in partial trades. 

Future Ballpark Expectations

Extending the strategy to 20 years using the same CAGR achieved over the past 12.24 years can provide an approximation, a ballpark figure, on the strategy's future expected performance. Comparing test #3 to test #1, where only the initial capital is considered, shows a $ 448 million difference in expected outcomes. A direct consequence of not raising more initial capital. We could view it as some opportunity cost. It was not a strategy request but an administrative decision that limited the capital at play. This also gives a value to not going for the added capital.

As the initial capital increased, the number of trades executed also increased, where only the bet size should have increased. Usually, increasing the bet size generates about the same number of trades but with a higher average profit per trade, as should be expected: 10 times more on the table, close to 10 times more in profits, not more.

One explanation for the increase in the number of trades is this decimal truncation, the flooring of the number of shares that will be purchased or sold. As you increase the bet size, more price variations qualify for the minimum 1 share trade requirement. Whereas with rounding the number of shares, things might probably have evened out, but at times going slightly over full exposure which could trigger the use of margin and associated fees.

With the higher initial capital, we see an increase in the number of trades, an increase in CAGR, and an increase in the average net profit per trade (see the xbar column). This is mostly due to the flooring of the number of shares traded. The differences are significant.

You have a strategy that does not outperform its tracker index, but, nonetheless, did beat long-term market averages over its past 12 years.

The stock selection is more than relatively secured. In fact, it is a reasonable bet on America. The stuff on which you can build retirement funds or grow your portfolio for whatever purpose. QQQ did more than outperform putting one's money in a bank account, earning low interest.

How could you use this strategy? It got close to QQQ's overall return. Nonetheless, you could have done a little better just by buying QQQ outright. A single operation with little effort, if any. No need for a computer, trading software, or automation. All that was required was taking a position and simply sitting it out.

Did you have more risk in putting 100k or 10 million on the table? Based on the above table, the max drawdown would have gone from -27.5% to -28.0%. We cannot say the difference was significant. Therefore, the very first consideration should be to find ways to get that 10 million, and even more, as initial capital. The effort would be well rewarded with not much added risk.

Note that the hit rate in the first panel goes from 60% to 74% as you increase the initial capital. Also rising is the average net profit per trade xbar and the overall CAGR. Those 3 measures should have declined.

The program cannot improve by itself, especially using rebalancing. And yet, the only change to the program was increasing initial capital, nothing else. Where is the Law of diminishing returns in this case? Does it kick in later? 


The bottom panel in the above table shows the impact of applying some leverage. Evidently, there is a cost associated with it. However, these costs will only be on the leveraged part of the portfolio: F(t) ∙ (1 +Lev)  =  (1 +Lev) ∙ [F0 + Σ(H ∙ ΔP)] - exp.

For example, a 30% leveraged account would have leveraging fees on only 30% of the portfolio: 0.30 ∙ F(t). Leveraging would also raise trading capital by 30%: F(t) ∙ (1 + 0.30). This will not have that much of an impact on the number of trades since we will be reaching what appears as a slowly approaching upside limit offered by the inherent mechanics of rebalancing. You have only 100 stocks that can rebalance on a weekly basis. Plus, once in a while, a few more due to replacements.

Evidently, as we increase leveraging, drawdowns increase.

As compensation, we do see an increase in CAGR that exceeds the added leveraging expenses. For instance, at 30\% leverage, the estimated cost with a 5\% leveraging fee would be 0.30 ∙ F(t) ∙ 0.05$. This would reduce overall CAGR by -1.5% but nonetheless increase CAGR from 20.99% to 27.28%. Thereby, increasing CAGR, net of leveraging expenses, by 6.3%, which is 4.2 times better than its cost.

With leverage at the 95% level, the CAGR will be reduced by -4.75% (0.95 ∙ 0.05 = 0.0475). Looking at the CAGR for those leveraged scenarios, there is more than enough to cover those added fees, even if they will be considerable. Leveraging just becomes another tool and also an added cost of doing business.

So, just based on the above table, in the first panel, you gain a higher CAGR by putting more on the table. As you put more on the table, the number of trades increased toward its estimated full potential of 63,800 trades.

Putting less on the table is like underplaying one's hand.

The money (a.k.a.) the profits, were there for the taking, but we lacked the capital to take advantage of it. And it is one of the reasons why you did not get more.

Whereas, in the bottom panel, the number of trades went up only a little (by about 1.1%, on average) but still remained near full potential, as should be expected. The slightly higher number of trades could be explained by the purchase of replacements for the dropped stocks in order to maintain the portfolio's 100-stock limit. Also, as leveraging increased, more partial trades could qualify.

It was only after the 75% leverage mark that the number of trades decreased, but nonetheless, it managed to keep a 70% hit rate. 

Due to the rebalancing scheme, there is an upper limit on the potential number of trades per week. It is highly related to the number of stocks in the portfolio and their respective price variations.

You find that as the leverage increased, the drawdowns also increased. That should be expected. We increased the bet size by leveraging, thereby amplifying the impact of volatility.

Nonetheless, such a trading strategy could be used to complement others aimed at reducing overall portfolio volatility. There is a cost to leveraging, therefore, maybe, be the one providing the added funds and collecting those fees (they get to be considerable), lend the needed margin to your trading strategy.

Increasing your initial capital by the same percentage amount as the margin is another administrative move. It does not have the same effect. All it does is increase the initial capital, while leveraging will also impact all trades and generate much more. Which level of performance do you want?

Raising Initial Cash – No Leveraging


Note that all 4 of the tests above maintained a hit rate of 74% and a drawdown of -28%, the same as in test #3. As you increased the initial capital, the CAGR also stayed about the same, near 21.05%.

The difference between using leverage and only raising initial capital is considerable. The difference comes from what is being compounded. In the above chart, the initial cash increase raised the portfolio's outcome close to the percent increase (test #9). 30% more cash, about 31% more in total liquidation value. While the 30% leverage (test #4) increased the liquidation value by 86.17%. Leveraging enabled continuous reinvestment of leveraged profits.

The 74% hit rate is not the result of some better market timing. In reality, this strategy is only reacting to market turbulence. We could say that it operates on the fumes of variance. If the price does not move by enough, that is more than 1/q, there is no trade.

The strategy makes no other prediction than its initial assumption, its bet on America. Understandably, the majority of sales will be at a profit. Most shares are sold on the way up. For instance, on test #9, some 74% of trades (47,463) out of 64,113 were positive.

Buying is done when prices decline. There are no immediate losses acknowledged on these "purchases". We just add to positions without liquidating (except for the stocks falling off the top 100 list). The 74% hit rate is simply due to the structure of the designed game, which strictly specified the rules of engagement. It is the result of the strategy's trade dynamics.

Stocks Traded – QQQ Weights

The above chart mimics the weights found in QQQ for each position. The 10 largest corporations account for the lion's share, 55% of the total. The other 90 stocks generated the remaining 45%. All the tests, from #1 to #16, showed almost identical distributions. The reason is simple. QQQ is a market-cap-weighted tracker. And therefore its weights will tend to match and follow closely its index counterpart.

It is now your move. Make your own bet on America.

Could you make more? Yes, definitely, and for sure. You got a copy of the program. You can do all the same tests shown here and more. However, I would suggest adding some protection aimed at reducing volatility and drawdowns. Add some timing signals to improve profit margins. Add some gaming to enhance overall returns. Improve on the strategy's design.

It is always up to you to prove to yourself that you can do it.

A simulation is just to show it is possible and worthwhile. I can only encourage you to plan for your next 20 years.

Also, a portfolio does not need to retire at 65. It can live another 30+ years. You will find out, in the end, that it was all about you and your choices.

In the meantime, consider adding capital and applying leverage at the same time. It would result in something like in the table below.

Raising Initial Cash – And Using Leverage


Both leverage and added capital are considered. Notice the range of the outcomes. Check test #8 with its 50k initial stake to test #16.

All done using the same strategy, the same trading logic, and the same rebalancing on the same stocks on the same dates at the same times. Yet, you can go from $ 1,494,547 to $ 16,927,290,505 just by managing the strategy's available cash resources. It should give you some motivation to find more capital right from the start of your 20-year journey.

You know that if you add more leverage to this strategy, it will have larger drawdowns. Then, based on the level you want to reach, maybe it would be time to investigate trading methods that would reduce those drawdowns to more acceptable levels. However, note that the drawdowns in the above chart are the same as in the second panel of the first table above.

This says that it is not raising the initial capital that is raising the drawdowns; it is the leveraging. The CAGR on the second panel in the first table is about the same as in the table above.

However, this CAGR will be reduced by the cost of leveraging. But these costs are taken directly from the trading account as you progress. Meaning that it is not fresh capital that you have to pour in, those will be borrowed funds on which you will pay leveraging fees as you go. And your ongoing market profits will be able to pay for it and some.

All the tests presented were achieved using the stated initial capital and leverage. Using more cash, just as setting some acceptable leverage, are both administrative decisions. And since we are dealing with 100 stocks, the concentration risk factor has been reduced considerably.

You can run the program with any numbers you want. Change the initial capital to whatever amount, and set the leverage to what you might find acceptable, including zero. If the numbers are within those presented, the program will comply and deliver something between test #1 and test #16.

The strategy can do test #1 just as it can do test #16. The difference is how you consider money and how you can get it. You can put more capital on the table. Good for you. You can tolerate having your program use some leverage, then, there is a reward attached to that too.

These tests, from #1 to #16, are all doable by anybody having the resources. It does not even require that you have any kind of trading skills. You do not need special training, and to top it off, the trading script is free.

You are afraid or convinced that, at some point, the markets will go down. Why should you let your program run? Shut it down, liquidate all positions, and go to the sidelines. You can always restart the program later under the same ending conditions or set new initial conditions. It is not because you have a program that you cannot stop it at will. You are dealing with a machine having a big red emergency button that you can press at any time. You are in charge. Protecting your portfolio should be a major part of your trading strategy.

You have, here, a trading strategy that has nothing in it: no secret sauce, no indicators to follow or guide trade execution, no signals to trigger trades, no request for fundamental data. It is not the best, but it is pretty interesting considering.

You want more; you just put more in. You provide the input: the how much you put in it. It is all on you and, ultimately, how much you want it.

A 10 million initial account with 30% leverage can reach the billionaire status in 20 years. And if you do not want to be bothered by the programming (actually changing two numbers) and monitoring your account, simply buy QQQ outright, sit down, and relax for the next 20+ years. The simulations were to show that buying QQQ was not that bad an idea, and trading this strategy could do about the same.

Sometimes, you find problems that you think will require complex solutions because they are, in fact, quite complicated. And then, you find ready-made solutions designed by others when you were not even looking their way.

Make your own bet on America. You cannot say you do not have the tools. They are there, free for the taking. If you can do better, do it. However, you should consider this strategy as the very minimum you could do. If you do less, the question should be: why? You had this available all along.

Finally, it is always your choice to do or not to do.

Best wishes.

Related Articles:

A Trading Strategy Of Interest - PART II

A Trading Strategy Of Interest

The Makings of a Stock Trading Strategy – PART II

The Makings of a Stock Trading Strategy – PART I

Created: Nov. 1, 2021, © Guy R. Fleury. All rights reserved.