2 months progress: issues, fixes, and live results of my quant engine.

2 months progress: issues, fixes, and live results of my quant engine.

I am an ML engineer with 9+ years of experience. A while back, I grew tired of watching traditional mutual funds charge high expense ratios while underperforming in a choppy, unpredictable market.

Mind you, I am a full-time employee. I don't have the time to sit and stare at live charts all day. I wanted to use my engineering background to build a completely systematic approach to swing trading. I started coding this last December, launched it to the public in July, and here is how it's going.

The Live Results (Skin in the Game) I’ve been trading live using the app's signals since March. Over the last 4-5 months, the live account has netted a realised profit of +₹21k.

The Issue: What the new paper trading module revealed In July, I built a paper trading/simulation engine into the backend to stress-test the math further. Over the last month, the paper trading simulation showed about +₹8k in profit, but the ride wasn't smooth.

https://preview.redd.it/3hu1gsol2sjh1.png?width=1080&format=png&auto=webp&s=39714149f009e0761f8ae4d7deb852b50490c261

I attached a screenshot of the backend simulation dashboard. You can see the simulated equity curve took a pretty nasty dip in mid-July. When I broke down the strategy data, I found the culprit: my "Pure Momentum" strategy was bleeding money (0.26 reward factor). Meanwhile, the "Quality Value" setups were carrying the whole portfolio with a 75% win rate.

The Fix: What I changed this weekend Looking at the bad data from the July simulation, I realized my risk-reward logic wasn't strict enough on momentum plays. I spent this weekend pushing some major fixes to the core engine:

  • Forced 1:2 Risk-Reward: The script now calculates a strict 1.5x ATR stop-loss and a 3x ATR target. If the math doesn't offer at least a 1:2 setup, the engine automatically rejects the trade.
  • Anchored VWAP: Added a 20-day AVWAP check. If a stock is trading below its 20D AVWAP, the engine ignores it to avoid catching falling knives.
  • F&O Sector Breadth: Added a market breadth check (Advances vs Declines). It won't give a buy signal if the parent sector is actively dumping.

Final Results & Next Steps The engine is much tighter now and rejecting low-probability setups before they even reach the dashboard. Let's see how things go in the future. Will keep folks posted.

For those who have been asking or using it, I've kept the price at just ₹199/month for the first 100 users to access the Quality Value & Unified Strategy (both of which have great reward factors). This just helps make the app's server costs sustainable. Everything else on the app is completely free.

You can check out the updated version here: 🔗 https://www.thestockmind.com

Thanks to everyone who gave feedback on the last post. If any other devs/traders have ideas for metrics I should add to the scoring algorithm next, let me know!

reddit.com
u/WinterSpecial7970 — 4 days ago

2 months progress: issues, fixes, and live results of my quant engine.

Hey guys, quick update on the stock recommendation app I've been building and trading with.

Just to recap the timeline: I've been trading live using the app's signals since March. Over the last 4-5 months, the live account has netted a realised profit of +₹21k. Not much but that's fine.
Here is my Verified Zerodha Ledger for transparency

https://preview.redd.it/ysoly5xptjjh1.png?width=1080&format=png&auto=webp&s=909f0a622dcc02d7260e1a2b23c6fc4250c35dd1

Mind you I am a full time employee with hardly any time in investing/trading. Launched this app to public in the month of July . Below are the observations

The Issue: What the new paper trading module revealed

https://preview.redd.it/ges5l5gotjjh1.png?width=1080&format=png&auto=webp&s=db2895d1826254dc222ddda62f9b64472978ace6

In July, I built a paper trading/simulation engine into the backend to stress-test the math further. Over the last month, the paper trading simulation showed about +₹8k in profit, but the ride wasn't smooth.

Quality Value Strategy performing best 

