**HTML files.**

The purpose of HTML files was to render the mathematical formulas used in my articles more readable. And since each article is dated, they build on this dated sequence to expand on the mathematical structure of stock trading strategies.

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.

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”.

Oct. 6, 2019

The following simulation results were posted in a Quantopian forum as a follow-up my last post (**A Markowitz Attempt**) in which I returned to the $10M initial capital scenario. I wanted the program and its subsequent tearsheet analysis to finish since at times some are too big to complete in the allowed time.

Sept. 29, 2019

This is a peculiar trading strategy. The original author probably wanted it to be based on some Markowitz portfolio management principle, but it is not. Nonetheless, over part of its trading interval, it does make as much money doing nothing as it does trading.

Sept. 26, 2019

This new **HTML file** puts a few questions on the table. Even if the title sound obscure, its understanding is relatively simple. Mostly, it says that stock prices are not normally distributed and therefore why apply that kind of math to the problem if it is not that representative?

Sept. 25, 2019

This **HTML file** deals with stopping times. It is a notion related to stochastic processes where we try to determine where and when certain values will be hit like a price target for instance.

The note argues that it is not the first stopping time that should be the main interest, but the last one where you might have no means to determine when and at what level it might be reached if at all. Yet, getting closer to that last stopping time might have more merit since it should tend to increase profits.

Sept. 20, 2019

This **HTML file** deals with stock portfolio strategy design problems associated with automated trading. We know that over the long term, most professional portfolio managers do not outperform market averages. However, using simple tools, one could do better than average.

Sept. 16, 2019

The following **HTML file** deals with stock selection problems associated with automated processes. In particular, often the mere fact of selecting stocks on some economic rationale is sufficient to reduce the immense set of potential portfolios to a unique and totally deterministic one. This, that we look backward or forward in time.

Sept. 11, 2019

The following **HTML file** combines two recent posts made in a Quantopian forum. It deals with the structure of a stock trading strategy and the steps that can be taken to enhance its performance over the long term. It should be viewed as a continuation of my * Reengineering For More* series of articles.

Sept. 17, 2018

Investing in stocks and trading them are not the same, even if both are played using the same stocks. It is as if anyone could design their own game within the game to suit their own perceptions and objectives, that they be short-term or long-term. All could call it their investment strategies, and technically they are right. Furthermore, they could all win.

July 11, 2018

**Uncertainty**

One of the major concerns in stock trading strategy design is future price uncertainty. Unsure of about everything as to what is to come. As if unable to make assured predictions on what might or might not happen next. If it was not like that, you would be sure and ready to play that game every day of the week. Call it fun and lucrative.

The more randomness there is in stock price series, the more difficult it is to consistently extract predictable profits. As if the predictions were mere coincidences or luck

June 17, 2018

**Basic Portfolio Math part IV**, made the point that the 505 listed stocks in the S&P500 price matrix were the same for everyone. Its past is recorded history and there is only one iteration of it. The possible combinations of selectable stocks for a portfolio is so huge that there is not enough computing power on this planet to make an exhaustive search for the best possible trading strategy within a million lifetimes, let alone over the next few minutes.

June 10, 2018

**Part IV** of this series considers what goes into building a stock portfolio for the long term. A look at the magnitude of the problem of finding the best portfolio mix possible to the acceptance of the best you can do which is designing a good trading system able to prosper for decades. In the end, it is the account balance that will really matter.

June 3, 2018

**Part III** of this series deals with a stock trading strategy's need to generate some long-term positive alpha in order to outperform expected market averages. And since alpha is also compounding over time, a small dose can go a long way.

May 24, 2018

The stock market game is relatively simple. You buy some shares, hold them, or resell them later. You intend to invest in worthwhile companies for the duration of whatever holding period you see fit. The main objective remains, in either case, to make a profit. However, this profit should be looked at from a long-term perspective. If you trade, it is not just one trade that you should be concerned with.

March 1, 2018

Some of the stuff in portfolio management is so basic that we often forget how really basic it is. The building block of a portfolio is the position taken in some shares of a listed company as an investment or as a short-term speculative move. In both cases, the objective is to make a profit. We buy an asset and hold on to it, or resell it later on for a profit. Trading is simply doing the latter more often.

February 4th, 2017

