Category: Investing Insight

Investing insights to make you a better investor.

Kalman vs SMA

This post is inspired by A Stochastic Model Against a Geometric Rule: the Kalman Filter and the 200-Day Line. We took the basic idea and translated it to Indian equity indices. Then we extended it to different SMA look-back periods (20-, 50- & 100-days) and different Kalman configurations (fixed, calibrated & adaptive.)

tl;dr: you are better off with moving averages (details).

NIFTY 50 and NIFTY BANK doesn’t trend on a daily time-frame so none of the trend-following approaches work on that. On MIDCAPs and SMALLCAPs, short moving averages reduce drawdowns. So if you can get cheap leverage or benchmark to NIFTY 50, it might make sense.

Code and charts are on github.

Introducing the StockViz Mutual Fund MCP Server

There are many instances (corporate compliance, for one) where investors cannot maintain a direct equity portfolio. This was a tough hill to climb earlier. However, thanks to the flood of index funds that scratch every itch in the market over the last couple of years, it is now possible to port some of our low-frequency quant strategies in to the domain of mutual funds.

As a Mutual Fund Distributor, if you ask us to execute this, we will obviously put you on “regular” funds. However, if you are a little tech savvy, you can do it yourself for free.

Point your AI agent to https://mutual-fund-mcp.stockviz.workers.dev/mcp and start exploring this brave new world.

We have set up a live model portfolio that tracks Factor Momentum with Index Funds. This is going to be the first of many.

Once your AI agent gets the model portfolio, you can ask it to execute it for you using any API of your choice with any broker of your choice.

Here’s a brief intro video that walks you through how to setup the MCP in an agent. We’ve shown it using Goose, but it should work in Hermes, Claude, etc… We’ve also thrown in some questions that you can ask it about the strategy, historical index metrics, etc…

If you have any questions or suggests, please post them on this substack chat thread.

Factor Momentum with Index Funds

Factor Momentum is an interesting concept – it posits that factor portfolios (value, quality, low-volatility, momentum, etc.) themselves exhibit momentum. If a certain factor worked in the past, it will continue working in the near-term. We had introduced this in Factor Momentum Everywhere and setup a couple of model portfolios – Model Momentum that uses our own factor models, and Factor Momentum that uses ETFs.

While discussing Factor MAX, we realized that there are now index funds that reference the basic factors that can be used instead of ETFs. ETF liquidity tends to be patchy and does not support large portfolios. Index funds are more convenient in that sense.

Here’s how factor momentum using just these basic factor indices looks like:

Like every investment/trading strategy, there will obviously be years where it under-performs.

However, it looks like this has held its own.

Financial News Sentiment Analysis: Qwen vs. Jev

Ever since Typesafe’s Jev came out, people have been raving about its “one-shot” classification capability. We decided to put our news archives through Qwen (a “regular” llm) and Jev (a classifier) to bucket the sentiment expressed in each of them into Positive, Neutral and Negative.

Is Jev lazy? Picking “Neutral” is the path of least resistance, isn’t it? What if we split it by media type?

It looks like Jev loves being neutral. Either Indian financial media is mostly unbiased or Jev is not as “one-shot” as claimed to be. Thanks to Jev’s neutrality, the two models agree only 43% of the time.

Given their differences, are they useful?

There is no evidence that extreme media sentiment reliably predicts subsequent index direction. The positive post-event paths may simply reflect the general upward drift of the indices.

It appears that sentiment is in the eye of the analyzer and largely useless in predicting low frequency market direction. Details about the methodology and results are here.

Code and charts are on github.

Filtering and Momentum Signals

The paper Shenhao Zhang, A Low-Frequency Quantitative Trading Strategy Based on Trend Filtering and Momentum Signals: Empirical Evidence from A-Share Banking Stocks, published at ICDEIT 2025, is a small, low-frequency technical-strategy study on two Chinese bank stocks. We wanted to check if it generalizes to a larger universe of Indian and US stocks.

tl;dr: it doesn’t (summary).

For Indian stocks, you may want to give this a wide berth. From 2016 through now, the model barely beat a fixed deposit.

However, by the virtue of it side-stepping the 2008 drawdown, it managed to put a decent number on the board for US stocks.

We tested this out because the premise seemed promising. Sadly, it turned out to be another one of those narrow, overfitted papers with an SEO friendly title.

Code, charts, findings are on github.