January 19, 2023

What Makes QScore Different

Example quartile plot

With a bit of digging, you can find articles where a hotshot programmer says they can predict future stock prices. After a few Python code snippets, they show a graph where the prediction line almost exactly tracks the stock price, inevitably with a very short prediction horizon, at most a day or two into the future. Quoting Monte Python, my advice when you see that is to run away, run away!

Over a very short horizon, stock prices tend to exhibit something called autocorrelation, the tendency of a signal (in this case, the stock price) to closely resemble a copy of itself shifted ahead. In other words, you can get a “reasonable estimate” of tomorrow’s price just by carrying forward today’s price. However, that autocorrelation effect drops off quickly after a day, maybe two at the most. Extrapolating (“regressing”) the short-term trend might get you a bit further out in time. But the problem is that a price series alone just does not have much predictive value.

And about that “reasonable estimate” quote, you might see a gleeful statement that the RMSE (Root Mean Square Error) is only, say, 2.5. In the context of a stock, that error-rate metric means the actual future price is, on average, $2.50 higher or lower than the predicted price. It’s hard to make money in the stock market with that level of imprecision! There are other accuracy measures, some of which use percentages instead, but generally you will find that the error rate, however it is measured, is often higher than the normal daily fluctuation of the stock price. That’s why applying machine learning to stock price prediction is extremely difficult: the typical daily variance far exceeds the daily return making it very hard to get TRADEABLE accuracy with end-of-day trading in a one- or two-day timeframe. Besides, that’s a game for Day Traders!

So, what makes QScore different? Well, there are five significant innovations that distinguish QScore: 1) Prediction Horizon, 2) Features, 3) Target, 4) Infrastructure and 5) Integration with Nirvana Systems's OmniTrader.

Prediction Horizon

QScore was designed for active investors, not day traders, wanting to achieve higher returns with lower risk than the buy & forget norm. QScore is therefore optimized to a 10-period prediction horizon, essentially two calendar weeks ahead. This horizon was selected as it gives the stock enough time to get a return that significantly exceeds the daily volatility while limiting the market exposure to reduce trade risk. All predictions are out-of-sample, meaning that the AI model used to generate the prediction has never seen the data it is predicting. In other words, the model is trained on a set of inputs and then used to predict the target for a different, unseen second set of inputs. This eliminates any potential “look-ahead” bias.

Features Engineering / Feature Selection

As discussed above, a 10-period prediction horizon requires more predictive features than just the price series. For each stock, QScore determines the optimal subset of the over 200 extensively tested features compiled in TRADEnosis. Features span the categories of company fundamentals, technical analysis indicators, and macroeconomic & market benchmark metrics. Additionally, as the TRADEnosis feature repository expands, new features are available to QScore, potentially improving results over time. We are constantly exploring new features such as news and sentiment metrics, analyst ratings and earning surprises, and advanced technical analysis strategies and indicators.

Target and Optimization Strategy

QScore achieves higher accuracy by using a categorical prediction target, rather than a continuous variable like price. Specifically, it has been trained to identify situations where the future price will be in the lower (for a short trade) or upper (for a long) distribution tails of the historic returns. [Refer to the graphic at the top of this article where returns are binned and sorted, lowest to highest, on the X-axis and the frequency or count of the results in each bin is plotted on the y-axis]. This training is optimized using an intuitive performance measure, namely Profit Per Trade (PPT) rather than an abstract error metric like RMSE.

The TRADEnosis Infrastructure

QScore uses a series of advanced machine learning techniques to train the AI models that are used to generate daily buy & sell signals. Each stock is processed separately, generating a trained model specifically for that security. Processing all the stocks supported by QScore takes a lot of server time. Completing this each night before the market opens is only possible using the parallel processing capabilities of the TRADEnosis infrastructure.

Integration with OmniTrader

QScore generates a lot of buy/sell signals, along with a probability rating. Instead of simply hooking it up to a broker, we have decided to integrate QScore, via the supporting TRADEnosis infrastructure, up to Nirvana Systems' OmniTrader trading platform. OmniTrader supports multiple brokers and is an excellent charting program. But the major advantage is that OmniTrader has robust capabilities to develop and test trading systems. In the case of QScore, OmniTrader has a 'system block' that connects to the TRADEnosis signal feed. Those raw signals are then feed into a customizable set of drag-and-drop strategy blocks. For example, one could add a filter block, say, to only take signals that are in an up-trend, or combine the QScore signals with any of the hundreds of technical analysis systems supported by OmniTrader. Most importantly, the filtered/enhanced (or even unmodified) signals are then passed to a 'Trade Plan' block. This component is what connects to one of the supported brokers (or to a paper trading account) and manages your trading equity. You can add simple or trailing stops and use whatever order types the broker supports (limit, GTC, etc.). Once you have your strategy designed, OmniTrader can run a simulation (like the ones you see on this site) to show how the strategy would have performed in the past.


Overall, given these advantages, we believe QScore and the underlying TRADEnosis platform will be able to generate more profitable returns with lower risk. As of this posting, QScore is in testing by select Nirvana customers. Some of those initial results are posted on this site. We hope you will check back as we hope to release it to the public soon.