Systematic Strategies and CTAs

How to fight Alpha Decay with the Menthor Q-Score

In this lesson, you’ll learn how to combat alpha decay using the MenthorQ Q-Score, a factor-based machine learning model designed to give retail traders institutional-grade insights. We’re joined by Jason from PI Quant News, who brings 25 years of capital markets experience, to explore why traditional technical indicators lose their edge when everyone uses the same tools and data.

The Q-Score analyzes four key factors to help you understand market conditions: Options Activity, Volatility, Momentum, and Seasonality. Each factor produces a score that indicates bullish or bearish conditions. The Momentum score ranges from 0 (very bearish) to 5 (very bullish) by combining technical indicators to identify trends. The Seasonality score uses 20 years of price data to forecast the next five days of price movement, ranging from -5 (bearish) to +5 (bullish).

The Volatility score spans from 0 (low volatility) to 5 (high volatility), helping you understand risk and potential profit whether you’re trading options or directionally. The Options score ranges from 0 (very bearish) to 5 (very bullish) and serves as a sentiment indicator for market direction. Understanding these scores gives you the same factor-based analysis that hedge funds use, rather than relying on widely-available technical indicators that everyone else is watching.

You can use the Q-Score to confirm your existing strategies, identify seasonal patterns, and determine optimal times to buy or sell options premium. For example, Tesla’s option score showed predictive spikes that aligned with major price moves, including the day when Elon Musk and Trump were tweeting on X. Even if you entered a day or two after the signal, you could have capitalized on these massive moves. Rather than just looking at whether a score is high or low, it’s crucial to understand the change in the score—a score of 5 might indicate you’re at the top of a move, not the beginning.

To get started, create a free account and access the documentation under our guides section. Click on products, then Q-Score to view all available information. You’ll find the Q-Score at the top of the dashboard showing all four factors, with time series charts you can overlay with price data to conduct your analysis.

Video Chapters

  1. 00:00 – Introduction and welcome with Jason from PI Quant News
  2. 02:51 – The importance of data-driven trading environments
  3. 04:04 – Understanding edge and alpha decay in markets
  4. 06:51 – What is the Q-Score and its four factors
  5. 09:40 – How hedge funds use factor-based strategies
  6. 12:28 – Practical Tesla example showing predictive signals

Key Takeaways

  1. The Q-Score provides institutional-grade factor analysis across Options Activity, Volatility, Momentum, and Seasonality to combat alpha decay
  2. Seasonality uses 20 years of price data to forecast the next five days of price movement with scores ranging from -5 to +5
  3. Understanding the change in score is as important as the absolute value to avoid entering at market tops
  4. Traditional technical indicators lose their edge when everyone uses the same tools, making factor-based models essential for finding consistent market mispricings
Video Transcription

[00:00:00.07] - Speaker 1
Sam.

[00:00:41.02] - Speaker 2
Good afternoon, everyone, and welcome back to our new session for today. And very excited about this one because I think we are here with special guests. We're here with Jason from PI Quant News. Welcome back, Jason.

[00:00:56.10] - Speaker 1
Thank you. It's great to be here. Great to see everybody.

[00:00:59.11] - Speaker 2
Yeah. And I think, Jason, we were like, and we were live was probably like two, three months ago, and I think we partnered together in this kind of collaboration because I think we share kind of like the same interest about data. And for those who don't know you, maybe if you want to introduce yourself and share with us what you do, and also people can find you at Piquant News as well.

[00:01:23.15] - Speaker 1
Thanks, Fabio. Sure. So I've been in the capital markets in some capacity for probably 25 years. I was a hedge fund trader, portfolio risk manager. I was a credit quant, market risk quant. But kind of the common thread across that entire 20, 25 year journey was writing code. When I just started, it was C C, and then it was MATLAB, and then for the last 15 years or so, it's been Python. And with Python, we can do a lot of stuff. And a lot of the stuff you're seeing on the screen here today that Fabio is showing, we're going to talk about what the implications are of that, obviously the markets, but then how to use Python to kind of put this all into context. So for Pyquant News, I spend a lot of time publishing free content on how to use Python for algorithmic trading, how to take your discretionary strategies, how to convert those to systematic strategies with Python. And I aim this all towards beginners. So a lot of the, you know, the trading set and the finance people, they didn't grow up writing code, they grew up studying the markets. But it's a super important tool in your tool belt.

[00:02:30.13] - Speaker 1
And Piquant News is all about helping folks get up and running with Python for quant finance. That includes algorithmic trading, market data analysis, options, pricing, et cetera. So go on to piquantnews.com, check it out. There's a free newsletter which I recommend Everybody checking out. Free 155 or so issues. The next one's coming out on Saturday. Thanks, Fabio.