I attached a screenshot of the backend simulation dashboard. You can see the simulated equity curve took a pretty nasty dip in mid-July. When I broke down the strategy data, I found the culprit: my **"Pure Momentum"**strategy was bleeding money (0.26 reward factor). Meanwhile, the "Quality Value" setups were carrying the whole portfolio with a 75% win rate.

The Fix: What I changed this weekend

Looking at the bad data from the July simulation, I realized my risk-reward logic wasn't strict enough on momentum plays. I spent this weekend pushing some major fixes to the core engine:

  • Forced 1:2 Risk-Reward: The script now calculates a strict 1.5x ATR stop-loss and a 3x ATR target. If the math doesn't offer at least a 1:2 setup, the engine automatically rejects the trade.
  • Anchored VWAP: Added a 20-day AVWAP check. If a stock is trading below its 20D AVWAP, the engine ignores it to avoid catching falling knives.
  • F&O Sector Breadth: Added a market breadth check (Advances vs Declines). It won't give a buy signal if the parent sector is actively dumping.

Final Results & Next Steps

The engine is much tighter now and rejecting low-probability setups before they even reach the dashboard. Let's see how things go in future. Will keep folks posted.

For those who have been asking or using it, I've kept the price at just ₹199/month for first 100 users to access Quality Value & Unified Strategy (both of them have great reward factor) and also to make this app sustainable. For rest, folks can use rest all the features for free. You can check out the updated version here:

https://www.thestockmind.com

Added some cool features as well along with fixed few bugs. Added dedicated navigation and feedback buttons on logout as well. Thanks to everyone who gave feedback on the last post. Will be looking for some new feedbacks as well. If any other devs/traders have ideas for metrics I should add to the scoring algorithm next, let me know!

reddit.com
u/WinterSpecial7970 — 5 days ago

2 months progress: issues, fixes, and live results of my quant engine.

Hey guys, quick update on the stock recommendation app I've been building and trading with.

Just to recap the timeline: I've been trading live using the app's signals since March. Over the last 4-5 months, the live account has netted a realised profit of +₹21k 🔗 Here is my Verified Zerodha Ledger for transparency

https://preview.redd.it/6t83c2k1rjjh1.png?width=2574&format=png&auto=webp&s=e563bcec3c01883084f7bce40b7cf634ba2d9a7f

Mind you I am a full time employee with hardly any time in investing/trading. Launched this app to public in the month of July . Below are the observations

The Issue: What the new paper trading module revealed

In July, I built a paper trading/simulation engine into the backend to stress-test the math further. Over the last month, the paper trading simulation showed about +₹8k in profit, but the ride wasn't smooth.

Quality Value Strategy performing best

I attached a screenshot of the backend simulation dashboard. You can see the simulated equity curve took a pretty nasty dip in mid-July. When I broke down the strategy data, I found the culprit: my "Pure Momentum" strategy was bleeding money (0.26 reward factor). Meanwhile, the "Quality Value" setups were carrying the whole portfolio with a 75% win rate.

The Fix: What I changed this weekend

Looking at the bad data from the July simulation, I realized my risk-reward logic wasn't strict enough on momentum plays. I spent this weekend pushing some major fixes to the core engine:

  • Forced 1:2 Risk-Reward: The script now calculates a strict 1.5x ATR stop-loss and a 3x ATR target. If the math doesn't offer at least a 1:2 setup, the engine automatically rejects the trade.
  • Anchored VWAP: Added a 20-day AVWAP check. If a stock is trading below its 20D AVWAP, the engine ignores it to avoid catching falling knives.
  • F&O Sector Breadth: Added a market breadth check (Advances vs Declines). It won't give a buy signal if the parent sector is actively dumping.

Final Results & Next Steps

The engine is much tighter now and rejecting low-probability setups before they even reach the dashboard. Let's see how things go in future. Will keep folks posted.

For those who have been asking or using it, I've kept the price at just ₹199/month for first 100 users to access Quality Value & Unified Strategy (both of them have great reward factor) and also to make this app sustainable. For rest, folks can use rest all the features for free. You can check out the updated version here:

https://www.thestockmind.com

Added some cool features as well along with fixed few bugs. Added dedicated navigation and feedback buttons on logout as well. Thanks to everyone who gave feedback on the last post. Will be looking for some new feedbacks as well. If any other devs/traders have ideas for metrics I should add to the scoring algorithm next, let me know!

reddit.com
u/WinterSpecial7970 — 5 days ago

50 days of forward-testing my Nifty quant model: ₹1 Lakh ➔ ₹1.07 Lakhs (86.7% Win Rate / 1:18.5 R:R)

Hey everyone,

Over the past 1.5 months, I have been using StockMind Quant Engine built on Nifty 50 stocks for a paper trading. Not regularly but in between weekdays and taking positions based on signals.

I wanted an objective, data-backed way to trade without risking real capital until the strategy proved positive alpha against the benchmark.

Here are the live forward-test stats from the past 50 days:

Performance till 3rd August,2026

Starting Capital: ₹1,00,000 Starting Date : 10th June
Current Equity: ₹1,07,935 (+7.93% net return)
Nifty 50 Baseline Return: +6.05%
Model Alpha over Nifty 50: +1.77%
Win Rate: 86.7% (15 closed trades)
Risk-Reward Ratio: 1 : 18.5
Holding Period & Strategy Duration:
Across all 15 closed trades, our average holding period is 15.7 days (~2.2 weeks).

  • Quick momentum swings (2–4 days): SBIN, BPCL, HDFCLIFE (locking in quick sector surges).
  • Positional trend rides (25–52 days): WIPRO, HEROMOTOCO, ITC (riding strong multi-week trends).

The key takeaway from the equity curve (green line vs dotted Nifty line) was how the model handled market pullbacks around mid-July. When Nifty dipped, the sector rotation rules shifted allocation into defensive/value names rather than taking drawdowns in overextended momentum stocks. This is something I wanted my algo to worked and glad that its working as of now. I will keep the sub updated.

I built this tool (StockMind) as an open platform for myself and other retail traders who want to test quantitative momentum and sector rotation models with zero financial risk.

We have a 7-day free PRO trial on signup (no credit card or payment details needed) if you want to run simulations or check live sector breadth.

Would love your thoughts on the performance curve and risk-reward metrics!

Site link: https://www.thestockmind.com

reddit.com
u/WinterSpecial7970 — 17 days ago
▲ 5 r/SaaS

Month 1 clarity metrics for my side project (949 users, $0 ads) - looking for feedback on whether this shows real traction

Hey guys,

About a month ago I launched a side project called The Stock Mind. It is a quantitative stock research terminal and paper trading tool for Indian markets. I built it mainly for myself because I was frustrated with mutual fund returns over the past couple of years and wanted a rule based system to track sector rotation and momentum.

I havent spent anything on paid ads or marketing. Everything so far has been organic from reddit and word of mouth.

Clarity Screenshot

I attached a screenshot of my Microsoft Clarity analytics for the last 30 days. We hit 949 unique users and 1,415 total sessions. Around 25.5% of our traffic is returning users (361 sessions), which felt like a decent sign for a brand new tool.

Our average scroll depth is around 82% and active time spent is 56 seconds per session. Interestingly, Clarity shows about 18.5% dead clicks where users click on static stock cards or sector bars expecting live chart popups or deeper data drill-downs.

I am trying to figure out if these numbers represent genuine validation / early product market fit, or if I am just looking at vanity traffic. For anyone who has launched a SaaS or data tool before, is a 25% returning user rate in month 1 a good benchmark? What metrics should I be focusing on next before trying to monetize?

I recently added a 7 day free PRO trial on signup (no credit card needed) so anyone can test the full strategy models and paper trading journal.

Would love your honest thoughts on the numbers and the app if you get a chance to check it out.

reddit.com
u/WinterSpecial7970 — 23 days ago

