AI trading bot NSE: 6 November 2026 paper-trading results

I built an AI trading bot that executes simulated trades with fake money on the NSE, and today it finished with a gross profit of ₹250.30. My bot’s balance moved from ₹101,952.50 to ₹102,202.80; every trade was paper-only, with risk limits enforced by code.

AI trading bot illustration for the daily NSE paper-trading report: a small robot trader sits at a desk watching a big round clock approach closing time, patient, hands folded. Stock bubbles beside the robot: M&M lost, ULTRACEMCO gained, TITAN gained.

Stock News catalyst Result Exit (IST) Gross P&L R
M&M earnings stop hit 12:37 −₹256.50 −1.00R
ULTRACEMCO earnings sold at the 3:15 PM close 15:15 +₹208.00 +0.96R
TITAN earnings sold at the 3:15 PM close 15:15 +₹298.80 +1.02R

Day total (gross): +₹250.30 (+0.25% of the starting balance). Nifty 50 over the same window: +1.61%.

Every stock the bot looked at

# Stock Sector Up at start Volume vs usual Headlines Decision
1 InterGlobe Aviation (INDIGO) Services +4.26% 3.87x 5 Not bought: news not positive
2 Mahindra & Mahindra (M&M) Automobile and Auto Components +3.87% 15.34x 5 Bought
3 UltraTech Cement (ULTRACEMCO) Construction Materials +3.64% 6.58x 5 Bought
4 HDFC Life Insurance Company (HDFCLIFE) Financial Services +2.40% 4.04x 4 Not bought: no specific company event; news not positive
5 Titan Company (TITAN) Consumer Durables +2.32% 29.46x 5 Bought
6 Bharti Airtel (BHARTIARTL) Telecommunication +1.99% 7.60x 5 Not bought: rated strong; already have 3 positions
7 HCL Technologies (HCLTECH) Information Technology +1.96% 4.01x 5 Not bought: no specific company event; event still to come; news not positive
8 HDFC Asset Management Company (HDFCAMC) Financial Services +3.86% 1.45x 5 Not bought: no specific company event; opinion or rumour only
9 Tata Consultancy Services (TCS) Information Technology +1.61% 4.17x 5 Not bought: sector news news is not a kind the bot trades on; news not positive
10 Infosys (INFY) Information Technology +1.45% 4.38x 5 Not bought: sector news news is not a kind the bot trades on

Up at the start is the rise from the previous close when the bot started (about 09:35 IST). Volume vs usual compares the morning's trading volume with the stock's normal pace.

How the Nifty 50 and my trading bot moved

The bot gained 0.25% of its starting balance, while the Nifty 50 rose 1.61%. They are measured differently: the bot’s result is against its whole balance, while the index figure covers the same time window. This daily entry sits within one week of data.

Which NSE stocks the AI trading bot picked

The morning screen checked 100 stocks; 23 cleared the rise and volume requirements. The top 10 candidates then went to the AI news step. That screen requires at least a 0.5% rise and volume pace of 1.0 or more. Headlines come from Google News and prices from Yahoo Finance.

The biggest morning moves among these candidates were IndiGo at 4.26%, UltraTech Cement at 3.64%, and HDFC Asset Management Company at 3.86%. Relative volume stood out in Titan at 29.46, Mahindra & Mahindra at 15.34, and UltraTech at 6.58. These figures explain why the stocks surfaced for review, not why their prices moved. The bot trades news catalysts, not chart patterns.

What the news said about each stock

Mahindra & Mahindra rose 3.87% in the morning with relative volume of 15.34. Reuters and MarketScreener carried the headline about the company being up after a quarterly profit rise and steady SUV demand; BW Auto World reported Q2 profit up 25% to ₹4,588 crore and auto profit up 55%. The AI rated the earnings news strong and bullish. It also read an Upstox price page and Mahindra’s results page.

UltraTech Cement was up 3.64%, with relative volume of 6.58. NDTV Profit reported Q2 net profit up 21% to ₹1,231 crore and revenue up 19% year over year. The AI called this earnings catalyst strong and bullish. Other headlines included an Economic Times chart-focused article, an ad-hoc-news.de story about fuel pressure, a Scanx office-change item, and a TechGraph stock-price page; those were not the cited reason for the rating.

