r/IndiaAlgoTrading

How good are these results?
▲ 12 r/IndiaAlgoTrading+2 crossposts

How good are these results?

Ask me anything. Happy to answer and I would love to know whether this strategy is good or not. Because I'm new to Algo.

u/Marveliteloki — 14 hours ago
▲ 14 r/IndiaAlgoTrading+11 crossposts

How I Built a Real-Time Nifty 50 Forecast Accuracy Engine — And What It Taught Me- self service tool for intraday trader

Most market forecasters have the same problem.

They post a forecast in the morning. The market closes. They move on.

Nobody measures. Nobody improves.

I decided to change that.

The Problem With "I Was Right"

After years of analyzing Nifty 50 intraday movements, I realized something uncomfortable.

I could look at my forecast at 3:30 PM and say "I got the direction right." But that told me almost nothing useful.

Was I right at 9:15 AM or only after 2:00 PM? Was my model 10 minutes early or 10 minutes late? Did I get the morning session right but miss the afternoon? Was Model A better than Model B today — and by how much?

These questions had no answers. Until I built something to answer them automatically.

What I Built

A real-time Nifty 50 forecast accuracy engine that runs , updates every minute during market hours, and computes 30 different metrics automatically.

It looks like a standard chart. But under the hood it is doing something most trading tools don't do — comparing forecast shape against live market data, minute by minute, all day long.

Here is what it tracks:

Correlation metrics:

  • Full day Pearson correlation
  • Last 60, 30, 15 and 5 minute rolling windows
  • Best matching 30-minute window of the day
  • Worst matching 30-minute window of the day

Direction accuracy:

  • Overall up/down direction match percentage
  • Up move accuracy separately
  • Down move accuracy separately
  • Longest correct direction streak
  • Current streak at any moment

Magnitude accuracy:

  • Average error per bar in points
  • Percentage of bars within 5, 10 and 20 points
  • Maximum error (worst single minute)

Time shift detection:

  • Is the forecast running early or late vs actual?
  • By how many minutes?
  • At what shift does correlation peak?

Session analysis:

  • Morning session match (9:15 to 12:00)
  • Afternoon session match (12:00 to 15:30)

Trend accuracy:

  • Did forecast predict the right day direction?
  • Did it catch the peak within 30 minutes?
  • Did it catch the trough within 30 minutes?
  • How close was the forecast high vs actual high?
  • How close was the forecast low vs actual low?
  • End of day accuracy

Overall:

  • Composite weighted score
  • Automatic ranking when running multiple models

The Discovery That Changed Everything

The most surprising metric was time shift.

For weeks my correlation scores looked decent — around 65 to 70 percent. I thought that was reasonable. Then I added time shift detection.

It showed my model was consistently running 10 to 15 minutes ahead of the actual market.

The forecast shape was correct. The timing was off.

Once I knew that, I could account for it. Within two weeks my full day correlation jumped from 68 percent to 81 percent — not because my model got better, but because I finally understood how it was wrong.

You cannot fix what you cannot measure.

Running Multiple Models

The second insight came from comparing models side by side.

I run three different forecast approaches each morning. Before this tool I would look at them visually and pick the one that "felt" most reasonable.

Now I have a comparison table. Every metric. Every model. Automatically ranked.

Some days Model A wins on correlation but Model B wins on direction accuracy. Some days one model nails the morning session while another gets the afternoon right.

The table shows exactly where each model is strong and where it falls apart. That is information you cannot get from looking at lines on a chart.

The chart itself has full interactions — hover tooltips, crosshair, zoom, pan, timeframe switching from 1 minute to 30 minutes, moving averages. What the Hover Shows

When you move your cursor over the chart you see:

  • Exact time label
  • Live Nifty value at that minute (change from open)
  • Each forecast model value at that minute
  • Difference between actual and forecast in points

In the analysis table every cell highlights the best performer in green. You can see at a glance which model is winning, which metric each model leads, and what the composite score is right now.

What This Is Not

This is not a trading system. It does not give buy or sell signals.

It is a measurement and improvement tool. Its job is to tell me honestly how accurate my forecast was today — in 30 different ways — so I can understand my model better and improve it over time.

The goal is not to be right every day. The goal is to understand exactly how and when and why I am wrong, so the model gets better over time.

What Is Next

will update and have real time from Monday or whatever possible at earliest

The Bigger Point

Anyone can post a forecast. Very few people measure it rigorously.

If you are serious about market forecasting — intraday or otherwise — you need a measurement system as rigorous as your forecasting system.