[00:02:51.23] - Speaker 2
Yeah, absolutely. And I think, yeah, for, for those who haven't signed up, like, guys, just access this because it's really amazing content and it's, it's free, of course. So if you want to learn how to code and learn Python, I think it's a very, very great resource. So today we're gonna spend some time looking at the importance of data and together with you, Jason, we can look at how to use some of these tools and some of these backtesting results and what does that mean for the audience. So we're going to talk about the Q score and why we built it and how you can then use it to potentially think about a systematic strategy. But before we do that, I think it's important to understand that the market is moving more and more towards the data driven environment. Right. So we see it every day. Data is everywhere and data can really help us gain an edge in the market. And I think maybe, Jason, I want to, I don't know if you maybe can explain this. Why is this important? We always talk about the concept of alpha decay and when, when people use indicators that are widely used in the market, why there's no hedge behind it and what does it mean for, for traders?

[00:04:04.07] - Speaker 1
Yeah, it's a great question. I get that, I get that one a lot. So this kind of word, edge, it, it kind of means everything and nothing at the same time, but we all know it's super important. So the way I think about Edge is it's a consistent mispricing in the market that you can detect and take advantage of. Right. So we all know that information is pretty much priced into the market immediately. As soon as Tesla earnings come out, you know, within microseconds the stock has reacted to the announcement and you can't get Edge trying to get between that. So Edge is all about finding a consistent way to exploit a mispricing in the market in a statistically significant way. And I promise I won't get any more technical than that. But if you remember your T score from like your very first statistics class, that's a good way to think about it. And Edge is really the ability to consistently make profits in a non random way. And the problem with a lot of the technical analysis, you know, I'm not a big fan of technical analysis, is that if everybody's looking at the same indicators and everybody has the same MacBook Pro and everybody has access to the same data and everybody has access to Trading View or even, you know, Python, everybody's squeezing out the exact same inefficiency.

[00:05:25.09] - Speaker 1
So there's very little Edge left for anybody. Which is why we like to use things like the Q score, which is what we're going to look at today, which is a factor based analysis and then we can actually measure what's called alpha decay, which we can get into in a little bit.

[00:05:39.15] - Speaker 2
Yeah, And I think it goes back to when I was selling data to large hedge funds. They were always looking for an edge and they were looking at data sets that were uncorrelated with what they already had. So they were trying to discover alpha in some other ways from the traditional data and also the, the statistics. So the back testing was very, very important. So today we're going to talk about a little bit about this and then we're going to talk about some back testing results. So before we start, I think let's start with what the Q score is. So if you guys come under our guides, this is available for everyone. You just need to create a free account and you can access all our documentation, click under products and Q score and then you'll be able to access this. So we basically created the Q score to create the beginning of our factor based machine learning model that can help you understand what the asset is and are we in a bullish or bearish environment by looking at different factors? So when we open the dashboard we have the Q score is at the top here and we look at four factors.

[00:06:51.05] - Speaker 2
Option, activity, volatility, momentum and seasonality. The score basically we're going to go into each score basically is broken down by a number that goes typically from 0 to 5, where 0 is a very, very bearish score, 5 is a very, very bullish score. So here we have our momentum score. We have a 0, 0, which is bearish momentum, 5 is a bullish momentum. Then you have the time series of, of that score, which is what you see here. So essentially here I'm opening Tesla. I have my option score, this is the last three months of option score data and then you can overlay that with the price. So we're going to go into some interesting analysis there. Momentum looks at price action and combinates a series of technical indicators to understand if we are in a bullish or bearish trend. Seasonality is using the last 20 years of price data to forecast the next five days of price movement. So this is an algorithm that our quants develop to use past data to potentially forecast the next five days of price movement. Seasonality score goes from minus 5 to plus 5. Minus 5 is a very bearish seasonality.

[00:08:08.05] - Speaker 2
0, no seasonality 5, bullish seasonality. Then we have our volatility score. It goes from zero, which means we are in a low volatility environment, to 5, which is a high volatility environment. Why is that important? Because if you are trading options or if you're even trading directionally, understanding if we are in a very high or low volatile environment can help you understand your risk and your potential profit. And then finally the option score, which again goes from zero, which is very bearish, to five, which is very bullish. And here we can see that. So, and then let me do a question, Jason, at any time. So why, how can we use this? So we can use the Q score to understand if we are in a bullish or bearish trend. So if you already have a strategy and you need some confirmation, we can provide that. So let's say that you wanted to go long a stock. You could use the Q score to understand if that data confirmed your analysis. You can also use it for looking at seasonal patterns. So leveraging our seasonality score and we're going to go into some backtesting results.

[00:09:16.18] - Speaker 2
And then of course, if you are trading options, you're selling premiums, you could use our volatility score to understand if it's a good time to buy or sell. And again, the option market typically is a sentiment indicator of where the market is looking to go. So using the Q score, using option can help you really understand where the market could be and what are the key levels to respect.

[00:09:40.18] - Speaker 1
Yeah, and Fabio, this stuff is super important. And I think you talked about edge most. I mean, I would, I would argue most retail, non professional, non hedge fund people don't really get access to this kind of thing. And I hate to, you know, say it's like secret information, but it's. This type of scoring is exactly what the funds do. They're, they're not running technical analysis strategies. I can guarantee you that. They don't have. I mean, some proprietary firms do that where they give you a seat, they give you a Bloomberg, they give you a trading screen, they give you some capital and they say good luck. But the failure rate of those folks is pretty high. The funds are not doing that. The funds are building predictive factors like what you're looking at here. And they're always composed of things like, you know, other markets, either options, even FX interest rates, depending on how sophisticated they get, some, some sort of volatility with options, obviously because of high volume, you're paying a lot of money for those options. Right. And if you're in an options buying strategy or you're getting net debit options, then you need to know that because you could be paying a premium for that improved volatility.