Titan gained 2.32% in the morning and had the day’s highest relative volume, 29.46. Moneycontrol said Q2 net profit more than doubled to ₹2,393 crore and beat estimates; Upstox also reported the results and a board-approved ₹2,500 crore fundraising plan. The AI rated the earnings news strong and bullish. Its other reading included a Business Standard retirement headline, an NDTV Profit target-price story, and a Multibagg AI jewellery-margin item.

The fourth strong rating was Bharti Airtel: its morning rise was 1.99% and relative volume was 7.6. ET Telecom and The Hindu reported September-quarter net profit up 24% to ₹10,710 crore. The AI rated that earnings news strong and bullish.

The other headlines did not meet the same bar. IndiGo rose 4.26% with relative volume of 3.87, but Multibagg AI reported a quarterly loss of ₹1,900 crore as fuel costs surged, so the AI marked the catalyst weak and not positive. HDFC Life’s 2.40% rise and 4.04 relative volume came alongside a Scanx report about its BRSR filing; the other results were price pages or general market coverage, not a specific positive company event. The AI rated it weak.

HCL Technologies (up 1.96%, relative volume 4.01) appeared in a TradingView dividend-stocks list and a Scanx notice about future investor conferences. The AI found no specific upside event and rated the news weak. HDFC AMC (up 3.86%, relative volume 1.45) had seasonal-return and stock-pick headlines from Yahoo Finance and Livemint, plus general market items; the AI treated these as opinion or general coverage, not a confirmed company event.

TCS (up 1.61%, relative volume 4.17) had an Economic Times headline about an AI-related rout in IT stocks and a TCS study about executives’ views on AI. The AI rated this sector news weak and not a direct positive company catalyst. Infosys (up 1.45%, relative volume 4.38) appeared in the same Economic Times sector story, a CNBC TV18 expert-picks headline, and a MarketWatch item about its ADR. The AI rated the evidence weak; it recorded no concrete financial figure or target in the cited stories. The model reads headline titles, not the full articles.

Why the trading bot bought or skipped each stock

Code checks the AI’s rating and applies the trade rules. The bot bought M&M, UltraTech, and Titan, reaching its limit of three positions. M&M hit its stop-loss—the price where the bot gives up on a trade—at 12:37, for a gross loss of ₹256.50. UltraTech and Titan both closed at the 3:15 PM close, for gross gains of ₹208.00 and ₹298.80. Their targets, the prices where the bot takes profit, were not hit.

IndiGo, HDFC Life, HCL Tech, HDFC AMC, TCS, and Infosys were not bought because their news ratings were weak. Bharti Airtel rated strong but was skipped because all three trade slots were already filled. By the close, its price was down 0.18% from the morning reference; a hypothetical trade would have reached its stop. That is not a bot trade or part of the result.

How the trading bot behaved

The AI rated four of the 10 candidates strong; code allowed three trades and skipped the fourth because the three-position limit was full. All three trade plans met the current minimum reward-to-risk requirement of 2, with risk capped at 0.5% of the balance per trade. One stop-loss fired, and none fired within the first 60 minutes. Two positions closed at the session end. The three bought stocks were in different sectors, so there was no same-sector holding today.

The one-per-sector preference is already in force in its softer form: first-choice stocks get priority, and an extra strong stock in a sector can use a slot only if one remains. There was no same-sector reserve candidate today. The AI’s factual-question rating step also began on 12 October, alongside the sector change, so comparisons around that date cannot isolate the sector rule. The risk limit and reward-to-risk requirement also tightened on 29 October; results from before and after that change are not like-for-like.

My post-mortem records the selections, headline ratings, rule decisions, and exits. The Indian stock market paper-trading ledger remains gross: brokerage, taxes, and slippage are not modelled.

Software Engineer's Corner: The AI reads the news, but code makes the decision

One standalone lesson taken from the code of my trading bot. The bot is a simulation with fake money: it places no real orders.

Where this fits in my bot

Once the screener identifies stocks that are moving, the next question is: Why are they moving?

A stock might be rising because of a major order win, strong quarterly results, a government announcement, or simply speculation in the market.

To investigate this, my bot collects recent news headlines for each shortlisted stock and sends them to an AI model for analysis.