Otherwise you are flying blind and calling it analysis.

Build the feedback loop. Measure everything. Improve systematically.

That is how forecasting becomes a skill rather than a guess.

*I publish daily Nifty 50 intraday forecasts along with real-time accuracy tracking. Follow for updates on methodology, results and the ongoing development of this tool.*They post a forecast in the morning. The market closes. They move on.

Nobody measures. Nobody improves.

I decided to change that.

The Problem With "I Was Right"

After years of analyzing Nifty 50 intraday movements, I realized something uncomfortable.

I could look at my forecast at 3:30 PM and say "I got the direction right." But that told me almost nothing useful.

Was I right at 9:15 AM or only after 2:00 PM? Was my model 10 minutes early or 10 minutes late? Did I get the morning session right but miss the afternoon? Was Model A better than Model B today — and by how much?

These questions had no answers. Until I built something to answer them automatically.

What I Built

A real-time Nifty 50 forecast accuracy engine that runs , updates every minute during market hours, and computes 30 different metrics automatically.

It looks like a standard chart. But under the hood it is doing something most trading tools don't do — comparing forecast shape against live market data, minute by minute, all day long.

Here is what it tracks:

Correlation metrics:

  • Full day Pearson correlation
  • Last 60, 30, 15 and 5 minute rolling windows
  • Best matching 30-minute window of the day
  • Worst matching 30-minute window of the day

Direction accuracy:

  • Overall up/down direction match percentage
  • Up move accuracy separately
  • Down move accuracy separately
  • Longest correct direction streak
  • Current streak at any moment

Magnitude accuracy:

  • Average error per bar in points
  • Percentage of bars within 5, 10 and 20 points
  • Maximum error (worst single minute)

Time shift detection:

  • Is the forecast running early or late vs actual?
  • By how many minutes?
  • At what shift does correlation peak?

Session analysis:

  • Morning session match (9:15 to 12:00)
  • Afternoon session match (12:00 to 15:30)

Trend accuracy:

  • Did forecast predict the right day direction?
  • Did it catch the peak within 30 minutes?
  • Did it catch the trough within 30 minutes?
  • How close was the forecast high vs actual high?
  • How close was the forecast low vs actual low?
  • End of day accuracy

Overall:

  • Composite weighted score
  • Automatic ranking when running multiple models

The Discovery That Changed Everything

The most surprising metric was time shift.

For weeks my correlation scores looked decent — around 65 to 70 percent. I thought that was reasonable. Then I added time shift detection.

It showed my model was consistently running 10 to 15 minutes ahead of the actual market.

The forecast shape was correct. The timing was off.

Once I knew that, I could account for it. Within two weeks my full day correlation jumped from 68 percent to 81 percent — not because my model got better, but because I finally understood how it was wrong.

You cannot fix what you cannot measure.

Running Multiple Models

The second insight came from comparing models side by side.

I run three different forecast approaches each morning. Before this tool I would look at them visually and pick the one that "felt" most reasonable.

Now I have a comparison table. Every metric. Every model. Automatically ranked.

Some days Model A wins on correlation but Model B wins on direction accuracy. Some days one model nails the morning session while another gets the afternoon right.

The table shows exactly where each model is strong and where it falls apart. That is information you cannot get from looking at lines on a chart.

The chart itself has full interactions — hover tooltips, crosshair, zoom, pan, timeframe switching from 1 minute to 30 minutes, moving averages. What the Hover Shows

When you move your cursor over the chart you see:

  • Exact time label
  • Live Nifty value at that minute (change from open)
  • Each forecast model value at that minute
  • Difference between actual and forecast in points

In the analysis table every cell highlights the best performer in green. You can see at a glance which model is winning, which metric each model leads, and what the composite score is right now.

What This Is Not

This is not a trading system. It does not give buy or sell signals.

It is a measurement and improvement tool. Its job is to tell me honestly how accurate my forecast was today — in 30 different ways — so I can understand my model better and improve it over time.

The goal is not to be right every day. The goal is to understand exactly how and when and why I am wrong, so the model gets better over time.

What Is Next

will update and have real time from Monday or whatever possible at earliest

The Bigger Point

Anyone can post a forecast. Very few people measure it rigorously.

If you are serious about market forecasting — intraday or otherwise — you need a measurement system as rigorous as your forecasting system.

Otherwise you are flying blind and calling it analysis.

Build the feedback loop. Measure everything. Improve systematically.

That is how forecasting becomes a skill rather than a guess.