The **HTML file** at the end of this article relates to my transformation of a cloned trading strategy as found on the Quantopian website. It was first declared as not worth pursuing. But I like to take such strategies and make them do more. A kind of demonstration of what you can find in **my book** holds.

The premise is simple. If the stuff presented in my book works. Then, almost as a foregone conclusion, based on those principles, I should be able to make such a trading strategy outperform. And the applied trading procedures would have a positive impact on the overall performance level. That is what this **HTML file** is all about. Making do with what was ordinary stuff, and making it great. You be the judge.

November 2, 2016

*This new HTML file is another step in this series of articles. Refer to preceding articles starting with the Payoff Matrix to gain a better understanding of what is being put forward in this two-part installment.*

Any automated stock trading strategy can be resumed by 3 of its performance metrics. Namely, the number of trades, average bet size, and net profit margin per trade (n, u, PT). Everything else is of lesser consequence, part of features, preferences, or descriptive properties.

October 22, 2016

This article shows what I consider the core of a trading strategy. Looks at the trading problem from a different angle than most. Starting from the end results metrics, then going back to design strategies that will affect these metrics over the entire trading interval. As if designing a strategy backward, but most certainly constructively, allowing for a multi-asset, multi-period view of the stock portfolio management problem.

October 13, 2016

The **HTML file** below starts to elaborate on trading methodology infrastructure. It is part of the background information needed to go forward. It uses a MACD trading strategy as an example to set mathematical structure to trading procedures. It could have used something else, the whole point is not on the MACD, but trading strategies in general.

October 10, 2016

The **HTML file** below tries to elaborate on the predictability, not of stock price movements, but mostly on portfolio performance outcomes. It tries to do this using only two numbers, one of which is just a trade counter.

The objective being to show that those two numbers which characterize a trading strategy can add some understanding of a strategy's long-term goals. As if giving the ability to make napkin estimates of where a portfolio might be some 20+ years down the line, thereby providing a reasonable guesstimate.

October 3, 2016

The **HTML file** below deals with the perception of trading decisions within the context of building a long-term stock portfolio. It is the continuation of a series of articles dealing with the underlying math behind a stock trading strategy.

Instead of looking for a trading strategy that tries to shift its portfolio weighs from period to period as in a Markowitz or Sharpe rebalancing scenario, the search is for long-term repeatable procedures that can affect a portfolio's payoff matrix over its entire multi-period multi-asset trading interval. The main interest is not in a trade here and there but on the possible thousands and thousands of trades over a portfolio's lifespan. All influenced by the trading functions put on the table.

September 25, 2016

What I see most often are stock trading strategies that operate on the premise of finding some kind of anomaly or pattern that the developer hopes will repeat in the future. He tries to select the best methods he has to do the job. But, it still is limiting in the sense that one is not looking to increase the number of trades but simply to accept the strategy's generated number of trades. As if looking only at one way to increase end results. It's okay, but one should want more and could do more.

September 15, 2016

The following article is part of a series. It deals with ways to enhance a stock trading strategy by incrementally increasing the number of trades to be executed over a long-term trading interval as well as increasing the average profit per trade. Thereby, giving a higher performance at the portfolio level.

September 13, 2016

This article examines stock trading strategies with structural defects. Meaning strategies designed to fail, even before they start trading. It is not because someone has designed a stock trading program that it will make money. You need more than that. One thing is sure, might as well learn not to include in your own programs trading procedures that are almost assured to obliterate your long-term portfolio performance. But then, anyone can design their trading strategies the way they want.

September 8, 2016

Designing trading programs implies mathematical formulas. We all have a vision of what our trading programs should do. Presented in this article, as in the prior one (**Payoff Matrix**) are building blocks for what I want to do with Quantopian. As if putting on paper, preparing an overall plan on how I want to use its facilities. The process could help others.

September 6, 2016

The HTML file listed below is full of matrix formulas. You don't need math to understand the message. For me, putting an equal sign on something is a big statement. All one can do after is declare: not equal, and show why. It is not a matter of opinion anymore, it is a matter of proof.

The file looks at the trading problem from a payoff matrix perspective, which in itself can represent any trading strategy whatsoever. It concludes with any trading strategy could also be expressed as the number of trades times the average profit per trade, leaving only two variables to consider when designing trading strategies.