[00:10:46.27] - Speaker 1
There's also, maybe we'll look at this in the back test, Fabio, but there's, you know, these regimes, there's High volume regimes, low volume regimes. And if you're trading a systematic strategy, you want to be trading the right strategy for the regime you're in. So if you get some very binary score like lower high volatility and somebody like Fabio puts all this together for you, it's great because then you don't have to worry about all the nitty gritty nuts and bolts. You just say low vol, high hall and then you adjust your strategies accordingly.

[00:11:16.15] - Speaker 2
Yeah. And I think it's important also. And then I'm gonna show you not only the back test power, so we have built some screeners around it. So I think it's not only important to look at the value. So, oh, we are in a four or five option score is very, very bullish. It's also important to understand the change because we could be in a very, very bullish trend, but they, we could be at the top of the market. So if you are, you know, thinking on going long just because the score says we're at the 5, then maybe like you're not looking at risk in the correct way. But if we start looking at the charts, this is like the option score for Tesla for the past three months. And take a look at these kind of spikes in the score. Right. These are like all predictive of this potential move. So you could have used this score to potentially predict, even if it's not exactly the same day, even if it's a day or two later, you could have still capitalized on these massive moves of the underlying price. Right. So here we see this was the day basically Elon Musk and Trump were tweeting on X.

[00:12:28.14] - Speaker 2
The market went super bearish in one day and then went back super bullish on, on another day. So basically, capitalizing on this kind of tools can help you potentially look for the direction. So as you can see, the option score went here from zero to four in a matter of a day. Suddenly we see a massive start of a big trend. I think this is like 30 to 40% return in, in this over here. Just this move was a 20 return I think was from this price action here.

[00:13:03.27] - Speaker 1
I love the approach with the options market. You know, they say that the bond, the bond traders are the smartest, but then close second are the options traders. Because it's all, you know, it's, it's like everything is our arbitrage, everything's mathematics. There's very little room for emotional, you know, emotions in the options market. It's literally all models, right? So you get this like, really, really strong source of information that can often predict moves in the, in the stock market because you've got, you've got the, the options market makers being very smart in the market and, and, and, and, and if you can extract that information of the options market and then apply that not only in say the stock market and the underlying, but in a score based like what you're seeing here. It's, it's great, it's just such a, it's such a potent tool for the tool belt for, you know, non professional traders like us.

[00:13:57.23] - Speaker 2
Yeah. And then basically we're going to go into backtest, but I want to show some of the screeners. So if you click on the screeners here. So first of all we can screen for the highest score and the lowest score. So obviously, hey, if I want to find for bullish ideas then maybe I can screen for the ICE Q score. So as we can see we have our Max 7, our SPX and we, we get the list there. So these are the score, this is our volatility score. So you can filter out. So you might want to look for high option score and maybe high momentum score as well. So we have for example Roblox that is not only high on option, is also very high on momentum and is relatively high on seasonality. So you can kind of compare the four there. But that this is very important. So again I want to see potential bullish ideas or bearish idea. But the more relevant I think is really looking at the delta, so the change in the score. So here what we're showing you is the highest increase versus the previous day of the option score.

[00:15:05.05] - Speaker 2
So for example, if we click here we see companies like Macy's that had five points increase in option score. So that means that two days ago the option score was zero. So very, very bearish. Now it's five, very very bullish. We have Norwegian, we have Chipotle, Adobe. Right. So again, understanding the change could be very key. So in a matter of one day the score went from very, very bearish to very, very bullish. So how can we capitalize on this and how can we understand what the market could do by looking at the data?

[00:15:43.23] - Speaker 1
And when we start talking about Python, right, you get access to this curated, clean, high quality, unique data set for Mentor Q and you start to use that data with some of these tools like Python and you start to plug that into say the back testing libraries. And I know there's a back testing screen here that we'll see in a second, but there's also back testing frameworks within Python that you can start to use. And what you're seeing here is great if you're not a programmer, but if you start to move into development with, with Python, for example, you start to pull this data in and you could start to do very, very unique and interesting things. So with that screener, for example, you can take the top, you know, X number of assets that pass the screener and you can build an optimized portfolio of assets or stocks that say, are all the top bullish factor scores. And that's actually how the hedge funds do it, right? They, they will split, they will take the entire universe of assets, say there's thousands of these things, and they will rank them from highest to lowest, they'll go short the lowest rank and, and they will go long the top ranked.

[00:16:57.02] - Speaker 1
Right. So you're long like a portfolio of five or 10 stocks and short a portfolio of five or 10 stocks. And you're essentially market neutral because you're long and short. So you're kind of dollar neutral. It's a very, very great, very good way to, for retail, non professional investors to get an edge in the market. And then we're going to talk about alpha decay. Fabio. Hopefully I did this in matlab at JP Morgan, like, you know, a life. But you can actually start to measure your edge, you can quantify your edge. Not many techniques can actually quantify the edge. And we could talk about that a little bit later when we look at the back testing stuff.