I publish daily Nifty 50 intraday forecasts along with real-time accuracy tracking. Follow for updates on methodology, results and the ongoing development of this tool.

u/Potential_Leek_4814 — 9 hours ago

Built a backtesting engine for NSE stocks with historical index constituents — flexible entry/exit rules, corporate-action-adjusted data

I wanted to test certain strategies and everything out there was either too complex to actually use or too expensive, so I ended up building this myself.

What it can do:

  • Trade an index (with the actual historical constituents for each date — not today's list applied retroactively, which is the mistake most DIY backtests make) or a custom list of stocks.
  • Build entry rules from technical indicators (RSI, SMA/EMA crossovers, volume spikes), combined in flexible OR-of-AND groups.
  • Choose from multiple exit strategies — a target %, a stop-loss %, a max holding period, or any combination of these, with whichever hits first deciding the exit.
  • Compare multiple strategy variants side-by-side on the same data.

On data quality: OHLCV data goes back to 2005 from official NSE bhavcopies, adjusted for splits/bonuses/reverse-splits, and cross-verified for demergers/spin-offs on the clearest cases — so a corporate action doesn't show up as a fake crash in your results.

To be clear about what this is: it's a swing-trading strategy backtester — works off daily OHLCV data, so it's built for multi-day holding strategies, not intraday/scalping.

Still very much a work in progress. If you've got suggestions for what to improve, I'd genuinely value the input — and I'll give access to anyone who offers something useful.

https://preview.redd.it/vx3fgjoyoebh1.png?width=1807&format=png&auto=webp&s=9b078718b80be2ab21cfbb8a477948b643bc172f

https://preview.redd.it/kf6m0toyoebh1.png?width=1781&format=png&auto=webp&s=b5e52a70f76cc3394373dab74b13d35778fc2798

https://preview.redd.it/5ltvr3wyoebh1.png?width=1287&format=png&auto=webp&s=79600c2fb9fea6f136931e80d6732ec4ccc9786e

reddit.com
u/Vivid_Opportunity849 — 13 hours ago

What I learned building "StockMind" and the maths that powers it. You can use it

Hey everyone,

A few days ago, I shared a post about building StockMind—a cash swing trading engine I coded to escape the F&O trap.

Over more than 200 people of you registered to check it out, and the feedback was a massive reality check. Here is a crisp retrospective on what this project has taught me about math, code, and transaction friction. May be you can incorporate it in your investing journey.

  1. The "Complexity Trap" in Machine Learning

As an ML engineer, my instinct was to throw complex deep learning models (like LSTMs) at price data. It failed. Stock prices are highly non-stationary; deep models just memorize historical noise (overfit) and blow up live.

I threw out the neural networks and went back to four simpler mathematical rules that actually work (At least it worked for me till now):

  • Relative Strength (RS) Sector Rotation: Ranks sector indices against the Nifty 50 in last 2 months . We block all buy signals in the bottom 30% weak sectors.
  • Quality + Momentum Filter:
    • Quality: Filter out high debt (Debt/Equity < 1.5) and target efficiency (ROE > 15%).
    • Momentum: Only enter if the asset is in a macro uptrend (Price > 150-day SMA).
  • Cointegration & Stationarity (For Mean-Reversion):
    • Math: Regresses the change in price spread between two assets against lagged values (ADF test). If p-value<0.05, we reject the unit root (non-stationarity) and trade the mean-reversion using Z-scores.
  • NLP / Event Risk Filtering:
    • Usage: Parses sentiment on the 5 most recent corporate news headlines. If the score falls below -0.3 (signaling lawsuits, fines, or bad earnings), the signal is blocked to avoid sudden gap-downs.

2. The "Friction Shock" is Real

Backtests assume you buy and sell at the exact closing price for free.

  • The Reality: The second you add a flat 0.25% cost per trade (brokerage, GST, STT, and slippage), high-frequency strategies die.
  • The Lesson: Keep holding periods longer (30+ days) to survive transaction costs.

3. Why I Kept 3 Different Strategies

No single strategy wins in every market regime. We run three to balance the portfolio:

  • Pure-Momentum: Captures big breakouts in strong trending bull markets.
  • Quality-DipBuy: Buys strong balance-sheet stocks at temporary discounts during market corrections.
  • Unified-PM-QV: Blends both to smooth out the overall drawdown curve.

4. The Automation Illusion (Zerodha API Chores)

We want to write a cron job and let it run forever. But because Zerodha doesn't support free headless logins, I still have to manually log in to Kite every morning to generate the session token. It's a 30-second reminder that "fully automated" systems usually have a manual starting key. I can automate it but the process would require me to share my credentials inside the script which I don't want.

5. Honesty is a Superpower

I was terrified of sharing this because the win rate is only ~46% and the CAGR isn't 200%. Also it's the first time I was sharing one of the project in public. But people are tired of get-rich-quick scams. The raw stats brought in 150+ folks who visited the website and immediately pointed out math loopholes (like survivorship bias) that are helping me optimise the engine.

Status Update:

  • The dashboard is live on our new domain: https://www.thestockmind.com
  • Next Up: Working to extend the universe till Nifty 100. Analysing its pros and cons. Creating a dedicated community around StockMind where I would be sharing insights and updates. Feel free to join it.

Would love to hear from other builders—what was the biggest gap between your backtest and live execution?

reddit.com
u/WinterSpecial7970 — 20 hours ago

Most 1-click algo trading apps let you automate your losses. We want to build the "check engine light" for retail traders. (Looking for honest feedback &amp; a co-founder)

Hey everyone,

We are a team of 4 undergrad students working on a algo-trading startup, and we are at the stage where we need a reality check from people who actually understand this space. We are also looking for a co-founder to join us.

The Problem We Noticed:
Right now, the retail algo-trading space is obsessed with "1-click automation." Platforms give you pre built strategies like (Stratzy) where transparency is not high or the tools to automate a strategy.

A strategy might have an 80% win rate in a bull market, but if the market regime shifts into a choppy sideways trend or a macro crash, that exact same strategy will trigger a "tail event" (like a slow bleed of consecutive small losses, or getting caught in an overnight gap). The user loses money, blames the app, and churns.

Our Idea: The "Historical Repeat" Scanner
Our motto is: "History should repeat itself, not your losses."

Instead of just giving users a blind 1-click bot, we are building an intelligence layer. Here is how it works:

  1. We heavily backtest various strategies to find their "sweet spots"—the exact market conditions, volatility levels, or price zones where the strategy has a massive historical edge and a high probability of profit.
  2. Our app monitors the market in real-time.
  3. When the market hits those exact conditions right now, we alert the user: "The exact historical setup where [Strategy Name] makes money is happening right now. Historical win rate for this specific condition is X%. Enter trade."

Essentially, we aren't just selling the execution tool; we are selling the timing. We tell the user exactly when to pull the trigger based on hard historical data, so they only trade when the profitable part of history is repeating itself.

Why We Need Your Honest Feedback:
We are young, we are hungry, but we know we might have blind spots. We’d love your brutally honest thoughts on:

  1. Is this a real pain point? Would retail traders prefer this over a blind 1-click bot? Will they pay for highly specific, condition-based alerts?
  2. The Flaws: What is the biggest logical flaw in this idea that we aren't seeing?

Looking for a Co-Founder:
As a team of 4 undergrads, we have the vision, the hustle, and we are currently mapping out the architecture. However, we are looking for a key co-founder to join us

We are specifically looking for:

  • A Technical Co-Founder: Someone who is a beast at Python, data engineering, financial APIs, or backend architecture. Someone who can help us build the Monte Carlo simulation engine without melting our server costs.

If you are interested in joining, DM me!

Thanks in advance for the feedback. Tear the idea apart—we need it!

Full disclosure: I used AI to help me rewrite and structure this post to make it readable and organized, but the core concept, the problem we're solving, and the actual vision are 100% ours.

reddit.com
u/Rybitic — 23 hours ago

Need help with a strategy

Hi, I'm a little new here. Basically let's get things straight. I've incurred a loss of 7L. It's okay. I might get all back or it's just life. I'm new to algo trading and idk much about it. I have a system. Built from scratch by myself. It works very well. Working for the past few weeks. It executes orders very well. The timing and tracking. The only thing that I lack is a decent strategy. Currently I've tried two and both are nicely failing. If anyone of you can help me with a decent strategy or suggest some book or something that would be very helpful.

reddit.com
u/Necessary-Till-3226 — 1 day ago
▲ 17 r/IndiaAlgoTrading+1 crossposts

I'm a solo dev + F&amp;O trader. I built the analytics terminal I always wished existed — sharing what I learned (and the tool itself)

I trade Nifty/BankNifty options actively, and for years my setup was a mess of Excel sheets, broker windows, and random OI websites that update once every 3 minutes.

So over the last few months I built MarketGrok (marketgrok.com) — a Bloomberg-style terminal for NSE F&O, as a solo developer. No team, no funding. Just me, a laptop, and way too much chai.

What's inside:

War Room — one screen with Composite Score, PCR, Max Pain, OI Buildup, sentiment meter, option chain, live news feed, top movers, and 34 global indices. This part is completely free.

Live NSE data for 200+ F&O stocks — no dummy/delayed data anywhere. That was rule #1 while building.

Greeks computed server-side using Black-Scholes, because broker APIs don't actually give you Greeks. Had to build that math myself.

OI Pulse, IV Studio, PCR Radar, Greeks Desk — the deeper Pro tools.

Charts built from scratch — CPR (matches Zerodha's calculation exactly), Ichimoku with forward projection, 13 drawing tools, works on mobile touch.

Breakout scanner that beeps when a stock hits a 500-day high. Simple, but it's caught moves I would've missed.

Some honest lessons from building this:

Payment gateways in India hate anything trading-related. Razorpay rejected me outright for the category. Took three attempts before getting approved.

A race condition in my signup flow silently created duplicate users for ~25% of registrations. Found it only after going live. Always use atomic upserts, folks.

Timezone bugs will humble you. IST + JavaScript's toLocaleString = pain.

The War Room is free to use, and Pro tools have a 7-day free trial (no card needed) if you want to poke around.

Not here to hard-sell — genuinely want feedback from people who actually trade F&O. What's missing? What would make this a daily-use tool for you?

Disclaimer: This is an analytics tool, not investment advice. I'm not a SEBI-registered advisor. Trade at your own risk.

reddit.com
u/Left_Nerve_996 — 1 day ago

100+ signups in 12 hours ! Pushed some new changes to my app StockMind.

Hey everyone,

Blown away by the response to yesterday’s launch—100+ signups in the first 12 hours!

I just pushed v1.1 with performance updates and user-requested features. Here is what's new:

  • ⚡ Dynamic Caching (Instant Loads):
    • Market Hours: Prices cache for 2 minutes to keep dashboard numbers active.
    • Off-Market / Weekends: Cache extends to 12 hours to stop redundant API requests.
    • Result: Page loads are now instant (0ms price fetches from memory instead of API waits).
  • 💬 Direct Telegram-Notified Feedback:
    • Added a floating feedback button in the bottom-right.
    • Securely locks your email if you're logged in to prevent spam.
    • Submitting feedback instantly pings my phone via a Telegram bot so I can respond/patch bugs in real-time.

Still analysing whether to move from Nifty 50 to Nifty 100 because of below issues. As of now I am keeping the connection with Zerodha a manual process.

  1. API Limits: Doubling the stocks might trigger Zerodha rate limits (429 throttle errors). But can be managed.
  2. Calculation Bottlenecks: Pairs-trading calculations scale quadratically, jumping from 1,225 combinations to 4,950, causing server timeouts.
  3. Friction & Drawdown: Mid-caps introduce wider bid-ask spreads (slippage) and much steeper drawdowns during market corrections.

Check it out:

Drop your thoughts below or hit the feedback button on the site! 🚀

reddit.com
u/WinterSpecial7970 — 1 day ago
▲ 2 r/IndiaAlgoTrading+1 crossposts

Need help in creating a fundamental research agent/s

I am working with antigravity. I want to create a system wherein i type the name of the company and the ai/agent fetches all the concalls/annual reports numbers etc. Then info gets feeded into LLM for further analysis. Analysis step would be customised according to my requirement. What i want to analyse and how should it display results will be customised by me. In future i want to add 2 LLM for last process. I have absolutely no clue how to go by this. I’m learning so not familiar with other technical terms.

reddit.com
u/sauhard_543 — 1 day ago
▲ 4 r/IndiaAlgoTrading+1 crossposts

Need strategies and tips for learning nifty and sensex market for future and options trading anyone can explain me? Any suggestions? Any algorithms?

Need tips and advices and help me to learn and guide me if you can

reddit.com
u/amayikudu — 1 day ago

Any full time traders still consistently making money?

Last year I quit my quant dev job to trade full-time. Things were going great initially, I made around 50% on a ₹4 crore portfolio. But since the end of April, everything has changed.
I’m down about ₹70 lakh this FY (over 15%). Both my directional and gamma scalping strategies have been struggling, and higher slippage and STT aren’t helping either.
Are other quants still consistently profitable in the current market, or are you seeing the same thing? I’m honestly considering going back to a job.

reddit.com
u/No_Mongoose_3562 — 2 days ago
▲ 92 r/IndiaAlgoTrading+1 crossposts

I’m an ML Engineer. I got tired of "AI Trading Bot" scams, so I coded my own Cash Swing Trading Engine in public. (No advice, just math)

Hey everyone,

Reuploading it since the previous post was taken down by bot. Honestly I am pretty new to this platform (old school) , I would request moderator to give chance before removing it. Looks like putting telegram link caused the post to get deleted.

Anyway I got lot of messages due to previous post, and most people where curious to see did I started trading with real money. And yes I did. I started putting my real money since last 2 months. Attaching the p&l statement. Some unrealized profits are mainly from previous investment which I did way back. But in short I was able to get decent returns of 6k . I deployed closed to 60k. There might be few bugs here and there because as I said earlier, I am really short on time as most of my time goes in looking after my aging parents, my job , my health and my wife. I don't know where this project will go but I am happy that I built something out of the frustration to help me in my investment journey. Was completely fed with financial gurus. Added few more images of my dashboard. And for god sake don't remove this post.

======================================================================

Old post content

Disclaimer: I am not a financial advisor or a SEBI registered entity. I am an Machine Learning engineer working in industry for more than 8+ years.

Like most developers, I wanted my savings to work for me, but the retail trading space is full of traps:

  1. Overfitted AI Bots: Feeding raw stock prices into LSTM/deep learning models just memorizes noise. They look perfect in backtests, but blow up live.
  2. Lagging Indicators: 1970s charts (RSI/MACD) are lagging averages that get front-run by HFT servers at microsecond speeds.
  3. Shitty performance of current Mutual Funds : 90% of the stocks has given negative return in last 2 years. I was tired of handing over commission to them. Hence decided to try something to build

So, After more than 8 months of struggle, I built StockMind—an automated quant engine focused on Cash Equity Swing Trading.

🚫 Why F&O (Futures & Options) is Excluded

SEBI states that 90% of retail F&O traders lose money. The math is structurally rigged against us:

  • Theta (Time Decay): Options decay to zero on expiry. In cash equity, you have holding power to wait out drawdown cycles.
  • Leverage trap: 5x margin leverage means a small 2% market dip triggers a force liquidation at the absolute bottom.
  • Friction drag: Frequent options trades bleed up to 10-15% of your capital annually in STT, GST, and brokerage fees.

📊 The Math & Modeling Implemented

Instead of predicting price ticks, the engine uses structural probability:

  • Sector Rotation: Ranks sector indices daily using Relative Strength (RS) against the Nifty 50. All buy signals in weak sectors (bottom 30%) are automatically blocked.
  • Quality + Momentum Screen: Excludes high-debt companies (Debt-to-Equity > 1.5) and prioritizes high return (ROE > 15%), filtering only macro uptrends (Price > 150-day SMA).
  • Friction-Adjusted Backtests: Adds a flat 0.25% cost per trade to simulate real-world STT and bid-ask slippage.

📈 Metrics & Performance

Backtested metrics over the last 5 years (adjusted for 0.25% cost per trade):

  • CAGR: [24.5%] | Max DD: [-12.3%] | Sharpe: [1.65]

Here is my current live paper-trading performance. I have started trading with real money as well. Will share the result soon in next post.

Dashboard Image

https://preview.redd.it/v7dwghb6lyah1.png?width=2860&format=png&auto=webp&s=ad317c6934d10e1b210972c58a348e943ad0e521

Paper Trading results

https://preview.redd.it/3ho585pelyah1.png?width=2880&format=png&auto=webp&s=b5becae9615b7067f192035fe49f88d4d6acc811

⚠️ Current Weaknesses

  • Manual Login: Have to log in manually to Zerodha Kite every morning to generate the API session token (no free automated headless login).
  • Daily timeframes only: Runs end-of-day data for swing trading. Not designed for day traders. Its more for medium to long term perspective.

💻 Website Link/Dashboard

Would love to get feedback from other developers and quants on the slippage modeling and sector rotation index.

u/WinterSpecial7970 — 3 days ago
▲ 4 r/IndiaAlgoTrading+1 crossposts

Is there any way to save on taxes on fno nifty profit

I heard 39 percent of the profit is the tax u have to pay if ur profit is more than 1 cr, does any one have any idea on saving on taxes

reddit.com
u/Consistent-Soil8933 — 2 days ago

Documenting my algo trading journey: 4 MCX algos

After 5 months of building my own algo trading platform, I’m finally seeing consistent results. 🚀

I wanted to share a small milestone.

For the past 5 months, I’ve been building and refining my own trading platform after work- coding, backtesting, fixing bugs, and optimizing strategies.

There were plenty of late nights where I wasn’t sure if the effort would ever pay off.

Current setup:
4 MCX algos
2 for CrudeOilM
2 for NatGasMini

Results (1 lot each | Since 8 May):
🧿 8 profitable weeks in a row
❌ Zero losing weeks
🚀 Live deployment started 10 days ago

Capital: ₹76,000
Net Profit: ₹48,000
ROI: 60%

I know backtests aren’t the same as live trading, which is why I’ve already started deploying the strategies live. So far, it’s been encouraging and has given me confidence to keep improving.

Still a long way to go, but it’s satisfying to see months of hard work finally turning into something real.

Would love to hear from others building their own trading systems. What’s been the hardest part of your journey?

u/TechieTrader_87 — 2 days ago
▲ 2 r/IndiaAlgoTrading+1 crossposts

Need Historical NIFTY 50 OHLC Candle Data (2007–2026) for Backtesting &amp; Research

&#x200B;

Hi everyone,

I'm looking for historical NIFTY 50 OHLC data from 2007 to 2026 for a personal backtesting and research project.

If anyone has data in any of these timeframes, I'd really appreciate it:

- 5-minute (preferred)

- 15-minute

- 30-minute

- 1-hour

CSV or Excel format would be great, but any usable format is fine.

If you have the data and don't mind sharing it, I'd be very grateful. And if you don't have it but know where I can get it, I'd appreciate any recommendations as well.

Thanks a lot!

reddit.com
u/anynomuspragna — 3 days ago

I replaced fixed trading rules with an LLM (Claude) for NSE F&amp;O decisions. Week 1 paper results — mostly lessons, not profits.

What this is

An autonomous options trading agent for NIFTY + BANKNIFTY. Instead of coded rules like "if RSI > 70 sell" or "EMA crossover → buy," the agent sends market data to Claude (Anthropic's LLM) every 15 minutes and lets it decide: trade or wait, CE or PE, which strike, when to exit.

The idea: an LLM can weigh 15+ inputs simultaneously and make contextual judgments that fixed rules can't. "Regime is bullish and 6/7 signals agree, but VIX just spiked 3 points in 10 minutes — wait." No indicator combo can reason like that.

Whether this actually works better than a well-tuned rule-based system is what I'm testing. Week 1 results say: maybe, but the exits need serious work.

Architecture (for the technical crowd)

Market Data (Upstox WebSocket + REST API)
    │
    ▼
┌─────────────────────────────┐
│  Data Layer                 │
│  Spot, Option Chain, Greeks,│
│  VIX, PCR, FII/DII, OI     │
│  15min/5min candles         │
└───────────┬─────────────────┘
            ▼
┌─────────────────────────────┐
│  Agent (Maker)              │
│  Claude Haiku — proposes    │
│  trade with reasoning       │
└───────────┬─────────────────┘
            ▼
┌─────────────────────────────┐
│  Checker (Validator)        │
│  Claude Sonnet — reviews    │
│  and approves/rejects       │
└───────────┬─────────────────┘
            ▼
┌─────────────────────────────┐
│  Paper Broker               │
│  Real bid/ask fills         │
│  Real costs (Upstox API)    │
│  Real margin checks         │
│  Trailing SL on live ticks  │
└─────────────────────────────┘

Dual-agent validation: A cheaper model (Haiku) proposes trades. A smarter model (Sonnet) reviews every proposal before execution. Think of it as trader + risk manager. ~Rs 100-150/day API cost for both combined.

Risk monitor: Background thread checks every few seconds — trailing stop-loss updates on real WebSocket ticks, daily loss halt (4% of capital), smart EOD exit (closes expiring/losing positions at 3:15 PM, holds profitable ones overnight).

Why not just code the rules?

I saw a post here recently: "RS + VWAP on 5min, profit factor < 1." And a comment: "Only indicator based algos will not be consistent in long run." That matched my experience.

The problem with indicator rules isn't the indicators — it's that markets change context. A RSI 70 during a breakout is a continuation signal. A RSI 70 at resistance is exhaustion. A coded rule treats them identically. An LLM can read the surrounding context and distinguish them.

The counter-argument (which I take seriously): maybe Claude is just doing the same pattern matching with extra steps and extra cost. Week 2 will test this specifically — I'm auditing whether Claude actually reasons differently with contextual data, or just mechanically follows regime + RSI like a fancy indicator algo.

What makes the paper trading realistic

This is the part I'm most confident about. Most paper results are fantasy because they fill at LTP with zero slippage. Ours doesn't:

Factor Our Approach
Fill price BUY at ask, SELL at bid — real WebSocket depth data, ~1 tick/sec
Slippage Depth-based + VIX/time jitter. Extra penalty if spread > ₹5
Costs Real Upstox brokerage API (not estimated). STT, exchange txn, GST, stamp duty — all from broker
Margins Real Upstox margin API. Can't enter trades the account can't hold
Position monitoring WebSocket FO ticks for open positions. Trail SL updates on real price movement

Week 1 results (Jul 1-3) — honest numbers

Capital: ₹5,00,000. NIFTY + BANKNIFTY options, BUY-only directional, 1-2 lots.

Day Trades What happened Realized P&L
Jul 1 3 Entries correct, exits broken. FO ticks wired mid-day. ₹0 (held overnight)
Jul 2 3 All entries caught direction right. Trail SL too loose — gave back ₹11K unrealized on one trade. +₹1,746
Jul 3 3 New trail SL deployed (8%→3%→2%). Agent skipped all afternoon cycles. Testing, not trading

Net Week 1: +₹1,746 realized. Not meaningful. The real finding is below.

What actually went wrong (the useful part)

1. Trail SL was the #1 problem, not entry signals. On Jul 2, a BANKNIFTY position hit +₹6,295 unrealized within 10 minutes of entry. By EOD it was -₹5,989. That's an ₹11K swing because the trailing stop was set at 35% — way too loose for options that can move 10% in minutes. Fixed to 8%→3%→2% progressive tightening. The entry was right. The exit let the profit evaporate.

2. Claude enters on Cycle 1 every single day. 9:30 AM, first cycle, Claude sees "regime BULLISH, 6/7 signals agree" and enters immediately. Never waits for a pullback, never says "let me observe for 30 minutes." In 5 out of 6 trading days, Cycle 1 = instant entry. This looks like pattern matching, not reasoning.

3. A 0.2% price-move gate killed the entire afternoon. I had a gate: "if market moved < 0.2% since last cycle, skip." On Jul 3, after all positions exited by 10:55 AM, the market went flat. The gate skipped every cycle from 11:17 to market close. With zero positions open, the agent should have been scanning for new entries, not sleeping. A 3-line fix, but it cost an entire afternoon.

4. Cost API was returning ₹0. Upstox brokerage API returns {"charges": {"total": 49.32}} but my code read data.total instead of data.charges.total. Every trade showed Costs = ₹0.00. The kind of bug that looks fine in logs until you check the numbers.

Current input audit

Inspired by that excellent "₹25L → ₹2.7Cr backtest autopsy" post here — I tagged every system input:

Input Tag
Slippage (depth-based) MEASURED — real bid/ask
Trading costs MEASURED — real Upstox API
Margins MEASURED — real Upstox API
Trail SL percentages ASSUMED — 3 days data
Regime detection ESTIMATED — EMA/SuperTrend, not validated
Cooldown (30 min) ASSUMED — picked a number
Daily loss limit (4%) ASSUMED — reasonable but arbitrary
Taxes NOT MODELED

4 measured, 2 estimated, 4 assumed. The assumed column is the real risk.

What's next

  • This weekend (Jul 4-5): Adding momentum data (VWAP, change from open, candle trend), IV rank, put/call IV skew — not as rules, but as context for Claude to reason about
  • Week 2 (Jul 7-11): Pure observation. Does Claude actually use the new data to make better decisions, or does it keep entering on Cycle 1? If it ignores the data, the features are noise — cut them
  • Aug 28: Go/no-go decision for live trading with real (small) capital

Questions for this sub

  1. For those who've gone from paper → live: what was the biggest gap that paper trading didn't reveal? (Even with realistic fills, I'm sure I'm missing something)
  2. Has anyone used LLMs for actual trade decisions (not just analysis/summaries)? What was your experience with consistency — does the LLM make the same decision given the same inputs?
  3. The dual-agent (proposer + reviewer) setup costs ~₹100-150/day in API calls. Is that worth it over a single model, or is the "checker" just rubber-stamping?

905 unit tests. No paid tools — everything runs on Upstox free API + Anthropic API (₹100-150/day). Code is private but happy to share architecture details in comments.

reddit.com
u/Chennai_data_guy — 3 days ago