March 13, 2023

My new book, Build The Retirement Fund You DeserveBe Rich, Be Happy could help you build your retirement fund while leaving you in control of it all up to retirement age 65 and after that for as long as you live. You would do it yourself, so there would be no intermediaries, management fees, or intervention from anyone. Moreover, while in retirement, you could withdraw funds at your own pace without being dictated to or bothered by some financial organization or government regulation. You would be in charge, in control. It would be your funds, and no one could force you to do anything.

March 5, 2023

My new book: Build The Retirement Fund You DeserveBe Rich, Be Happy deals mainly with the impact of the future value formula may have on your retirement and how it will change the world as we know it. All the ingredients needed for this massive societal transformation have never been gathered in this fashion before.

The Future Value equation is FV = PV (1 + g)t. The formula is rather ordinary and has been around for centuries. It starts with the Present Value of some asset to which we apply a growth rate (g) over a number of years (t). This formula will significantly impact the world in the coming decades.

Since the dawn of time, humanity and everything organic has adhered to this formula, whether it be population growth, financial instruments, savings, money supply, or anything else. Even a small positive growth rate will have an impact over time. For instance, with a population growth of about 2%, the world population should reach 50 to 60 billion people in 100 years. That should be quite a game-changer. On the other hand, if (g) is negative, you will have a decaying function with zero as its limit. Sterilize all the people, inject them with some gain of function drug with this purpose, and in some 100 years, almost no one will be left alive.

Feb. 28, 2023                 

                                                           NEW BOOK RELEASED

My new book: Build The Retirement Fund You DeserveBe Rich, Be Happy is for either individuals wishing to build their retirement fund to enjoy the freedom and independence its proceeds can bring or for businesses and financial institutions having to build long-term funds for whatever purposes.

Build The Retirement Fund You Deserve will give you a recipe on to grow your retirement fund over the long term while taking little of your time. So, get ready to be amazed by the wonderments of long-term compounding.

For individuals, this book could change your life and your children's lives. Large institutions could significantly increase their financial assets. But wait until you have read it all. It will change your mindset. Guide you in doing the stuff you need to do, not only for yourself but also for your loved ones.

Feb. 26, 2023

In my new book scheduled for an early March release: Build The Retirement Fund You Deserve. Be Rich, Be Happy I cover a trading strategy based on the QQQ ETF and more.

Here is an equation from my book that should guide anyone in building their retirement fund:

Future Value Equation
We have a future value formula with five 20-year periods at varying growth rates and independent withdrawal rates for each period after the first 20 years. As long as the growth rate is superior to the withdrawal rate, the fund will continue to increase over time, even after 100 years.

Dec. 2, 2022                             Also available in PDF  

You know you should build a retirement fund to last you a lifetime since you also know that without it your retirement might not be as pleasant as it could be, moneywise that is. The first hurdle, evidently, is money. If you do not reach retirement with enough, you will probably be missing out. The second hurdle, not surprisingly, is your age. If you start too late, you might not have enough time to make it worthwhile. And the third hurdle is you. Will you have the skills and perseverance to build that investment portfolio in the first place?

You are the one to decide what you want to do. Find ways to execute the needed tasks to get there. You will always be at the center of it all, no matter how you want to look at it. Every investment decision will matter, but mostly, only to you, since you will be the one winning or losing your own money. You remain the one, under market uncertainty or whatever happens to make all those decisions, even if by proxy. Having someone else do the job for you is your decision too.

Oct. 10, 2022

Here is a post I made (as is) about a walk forward on a QuantConnect thread. It should be to your benefit and therefore worthwhile. 

The post presents one particular pitfall of automated trading and that is no matter how promising a trading strategy might be, it could still go wrong and not perform as expected.


I would like to use a version of the "In & Out" strategy (frozen in time since October 2021) as a one-year walk-forward example.

The price data after October 2021 will be totally unknown to the strategy. It is assumed the strategy will continue to do what it was designed for and simply execute its code. After all, it was designed to do just that.