[00:17:35.03] - Speaker 2
Yeah, and please guys, let us know if you have any questions. But basically if we go back to the screeners, we have screeners for every score, so we can see for example, the highest change in seasonality, the highest change in momentum volatility. So again, why is this important? Because if you are an option seller, you might want to look for potential trade ideas. And of course, if you're selling premium, you want to look for assets that are experiencing a high volatility. Right, because you want to get more premium. And, and you are betting that the volatility would go lower. So here you can see for example, how the volatility score has changed on different assets. So we can do that for momentum, we can do that for seasonality. Very, very, very easy. I think what we're going to do now is let's go into some backtesting. Okay. Like how does this work? How does this perform historically? So if you come back to our documentation system and our guides, we can go back into the section called quant strategies and just click on strategies and we have five different strategies and we can go over a few of them or maybe all of them depend on on time.

[00:18:51.14] - Speaker 2
But basically let's start with our seasonality strategy for ETF trading. Right, so what did we do here? And then Jason, maybe you can comment on other how that looks like in terms of how the data looks like. So essentially here what we are doing, we are taking the seasonality score. Here we explain what the seasonality score is. Let me put this into also the chat in the comment. And basically we also take an asset universe which is really looking at macro, macro assets. So ETFs that are mimicking like a sector or like an asset class like oil and so on. And basically these are the entry and exit conditions. So we look at the ETF with the highest seasonality score that must be greater than zero, greater or equal to zero. If multiple ETF have the same score, we select the one with the highest average return over the past week. So we look at the ETF that had the best return and we choose that over the other one. We would buy at the market open. So this is like a one day holding period and then we would sell at the market open the next day.

[00:20:07.11] - Speaker 2
Unless again the same ETF is at the top rank of our pick. And then in that case we would just keep the position and just roll it to the next day. If there's no ETF that meets any criteria, no position is taken. We also counted a commission of $2 per trade. And the back test goes from January 2014 to January 2025 with the initial capital of 100,000. We're going to, going to go and look why that is important. Here you see the, the performance. So here you see the strategy versus the spx. And then here and I'll let you comment on this Jason, you see the different metrics?

[00:20:47.05] - Speaker 1
Yeah. So when we talk about back testing, if you go out to my website and you start reading through my content, two things that I rag on a lot. Number one is technical analysis. Number two is you know, this like why people think or, or the typical way people think about back testing. And while we're talking about edge, right, we talked about edge being this kind of consistent non random profit. And you know, most people will come in and think backtesting. Okay, let's run a back test. Let's optimize a bunch of input parameters until we get a positive P and L and then let's go trade those parameters into the future. The problem with that is that you will generally overfit to Noise, right? That's why technical analysis is so dangerous when you have this powerful system is because you're just overfitting to noise and then you're trying to trade a random pattern that will never appear again, right? So two things that backtests are good at. Number one is to help you assess the statistical significance of your strategy. That is, do you have edge or are you just getting lucky? Which is typically the case with, with technical analysis.

[00:21:58.16] - Speaker 1
The second thing is what you're looking at here is how do you assess the risk and performance dynamics of a strategy? And the idea here is this is what you could potentially expect if you were actually trading the edge. Okay? If you actually had the edge and you were statistically significant and you were not just getting lucky, that's super important because none of these metrics mean anything if you are trading a random pattern so quickly going through here, what you're looking at here is basically, and Fabio is doing this the right way, which is comparing a strategy against some benchmark. Another one of my, my sayings is if you can't beat the benchmark, you may as well just invest in the benchmark spy, because it costs money and it's a lot of stress and there's opportunity cost, right? So this, this is handily beating the S and P by, you know, 2,000 basis points. The KEGR is the annualized return. So this is what you might expect on an annualized basis. So 11 per year. Compounding, the Sharpe ratio is a, is a really good risk adjusted metric to tell you it basically annualized returns divided by volatility.

[00:23:07.26] - Speaker 1
And the way that you can think about this is how much return do you get for every one unit of risk that you take? And, you know, 0.76 is a very respectable sharp ratio, right? Anything around 0.5 and you start starting to take on too much risk for the potential strategy. Sortino ratio is very similar to the Sharp, except it just covers downside returns. The max drawdown, that is a, that is, you know, if you start with 100k and you immediately go into drawdown, you're down 45%. So your 100k turns into what, 65k or 55k in, you know, some amount of time. And typically with a strategy, you will get a larger draw down than the S and P. Right? But it's just something to track volatility. Again, it's just a bit above spy. So it's really respectable. 24% annualized volatility is, I mean, I think Tesla is like 60, 70% right. Just for, for kind of, for sake of comparison. The beta is the sensitivity against the benchmark. So for example, 0.48 means that for every 1% the S P goes up, this strategy goes up 0.48%. So you have kind of this low beta strategy which in other words is non correlated.

