AI's Leap into Stock Predictions: A Love Story or a Tragic Tale?
Are you seeking a pot of gold in the stock market? Strap in for a wild ride as we explore investment strategies and AI success rates.
Hello adventurers!
The past two week have been a treasure trove of lessons and failures for me.
A real Edisonian weeks!
The results: It got me thinking about another secret passage I might explore. But let’s start at the beginning.
How it all started
Do you ever find yourself asking if AI stock price algorithms are just smoke and mirrors? Or if financial fundamentals are like the mysterious X on a pirate map?
Maybe you’re baffled by the Bermuda Triangle of different investment strategies out there. Well, these questions are like a mischievous rabbit hole and guess who hopped right in?
You got it - this explorer did!
That’s why I went missing in action last week. But I managed to burrow my way out of the warren to share my current finds with you.
If you’re new here, a warm welcome from my side! If not, you know what to do.
I’m Michael, your friendly stock guy, and I’m on a mission to make stock evaluation as easy as choosing your favorite ice cream.
Last year, I embarked on a wild journey to create a program that does the heavy lifting when it comes to stocks. Curious about my wild escapades? Read the full story here.
Let’s move on.
Picture this - you’re enjoying your morning cappuccino. The door is open and you here the birds cipping. After another tasty sip, you lean back and hit play on a YouTube video, and poof! It’s suddenly dark outside. A whole day disappeared faster than a coin in a magician’s hand.
Sounds familiar?
How I got there
If you’ve been following my journey, you know I’ve been dabbling with AI. My Yoda Patrick, the tutor, gave me a homework assignment on stock price predictions. This assignment took me on a whirlwind tour with a deep learning model called LSTM. What’s LSTM, you ask?
Imagine it as an AI oracle. It can predict future events, but it’s a bit better than a fortune cookie.
How are the results?
This is Tesla for the last year. The red line is the prediction. The blue line how it really was.
At first blush, the results seemed to sparkle like a gold nugget. But a closer inspection revealed it was just fool’s gold.
Why?
Because it was trying to predict the future but mostly got it wrong, like a weather forecast promising sunshine on a rainy day. And it’s lagging most of the time, what’s pretty bad for a prdiction.
Go one more
How I got there.
Enter the superhero of optimization - GridSearchCV. It’s like an AI DJ. It fine-tunes the parameters (music clips) of the algorithm to create the perfect mix. This DJ does all the heavy lifting, so I can sit back and enjoy another cappuccino. This strategy sounded cool, right? The results is the pic above.
To do this GridSearcgCV I used this code.
Go one more more
I wanted to be an overachiever and also did this. I wanted to know which inputs are the most promising. Like a chef adding too many spices, I fed it with a boat load of data. I used a methode called RFE (Recursive Feature Elimination), think of it as a smart filter that discards unnecessary noise.
Here is how it looked like.
That’s the data I gave it (no, not just 5 rows)
I asked the RFE to look for the strongest supporter of the close price.
This was the RFE result.
I thought I had struck gold again, but sadly, it turned out to an empty nut again.
The end result?
I learned, more data doesn’t always mean better results. The resulting prediction was crap :-)
So I'll spare you that picture.
Who knew?
Conclusion Part 1
One thing we've learned is that AI, while impressive, it’s not infallible... at least not yet. I myself might be the biggest bottle neck right now because of my level of understanding.
Our digital pals may have superhuman processing abilities, but their prediction prowess is currently more akin to a wild guessing game than a sure-fire oracle. That was at least my take-away for now. It shows clearly, that when we put shit in, only shit can come out. So, with all the AI out there, your sound background knowledge is still needed. Otherwise AI stumbles and falters, and is most of the time, as wrong as a reversed compass or the so called stock-gurus.
Yet, let's not be too quick to judge. After all, even the greatest minds in history weren't born perfect, AI is still in its early stages. It's a wild stallion trying to find its footing, a fledgling bird learning to fly. It's still testing its wings, still learning to soar.
AI is a work in progress, growing and evolving, just like us. It may not be perfect today, but remember, it took humans thousands of years to get to where we are. Who knows where AI will be in a decade?
The potential nevertheless - is fascinating.
There is more
While I was busy with AI, I had an encounter a while ago with Joel Greenblatt’s “magic formula.” Woohh.
Greenblatt isn’t just another financial guru - he’s a real Wall Street wizard who made a fortune with his investment strategies. His magical concoction revolves around the ROIC (Return on Invested Capital) and earnings yield.
The basic idea is simple: buy excellent companies and enjoy great results. Sounds like a fairy tale, doesn’t it? But he swears it’s true. The formula consistently beat the market with returns of 15-20% per year. Now I want to know if this potion still holds its magic in today’s market. I have a bunch of stock data to back test it.
Stay tuned and find out!
Progress:
Dove into the icy depths of deep learning.
Rewrote chunks of my prototype like a skilled baby craftsman.
Attended a sales and marketing workshop in London. Unfortunately, the workshop felt more like a sales pitch than a learning opportunity.
My workout routine is going strong, though I have to give my protesting shoulder some rest.
Plans:
Keep improving my prototype.
Get lost in two new books and more research.
Conclusion Part 2: Where is my head?
The stock puzzle I’m solving just got a lot bigger and more complex. I’m constantly wrestling with the question: is there still magic in these “old” techniques I’m learning and using. Yes - but there is but.
Some context. I made an evalutaion on Google roughly 2 month ago, bought it and made a good 20% profit on it and I’m happy.
But there are companies in my portfolio that don’t perform that well although the evaluation was fine as well. The basic principle here is, the market will find out, it might just take a while. I’m used to that. In the meantime, there is a way how you can improve your performance, because even with using my “old” techniques I’ve improved my performance a lot. But not as much as I want to - at least not yet. That’s why I started all this.
Because here’s the truth: a lot of so-called “experts” are losing money faster than a gambler at a Vegas casino. They just don’t tell you about it because it’s as embarrassing as forgetting your lines at a concert and - you are the artist. If they knew what the “market” was really up to, wouldn’t they all be zillionaires by now?
I’ve realized that when you dig deep, you uncover inconsistencies or conflicting opinions. It’s like reading two different stories about the same event. It leaves you scratching your head and wondering who to believe. So, fundamental analysis and macro views are just parts of the puzzle.
If 90% of the market players are losing money with these techniques, maybe the golden strategy is to do the exact opposite of what they’re doing. It’s like standing on your head to get a new perspective.
That’s what I’m investigating next like Indiana Jones. I’ll keep you posted.
Until our next thrilling meeting, keep learning, keep exploring, and keep in mind - appreciate every sweet and sour moment of your day!
Michael
Disclaimer:
The information in this article is my personal opinion. 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. They are no rules set in stone, like the rules of physics.
Therefore, use the contents of this newsletter at your own risk. Investing in the stock market can always lead to a total loss of the capital invested.