Home » Build a Stock Portfolio Programmatically: Cut The Noise

Build a Stock Portfolio Programmatically: Cut The Noise

This article shows how I’ve used our models to build a stock portfolio in 2020 based on the FMP API data. For this recipe, you need a couple of ingredients! Ideally: (1) a market crash with media spreading fear, (2) companies with outstanding fundamentals and (3) irresponsible quantitative easing. Mix all of them. Wait 2 years. Open your stock broker. It’s ready! Enjoy!

1. The situation in March 2020

In March 2020, the world collapsed and I remember being in a panicked state reading dramatic articles from journalists suggesting that we would enter a never-ending recession.

If you were invested at that time, you surely remember where you were and what you were doing when you saw THAT for the first time:

I was mostly invested in stocks that year and was sitting on consequent losses after that drop.

2. The logical investment choices at that moment

When your investments lose half their value in a couple of days, it really feels like a K.O. But you know, in your inner-self, that it is the right moment to invest more. Buying price is THE most important parameter for performance like we show with our learning trees model.

So I tried to take it rationally and put my money where my mouth was. Our first supervised learning model for stocks was a great candidate for that, giving performance regions for stocks in blue. It basically shows that companies with very low debt-to-equity and high net margin outperform:

I thought that tech and fashion were a good choice of sectors as these are full of blue chips. Also I thought a mix of European and American companies would make sense as I had no clue where the pandemic would hit the hardest. As a result, I came up with a reasonable set of companies in the performance areas:

See also  Decision Trees For Investment: Spot Key Financial Ratios

Leading to this portfolio which was equally weighted (“The Altcoin Oracle” was previously called “Stockomatics”):

The magic of this stock portfolio is that it looks common. No exotic penny stock, no leverage, no insider information.

3. The performance of this portfolio in 2020 and 2021

These stocks, solely chosen based on data and statistics, outperform indices drastically:

The only investment that performed (way) better than this is my crypto portfolio. Real-estate, commodities, bonds are just out of the equation and can’t compete.

3. Conclusion and perspectives

To summarise all of this, let’s keep it simple: media control the narrative and have an influence on markets. You can use that to your advantage. Because the rules are so systematic (recession=exaggerated fear=irresponsible money printing), buying top assets during dips has never been that rewarding as they are the ones bouncing back higher. Moreover, most companies are zombies. They’re full of debt and dependent on the never-ending low-interest system. If they have any sort of connection with the public sector or states, they’re dangerous and can explode anytime. In a world full of debt money, we want no debt. In a world of flattening returns, we want high net margins.

Be paranoid. Be selective. Cut the noise.

Take care, Clem

n.b: For more, check our other article on programmatic portfolios

Disclaimer: This is NOT financial advice and I still own all the stocks listed in this article.

Related Posts

Leave a Comment