This is one of the two stages where my bot uses AI. The other is when it proposes stop-loss and target prices for potential trades.

But there is an important design decision here.

I don't let the AI decide which stocks to buy.

Instead, the AI interprets the news, while ordinary Python code applies the rules and makes the final decision.

Why separate the two?

Because if the AI misunderstands a headline or invents a connection between a company and a news story, I don't want that mistake to automatically become a trading decision.

Let's look at how I implemented this.

First, what is structured output?

Normally, when you ask an AI model a question, it responds in natural language.

For example, if I ask:

"Is the news about Bharat Electronics positive?"

The model might respond:

"The company has received a significant defence order, which could have a positive impact on investor sentiment."

That sounds useful to a human, but it is not particularly convenient for a computer program.

The program would have to interpret the sentence to figure out what the model actually concluded.

Structured output solves this problem.

Instead of allowing the model to respond in any format it likes, I ask it to return information in a predefined structure with specific fields and expected values.

For example:

json { "event_type": "order_win", "status": "happened", "bullish": true, "has_number": true, "reason": "The company announced a new defence order." }

Now the application knows exactly where to find each piece of information.

Think of it as a REST API request or response.

When your Spring Boot controller expects a particular JSON structure, you don't want an arbitrary paragraph of text. You want predictable fields with predictable types.

That's exactly what structured output provides.

What is Pydantic?

This brings us to Pydantic.

Pydantic is a Python library used to define data structures and validate data.

Think of it as a combination of a Java DTO (Data Transfer Object) and validation annotations.

You define a class, specify its fields and types, and Pydantic checks whether the incoming data matches those definitions.

For example:

```python from pydantic import BaseModel from typing import Literal

class NewsAnalysis(BaseModel): event_type: Literal["order_win", "earnings", "dividend", "other"] status: Literal["happened", "expected", "rumour_or_opinion"] bullish: bool reason: str ```

Here is what each part does:

  • BaseModel makes this a Pydantic model.
  • event_type only accepts one of the specified categories.
  • status only accepts one of the three allowed values.
  • bullish must be a Boolean (True or False).
  • reason must be a string.

If someone supplies an unsupported event type or an invalid value, Pydantic can reject it during validation.

This is useful because I don't want my application working with unpredictable AI responses.

One important distinction: Pydantic validates the structure and types of the data. It does not independently establish whether the news is factually correct. That's where my own business rules come in.

How I use it in my bot

My actual implementation uses a Pydantic class called Checklist, defined in checklist.py.

For every shortlisted stock, the AI model fills in this checklist based on the news headlines provided to it.

The checklist contains the following fields:

1. event_type

What kind of event does the news describe?

Examples include: - Earnings announcements - Order wins - Dividends - Other corporate or market events

2. status

Has the event actually happened, is it expected to happen, or is it merely a rumour or opinion?

This distinction matters. An actual order announcement is different from speculation that a company might receive an order.

3. bullish

Does the news indicate a potentially positive development for the stock?

4. has_number

Does the headline contain a concrete numerical figure?

For example, an order worth ₹500 crore contains a specific number, while a headline saying that a company received a major order does not necessarily provide its value.

5. reason

A short explanation, based only on the supplied headlines.

6. source_numbers

Which of the supplied headlines support the model's conclusions?

This last field is particularly important. I want the model to identify the actual headlines behind its assessment, rather than simply provide an opinion.

Notice something about this checklist: there is no buy field.

The AI is not being asked to make a trading decision. It is being asked to interpret the available information and report its findings.

The code that makes the decision

Having a validated checklist is only the beginning.

The application still needs to decide whether the analysis is good enough to classify a stock as having a strong catalyst.

This happens in two stages.

Stage 1: Check the source headlines

First, a helper function checks whether a cited headline actually mentions the company being analysed.

For example, imagine the bot is investigating Bharat Electronics (BEL).

It receives these two headlines:

  1. Bharat Electronics wins a major defence order.
  2. Defence stocks gain momentum following positive government announcements.

The first headline explicitly mentions BEL.

The second talks about the defence sector generally. It might be relevant background information, but it does not establish that BEL itself received an order.

My helper function checks this distinction.

