Investment Insights:

When Machines Think Stocks - Mazi's Quantiatitive Playbook

Alungile Gcaza

At Mazi NextGen, we’re not just reacting to the market; we’re decoding it. In an age where investors are overwhelmed by data and distracted by noise, we use cutting-edge quantitative techniques to zero in on what truly matters.

As a quantitative analyst, I focus on building and refining the machine learning systems that power this mission. These systems drive everything from individual stock selection to dynamic asset allocation across our hedge fund, flexible fund, and equity-only mandates. By turning vast amounts of raw data into clear, systematic investment insight, we’re able to remove emotion, reduce bias, and bring consistency to complex portfolio decisions.

A Systematic Approach to Stock Selection

At the heart of our process is a simple question: What combination of characteristics has historically hinted that a stock is poised to outperform its peers? To answer this, we turn to sophisticated classification models that sift through mountains of market data in search of patterns that humans might miss.

Think of it like a medical diagnosis. A doctor doesn’t rely on a single symptom but weighs everything — lab results, medical history, physical signs — to assess a patient's health. Similarly, our models analyse hundreds of data points for each stock to build a comprehensive picture of its value, including:

  •  Fundamental Health: Classic indicators like price-to-earnings (P/E) and price-to-book (P/B) ratios help us assess the financial well-being of a company.
  •  Market Momentum: We track recent price movements to gauge how much investor sentiment is already behind a stock — and whether that trend has legs.
  •  Risk Profile: Every opportunity carries risk. We quantify it through measures of volatility and downside potential to avoid surprises and manage exposure wisely.

By training our models on years of historical data, we teach them to recognise the patterns that precede strong or weak performance. The system then assigns each stock a probability of success based on its current characteristics. By grounding our decisions in data rather than gut feel, we strip away emotion and behavioural bias — bringing discipline, consistency, and repeatability to stock selection.

Picking the Right Tool

The financial markets are noisy, complex, and constantly evolving, which is why we’ve tested a wide range of machine learning algorithms to find those best suited to the unique rhythms and dynamics of the South African market.

Our primary algorithm, a model known as LightGBM, has consistently proven to be the most appropriate model for the nuances of our market. We chose it because it excels in three key areas critical to our success:

  • Speed: It processes vast amounts of information at lightning speed, which allows us to retrain our models frequently and adapt to new market data as it becomes available.
  • Accuracy: It is exceptionally skilled at uncovering subtle, non-linear patterns in the data that traditional analysis would likely overlook.
  • Transparency: While many machine learning models operate as opaque "black boxes", LightGBM is compatible with interpretability tools like  SHAP Shapley Additive Explanations) that allow us to understand why the model is recommending a certain stock. This transparency is crucial for accountability and allows our portfolio managers to challenge, understand, and ultimately trust the model's output.

By choosing the right algorithm, we ensure our insights are not only powerful but also timely and easy to interpret. But this is not a set-it-and-forget-it process. Markets evolve, and so must we — which is why continually re-test all available algorithms to ensure our current model remains the most effective tool in a shifting landscape.

 

When Humans and Machines Team Up, Magic Happens

It's important to be clear: our machine learning models do not call the final shots. While they excel at spotting high-probability opportunities based on historical data, they can’t fully grasp the forward-looking nuances of a living, breathing market. This is where our portfolio managers are indispensable — they bring essential human judgement to the table. They conduct the final due diligence, managing risks that the models can’t detect — whether it’s avoiding unintended sector concentrations, managing portfolio liquidity, or accounting for corporate actions that might render historical data irrelevant. Together, humans and machines create a balanced, smarter investment approach.

 

The Bottom Line? Smart Data, Sharper Decisions

By combining our team's investment expertise with a sophisticated machine learning framework, we’ve built a more disciplined, evidence-based investment process that uncovers hidden inefficiencies and untapped opportunities traditional methods might miss. We remain committed to evolving our models and staying agile in an ever more data-driven market — so we can deliver smarter, more confident investment decisions every step of the way.

download
download
back to Insights