Welcome to the World of Surprises: Where Every Problem Breeds a new Solution
Follow me into a day where unexpected data behavior turns into opportunities for another code improvement.
A warm hello to all new readers! I’m glad you are on board.
New here? I’m Michael and on a mission to make beating the stock market as easy for you as choosing your favorite ice cream. I write an algorithm that does exactly that.
How it all started. The journey so far.
Let’s get straight to the meat.
Behind the Scenes
Guess what? You’re not gonna believe this, but I leveled up my code again and gained another important experience point. Here is what happened. Companies issue quarterly reports and annual reports. Analysts usually work with quarterly reports. That way, they can create a “real-time annual” report on a rolling basis, and so do I. So far, so good. But I hit this funky hiccup. In very rare cases, these numbers can be quite weird.
At first glance, I spotted what looked like a classic bug in the raw data. “Found you,” I thought, ready to squash it. But then I slowly realized what was really going on when I took a second look. After diving deeper, it got clearer, and I discovered the true reason.
As we all know, we all make mistakes from time to time and if you are a good company or a good human, you correct these mistakes. It’s all about owning those mistakes and setting them right. So when publicly traded companies are wrong with their financial statements, they issue a new SEC filing and correct the quarterly report with the right numbers. And they keep the original data in the raw data, to stay transparent and to make back testing even more realistic. Again, fortunately, this happens pretty rarely, but it happens.
And when you don’t teach your code, it behaves more like a naïve baby trying its best, ending up doing funny things. Now, my code, bless its heart, also tried to be helpful and ended up adding the duplicates instead of ignoring them and messing up the calculations in these rare cases.
A classic corner case, but still a little face-slap moment. So, to dodge this bullet in the future, I’ve now armed my code with a reference date to stay on track, no matter what. This also earned a spot on my ever-growing “lessons learned” list.
But, that also means, I have to restart my entire training again. This might sound awful, but it’s not the end world at all, because I have other good news as well.
In fact, it’s kinda awesome because I’ve managed to kick unnecessary variants to the curb and streamline the whole training from a whopping 37 days down to just 3.7 days. That’s right, a 90% speed boost!
So instead of poking around in the fog, I now test only what makes sense from a fundamental signal perspective. And those tests I tossed? Not a waste at all. Every test was a signal towards sleeker, smarter testing.
So two other major improvements this week.
What else?
I’ve also produced a couple of cool pics in the last weeks.
Here they are in case you haven’t already seen them.
What else happened?
I got sick. Nothing bad. A cold and a slight chill. It’s just annoying because it sets you back, and that’s why this article is a shorter one.
The Plan
Finally, get the final results. Can’t wait to see them.
What’s on my head
Nothing fancy.
Nuggets I’ve enjoyed
Nothing this week. I just slept a lot.
So, there you have it - my week in a nutshell - faster, fitter, smarter, better code.
Have a great day StockStar!
Hit that heart if you love surprises!
Michael
If you like it, share it, and make somebody happy.
Recommend The Economy Rocket to your readers and friends
I share my stock investment story without sugarcoating – you get the good, the bad, and those tricky ego trips. I'm developing a service with a mix of smart code and proven investment strategies, making stock analysis a thing of the past if you wish. Why? Because life offers so much more beyond the confines of stock analysis.
Disclaimer:
The information in this article is my personal opinion. I’m not a certified investment professional. It is not consulting, nor does it constitute investment recommendations.
I do my research carefully and follow my personal investment strategy.
The stock market is a complex building with its own rules. There are no rules set in stone, like the rules of physics.
Therefore, use the contents of this newsletter at your own risk and do your own research as well. Investing in the stock market can lead to a total loss of the capital invested.
@Amrita Roy thanks for the restack ! 🙏
I really like your diagrams. ;)
I hope you get well soon.