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
The Quantopian community website has shut down. All links to Quantopian posts have been disabled.
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 (Quantopian has shut down). Here is a link to its HTML equivalent.
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. 23, 2020
The following was posted in a Quantopian Forum Sept. 22nd expressing my point of view on the highlighted stock trading strategy. The strategy can be freely cloned, modified, and executed at will on their website. (Sorry for the links, Quantopian community website has shut down)
Some added notions to my previous article where I said I questioned every assumption in the original version of this program even if I used Dan Whitnable's version as starting point.
One of those assumptions was the fixed and generalized trend declaration which can have a major impact on trade dynamics.
Sept. 10, 2020
The following was posted in a Quantopian Forum expressing
my point of view on the highlighted stock trading strategy.
(Sorry for the links, Quantopian community website has shut down)
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.
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. (Sorry for the links, Quantopian community website has shut down)
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.
Aug. 30, 2019
When designing automated stock trading strategies it is mainly to outperform other available methods of portfolio management including other automated strategies. You can go to outperform over the short term where you will find a lot of what should be considered market noise (unpredictability or volatility or randomness or whatever you want to call it). Or, go for the longer term where the prevailing long-term market trend will be more visible.
Aug. 24, 2019
We can design our stock trading strategies to do whatever we want. However, most often it just turns out to be whatever we can. These strategies could be based on about anything as long as they remain relevant to our intended objectives. Also, they actually have to be feasible in the real world and be able to survive over the long term.
What is the use of a stock trading strategy that will blow up in your face
at some time in its near future and completely destroy your portfolio?
How about if it is not even designed to outperform market averages?
Aug. 22, 2019
A recent post made in a Quantopian forum. (Sorry for the Quantopian links, the community website has shut down)
The trading strategy described in my article: Reengineering For More was designed to be controllable. We could be more aggressive by adding more pressure to its controlling functions, or slow it down at will if we considered it too much or felt it was going to fast. It is part of the advantage of having controllable portfolio level functions rather than having adaptive or fixed trading parameters. It remains a compromise between individual preferences and maximizing long-term objectives.
Aug. 21, 2019
Improving overall portfolio performance over the long term might not be that hard to do. However, you will need a long-term vision of things to do so.
We all know the future compounding value formula: Cap. ∙ (1 + r)^t.
Say you want your long-term portfolio performance to produce twice as much as it could and wonder how much more return, or effort, would be needed to accomplish the task.
Aug. 18, 2019
Posted in a Quantopian forum recently as a follow-up to my article Reengineering for More which presented a remarkable trading strategy with outsized performance levels. (Sorry for the Quantopian links, the community website has shut down)
The described trading strategy used the CVXOPT optimizer.
First, let it be said. It is extremely difficult to extract some decent alpha using an optimizer.
The optimizer can only give you what it sees and you have no control how it will trade.
July 22, 2019
This is a follow-up to my last Quantopian post.
A more elaborate and detailed explanation for the equation used can be found in my third article of a series:
This is, I think, the 7th strategy I have enhanced or repurposed in Quantopian forums using parts of the equation given in that article. Another dozen or so simulations have been chronicled on my website over the years based on the same general equation.
July 19, 2019
This week there was this interesting notebook presented in a Quantopian forum. It is worth reading first so that what follows could be better understood. It is based on a free paper on momentum with volatility timing (link provided in the first post). (Sorry for the Quantopian links, the community website has shut down)
What I observed was that there was something in there that could apply to any wannabe market-neutral trading strategy. However, it still depended on the premises made about the market in general.
July 11, 2019
In a Quantopian forum, someone cited a Will Rogers' quote as a put down to the fact I was suggesting people buy stocks that are going up and drop those that are going down. This old Will Rogers quote goes like this:
Don't gamble; take all your savings and buy some good stock and hold it till it goes up, then sell it. If it don't go up, don't buy it.
To which I replied.
Will Rogers was right. It was and still is excellent advice. I used that same quote on my website years ago, but I read it differently. And I think Mr. Buffett also adheres closely to that same pun.
July 8, 2019
Answering a question in a Quantopian forum about the variables used in the presented equation in my last article.
Those variable names expressed averaged out functions: dampers, boosters, accelerators, amplifiers, and controllers. As their names imply, they are made to increase or decrease the impact of the controlling functions as the strategy moves along. Each playing their part somewhere in the program with the meaning you would give to those names.
July 7, 2019
I have absolutely no obligation to post anything on Quantopian forums, it is just like for anyone else. However, if I post something, I stand ready to explain and discuss within my own understanding and IP disclosure limits what a trading strategy does and for what reasons it does it.
July 6, 2019
The chart below shows the value of having some alpha over the long term. It can easily be reconstructed using the formula: Init. Cap. ∙ (1+ E[rm] + α)t, where rm is the long-term expected historical market return and alpha the added performance over and above this average market return.
July 6, 2019
Over the past 2 years, I have covered a lot of the inner workings of my trading methodology on my website and in posts on the Quantopian website forums. I find the methodology relatively simple and hope that from what has been presented, anyone could reengineer their own strategies to make them fly. This way everyone would be responsible for whatever they do.
July 6, 2019
Here is another follow-up post on Quantopian dealing with the same trading strategy as discussed before.
I stated previously in A Cloud & AI Strategy thread, that if you wanted more you could add a little bit more leverage, and since the leveraging is compounding, it would have a direct impact on the overall performance. Evidently, it would also have an impact on the portfolio metrics. (Sorry for the Quantopian links, the community website has shut down)
July 6, 2019
As a follow-up to the last Quantopian post, I added the following:
Of note, the mentioned trading strategy started scalable by design. I could push on its pressure points in order to increase the number of trades and the average net profit per trade. These were modulated. Most of it was done by leveraging and adding protective measures for when the equity line decreased by either reducing positions sizes or going short.
June 28, 2019
The following was posted on the Quantopian website.
I got interested in Stefan's trading strategy after seeing the “Cumulative Return on Logarithmic Scale” in a tearsheet. It showed alpha generation. This is represented by the steady widening of the spread between the algo and its benchmark.
I understand that this is a niche trading strategy specifically oriented on cloud and AI computing. Nonetheless, we should look at the stock market with a long-term perspective. And forecasting that we will need more from our machines should be considered as an understatement. With the advent of G5, this trend will accelerate and enable all new kinds of devices (IoT) requiring even more storage and services. Therefore, such a niche market should continue to prosper over the years.
June 23, 2019
The following Quantopian post was to comment on the following: “There is such a thing as skill, but my read is that proving it might take a lifetime.” To which I agreed and added:
That kind of study has been done. It turns out it would take some 38 years for a professional money manager to show skill prevailed over luck at the 95% level based on sufficient data (10 years and more). No one is waiting or forward-testing for that long. And even if they did, they would again be faced with the right edge of their portfolio chart: uncertainty, all over again.
June 11, 2019
The following was posted in a Quantopian forum where the discussion was dealing with the impact of clustering using multiple factors in multiple strategies.
Let's try to operate with 40 different strategies with 40 factors each and see what would be implied in such a portfolio. At stake would be 400M in capital, and a single strategy could be considered as either a source of portfolio alpha, a profit factor, a contributor to overall performance and be weighted accordingly.
May 26, 2019
The following was posted on a Quantopian forum where I sometimes participate.
We should separate the problem into two parts. One for selecting over historical data and one where the data is forthcoming (some future data). These two will turn out to be quite different problems. Simulating the future should be viewed as either a walk-forward or some form of paper trading. Both of which do not produce any money and therefore are just other forms of simulations. You could paper trade for years if you wanted to. But, in the end, you would still find yourself at the right edge of a price chart with an unknown future.
May 19, 2019
My previous to last post ended with a question: “has anyone here using the given strategy, with no change to the optimizer, found a way to reach the 50,000%, or 100,000%+ total return mark using the same initial capital, the same stocks, over the same 14-year time interval?”
I opted to make a new simulation based on the last reengineered version of that program (ver.: DX-08) using the same 14-year time interval with the same initial capital.