[00:24:30.23] - Speaker 1
Okay. It's, it's not correlation in the sense of statistics, but it's, it's not going to be, it's lower sensitivity than the underlying the benchmark. And alpha, that's the important thing. Right. So 12 basis points of alpha. This is kind of the holy grail. This is the gold that we're looking for. So if you are to compare the S and P to the strategy, you actually have so called outsized returns. And the outsized returns are generated through the factor. Okay. That's the concept here. So the factor is generating outsized returns above and beyond the benchmark. Win rate is great. So you want to be, you, you want to be winning more than you're losing at least half which you, you see here. And then as far as the months go, you're, you're up 64 of your total months, which is great.

[00:25:19.19] - Speaker 2
I think to add to that, Jason, if we look at beta and alpha, those are the two metrics that when large funds are looking at data, they assess. So they want data set that has a very low beta to what they have. They want to find returns in something that is uncorrelated to something that they already have in house. And then they want to generate more alpha. So the data set has to have a very low beta and a very high alpha. And the data set that provides the beta best of those two factors then becomes something that they would then implement into their strategies.

[00:25:58.10] - Speaker 1
Yep. Yeah. You know, I want to go back about this correlation thing. It's not actually correlation. We're talking about a linear regression here. Literally the linear regression and the beta coefficient is the sensitivity of the, of the portfolio returns to the market. So it's not actually correlation. But what Fabio is saying is correct. They look at this data sets that are not sensitive to the underlying that also has this kind of alpha intercept. And that, that's exactly what we're seeing here.

[00:26:30.16] - Speaker 2
Yeah, because they, if they already have some data that can give them a certain amount of alpha, they don't want another type of data that is very correlated to that data set.

[00:26:39.05] - Speaker 1
Exactly. Like Seth said another way, if beta was 1 and alpha was 0, then they would just be, look basically looking at S&P5,500 data there'd be no difference. They may as well just look at that data and you'd have your returns and all your Sharp would be very, very similar to the underlying.

[00:26:56.03] - Speaker 2
Yeah, absolutely. Okay, so this was one of the strategies and then we can go back and look at.

[00:27:05.17] - Speaker 1
You know what else I love about this is it's so simple. That's the, that's the common myth is to build these strategies you need some like hyper complicated thing which. Whereas this is just like pick the top, you know, the top ranked score and buy it basically.

[00:27:19.29] - Speaker 2
Yeah. Then Here we did one just looking at max 7 but we combine momentum and seasonality. Max 7 was the universe. And then again stocks with the seasonality greater than zero and momentum score greater than three. And here you can see basically the entry and exit condition. Same thing, five years or six years of history from 2019 hundred thousand dollars initial capital. And then basically this is kind of like 7 versus the S P. This is the cumulative return. And again this is just looking at the return of this asset. Yeah.

[00:28:09.23] - Speaker 1
Same same conversation. We don't have to. Wow, this one blew it out, huh?

[00:28:13.20] - Speaker 2
Yeah.

[00:28:16.05] - Speaker 1
The Mag 7 is, it's a winner. Yeah. So this one, the Sharp is even better. 1.4 sharp is, is really terrific without that much worse of a drawdown. I think in general people always ask me also about the drawdown. It's. This is one of those where it's not a hard fast rule about what's good or what's bad. I know I've known traders that will take, I mean I think there's a trader that win wins competitions that takes like 90 drawdowns which is heinous in my mind. It's, it's really what you're comfortable with. So it's more about heuristics and getting comfortable with what a drawdown feels like. Me personally when I start hitting 25:30 drawdown I start to get super uncomfortable. So the cool thing about these types of strategies that they're a very simp overlays that you can apply. So this is like pure signal, right? There's very simple overlays that you can include or even simple risk management controls to really manage that drawdown. Which is great because you get this great baseline strategy like what you're looking at here and you know based on the back test that the Vol is high 40 Vol.

[00:29:27.10] - Speaker 1
The the drawdown is high almost 50 drawdown and you can then work on implementing you know, risk management controls in a back test framework say within Python or you can use the platform Here to kind of, to work that in. So just a great baseline to start with and then you kind of tweak from there.

[00:29:45.04] - Speaker 2
Yep.

[00:29:48.07] - Speaker 1
But still great win rates. I mean, you're winning 55% of your days and as long as the winners and losers are about the same size, you're doing great. Yeah.

[00:29:55.23] - Speaker 2
And then the other one is again going back on just momentum. So before we look at seasonality, now we just look at momentum for ETF principle, same strategy. And then here you also have the same results. So sharp ratio, pretty high. I think over one is a very, very good result. And then here you actually have lower volatility than the index, which is lower drawdown. Sorry, Than the index.

[00:30:27.15] - Speaker 1
Yeah, this one's great. You know, Fabio, we, we trade a momentum factor as well. And momentum is such a powerful strategy. And it's great because the institutions don't always go after these because they will often exhibit periods of drawdown. Now this is like a 10 year strategy, so this is really good. But they'll often exhibit these periods of drawdown. And if you think about a fund manager, if you were to give a fund manager 100 billion bucks, let's say your pension fund, and they're charging you 2 and 20, so they're charging you millions of dollars to manage your money, if you look up one day and you're in a drawdown for three years, you're going to fire that manager. And momentum will tend to exhibit long periods of low drawdown or underperformance. But over the long run, they perform really, really quite well. So for retail people, ourselves, we get an edge because the institutions have yet to be able to fully exploit all the momentum. And that's why these strategies are really great. And you're kind of seeing it here. This is a really, really good metrics on this. Like a sharp ratio over one is, is really terrific.