python def mentions_company(symbol: str, company: str, headline: str) -> bool: """Same logic as the function of the same name in morning_run.py (a test keeps the two identical).""" name = company.replace(" Ltd.", "").replace(" Limited", "") short_name = " ".join(name.split()[:2]).lower() # first two words, e.g. "sbi life" text = headline.lower() return short_name in text or symbol.lower() in text

Stage 2: Evaluate the checklist

Once the source references have been checked, the evaluate function applies the actual business rules.

``python def evaluate(symbol: str, company: str, answer: Checklist, headlines: list, today: date) -> Decision: """Is this stock strong?headlines` is the numbered list the model saw (dicts with 'text' and 'published_at').""" failed = [] if answer.event_type not in STRONG_EVENT_TYPES: failed.append(f"event type '{answer.event_type}' can never be strong") if answer.status != "happened": failed.append(f"status is '{answer.status}', not 'happened'") if not answer.bullish: failed.append("the news is not bullish")

cited = [headlines[n - 1] for n in answer.source_numbers if 1 <= n <= len(headlines)]
naming = [h for h in cited if mentions_company(symbol, company, h["text"])]
fresh = any(is_fresh(h, today) for h in naming)
if not naming:
    failed.append("no cited headline names the company")
elif not fresh:
    failed.append(f"the cited headline is older than {FRESH_DAYS} days or has no date")
return Decision(strong=not failed, failed=failed, named_company=bool(naming), cited_fresh=fresh)