Oct. 3, 2022                                                   Also available in PDF

Over the past year, I wrote a lot about a freely available trading strategy rebalancing QQQ's 100 stocks on a weekly basis.

It started with A Trading Strategy Of Interest (see the 13 related articles listed below). The strategy had nothing going for it in the sense that even if you used it as is, it would not outperform its Buy & Hold equivalent.

In fact, holding QQQ outright for the duration would have produced slightly better results than using that program. Not by much mind you, but still less than buying QQQ and holding. Regardless, the strategy could be improved performance-wise.

The strategy provided a testing ground where general trading principles could be examined. Simulations (44 in all) managed to show CAGRs of 20%+ over a 12.4-year period. You could technically choose the strategy's performance level based on the initial preset conditions provided. This should be viewed, at least, as noteworthy.

Sept. 26, 2022                                            Also available in PDF  

In playing the stock market game, maybe the very first question should be: How much trading skills do you really need? To which I would venture, in many cases, practically none or very little. The game is simply too simple. Common sense might be your best asset ever.

What you might need however is sufficient capital, time, and some sustainable long-term method of play. You could even outsource the whole process should you not have the time to do it yourself. But that too has its limitations.

For some reason or other, you buy stocks, one or many at a time, at the prevailing market price and then try to resell them or hold them, hopefully for a higher price. You repeat the process as many times as you want. But, it is more something like as often as you can, within your capital constraints, available time, and trading methods.

Sept. 6, 2022                             Also available in PDF     

Your Stock Trading Game takes a look at trading stocks with a long-term perspective. It will use equations as a guiding light to higher portfolio returns. These equations will impose trading limitations as well as unleash a portfolio's long-term potential. If you do not plan your future or have no idea of where you are going, where do you think you will end up?

In my previous article, Basic Portfolio Math, we were shown 3 basic portfolio equations, all giving the same answer. From a world of short-term quasi-randomness, you could extract long-term expectations, or at least some tools to estimate where it was all going based on your trading procedures and constraints.

You had choices to make from the start that would greatly impact the future outcome of your stock portfolio or retirement fund.

Aug. 30, 2022                            Also available in PDF     

Basic Portfolio Math makes the case that certain stock portfolios can tell a lot about their future long-term outcomes based on their past simulated trading behavior.

It could help "predict" within a few percentage points their future value, even some 10 years hence and more.

This goes against many caveats we see about not knowing the future of an automated or discretionary trading system since its past is supposedly no guarantee of its future. True, but still, you could get pretty close to your forecasted expectations. Being able to make such an estimate or forecast is already a plus.

June 26, 2022                                    Also available in PDF     

No matter how we trade stocks, our long-term objectives are pretty much the same as everyone else.

We want our portfolios to go up in value, not down.

We find the upside the most reasonable outcome for our investment strategies since it is why we made them in the first place.

Nevertheless, we have to plan for our portfolio's recovery after a significant decline. Not by planning for what was or could have been, but for what will be coming our way.

We are averse to market drawdowns, no surprise there, we all are. Unfortunately, we have a really hard time avoiding them. The market can go down, but, it is our job to recover from them and do even better. My recent articles (see related articles below) provided recovery equations to do just that.

June 7, 2022                                                 Also available in PDF            

Portfolio Drawdown Protection will cover how we can partially protect our stock portfolio from market drawdowns.

Will be shown that even a portfolio level trailing stop-loss can limit the damage drawdowns can inflict on long-term performance.

Any drawdown should be considered as a drag on any portfolio's overall return since we not only have to recuperate the downfall, we also have to replace the lost opportunity that occurred during those market declines.

We need some more background to the process. First, we will consider how we can further raise the portfolio's long-term CAGR, and then, add protective measures. Doing the reverse, meaning, adding protective measures first, will tend to curtail, from the start, our ability to increase performance beyond certain levels due to the very early limits we want to impose on our trading strategy.

Let the strategy rise as much as it can, and then, set the limits you will find acceptable in your own trading scenario. If this makes your trading strategy produce a little less, so be it.