[00:31:37.19] - Speaker 2
Yep. And then the last one that we did is looking at futures. So we are looking at future seasonality score. And then we look at mostly ES&Q Gold, ZAN and CL. Those are the one that have expressed a better seasonality. Kind of like alpha on the, on the score. And then again, these are the kind of metrics. So the old imperial is against still one day and then this would be kind of like the return down. Hopefully.

[00:32:25.28] - Speaker 1
Hopefully folks are kind of getting the, getting the picture here. I, I always say that no one metric paints the whole picture. Right. You need to have all of these metrics in the same place to really get a good idea of the dynamics of the strategy. Well, this one really blew it out, huh? I wonder if the, I wonder if that seasonality strategy picks up any volatility as well. If there's like some, some kind of latent, Latent effect of volatility in that seasonality. I don't know, maybe.

[00:32:55.14] - Speaker 2
Yeah. I mean, there's another good example that we can show. So if we go back to. If we go back to the beginning of the tariff situation in February. So I want to show you some interesting use case there. So if we go back here and let's go and look at spx. Sorry if it's a bit slow. Okay, so here we have our option scores. We are March 17, but we are gonna go back in time. We are our momentum score. And I want to bring up our seasonality score. So let me bring it up here. All right, so we have here. So if you, if we go back, I want to go back actually to February. So if we go back to February, this is like at the beginning of the kind of tariff announcement at the beginning of February, and we were still in kind of like above 6,000. We, we were almost, we, we passed the 6,000 levels and we were kind of in this area. So here you see drop, seasonality. This was 1012 of February, right? So massive drop. And then of course, the next few days you start seeing the drop in the price.

[00:34:33.11] - Speaker 2
Combine that with the options score. A few days later, we also see this massive drop in option score. So you had your seasonality score bearish. You had your options score that was bearish. And this would have been a nice kind of like directional trade there. And then of course, you also have your momentum score that went very negative in a few days. So. Let us know, guys, if you have any, any questions or anything to add there. And then question for you, Jason. So how would you kind of like look at Python and creating a model in Python by looking at these kind of factors and data?

[00:35:34.16] - Speaker 1
Yeah, it's a great question. So the way that factors kind of work in the institutions is you're trying to predict forward returns. You're not necessarily trying to predict prices, you're trying to predict forward returns. And if you can find a factor that does a good job at predicting the forward returns, then you can concentrate your portfolio or your money into those stocks or futures that are exhibiting that high level of concentration with that forward return. So in this case, like if you had this Q score, option, Q score, momentum, Q score, seasonality, with Python, you can actually run like institutional grade alpha analysis. And what that basically does is it looks at what is, you know, assuming that you were to go along this factor, how well does that factor predict 5, 10, 21, 63, 126 day forward returns? Okay. And as you know, we were talking about alpha decay. People measure alpha decay in a lot of different ways, but one easy way to think about this is if the factor predicts returns over five days really well, it's going to predict, it's going to predict returns 10 days a little bit less well, 21 days a little bit less well.

[00:37:00.16] - Speaker 1
And the further you go out into the future, the less well that factor is going to predict returns. So that's one way to think about alpha decay. And what that basically means is that the ability of your factor to capture this inefficiency that Fabio has found erodes the further out you look. And what that tells you is how long do I hold the stock? Basically. So it gives you kind of this quantitative way to build portfolios at scale, right? So what you see here is an absolutely terrific way to manage, you know, your signals and the way to think about the market on a name or scanner, you know, a couple names at once. If you're, if you're trying to do this on a portfolio of every single US equity and you're trying to build a portfolio of say like 100 stocks, for example, you'd need something a little bit more powerful, right? You can't just stare at this stuff. And even in Excel it gets a little clunky after a while. So you integrate this with Python and then you have tools in the ecosystem that allow you to run this alpha analysis and allow you to find these concentrations of which are the stocks that are exhibiting the highest level of correlation with these forward returns.

[00:38:15.07] - Speaker 1
Very similar to what the screeners do. And that's exactly how, how I'm using Python for this, for this type of stuff. You, you can, I can go down the rabbit hole on this stuff quite deeply. If you've got questions, put them in the chat. Because I think this is a really, really interesting angle for non professionals, for retail people, and especially because I think there's a myth out there. Fabian, you probably hear it more than me, but you know, people think you plug a bunch of prices into some machine learning model and then out comes profits, which is exactly wrong. It doesn't matter if you've got a deep neural network in some fancy transformer, doesn't matter, it doesn't work, doesn't capture the non linearity and the non stationarity of the data. So the Way that like the professionals will do this is that they will actually use machine learning on the factors. So for example, you could combine the Q score option, Q score, momentum, Q score, seasonality scores into a single model model that gives you a single consolidated score. And then you can rank all your stocks based on that. Right. And you'd use the machine learning to fit the parameters.