```

The function checks whether the AI's assessment satisfies the conditions required for a strong catalyst.

For example: - Are the cited headlines actually about the company? - Does the news describe an event that has happened? - Does the assessment satisfy the other required conditions?

If a mandatory condition fails, the stock is not classified as strong.

These are explicit rules written in Python, not opinions generated by another AI model.

A practical example

Let's see what happens when I run the evaluation logic.

I used an invented headline set for BEL on 4 November 2026. The headlines and AI responses are illustrative, not actual market news.

I tested three scenarios:

Scenario 1: The AI gets it right

The model cites the headline about BEL winning an order and correctly identifies it as an event that has happened.

Result:

text honest : strong= True []

The stock passes the evaluation.

Scenario 2: The AI cites an unrelated headline

The model cites the general defence-sector headline as evidence that BEL received an order.

The validation code checks the cited headline and finds that it does not mention the company.

Result:

text AI wrongly cites the sector headline: strong= False ['no cited headline names the company']

The stock fails.

Scenario 3: The AI identifies a rumour

The model identifies the news as a rumour or opinion rather than an event that has actually happened.

Result:

text AI says rumour: strong= False ["status is 'rumour_or_opinion', not 'happened'"]

Again, the stock fails.

The important part is that the application doesn't just return a yes or no.

It also retains the reasons for rejection. This makes it easier to understand what happened when reviewing the bot's decisions.

Why I designed it this way

There is a fundamental difference between interpreting information and enforcing rules.

AI models are useful for understanding natural language, connecting ideas and interpreting unstructured information.

But I don't want important trading conditions to depend entirely on an AI model's judgement.

So I divided the responsibilities:

Component Responsibility
AI model Reads headlines and interprets the news
Pydantic Validates the structure and types of the response
Python code Checks evidence and applies business rules
Trading application Uses the final classification in the next stage

This approach has an important advantage: the same validated input produces the same evaluation result under the same rules.

It does not guarantee that the AI's interpretation is correct. It does mean that the final rule-based evaluation is predictable and testable.

That is the distinction I wanted in my architecture: AI provides interpretation, but code remains in control of the decision.

What else to explore

If you want to experiment with Pydantic yourself, try these:

  • Create a class that extends BaseModel.
  • Add fields with types such as str, int and bool.
  • Use Literal["a", "b"] to restrict the allowed values.
  • Use Field(description="...") to describe what a field means.
  • Pass invalid data and see how Pydantic reports the validation error.
  • Explore JSON Schema generation using model_json_schema().

The official Pydantic documentation is a good place to start.

Today's numbers

Today the AI analysed 10 stocks.

Of those, 4 were classified as having strong catalysts.

The Python validation and evaluation rules overruled the AI 0 time(s).

The AI reads the news. The code checks the evidence. And the experiment records what happened.

Follow the experiment live: the full record is on the dashboard at niftyexperiment.com.

More from the experiment

Where the information came from

Headlines come from Google News and prices and volume from Yahoo Finance. A star marks a headline the AI cited as the basis of its rating.

INDIGO (InterGlobe Aviation Ltd.)

  • US midterm elections results impact on IndiGo shares: Interglobe Aviation is flying over 7%, amongst top Nifty gainers (Livemint, 5 Nov)
  • ★ IndiGo posts Rs 1,900 crore quarterly loss as fuel costs surge (Multibagg AI, 5 Nov)
  • IndiGo Allots 1,000 Shares Under ESOP Scheme (HDFC Sky, 5 Nov)
  • Markets surge on sharp decline in oil prices, hopes of resolution to US-Iran conflict (bfsi.economictimes.indiatimes.com, 5 Nov)
  • IndiGo shares rally 4%: Why is InterGlobe Aviation stock rising for a second straight session? (Upstox, 3 Nov)

M&M (Mahindra & Mahindra Ltd.)

  • ★ India's Mahindra & Mahindra up after quarterly profit rise, steady SUV demand (Reuters, 6 Nov)
  • Mahindra & Mahindra Share Price - Live NSE: M&M Stock Price & Chart (Upstox, 5 Nov)
  • ★ India's Mahindra & Mahindra up after quarterly profit rise, steady SUV demand (marketscreener.com, 6 Nov)
  • ★ Mahindra & Mahindra Q2 PAT Rises 25% To Rs 4,588 Cr; Auto Profit Jumps 55% (BW Auto World, 5 Nov)
  • M&M Results Q2 F27 (Mahindra, 5 Nov)

ULTRACEMCO (UltraTech Cement Ltd.)

  • ★ UltraTech Cement Q2 Results: Net Profit Rises 21% To Rs 1,231 Crore, Revenue Grows 19% YoY (NDTV Profit, 6 Nov)
  • Stock Radar: This Sensex largecap stock showing signs of reversal on daily charts; time to buy? (The Economic Times, 5 Nov)
  • UltraTech Cement stock faces fuel pressure despite volume growth (ad-hoc-news.de, 6 Nov)
  • UltraTech Cement RTA KFin Technologies shifts office to Hyderabad (scanx.trade, 4 Nov)
  • UltraTech Cement (ULTRACEMCO) Share Price Today (NSE), Market News (TechGraph, 3 Nov)

HDFCLIFE (HDFC Life Insurance Company Ltd.)

  • HDFC Life Insurance Co Ltd Share Price, Stock Price - NSE/BSE Live (NDTV Profit, 6 Nov)
  • ★ HDFC Life files BRSR for FY 2025-26 (scanx.trade, 4 Nov)
  • Sensex Today | Stock Market Live: Sensex surges over 1,500 pts, Nifty nears 24,400; auto jumps over (IndiaIPO, 5 Nov)
  • ICICILIFE Share Price Today - ICICI Life Insurance Limited Stock Price Live NSE/BSE (Univest, 5 Nov)

TITAN (Titan Company Ltd.)

  • ★ Titan Q2 results: Net profit more than doubles to Rs 2,393 crore, beats estimates (Moneycontrol.com, 5 Nov)
  • Noel Tata to retire as vice chairman of Titan Company on November 12 (Business Standard, 5 Nov)
  • ★ Titan Company Q2 results: Net profit doubles over to Rs 2,393 crore YoY; board approves Rs 2,500 crore fundraising plans (Upstox, 5 Nov)
  • Titan Q2 Review: Target Price Cut Doesn't Diminish Motilal Oswal's Bullish View | Here's Why (NDTV Profit, 6 Nov)
  • Titan Company jewellery margin hits 14.3% on duty benefit (Multibagg AI, 5 Nov)

BHARTIARTL (Bharti Airtel Ltd.)

  • BHARTIARTL Share Price Today - Bharti Airtel on NSE/BSE (scanx.trade, 6 Nov)
  • Stocks to Watch Today, Friday, November 6, 2026: Bharti Airtel, ONGC, Titan, LIC, NTPC (HDFC Sky, 6 Nov)
  • ★ Bharti Airtel net profit rises 24% to Rs 10,710 crore in September 2026 quarter (ET Telecom, 5 Nov)
  • ★ Bharti Airtel net profit rises 24% to Rs 10,710 crore in September quarter (The Hindu, 5 Nov)
  • Stocks to Watch Today (Nov 6): Bharti Airtel, ONGC, Titan, Hindalco, Britannia, Bosch and more (Zee Business, 6 Nov)

HCLTECH (HCL Technologies Ltd.)

  • ★ Dividend stocks: Coal India, TCS, HUDCO, HCL Tech, GAIL among top 10 dividend paying stocks - Check yield, annual return (TradingView, 6 Nov)
  • EverestIMS Technologies Ltd Share Price (Business Today, 6 Nov)
  • Dividend stocks: Coal India, TCS, HUDCO, HCL Tech, GAIL among top 10 dividend paying stocks - Check yield, annual return (Livemint, 5 Nov)
  • HCL Technologies Share Price - Live NSE: HCLTECH Stock Price & Chart (Upstox, 5 Nov)
  • ★ HCL Technologies to participate in three investor conferences in Nov 2026 (scanx.trade, 4 Nov)

HDFCAMC (HDFC Asset Management Company Ltd.)

  • ★ HDFC Asset Management Company Limited (HDFCAMC.NS) Seasonal returns chart - Yahoo Finance (Yahoo Finance Singapore, 4 Nov)
  • High Net Profit Margin Stocks to Buy in Nov 2026: Top 5 Picks (Univest, 4 Nov)
  • ICICI Prudential Asset Management Company Limited (ICICIAMC.NS) Seasonal returns chart (Yahoo Finance UK, 4 Nov)
  • Positive Breakout: These 8 large-cap stocks cross above their 200 DMAs (The Economic Times, 6 Nov)
  • ★ Diwali 2026 Muhurat Trading Samvat 2083 stocks with up to 35% gain: HDFC AMC, SBI, Tech Mahindra, 3 more by Anand Rathi (Livemint, 3 Nov)

TCS (Tata Consultancy Services Ltd.)

  • ★ Infosys, Wipro, TCS, other IT stocks in focus as AI meltdown sparks worst rout in US stocks since 2020. Is (The Economic Times, 6 Nov)
  • Tejas Networks wins Rs 1537 crore order from Tata Consultancy Services for BSNL 4G (scanx.trade, 4 Nov)
  • ★ TCS Enterprise AI Study: 84% say productivity is AI’s top benefit; just 10% let AI act without human oversight (Tata Consultancy Services, 4 Nov)
  • ★ Tata Consultancy Services Study Shows 84% Executives See Higher Productivity as Top AI Benefit (www.marketscreener.com, 4 Nov)
  • Tata Consultancy Services (NSEI:TCS) - Stock Analysis (Simply Wall St, 3 Nov)

INFY (Infosys Ltd.)

  • Putting AI at the Heart of Musgrave (Infosys, 5 Nov)
  • ★ Infosys, Wipro, TCS, other IT stocks in focus as AI meltdown sparks worst rout in US stocks since 2020. Is (The Economic Times, 6 Nov)
  • ★ Stocks to buy today: Experts recommend HDFC Life, Infosys, Sai Life Sciences and Ather Energy (CNBC TV18, 6 Nov)
  • ★ Infosys Ltd. ADR outperforms market on strong trading day (MarketWatch, 6 Nov)
  • Narayana Murthy once wanted to work at Wipro. Why did Azim Premji turn him down? Here’s the story (Livemint, 5 Nov)

How these numbers are measured

  • Gross: before brokerage, taxes and slippage, which are not modelled yet.
  • R: profit or loss divided by the amount risked at the stop-loss (a stop-loss hit is about −1.00R, and a little worse if the price jumps past the stop-loss before it can be sold).
  • Exit time: the minute in which the stop-loss or target was touched; trades that touched neither are sold at the 3:15 PM close.
  • Nifty 50: price index, from the moment the bot starts (about 09:35 IST) to 15:15 IST. The bot's percentage is on its whole starting balance, so the two are not like-for-like.

Simulation notice: this is a paper-trading experiment with fake money. No real orders are placed. All results are gross, before brokerage, taxes and slippage, and a few days of results prove nothing. Nothing here is investment advice or a recommendation to buy or sell any security; stocks named are examples from the simulation. This post was written by an AI from the app's recorded data, and the tables are produced directly from the database.

Comments