kotak-logo
Products
Platform
Research
Market
Learn
Partner
Support
IPO
Stock Screener Using AI Logo Light Mode

Kotak

Stockshaala

Module 8
Testing & Optimization
Course Index
Read in
English
हिंदी

Chapter 2 | 2 min read

Avoiding Overfitting in Financial AI

AI models are great at spotting patterns.

But sometimes, they become too good at spotting patterns in old data.

So good, in fact, that they start memorising the past instead of learning lessons for the future.

This problem is called overfitting.

Overfitting happens when an AI model learns every tiny detail of past data, including random noise.

It performs brilliantly on historical numbers but fails when tested on new, unseen data.

Think of a student who memorises every line of last year’s question paper. They might top a practice test but stumble badly when fresh questions come up.

That’s exactly how an overfitted screener behaves.

Markets are noisy. Company results, global news, and even rumours affect stock prices.

If AI starts “learning” from all this noise, it can make filters that look perfect in backtests but collapse in live markets.

Example:

A screener trained on the 2020–2021 bull run might assume “every dip is a buy.” But in a sideways or bearish market, that rule will fail badly.

  • The model shows very high accuracy on past data but poor results on fresh data.
  • The screener gives complex conditions that look smart but don’t work in real trades.
  • Results change drastically when you tweak even one small filter.
  • Use simple rules: Fewer conditions usually perform better than overly complex ones.
  • Test on new data: Always check the screener on data it hasn’t seen before.
  • Cross-validation: Instead of one period, test across multiple time periods.
  • Focus on logic: Every filter should have a market-based reason, not just a statistical one.

Example

Suppose an AI screener finds that “mid-cap IT stocks with RSI under 25 and profit growth above 15% always bounce back within 10 days.”

That might be true in a limited backtest. But unless you test it on different years, sectors, and conditions, it’s just memorising a fluke.

Overfitting makes AI look smarter than it is.

In finance, that’s dangerous because markets never repeat the past in the same way.

Keep your prompts and rules simple, test them on fresh data, and always ask: “Does this filter make sense in real life, or is it just fitting old charts?”

The goal is not to be perfect on yesterday’s data, but to stay useful for tomorrow’s markets.

Is this chapter helpful?
Previous
Backtesting with Historical Data
Next
False Positives & False Negatives

Discover our extensive knowledge center

Explore our comprehensive video library that blends expert market insights with Kotak's innovative financial solutions to support your goals.

PreviousCourse IndexNext