There is a price to pay for portfolio protection. We do not need to kill our future CAGR just because we want a little protection.

June 1, 2022                                             Also available in PDF            

My last article Surviving Market Drawdowns, which is also available as a PDF file, covered the need to exceed average market returns. It considered drawdowns and inflation which have long-term effects on stock portfolios. The article expressed the need to compensate, if not over-compensate, for these negative factors, which tend to dampen long-term returns and thereby act as a drag on performance.

I will extend that perception by examining the impact of 5 of the most significant drawdowns of the last 40 years.

May 11, 2022                                            Also available in PDF                                                              

My last series of articles tried to cover a lot of ground. It was mentioned a number of times that the stock trading strategy used needed some protective measures since drawdowns could have quite a negative impact on long-term performance.

The following is mostly an extract from my upcoming book on building up your own retirement fund. It even covers generational funds made to last decades and decades.

Whatever the type of stock portfolio you have, or want, the objective is to generate long-term returns higher than just market average.

The intention, no matter how you want to play the market, is to make as much as you can without giving it back.

Jan. 5, 2022

There were still a few more things to share from the QuantConnect ETF Constituents Universe thread. 

I already wrote six articles on this freely available trading strategy exploring its general behavior and showing the results of some 46 simulations where three variables controlled its outcome. Variables determined by administrative decisions before the program even started.

These variables were independent of the game being played but still determined how the strategy would play out. They were: the initial capital used which evidently would have a tremendous impact on the final result, the method of weighing stock positions, and the applied leverage.

The achievable growth rate was left to the strategy's trading mechanics.

Dec. 21, 2021

The purpose of the previous 5 articles was to show the relative ease of setting up your own indexed retirement fund, manage it and prosper even with little intervention of your own. Was given a recipe on how to do just that. A single common-sense decision could get it started, one you could make at any time of your choosing.

You simply copied an imitator of a market index and followed its weighted index. The QQQ ETF was used for that very purpose, an index tracker tracking the NASDAQ 100 index. It was demonstrated that you could trade QQQ's 100 highest valued NASDAQ stocks, or simply buy QQQ outright and hold it for the duration with a slightly better CAGR, as should be expected.

Dec. 2, 2021

My 4 previous articles dealt with a do-it-yourself profitable and freely available stock trading strategy using the QQQ ETF over a period of 12.24 years. From its simple procedures, other generalized notions can be extracted.

First, a recall. We had this free trading strategy essentially mimicking the NASDAQ 100 index. Thereby making it a basis for your own indexed fund. Results on 44 simulations were shown. All having two components, one: a simple stock selection procedure (totally outsourced by using QQQ constituent stocks), and two: a weekly scheduled and automated rebalancing routine (trading on whatever happened and whatever was there in QQQ at the time).

Thus, having our machine automatically trade once a week and effectively only for a few minutes since all trades were market orders. Anyone with access to money could do this, not something you would call time-consuming either.

Nov. 15, 2021

There was more to extract from my previous article Use QQQ - Make the Money and Keep IT

The presented free trading strategy in that article did two simple things, one: it completely outsourced its stock selection process, and two: it rebalanced weekly. That's it.

No trading signals, no technical indicators, no market timing routine, no move to the sidelines in times of market turmoil. Not even a request for your opinion, feelings, state of mind, or market analysis. Quite a simple and productive "whatever happens" strategy, of the suck it up type. This trading strategy is saying that you do not need anything special to win, in fact, you do not need anything at all (except access to money). It is interesting to see how this strategy could also apply to a lot of other strategies having similar trade mechanics. Much can be learned from this pure rebalancing play.

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 II. As said, I found the strategy interesting for the simplicity of its stock selection process, its pure-rebalancing play, and its overall performance.

Oct. 20, 2021

As a follow-up to my last post, here are some additional observations. To put this in context, the last post presented a 12.16-year trading strategy simulation on a pure rebalancing play using the 100 stocks in QQQ, a weighted by market capitalization ETF. The strategy generated a 19.01% CAGR over the period, turning 100k into 830k or 1 Mil into 10.0 Mil with a 20.6% CAGR. Something better than most long-term market averages. The above-mentioned post also gave where to get a free copy of the program.