Why standard correlation fails retail traders (and how I used Johansen Cointegration + Kalman Filters for StatArb in Nifty)

Hey traders,

I wanted to share some very important learnings which I had when trying to build a Quant Engine. Feel free to use these concepts in your engine.

Most retail traders look at stock correlation (e.g. "TCS and INFY move together") and try to trade pairs based on standard deviation. The problem? Correlation breaks during market stress — two stocks can stay correlated for months and then permanently diverge during earnings or sector shifts.

Over the past few months, I’ve been building StockMind (thestockmind.com), a quantitative research & paper trading terminal for Indian markets. Here is how I structure our Statistical Arbitrage (StatArb) engine to solve this:

  1. Johansen Cointegration (Not Correlation): We test if a linear combination of two asset prices forms a stationary spread with constant mean (μ) and variance (σ2). Cointegration guarantees structural economic gravity.
  2. Kalman Filtering for Dynamic Beta: Static hedge ratios fail when corporate capital structures change. The Kalman Filter dynamically updates hedge ratio and intercept on every price tick. You can leverage this concept.
  3. Ornstein-Uhlenbeck (OU) Half-Life: Calculates the exact mean-reversion decay time to dynamically trigger Z-Score entries (±2.0) only when expected profit is ≥1.5× round-trip friction (0.15% STT/slippage).

These 3 statistical techniques can be used as filtering mechanism. Saying that I just launched a 7-day automatic PRO trial on signup (zero credit card needed) so anyone can test our sector rotation models and paper-trade setups with 1 click.

Would love for experienced traders to test the models and roast the UI/architecture!

Platform: https://www.thestockmind.com

reddit.com
u/WinterSpecial7970 — 23 days ago

After 300+ sign up , 15+ feedback , 50 daily users !!

4 weeks back I launched Stockmind to public after spending 7-8 months working on it , fixing bugs , creating features that me as a working professional uses the most . To get an aid in my investment journey as I see most of the mutual funds failing in delivering returns despite charging us an expenses ratio. 

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.

There were multiple feedback’s which I got and tried to resolve most of it . Today I am launching StockMind 2.0 , with better UI, better features like "Improved Watchlist Section", "Improved Paper Trading Experience", "Detailed Performance Tab", "Detailed History" & "Learning" section created out of my own experience. All these I specifically designed for users crunch on time , looking for a platform do paper trade & learn. Feel the adrenaline of trading. At the same time quant engine helping them to make informed decision. Some folks dismissed my previous post because I took help of AI to write, this time its complete Human written post 😄.

Kept the initial price of pro version as low as possible to sustain the platform. Had to restrict "Refresh" feature benefits behind pay wall as some users were abusing it & was having effect on CPU.

Will love your feedback . Use the feedback button in the UI or just reply here. Also took the equity position today because of strong signals on Stockmind. Finger crossed !!

Yesterday StockMind Prediction

Took the position in Zerodha

If someone hasn't checked the app yet. Below is the app link.

www.thestockmind.com

reddit.com
u/WinterSpecial7970 — 26 days ago

Building a quant engine solo is harder than you think. Here is my update.

Hey everyone,

Thanks for the overwhelming response to my last post about StockMind . Building a quant engine alone is a grind, but it's getting interesting.

Here is the quick update on what I’ve built, fixed, and corrected over the last few days:

1. Instant Feedback via Telegram

I added a feedback button to the UI. To make it actionable, I hooked it to a private Telegram channel. I now get instant notifications on my phone whenever a user reports a bug or makes a request. Some of the feedback so far has been real gold.

2. Headless Zerodha Auto-Login

No more manual steps. The system now spins up a headless process early in the morning, handles credentials/TOTP, and establishes the daily Kite session automatically.

3. Security Hardening

I went back and gated the API routes that were previously unprotected. Thanks to one guy who pointed out.

4. The Backtesting Reality Check (Self-Correction).

In my original post, I shared a backtested CAGR of 24.5% over 5 years.

