I built an AI trading bot that executes simulated trades with fake money on the NSE, and today it made no trades and stood aside. There was no gross profit or loss; its paper balance remained ₹101,430.60.

Every stock the bot looked at
| # | Stock | Sector | Up at start | Volume vs usual | Headlines | Decision |
|---|---|---|---|---|---|---|
| 1 | Hitachi Energy India (POWERINDIA) | Capital Goods | +9.21% | 26.55x | 5 | Not bought: rated strong; not even 1 share fits the rules |
| 2 | Siemens Energy India (ENRIN) | Capital Goods | +2.38% | 6.32x | 5 | Not bought: no specific company event; news not positive; headline did not name the company |
| 3 | ABB India (ABB) | Capital Goods | +1.30% | 4.54x | 5 | Not bought: event still to come; news not positive |
| 4 | Divi's Laboratories (DIVISLAB) | Healthcare | +1.83% | 1.88x | 5 | Not bought: no specific company event; event still to come; headline did not name the company |
| 5 | Apollo Hospitals Enterprise (APOLLOHOSP) | Healthcare | +1.11% | 3.22x | 5 | Not bought: management change news is not a kind the bot trades on; news not positive |
| 6 | Punjab National Bank (PNB) | Financial Services | +1.00% | 5.81x | 5 | Not bought: no specific company event |
| 7 | Cummins India (CUMMINSIND) | Capital Goods | +1.73% | 1.32x | 5 | Not bought: no specific company event; news not positive; headline did not name the company |
| 8 | CG Power and Industrial Solutions (CGPOWER) | Capital Goods | +0.91% | 2.17x | 5 | Not bought: no specific company event |
| 9 | BSE (BSE) | Financial Services | +0.82% | 2.23x | 5 | Not bought: product or partnership news is not a kind the bot trades on |
| 10 | Adani Green Energy (ADANIGREEN) | Power | +0.57% | 5.85x | 5 | Not bought: no specific company event |
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’s result was 0.0%, while the Nifty 50 moved -0.06%. These are measured differently: the bot’s result uses its whole balance, while the index move covers the same time window. This is a daily account of my AI trading bot for the Indian stock market, with every decision logged for review.
Which NSE stocks the AI trading bot picked
At 09:35, the bot screened 100 stocks; 13 passed the morning screen for a rise of at least 0.5% and volume pace of at least 1.0. The top 10 candidates went on to the news step. Prices come from Yahoo Finance, while the headline feed comes from Google News.
POWERINDIA stood out on price and activity: it was up 9.21% with relative volume of 26.55. ENRIN was up 2.38% with relative volume of 6.32; ABB was up 1.3% with 4.54. Among other notable readings, PNB showed 5.81 relative volume, ADANIGREEN 5.85, and APOLLOHOSP 3.22. Those figures explain why the stocks surfaced for review, not why they moved.
What the news said about each stock
POWERINDIA had the clearest company-specific story. Business Standard’s 12 November headline reported Hitachi Energy India’s Q2 net profit up 21% and revenue up 63.5%. The company’s 13 November release described strong Q2 performance and a record backlog; TradingView’s 12 November headline also cited the ₹33,335 crore backlog. The AI rated the catalyst strong, citing earnings growth and the backlog.
The other Capital Goods names had less direct evidence. ENRIN’s headlines included a 12 November Yahoo Finance item about Siemens Energy AG and a 11 November Transformer Magazine story about grid-equipment backlogs. The AI noted that the Siemens Energy AG stories did not name Siemens Energy India. ABB’s Upstox and ET Now headlines on 13 November said Q2 results were due that day, not that results had been reported. For CUMMINSIND, headlines included unrelated Cummins price-target items and an India Today story about Pat Cummins; the AI said none reported a specific event for Cummins India. CGPOWER’s relevant headline was Energetica India Magazine’s 10 November report of ₹392.93 crore in approved expansion capex, but the AI still rated its news weak.
Healthcare headlines also failed the bot’s strong-news test. Divi’s Laboratories’ 10 November item from pharma.economictimes.indiatimes.com described plans to expand peptide synthesis capacity, without a concrete figure. The AI called it weak and noted the missing figure. Apollo Hospitals’ 13 November HR Today headline reported Anand Wasker’s appointment as Chief Business Officer – Apollo International; the AI rated the management-change news weak and not bullish.
PNB’s Business Standard and Economic Times headlines on 11 and 12 November described a share-price rally and 52-week highs. The AI treated this as price momentum, not a specific company event. BSE’s Times of India headline on 12 November described a partnership to help 100 Marathwada firms go public, which the AI rated weak. ADANIGREEN’s BW Businessworld and MillenniumPost headlines on 13 November reported its addition to the MSCI Global Standard Index; the AI did not count this as a qualifying specific company event. Across the remaining headlines, several were price pages, broad commentary, unrelated items, or announcements rather than completed results.
Why the trading bot bought or skipped each stock
The bot bought none of the candidates. POWERINDIA was the only stock rated strong, but code rejected its trade plan because not even one share fit the rules. The reason recorded was that the planned trade could not fit; the record does not identify a more specific constraint. Its hypothetical return through the close was 1.57%, not a return earned by the account.
The other nine were not bought because their news was rated weak or no specific company event was found. That included future ABB results, general price momentum in PNB, and the headlines about CGPOWER and ADANIGREEN. No stock was bought on a chart signal: the bot uses its scheduled news check, then code applies the entry, stop-loss and target rules. A stop-loss is the price where the bot gives up on a trade; a target is the price where it takes profit.
How the trading bot behaved
The AI rated all 10 candidates and marked one strong; code allowed zero trades and turned down one plan for the position-size reason above. The current risk limit is 0.5% of balance per trade, with a possible gain of at least twice the possible loss. The bot can hold at most 3 stocks. Since 12 October, the AI’s news assessment has also had to answer factual questions about each headline before code applies the rules.
The one-per-sector approach is already active in its softer form: a first-choice stock from a sector gets priority, while another strong stock from that sector can fill a slot only if space remains. It did not come into play today; there was only one strong candidate. No positions meant no stop-losses or targets fired, and no stocks were held together from one sector. I record the AI’s reasons, code’s decisions and the session post-mortem so the paper-trading record can be checked.
Software Engineer's Corner: How my bot finds the stocks that are moving
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
After the bot fetches the prices of the Nifty 100 (India's list of 100 large NSE stocks), it needs to narrow those 100 stocks down to a handful worth investigating through news.
This is the screener.
It is important to understand that this part of the bot does not use AI. It uses Python, a data-analysis library called Pandas, and a few mathematical calculations to identify stocks that are both rising and experiencing unusual trading activity.
Before getting into the screening logic, let's understand Pandas.
First, what is Pandas?
Pandas is a popular Python library used for working with structured data.
Think of it as Excel, but designed for Python programs.
You can use it to: - Read data from CSV and Excel files. - Organise information into rows and columns. - Filter records based on conditions. - Calculate averages, percentages and other statistics. - Analyse large datasets efficiently. - Combine and compare information from different sources.
For example, imagine you have the following stock prices:
| Stock | Yesterday's Close | Today's Price | Volume |
|---|---|---|---|
| Reliance | ₹1,450 | ₹1,480 | 25 lakh |
| Infosys | ₹1,600 | ₹1,620 | 18 lakh |
| TCS | ₹3,200 | ₹3,190 | 12 lakh |
Pandas allows Python to work with this information as a table.
In Pandas, this table is called a DataFrame.
A DataFrame is essentially a two-dimensional data structure with rows and columns. Each column can contain a different type of information, such as stock names, prices or trading volumes.
How I use Pandas in my bot
My bot fetches historical and current stock data for the Nifty 100.
Instead of manually processing each stock's prices, I use Pandas to organise and analyse the data.
For example, a stock's price history might look something like this:
| Date | Open | High | Low | Close | Volume |
|---|---|---|---|---|---|
| Monday | 1,420 | 1,450 | 1,410 | 1,440 | 12 lakh |
| Tuesday | 1,440 | 1,460 | 1,430 | 1,450 | 15 lakh |
| Wednesday | 1,450 | 1,490 | 1,445 | 1,480 | 25 lakh |
Each row represents a trading session, and each column represents a piece of market information.
In Python, I can access an individual column like this:
python
frame["Close"]
This gives me the closing prices of the stock.
I can access the latest closing price using:
python
frame["Close"].iloc[-1]
Here:
- frame is my Pandas DataFrame.
- "Close" selects the closing-price column.
- .iloc[-1] selects the last row, which contains the latest available value.
This makes it easy for the bot to work with the latest stock prices without manually searching through the data.
Two numbers per stock
A "mover" in my bot is a stock that is up today and busy today.
Two numbers help identify these stocks:
1. Change
This measures how much the stock price has increased compared with yesterday's closing price, expressed as a percentage.
For example, if a stock closed yesterday at ₹1,000 and is currently trading at ₹1,030, its change is:
python
change = ((1030 - 1000) / 1000) * 100
Result: 3.0%
Pandas also provides convenient functions such as .pct_change() to calculate percentage changes between consecutive rows.
2. Relative volume
Volume tells us how many shares have been traded.
Relative volume compares today's trading volume with the stock's usual trading volume.
Think of it like a backend server. If your application normally receives 1,000 requests per minute but suddenly receives 3,000, something unusual is happening.
Similarly, if a stock normally trades 10 lakh shares but has already traded 30 lakh shares, its relative volume is 3.0.
Because the bot runs while the market is still open, it adjusts the historical average volume to account for the portion of the trading day that has passed. Otherwise, comparing morning volume with a full day's average would be misleading.
The screening logic
Both conditions must be satisfied for a stock to qualify:
- Its price change must be above the minimum threshold.
- Its relative volume must be above the minimum threshold.
If either condition fails, the stock is dropped. This is the exact code from my bot (it works through all 100 stocks one by one and counts why each dropped stock was dropped):
python
change = (closes.iloc[-1] / closes.iloc[-2] - 1) * 100
rel_volume = volumes.iloc[-1] / (volumes.iloc[:-1].mean() * fraction)
price = closes.iloc[-1]
avg_range = (frame["High"] - frame["Low"]).tail(14).mean() # typical daily range
if change < MIN_CHANGE:
counts["not up enough"] += 1
continue
if rel_volume < MIN_REL_VOLUME:
counts["up, but volume too low"] += 1
near_misses.append((symbol, change, rel_volume))
continue
found.append((symbol, change, rel_volume, change * min(rel_volume, 3), price, avg_range))
The thresholds are controlled by two constants: MIN_CHANGE and MIN_REL_VOLUME.
This means I can adjust the screening strategy by changing these values rather than rewriting the entire screening process.
The ranking score
Once the qualifying stocks are identified, the bot ranks them using this formula:
python
score = change * min(rel_volume, 3)
The min(rel_volume, 3) part caps the volume multiplier at 3.
Why?
Imagine one stock has a relative volume of 20 while another has a relative volume of 2.5.
I don't want an unusually large volume spike to dominate the ranking entirely.
The cap is a design choice in my strategy. It allows both price movement and trading activity to contribute to the final score.
Worked example
These inputs are made up to demonstrate the calculations. They are not actual market data.
| Stock | Price Change | Relative Volume | Score | Result |
|---|---|---|---|---|
| A | 3.0% | 1.5x | 4.5 | Passed |
| B | 2.0% | 6.0x | 6.0 | Passed |
| C | 0.3% | 5.0x | — | Dropped |
| D | 4.0% | 0.8x | — | Dropped |
Stock C is busy but barely moving upwards.
Stock D is rising but does not have enough trading activity.
Both are dropped.
Stock B ranks above A because of its stronger relative volume, but the volume contribution is capped at 3.
Why Pandas matters here
Without Pandas, I would have to write more code to organise price history, retrieve individual values, calculate averages and process the data.
Pandas makes these operations much easier and more readable.
It is not making trading decisions for my bot. It is helping Python prepare and analyse the data that the screening logic needs.
The distinction is important:
- Pandas organises and processes the market data.
- Python executes the screening calculations and rules.
- AI comes later, when the bot investigates news and evaluates possible catalysts behind the stock movements.
Each component has a specific responsibility.
What else to explore
If you want to experiment with Pandas yourself, try these:
frame.head()– displays the first five rows.frame.tail()– displays the last five rows.frame["Close"]– selects the closing-price column.frame["Close"].iloc[-1]– gets the latest closing price.frame["Close"].pct_change()– calculates percentage changes between consecutive closing prices.frame["Volume"].mean()– calculates the average trading volume.
You can learn more from the official Pandas documentation.
Today's numbers
Today the bot checked 100 stocks, and 13 passed both screening conditions.
These stocks now become candidates for the next stage of the experiment: investigating the news behind their movements.
Follow the experiment live: the full record is on the dashboard at niftyexperiment.com.
More from the experiment
- Previous daily post: AI trading bot for NSE: 12 November 2026 paper results
- All weekly summaries from the AI trading bot
- All daily reports from the AI trading bot
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.
POWERINDIA (Hitachi Energy India Ltd.)
- ★ Hitachi Energy Q2 net profit rises 21% to Rs 319 cr, revenue jumps 63.5% (Business Standard, 12 Nov)
- ★ Hitachi Energy India Limited delivers strong Q2FY27 performance: Strong market momentum drives orders, revenue growth, and record backlog (Hitachi Energy, 13 Nov)
- ★ Hitachi Energy India Q2 FY27 slides: revenue surges 64% on grid demand By Investing.com (Investing.com India, 12 Nov)
- ★ Hitachi Energy India Q2 Results: Order Backlog Hits Record Rs 33,335 Cr As Grid Investment Drives Demand (TradingView, 12 Nov)
- ★ Hitachi Energy India's Q2 profit rises 21%, revenue jumps 64% as margins shrink - CNBC TV18 (LinkedIn, 12 Nov)
ENRIN (Siemens Energy India Ltd.)
- Siemens Energy AG (SMEGF) (Q4 2026) Earnings Call Highlights: Record Results, EUR164 Billion ... (Yahoo Finance, 12 Nov)
- Grid equipment backlogs grow across manufacturers (Transformer Magazine, 11 Nov)
- Six Stocks To Buy Today, November 13: Meesho, Paytm, Bajaj Finance, And More (NDTV Profit, 13 Nov)
- Siemens Energy Earnings Call Signals Strong Growth Ahead (TipRanks, 12 Nov)
- Power Transformers Market Size to Reach USD 48.2 Billion by 2033 as Grid Modernization Accelerates (openPR.com, 11 Nov)
ABB (ABB India Ltd.)
- Stocks to watch, Nov 13: ABB India, ZEEL, Eicher Motors, Ola Electric, Religare Enterprises, TMPV, Vi (Upstox, 13 Nov)
- ★ Q2 Results, Nov 13: Grasim, Eicher Motors, ABB India, Tata Motors PV, Manipal Health, Indo-MIM, RVNL, Godrej Industries, others to post earnings (Upstox, 13 Nov)
- The Industrial Robot Chokepoint: How India Must Think About China's ABB Veto (Swarajya, 11 Nov)
- ★ Q2 Results Today, November 13: Tata Motors PV, Grasim Industries, Eicher Motors, Godrej Industries, ABB India among companies to announce earnings (ET Now, 13 Nov)
- ★ Q2 results today, November 13: Grasim Industries, Eicher Motors, ABB India, Tata Motors PV, Godrej Industries among companies to announce earnings (Business Upturn, 13 Nov)
DIVISLAB (Divi's Laboratories Ltd.)
- The Bet Divi's Laboratories Holders Made Before A 82% Jump (Simply Wall St, 13 Nov)
- ★ Divi’s Lab to expand peptide synthesis capacity with new SPPS Lines (pharma.economictimes.indiatimes.com, 10 Nov)
- Divi's Laboratories Limited (DIVISLAB.BO) Seasonal returns chart (Yahoo Finance UK, 11 Nov)
- Deven Choksey prefers Sun Pharma, Cipla for fresh buying; sees upside in Indian IT (CNBC TV18, 11 Nov)
- Sun Pharma Share Price: 17.4% CAGR vs Cipla, Divi's (Univest, 11 Nov)
APOLLOHOSP (Apollo Hospitals Enterprise Ltd.)
- ★ Apollo Hospitals Appoints Anand Wasker as Chief Business Officer – Apollo International (https://hrtoday.in/, 13 Nov)
- APOLLOHOSP Share Price Today - Apollo Hospitals on NSE/BSE (scanx.trade, 12 Nov)
- Apollo Hospitals stock supported by expansion, value unlocking triggers (Business Standard, 10 Nov)
- Apollo Hospitals Q2 FY27 Earnings Call Transcript Now Available (Kalkine India, 11 Nov)
- Apollo Hospitals (NSE:APOLLOHOSP) Q2 FY27 Earnings Call Transcript Released: Key Insights and Investor Impact (Kalkine Media, 11 Nov)
PNB (Punjab National Bank)
- PNB Share Price (Upstox, 12 Nov)
- ★ Punjab National Bank share price soars 11% in two days; hits 52-week high (Business Standard, 11 Nov)
- ★ Punjab National Bank among 4 stocks hitting 52-week highs; rally up to 22% in a month (The Economic Times, 12 Nov)
- Bank holiday today: Are SBI, HDFC, ICICI branches closed on Friday, 13 November for Wangala Festival? Check RBI calendar (Livemint, 13 Nov)
- Punjab National Bank (PNB.NS) Seasonal returns chart (Yahoo Finance UK, 10 Nov)
CUMMINSIND (Cummins India Ltd.)
- Usman Khawaja 100 percent wrong, his Sandpapergate story irresponsible: Pat Cummins (India Today, 13 Nov)
- What Are Visa Services, Power Engine and Pharma Stocks? (Univest, 11 Nov)
- Freedom Broker maintains Buy on Cummins, cuts price target to $720 (scanx.trade, 12 Nov)
- Allison Declares Quarterly Dividend (Yahoo Finance Singapore, 12 Nov)
- UBS maintains Buy on Cummins, cuts price target to $675 (scanx.trade, 11 Nov)
CGPOWER (CG Power and Industrial Solutions Ltd.)
- CG Power and Industrial Solutions Limited (CGPOWER.NS) stock price, news, quote and history (Yahoo Finance Singapore, 12 Nov)
- Festive Season Closure Would Affect Thousands Of Families' Livelihood: Bombay High Court Stays Shutdown... (Live Law, 12 Nov)
- CG Power and Industrial Solutions Limited (CGPOWER.NS) Stock Price, News, Quote & History (Yahoo! Finance Canada, 12 Nov)
- ★ CG Power Approves INR 392.93 Crore Capex for Manufacturing Expansion (Energetica India Magazine, 10 Nov)
- What Are IT Services, Electrical and Auto Parts Stocks? (Univest, 12 Nov)
BSE (BSE Ltd.)
- Share Market: BSE and NSE conduct muhurat trading on Diwali (News On AIR, 12 Nov)
- BSE SENSEX Edges Up 31.61 Points to 81,911.01 for a Third Straight Gain as Realty Stocks Surge (BBN Times, 13 Nov)
- BSE Revises WTI Crude Oil Derivatives Contract Specifications (Deccan Chronicle, 12 Nov)
- Bright Outdoor Media Moves To BSE, NSE Main Boards After Rs 155 Cr FY26 (TradingView, 12 Nov)
- ★ CMIA, BSE join hands to help 100 Marathwada firms go public (The Times of India, 12 Nov)
ADANIGREEN (Adani Green Energy Ltd.)
- Adani slashes Maharashtra power project cost by 99%, its forest dues plummet; Centre orders probe (The Indian Express, 13 Nov)
- Adani Enterprises, Adani Ports, Adani Green: How Adani Group stocks are performing as benchmarks stay flat (Upstox, 12 Nov)
- ★ MSCI Adds LIC, Coforge, Adani Green And Meesho To Global Standard Index (BW Businessworld, 13 Nov)
- Indian Green Energy Stocks Show Mixed Trends As Select Counters Gain Amid Market-Wide Selling Pressure (12 November 2026) (SolarQuarter, 12 Nov)
- ★ LIC, Coforge, Adani Green, Meesho enter MSCI Global Standard Index (MillenniumPost, 13 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
Post a Comment