Oct. 9, 2021

            Also available in PDF                                                              

Recently on, a trading strategy dealing with the QQQ ETF was published. You can find it HERE, where you can clone it and then test it for yourself if you want to.

The strategy caught my interest since all it did was rebalance QQQ on a weekly basis. It represented an opportunity to study the trade mechanics of a pure-play rebalancing in motion, something I wanted to revisit for some time.

QQQ is composed of the top 100 NASDAQ stocks by market cap. What could be the interest when you could just have bought QQQ and held on over the same time interval? Higher returns? Lower drawdowns? Something to do?

Aug. 12, 2021

This HTML file can be very helpful to anyone designing automated short-term stock trading strategies. It has deep implications. It deals with correcting for long-term portfolio return degradation, on how to fix it, and even how to reverse it.

It builds on mathematical equations used in describing the outcome of our trading portfolios and shows how easy it is to improve on these designs with simple trade triggering techniques. As if saying that your trading procedures can be greatly improved just by requesting more and letting long-term compounding do its job.

Aug. 2, 2021

There is math and gaming in building a long-term automated stock trading strategy. Some of it is quite elementary and ignoring it could be unwise. The math sets limits, boundaries, and constraints on what you can or could do in trading stocks over the short to long term.

I use math to describe the game and see its limits, and when programming trading procedures, try to enhance strengths and alleviate weaknesses within the confines of limited capital, limited time, limited know-how, and limited resources.

July 18, 2021

The big word in the title is "automated". The process should start with your honed discretionary trading system using your trading rules, market know-how, and trade logic which you simply automated.

There is a lot of software out there to help you do that, not only simulate your strategy but also trade live. Why do it? Who would have guessed? Evidently, for the money. It is there, available any day of the week. Doing it right, getting close enough to your long-term goals should be more than enough and relatively easy to achieve.

June 6, 2021

Another continuation to the last few articles found on my website dealing with the freely available In & Out stock trading strategy. This one is about gaining a better understanding of its trade mechanics. Without it, how could you determine what is really going on, and maybe more importantly, how could you "control" what it does? Or even better, what it will do going forward?

Forward, that is the keyword, that is where the money is. There is no real money to be made on a simulation over past market data. A simulation can only serve as a kind of feasibility study sampled out of the gazillions other choices that could be made. Why is this trading strategy profitable? How could you make it even more so going forward? Those are questions in need of answers.

May 1, 2021


Of the published automated stock trading strategies, you are presented with a diamond in the rough once in a while. You either ignore it or recognize it as such and try to find out if indeed it will have some real value after being cut and polished. It is a choice you have to make. You will still have to work to extract that gem and then enhance its value. To your credit, this is a very simple strategy.

April 1, 2021

This is a follow-up to my last article Basic Stock Portfolio Math. Trying to provide a different look at the inner workings of the In & Out stock trading strategy which is freely available on QuantConnect where you can modify it at will. The intent is to show how this strategy is making its money. It should prove interesting. The strategy is composed of only a few parts: a stock selection process, a trend definition section, and a trade execution method. Nothing very complicated.

March 9, 2021

The following HTML file deals with some of the basic math of a long-term stock trading portfolio. It reduces the problem to two numbers, one of which is a simple counter. Because trading over the years can imply a lot of trades, we have to look at the problem in terms of averages. What will the average net profit per trade tend to when you have a large number of trades? It is a basic question that appears difficult to solve, and yet, it can be greatly simplified. That you trade automated or by hand, the equations presented will still hold. The final outcome of a trading strategy is the result of simple math, simple equations, nothing complicated.


HTML File.

Feb. 19, 2021

Designing a successful stock trading strategy has about the same objectives as developing your own money printing machine. That you trade on a discretionary basis or use some elaborate trading program to execute your trades does not guarantee you to win at this game but you can easily put the odds in your favor of doing so.