[00:39:22.03] - Speaker 1
And that's how professionals are actually doing this. And they're spending all of their time building factors like the Q score stuff that you're looking at, that's what these guys get paid to do, is build these factors. In data science this is called feature engineering. In finance we call it factors. It's basically the exact same thing, but when you, when you kind of move in and start to do the heavy lifting, that's where you need something a little bit more powerful than Excel and where Python can really help. So we got a question, and the question is, what Python library do you use for this kind of analysis and back testing? Great question. You're sending me down the rabbit hole. So I, there's two different types of backtesting frameworks that most, most people don't realize this. There's event based back testing and there's vector based back testing. Okay. Event based back testing, think about it goes bar by bar by bar by bar by bar by bar, like row by row by row. And then for each row you can hook into it and you can do a bunch of stuff. Vector based back testing is when you apply all of your calculations to all the data at the exact same time and there's pros and cons of each.

[00:40:32.16] - Speaker 1
So when I do all of this factor work, I use the Zipline Reloaded ecosystem. Right. This is not to be mistaken with Zipline from Quantopian, which was abandoned in 2022. Okay. Zipline Reloaded was picked up by a guy called Stefan Johnson. He wrote a book about machine learning and trading. Excellent. Dense, highly technical book, but excellent. And it's currently maintained. There's also a tool called alpha lens. And essentially what you can do with alpha lens is what I'm describing here. You can measure your alpha, you can measure the alpha decay, you can do all these predictive factors. So that's what I'm, I'm, I've been looking at this stuff for 15 years. That's what I've been using the, basically for 15 years, those two tools. It's a good question.

[00:41:19.05] - Speaker 2
Yeah. And I think there, I think the one that you mentioned was very widely used until unfortunately was removed. But yeah, I think it's not, I think, easy to have a back testing tool that can fit every, every data set. So I think it's important that you guys use something that can tailor to what type of strategy you are looking to build. So, yeah, we are also like starting to build our own backtesting engine, which is super important.

[00:41:51.19] - Speaker 1
Yeah. And the best advice I can ever give you is to use a back testing framework somebody else built. So Fabio is spending a bunch of time with his smart quant engineers putting together a back testing engine. Just use what it gives you because it's custom tailored for this type of thing. You know, the Python ecosystem, there's pros and cons to that too, Right? So the pros are that it's open source, completely flexible, you know, ultimate level of flexibility. But the cons are that you got to fight with the framework sometimes, you got to get data in it, et cetera, et cetera. So that's not where you should be spending your time. Your time should be researching kind of alpha factors and trading.

[00:42:28.29] - Speaker 2
Yeah, absolutely.

[00:42:31.09] - Speaker 1
So is it possible to show any examples or demo of your analysis using this data? I've got tons of examples using Python on my website, but none using this data yet. Fabio and are working out, not an arrangement, but we're, we're figuring out how to get the data out of his platform and into the, into the back testing frameworks. I actually did do a newsletter, Fabio, maybe I can grab the link real quick. That does use the mentor queue data and it does use Python to back test a strategy on the mentor queue data. Let me find that and then you'll kind of see how this stuff works in real life. And I'll post the link in the, in the chat here. Just give me a, give me a second.

[00:43:11.29] - Speaker 2
Yep. And I can open it up.

[00:43:14.11] - Speaker 1
Cool. Yeah, it's going to take me a minute. So if, if there's any other questions from the audience while I look, look at this. It'll take me a second to find it. Ah, here. That was quick. So here's the link if you want to open it up. I can kind of demonstrate how, how we used the mentor queue data to actually run a backtest. Now this is super simple. This is not a back test using the full kind of framework. That's what we're working on, but it is an example of how to use this really powerful data that you can get plugged into here.

[00:43:53.01] - Speaker 2
Can you share it with me, Jason, via WhatsApp or via the chat? Because put in a private chat.

[00:44:00.22] - Speaker 1
Sorry, I Put it into the comments. Did it show up in the window?

[00:44:05.02] - Speaker 2
Perfect. Okay.

[00:44:08.25] - Speaker 1
So this one is using the. Not the Q models, but this is using the Gamma levels that Munsor Q is famous for. Right. So if you scroll down, you kind of see that we're calculating Gamma and we're figuring out what levels of Gamma are generating signals. And I try to reverse engineer a little bit about what Fabio is doing under the hood. I'm just aggregating of Gamma at strikes. I don't know if he's probably doing something more sophisticated, but what you see is essentially these levels where Gamma is kind of the net. Gamma is like high basically. And I wrote a bunch of code to do this, but you get this stuff for kind of free for Mentor Q. And that's the way to do it. You get the data and then you just build the strategies. But this is giving you example of how to put this stuff together. Actually there's another one that's better that actually shows how to use the data. That's not the one I was thinking about.

[00:45:05.03] - Speaker 2
Yeah.

[00:45:13.08] - Speaker 1
I'll look for that too while we're at it.