I have to hold my hand up here: after a deep-dive audit, I realized that stat had a mistake. My backtester had a minor look-ahead bias (evaluating historical data using current fundamentals) and a caching leak that was letting future price data slide into past decisions.

I patched the DB schemas to be Point-in-Time and fixed the cache. The adjusted, clean results (adjusted for 0.25% cost per trade) are:

  • Old Reported CAGR: 24.5% (Biased)
  • New Honest CAGR: 20.4% (Bias-free, point-in-time)
  • Nifty 50 Index Benchmark: ~12.02%

It's a 4.1% drop, but I'd rather trade a real, clean 20.4% CAGR than a fake 24.5% CAGR.Survivorship Bias is still there but as its Nifty 50, we see less stocks getting kicked out from universe

Next Steps

Now that the data leaks are plugged, the moment the model outputs a high-confidence signal especially when the score is 90, I’m putting real money on the line.

I’ll keep you all posted.

If you want to check it out: 👉 www.thestockmind.com

reddit.com
u/WinterSpecial7970 — 1 month ago
▲ 9 r/SaaS

How do you decide pricing for your SAAS ?

Any Indian SAAS developer, how soon you started charging & which platform you used for it ? If I have a product around stock recommendations how should I plan around it .

Launched the app last Friday got more tha 250 sign ups till now. Close to 50 folks are retuning every day.

Any help will be appreciated.

reddit.com
u/WinterSpecial7970 — 1 month ago

I found a "Max Score" anomaly in my "StockMind" system that’s been highly accurate: The 90-Point Threshold

Recently, while reviewing my trade logs and backtesting data, I noticed a very specific, recurring pattern.

Because of how the math in my scoring algorithm is structured, the absolute maximum score a stock can mathematically achieve is 90*.* You could see the score pointer field on the right side of the screen.

https://preview.redd.it/fr2kl70vxjbh1.png?width=782&format=png&auto=webp&s=51093e4996a4c1025511059899770526a25d550c

Whenever a stock's score touches exactly 90, it has been an incredibly high-probability winning trade.

Why does this happen?  A score of 90 doesn't just mean a stock is "good"—it means it has perfectly aligned across every single strict parameter in the engine:

  1. Macro/Quality: The fundamentals are rock solid (no look-ahead bias).
  2. Momentum: It's in a confirmed, strong structural uptrend.
  3. Mean Reversion: It has pulled back to a mathematically perfect support zone based on standard deviations (no chasing overextended moves).
  4. Sentiment: News sentiment and broader market regime filters are green.

In a normal market, most "good" setups hover around a score of 50 to 70 (as you can see in my current top 5 list). Hitting 90 is extremely rare. It acts as the ultimate strict filter.

The Takeaway Since noticing this, I’ve started treating the "90 Score" as an automated high-conviction trigger. It requires extreme patience because you might go weeks without seeing one, but when it hits, the win rate and risk-to-reward have been fantastic.

For anyone building their own systems: Pay attention to the absolute extreme outliers in your data. Sometimes the best alpha isn't in a new complex indicator, but in realising what happens when all your existing rules align perfectly.

Would love to hear if anyone else has found similar "threshold anomalies" in their own systems! Just FYI this morning I saw the score of 90 for JSWSTEEL and took the trade. Till now it's going good.

Today's performance

The trades which you seeing here, I took that paper trade when the score touched 90 and it has performed damn good. I will be adding features in showing score in these paper trade cards to justify my hypothesis.

Historical Paper Trade

Attaching the link of the application:

www.thestockmind.com