In reality, the problem is very simple: you buy some stock (whatever the reason) and resell it later at a profit. You do it often. That is it. That is all the game. You do not need much to understand the mechanics until you do more than a few hundred trades. Then, you get to realize that the “game” is a little bit more “complicated”.

Feb. 6, 2021

You design an automated stock trading strategy and will use historical data for your simulations. Right off the bat, all the stock prices you will use are part of recorded history, and therefore, what kind of “discovery” are you going to make should be the question?

All the data is already there in plain sight. All you have to do is access it. Somehow, for some, it is as if the price of AAPL over the last 20 years has eluded them? As if they had never seen it before, or did not know what it did or what it stood for? AAPL and its related data is there, and that up to yesterday. Period. We can immediately see the hindsight problem this can create.

Jan. 24, 2021

Here is another post made on a QuantConnect forum. It could be viewed as a follow-up to the articles Stock Portfolio Backtesting and The In & Out Stock Trading Strategy

Is there something in @Vladimir's In & Out strategy (version 1.5)? What I see is that there is money in there. But, you have to determine that for yourself. What follows is not intended to convince you, you have to do your own homework.

Is there an edge that could persist going forward? Is it of any consequence what this strategy did over its simulated past? Is this strategy overfitted or not? In all simplicity: is it worth it? There is so much that could be said about this strategy.

Jan. 12, 2021

The following post is in reference to a question asked on overfitting in a QuantConnect forum.

Any stock trading strategy designer should have views on this subject since somehow it gets in the way if not at the heart of any such strategy that it be live or simulated. I find overfitting indirectly related to the law of diminishing returns. Meaning that going forward, your trading strategy will produce less over time. However, it can also be viewed in light of another problem, and that is to think that the market will strictly follow our often misconceived and poorly designed trading strategies. It should be forcefully noted that the market has no such obligation.

Nov. 16, 2020

Following Quantopian's shutdown, some of Quantopian's members moved the In & Out strategy to QuantConnect. I moved there too and started reading the documentation. Also started analyzing this adapted strategy and doing some simulations of my own. The following is my first post on QuantConnect relating to this freely cloneable strategy.

Nov. 1, 2020

I was about to answer a question in a Quantopian forum when they opted to shut down their community website. Here is that post anyway. It is trying to answer: could someone use stocks based on highest relative strength above a market average proxy? The strategy's code was given in the thread titled: New Strategy — “In & Out” where anyone could make a copy of it and then modify it at will.

I had this prepared answer, so figured it would do no harm to provide it anyway before everything was erased. I will definitely miss Quantopian participants and would like to express my thanks to all for their comments and contributions over the past few years.

Oct 17, 2020

The previous post showed the outcome for long-term portfolios where returns were randomly generated. Even under randomness, it resulted in return degradation making the game not worth playing. Adding some alpha would make a portfolio profitable. And, if you added more alpha, the long-term CAGR could increase even more.

All simulations were unique. A new random return series would be generated for each and every one of the tests (over 300). We could anticipate that most tests would come out close to some average, whatever that average might be. This was illustrated in the charts, figures, and equations in the previous post.

Oct. 10, 2020

The previous notebook put some emphasis on having an edge to overpower built-in long-term return degradation. There are many ways of doing this. The payoff matrix equations can have gazillions of solutions. They all depend on how you deal with the ongoing inventory matrix H. Trading implies doing a lot of trades, and doing so brings along with it the Law of large numbers.

Oct. 8, 2020

Posted a Jupyter notebook on Quantopian. Here is a link to its HTML equivalent(Sorry for the Quantopian links, the community website has shut down)

In the notebook, random return series were generated using a normal distribution with a 3% standard deviation over 1, 2, 5, 10, and 20 years to show the impact of trading over the long term. Such a strategy will breakdown over time. In the beginning, it might not be that visible, but as the time interval increases, it becomes more and more apparent since return degradation is technically built-in.

Sept. 16, 2020

