Markowitz Recommendation Engine Portfolio Optimizer & Health Dashboard

A data-driven portfolio optimisation engine built at AltQube that uses actual investor holdings from CDSL and linked broker accounts to calculate portfolio risk, simulate thousands of asset combinations, and identify the optimal position on the Efficient Frontier based on the investor’s risk tolerance. Powered by Markowitz Modern Portfolio Theory, it delivers personalised rebalancing recommendations without traditional advisory fees.

The Problem We Saw

Before starting AltQube, I met too many people investing without clarity. Some took tips from friends, others followed whatever their broker suggested, and a few paid high fees to financial advisors for advice that was not truly personal.

Even so-called personalised portfolios were often built without looking at the investor’s actual holdings. Without a clear picture of what someone already owned, it was impossible to genuinely optimise their investments.

I wanted a better approach. Something that was technology-driven, affordable, and precise.

The First Attempt

When AltQube began, our first approach was simple.

We asked investors a set of targeted questions, ran their answers through a rules engine, and suggested a matching portfolio.

It looked neat at first, but we quickly hit a limitation. If someone already had investments, we were forced to make assumptions. A recommended balanced portfolio might look fine on paper, but what if the investor was already 80 percent in equities or heavily concentrated in a single stock?

It felt like prescribing medicine without running any tests.

The Game-Changer: Real Data

Things changed once we received our Registered Investment Advisor (RIA) license.

This allowed us to work with CDSL and, with the investor’s consent through their PAN details, securely pull their actual mutual fund holdings.

We took the idea further by integrating with equity brokers. Once users connected their trading accounts, we could see every stock, ETF, and mutual fund they owned.

From that point onward, we no longer relied on guesswork. We had a complete and real-time view of the investor’s portfolio.

Building the Engine Room

With full access to real data, the focus shifted to making sense of it.

We created a portfolio analytics microservice with the following process:

  1. Collect historical timeseries for each asset.

  2. Calculate pairwise covariances to measure how assets move in relation to each other.

  3. Construct a covariance matrix (Σ) to map these relationships.

  4. Determine the portfolio weights (w) showing how much of each asset the investor holds.

  5. Calculate portfolio risk using:


\text{Risk} = w^T \cdot \Sigma \cdot w

That calculation produced a single number representing the portfolio’s volatility.

Why We Chose Markowitz

We based our optimisation on Markowitz Modern Portfolio Theory because it answers a critical question:

For the level of risk an investor is willing to take, what is the best possible return they can aim for?

We ran thousands of simulations, each with different portfolio weights, calculating the expected return and risk for every combination.

When plotted, the results revealed the Efficient Frontier, a curve representing the most optimal portfolios. Anything below this curve is inefficient because the investor could achieve a higher return for the same level of risk.

The Efficient Frontier in Simple Words

Imagine packing a backpack for a trip. You have a weight limit (risk) and a set of things you want to carry (returns). The Efficient Frontier is the perfect packing list that gives you the maximum usefulness without exceeding your weight limit.

If you overpack, you carry extra weight without any extra benefit. If you underpack, you miss out on things you could have carried.

Our role is to make sure each investor’s backpack is packed just right.

Personalising the Frontier

To select the right position on the frontier, we needed one final input: risk tolerance.

We asked a small set of focused questions to understand how comfortable the investor was with volatility.


  • For someone wanting steady growth and minimal fluctuations, we placed them at the low-risk end of the curve.

  • For those comfortable with market swings in pursuit of higher returns, we positioned them further along the curve.


The recommender engine then suggested a rebalancing plan. It indicated which weights to adjust, which assets to trim, and which ones to add so that the portfolio moved toward its optimal position.

Two Different Journeys

One of our first users was a conservative investor with a random mix of stocks and debt funds. Their portfolio carried higher risk than necessary for the returns they were earning. We rebalanced it toward lower volatility, keeping almost the same returns but cutting the risk by 20 percent.

Another user was a young and aggressive investor holding too much in cash and debt instruments. We increased their equity allocation, improving projected returns without taking on excessive additional risk.

Same engine, different outcomes. Both matched to the investor’s personal reality.

The Bigger Picture

This is not just an algorithm. It is a bridge between academic financial theory and everyday investing in India.

It can see exactly what you own, understand how it behaves, and guide you toward the most efficient balance between risk and reward. All of this is grounded in actual data, not assumptions.

Most importantly, it delivers this without the intimidating fees that keep many people from ever seeking advice.

I believe portfolio guidance should be transparent, precise, and available to everyone. AltQube is our way of making that happen.