[00:45:24.20] - Speaker 2
Is a good question for you as well. J. So now people are using generative AI for data analysis. Can we combine machine learning with Geni to take it to the next level to find the edge?

[00:45:44.13] - Speaker 1
You got to remember that generative AI is a language model and generative AI is made up of. Nowadays the modern gen AI is made up of a lot more than just a deep neural network. Right. There's a deep neural network that creates the pre trained transformer architecture. But then on the back of that there's all sorts of reinforcement learning that fine tunes the training and the post training step to kind of give you your answers. What Gen AI is really good for is generating ideas. It's not at least right now going to be used for kind of building a trading strategy. Right. But you can use it to generate ideas. Now that's not to say you couldn't pump like a bunch of documentation through a generative AI system and like extract information say out of a 10Q or 10K. People are absolutely doing that. You're, you're basically pulling out data out of text and written documentation. You're pulling information out of those things and you're turning it into data in a way that you could use. I would argue that that is a very, very powerful way to kind of generate alternative data sets. But then you've got to still munch that data and you got to plug it into your strategy.

[00:47:02.04] - Speaker 1
So that's really where I'm seeing, I think the, the mistake that people are making when they think about this stuff is like you plug prices into into chat GPT and it's going to give you a trading strategy that wins. That's not exactly how Albert's going to use. You feed it a 10Q for example, and you ask it to explore, extract, you know, balance sheet data or risks, and then you can use that on a fundamental basis.

[00:47:26.05] - Speaker 2
Yep, good question.

[00:47:31.03] - Speaker 1
That second link I sent you, Fabio, that's the one I wanted to share, that's actually using the, the data that you had sent me at that a couple months back and it actually generates a sharp of over one. So scrolling down a bit and basically here, that very first. So there's spy levels, right? So this is the gamma levels and you know that second black box line number one you see read CSV. So I got a CSV file with all this data from enter queue and then I'm just processing it and if you scroll to the end, you've got the rest of this code that generates this kind of P and L. Now this is a very simple example of how to use Python to run a strategy. And it would basically just give you an idea of whether it's something you want to pursue or not. And if the answer is yes, you'd want to plug it into a formal back testing framework to get all the bells and whistles. And you can see like the strategy actually performed quite well. It kind of matched the buy and hold strategy at the end. But there was a while, for about a year and a half where it was vastly exceeding the performance performance.

[00:48:39.12] - Speaker 1
And if you put some risk management in there, you could probably maintain that. Maintain that performance.

[00:48:44.20] - Speaker 2
Yep. This one was a good exercise and I think we shot it live like two, three months ago the last time we were here.

[00:48:53.06] - Speaker 1
Yeah, the gamma stuff is great. And we'll do one with the, the Q, the Q score at some point too.

[00:48:57.23] - Speaker 2
Yeah. All right, let's see if we have more question, guys. I think this was awesome. I don't know if you have anything on your side, Jason, that you wanted to answer or to touch base on.

[00:49:15.06] - Speaker 1
No, just really excited you guys are getting into the, into the, into the factor stuff. I've been, I've been doing factor trading for my, basically my entire career. That's where I. Six years at J.P. morgan, that's what I was doing. So very, very powerful way to kind of get an edge and for you guys to kind of democratize this for people is really awesome. And then I think, as you can kind of see, you plug this data into Python and you can just kind of amplify the power that you have through back testing, frameworks, analytics frameworks, whatever you want really. And combined it's a really great way to find. Keep your edge.

[00:49:51.28] - Speaker 2
Yeah. And I think what we are also working on is historical APIs so that you'll be able to basically add those levels or add those levels into your trading platform, backtest using those tools that you already use to build algorithm trading and then of course potentially take the data into your own system and create an algo for that. So that's next step, but it's going to take us a bit of time to develop.

[00:50:18.03] - Speaker 1
Yeah. And for pyQuant news, there's 152 basically code tutorials. Now that's from my weekly newsletter. I publish a newsletter every single week I have for It'll be my 153rd week. Almost three years. These are short, punchy copy paste code tutorials, no cost. Subscribe to the newsletter, you get all the stuff for free. I've got a YouTube channel that I think Fabio linked there. I'm constantly posting on Twitter, so if you want to find me on social Media, Twitter or LinkedIn @Pyquin want News is the best way to get. I do have some paid products. A lot of what I talked about today is built into a course. I have a Basics Python Basics course that's tailored to finance people that you can find on the website and then the bigger course which helps people use Python for all the stuff we talked about today, factor analysis, developing factors, all of Python. So it's a great way to get kind of ramped up quick. And then, you know, combined with this, with this really incredible data we get from Enter Q it's, it's a pretty potent combination. So looking forward to seeing in the newsletter and if you got any questions, just ping me on.

[00:51:24.21] - Speaker 1
Ping me on Twitter.

[00:51:25.24] - Speaker 2
Yeah. Thank you so much for your time and I look forward to seeing you soon.

[00:51:30.01] - Speaker 1
Jason, it's a pleasure.

[00:51:32.06] - Speaker 2
Have a great day, guys. Bye.

[00:51:34.01] - Speaker 1
Cheers guys. Bye.