The automation of a stock trading strategy appears at first glance as a simple process. You program what you think you might have done on a discretionary basis, except your computer can do it much faster and more often. You try to transfer to a program your acquired knowledge, understanding, logic, and trading methods by first simulating the outcome of your procedures over past market data.

 Sept. 10, 2020

The following was posted in a Quantopian Forum expressing
my point of view on the highlighted stock trading strategy.

No one seems to be much concerned by the stock selection process used when it has a major role to play over the long term. First, let's set “long term” as 15 years or more. I would prefer 20-30+ years, but we do not have that much data available.

Sept. 1, 2020

A lot of emphasis was put on a payoff matrix equation (see my last article) to represent a long-term rebalancing stock portfolio. From it, we could estimate the number of trades the rebalancing might generate over the life of the portfolio. However, that was still only half of the solution. What was also needed was an estimate on the profitability of such a trading strategy. That part of the equation is more complicated and has a lot more than just one solution, even though, it too has a simple formulation.

Aug. 17, 2020

You start a stock portfolio with the intention of using scheduled rebalancing, meaning that the stocks in your portfolio are readjusted to a fixed weight on a yearly, monthly, or weekly basis. This portfolio management decision is simple, however, it does have ramifications.

An equal weight is easy to determine, it can be made proportional to the number of stocks j in the portfolio w = 1 / j. It does not say which stocks will be in your portfolio, only that the actual number of stocks will tend to j or less: → ≤ j. Fixing the number of stocks to be traded will also set the initial bet size which will depend on the available initial trading capital.

 Aug. 4, 2020

The following was posted in a Quantopian forum on a trading strategy I greatly modified in order to have it follow its payoff matrix equation directives. It is also the fifth walk-forward performed on this trend-following trading strategy over the past 3.5 months. The strategy used a leveraged adaptive exponential betting allocation function to increase its long-term performance.

July 13, 2020

The following was posted in a Quantopian forum dealing with “Quality Companies in an Uptrend”. The original strategy template is available free for anyone to copy and use as they see fit. The trading strategy itself is fairly basic: it selects a set of the highest momentum stocks from top quality companies that are estimated to be in an uptrend. The assumption is made that such a trend would continue forward. The portfolio is rebalanced at the end of each month. Thereby, continuously chasing the higher momentum stocks. Nothing unreasonable about that proposition.

June 29, 2020

The way you design your stock trading strategy can force it to react in very specific ways. Pointing toward the need to gain a long-term portfolio management perspective since the primary objective of any strategy designer should be to structure these automated trading strategies so that they can, not only survive but also generate above-average returns over 20+ years. If you cannot achieve that, it is very simple: you failed. All you might have to help you is your skills, some math, and the analysis of past history.

June 25, 2020

The more you look at the stock market game, the more you realize you need to play for the long term even when you are making short-term trades. Also, the more you trade over the short term, the more those trades will be faced with random-like outcomes, and the more trades you will need to reach your long-term goals whatever they are. As if there was a contradiction in purpose and means to achieve those goals. Nonetheless, most often, it remains quantifiable. The presented equations will govern it all for some planned and preset strategies.

June 22, 2020

My last article: Stock Trading Game - Gambling It Out was making the point that stock prices could be considered as having the number of up and down days close to the equivalent of a coin toss. There was no need to look at thousands of stocks to validate this hypothesis. Even a small sample over an extended period of time would be more than sufficient to make that point. Nonetheless, some 21 years of data (5,473 trading days) was used to assess the general direction of the daily price movements and their long-term outcomes.

June 15, 2020

If you knew that if you played the stock market game and that you would win no matter what, even if it took a long time, would you not find the time and resources to play your expected winning game if you could?

June 10, 2020

You want to win the stock trading game, even with all its uncertainty. However, it should not be just winning it. It should also be with a higher purpose. Maybe, something like building up your own retirement fund or help someone else build theirs. One thing you should want, no matter what you do in managing that stock portfolio is to make sure you will win and make it so you outperform the expected long-term averages.