reddit.com
u/WinterSpecial7970 — 2 months 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 — 2 months 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 — 2 months ago
▲ 95 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 — 2 months ago

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,

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: [Insert, e.g., 24.5%] | Max DD: [Insert, e.g., -12.3%] | Sharpe: [Insert, e.g., 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.

Paper Trade performance.

⚠️ 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.

💻 Open Source & Dashboard

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

reddit.com
u/WinterSpecial7970 — 2 months ago
▲ 1 r/SaaS

I am an AI Engineer working in this space from past 9 years. The way everyone rushed to create AI applications, I realized one thing. Very few people really thinks about potential vulnerability in there code base. This results in piling up of technical debt.

On top of it most of the existing SAST tools are not designed to capture GenAI / Agentic Logic vulnerabilities. Existing scanners either miss prompt injections entirely, or they flag every single string formatting operation, which makes the alerts useless.

I wanted a tool that actually understands the intent of the data flow.This was the problem statement I started working on it. Lately after hearing so many layoff it put the fuel to fire as well

So, I spent the last 3 months planning ,designing & building RepoInspect.

However I am a builder, an engineer but very bad in marketing and moving a product to profitability.

Anyway let's get back to solution. Repoinspect is a two-pass hybrid engine. It uses a deterministic AST taint tracker to find potential hotspots, then hands the attack path to an autonomous AI agent to verify if the injection is actually exploitable.

End Result: To test it, I pointed it at some of the most popular AI frameworks. Got multiple bugs in those. Attaching the detailed results on github.

The Launch Struggle: I tried to launch on Hacker News yesterday. Because my account is new, I got flagged almost immediately. It was a huge punch in the gut after a month. Same thing happened with most of the reddits accounts. Honestly speaking I have never been to these sites and really doesn't know the rules and regulations around it. I just want my solution to be atleast given chance and heard by AI folks.

But instead of giving up, I spent this weekend adding what the community might like : Local LLM support  so teams can run audits without their code ever leaving their machine.

I've open-sourced the engine and all the forensic reports. I’d love to hear from other founders who have built developer-focused security tools. How do you find your first "Real" users when the automated filters are so aggressive?

GitHub: https://github.com/ritesh-ui/RepoInspect

u/WinterSpecial7970 — 4 months ago

Apparently along with 10th,12th , Graduation , Service Letter they are asking for permissions into our ITR, Bank Statement, EPFO website ?

Is there any law enforcement in this country to stop this shit happening. Murder of our digital privacy and forcing us to be digitally naked.

Highly disappointing and disturbing. Never seen such shit happening in last 9 years of my corporate experience

reddit.com
u/WinterSpecial7970 — 4 months ago
▲ 8 r/aisecurity+1 crossposts

Hey everyone,

I’ve been working on a project to solve a major problem in AI security: Traditional SAST tools (Snyk, SonarQube, etc.) are blind to "Agentic Logic" bugs. They look for bad strings, but they don't understand how user data can hijack an LLM’s instructions.

I built a deterministic engine called RepoInspect that merges AST-aware taint tracking with autonomous AI agents. To test it, I ran it against LangChain, and it flagged 10 high-severity vulnerabilities that had been missed by standard tools.

The most common issue: Instruction Hijacking (LLM01) In several built-in chains (like the LLMMathChain), user input is interpolated directly into a prompt template that tells the model to generate executable Python code (for numexpr).

The Attack Vector: Because the user {input} isn't delimited (no XML tags, no isolation), an attacker can simply "ask" the model to generate malicious system commands instead of a math expression. Since the chain executes that code immediately, it’s a direct path to code execution via a prompt.

Key Findings in the Audit:

  • Prompt Injection: 10+ cases in agents (Self-Ask, JSON Chat) and chains.
  • Excessive Agency: Critical risks in utility wrappers exposing API keys.
  • Insecure Deserialization: Risks in how some vector store adapters handle metadata.

Why I’m sharing this: I’ve open-sourced the engine and the full forensic reports for LangChain, OpenAI, and Dify. I want to help developers move beyond "hope-based security" for their RAG and Agentic pipelines.

I'm curious to hear from other researchers—besides XML delimiters and system message isolation, what "hard" defenses are you using to protect your agents from hijacking?Adding github repo in the comments.

reddit.com
u/WinterSpecial7970 — 4 months ago