Outperforming the long-term averages is the only reason for you to undertake such a tasking endeavor yourself. Otherwise, simply buy a market average surrogate (such as SPY or some equivalent), or find someone that could do better than you which would have been more productive moneywise and with a lot less work.

June 4, 2020

A stock trading strategy can often be simplified to its most basic components, and there are not that many of them. In fact, maybe just two. Those trading strategies cannot be considered that complicated either if whatever their outcomes, they will end up as being the result of two numbers, namely: the number of trades executed over the life of the portfolio and the average net profit per trade. Due to the continuous trading, it transforms the expected portfolio profit problem into a long-term statistically driven and dynamic inventory management problem under uncertainty.

May 30, 2020

In this third installment, I would like to concentrate on the second part of the equation presented in my previous post. It is also where you can find an explanation for a trading strategy's overall return.

But first, a point to be made again, if your stock trading strategy is not built to last, what is it good for? Why build something and see it blow up in your face after a number of years? Wasn't your goal to build your retirement fund or someone else's, or build a legacy fund for some reason or other, and that it would, at the very least, have a positive ending value?

May 24, 2020

My last article (The Inner Workings Of A Stock Trading Program - Part I) stated that a single line of code was dictating the long-term behavior of a stock trading strategy. And that this scheduled rebalancing was sufficient to explain the number of trades that would be carried out over the life of this portfolio. In that article, the first part of the presented equation provided this estimate of the number of trades that would be performed over the years.

Other important observations could be directly extracted from the same equation. Having a portfolio's payoff matrix equation to explain an automated trading strategy implied that the outcome did, in fact, answer to mathematical functions. And that it is these mathematical functions that are driving the show.

May 22, 2020

My last article admitted that the trading strategy used was effectively trading on market noise. Even under those conditions, it could win and win big. It is surprising that, after such a statement, system designers were not in an uproar and making all those points that could be made to rebuke the claims. The article went even further by providing a portfolio payoff matrix equation which enabled making long-term estimates of the portfolio's future value.

May 18, 2020

My last series of articles (The Portfolio Rebalancing Gambit, I, II, III) was about a trading strategy that dealt with its long-term payoff matrix as if playing a game where some randomness appeared to prevail, and a lot of it did. Even in that kind of trading environment, the strategy was doing more than quite well.

A stock trading strategy operates quite differently than a long-term investment strategy. The latter is awaiting capital appreciation from reasonable investments for periods of 20-30+ years. Doing so, almost assuring itself of winning simply by holding most of the stock positions for long periods of time. As an example, see Berkshire Hathaway.

May 6, 2020

In my previous article, the point was made that you could win the game relatively easily simply by prescheduling your future trading activity based on your portfolio's initial set up. The portfolio value equation was put on the table with a reachable long-term objective giving a purpose to the whole process. You did it for your own retirement account or as some legacy fund you might want to leave behind or build a generational fund with philanthropic views. Those are things for you to decide. All I can do is help you design your long-term portfolio for whatever reason you may have.

I will build scenarios based on the portfolio payoff matrix equation presented in the prior two articles of this series (see related articles below). The purpose is to show the range of what you can do based on your own portfolio settings and long-term objectives and also show where's the money. I hope that with the examples provided you will be able to build your own and know what to expect based on your numbers.

May 3, 2020

Whatever your automated stock trading strategy, it needs a purpose, an objective. You need to plan for where you want to go and how you will get there. From my previous article, you can estimate how many trades will be executed without even writing a single line of code knowing you will be scheduling a periodic rebalancing procedure over your portfolio's life cycle.

This article continues in the same direction as the preceding ones (see related articles below), going from the endpoints and designing a trading strategy backward from the perspective of its long-term objectives. And then, redesign the trading strategy for going forward. All in the process of trying to answer the question:

What does my trading strategy have to do to reach its long-term objectives?

April 30, 2020

Often, we ignore the very structure we have given our automated stock trading strategies. We code them to behave in a certain way for as long as they will be executed. For example, in most Python programs showcased on Quantopian, we can find variants of the following line of code:

schedule_function(rebalance, date_rules.month_start(), time_rules.market_open())

It instructs the program to rebalance its portfolio the first trading day of each month as the market opens. That single line of code will execute, on its preset schedule, no matter what. Other programming languages would use a different syntax and wording to accomplish the same task.

April 24, 2020

We often design stock trading strategy simulations by first programming them on some economic notion and then observe the outcome. As if the trading procedures, over the long term, would resolve the appreciation problem all by themselves, when a more global view should be taken. The where you want to go and how far will it take you?

Most of it could be determined beforehand. More planning and a better outlook as to what you really want to do.

April 20, 2020

We design stock trading strategies simply to make money. The more the better. But it all has to be done within constraints of available capital and minimizing overall risks. Trading has a number of differences when compared to long-term investing in many regards. A trade, almost by definition, is seen as a short duration thing that can come out profitable or not. While in the long-term setting of investing, durability, appreciation and overall trends gain more importance. Short-term fluctuations are practically ignored while trading might live by them.

But whatever the trading strategy, it has some basic math to explain what it does. Not sophisticated math mind, as will be demonstrated here, but inherent structures nonetheless that are dependent on the how the trading is done. Most of the text that follows is about averages, and we can use these averages due to the large numbers that will be used. In all cases designing diversified portfolios with hundreds of stocks and thousands of other possibilities.

April 16, 2020

Usually, in designing automated stock trading portfolios, all the attention is put on the program's code. The trading procedures, the decision making, the gathering of relevant information that needs to be analyzed, interpreted, and acted upon. Often, our initial capital is a limiting factor just as our ability to extract a decent long-turn return.

Here, I will go about it in reverse. From the final objective, it will be to break down the trading strategy into what needs to be done to achieve these long-term returns. Something like starting from the end results and asking the question: how did we get here? Or more to the point: how could I get there? The “I” here is you.

April 13, 2020

The following is a post made on a Quantopian forum related to my recent articles on the subject of a portfolio's doubling time (see related files below).

I like the notion of doubling times for a portfolio. It indicates, on average, how much time was required for the portfolio to double in value. It is all a matter of the strategy's CAGR, its compounding rate.

April 9, 2020

I thought it might be an appropriate time to make a walk-forward test on the strategy presented in my January 8th article: Financing Your Stock Trading Strategy which showed a 16.9-year simulation with an ending date of 1919-11-29. It would make this new simulation a walk-forward, out-of-sample, test where the strategy would not have seen the last 3-month of market data.

March 31, 2020

My previous article dealt with The Making Of A Stock Trading Strategy's mathematical backdrop. Designing automated trading strategies having for objective to prosper over the long term. There are a multitude of ways of doing so. A trading portfolio, even with its short-term vision, needs to view its final outcome in light of a long-term compounded return. This is where a portfolio's average doubling time takes some importance.

March 28, 2020

The making of an automated stock trading strategy is relatively simple. It is made of 3 distinct processes: selecting some stocks on some reasonable quantifiable assumptions, determining the logical trading rules and procedures that will be applied, and executing them. The trading process can be enclosed in a single do-while loop and be executed until reaching the end of the program, that it be up to a past or future date.

March 16, 2020

We can represent stock trading systems with equations and not necessarily know that much about their future market returns, except general expectations and/or educated guesses. However, with these equations we can determine what is needed, over the long term, to trade and win.

Jan. 24, 2020

This is a follow-up to my last article, an attempt to answer the question: can you do more?

Two of the most important traits of any stock trading strategy should be its durability and its scalability. The first so that the strategy does not blow up in your face during the entire trading interval, and the second so that a portfolio can grow big.

Jan. 8, 2020

In my previous article was shown 17 simulation results of a stock trading strategy as found on the Quantopian website. On that basic template, I added optional functions in order to increase and control performance.

This intermediary step is part of my analysis of the strategy's worthiness since I am still exploring its capabilities: limits, strengths, and weaknesses. I present 12 new simulations using 160 stocks.