This repository is an open-source collection of algorithmic trading strategies for the Indian stock market, with a primary focus on option selling in:
- NIFTY 50
- BANK NIFTY
- SENSEX
- MIDCAP NIFTY
- FIN NIFTY
- ✅ Zerodha (Live & Ready to Deploy)
- ⚙️ AngelOne, Upstox, Fyers, AliceBlue, etc. (Coming Soon!)
✅ Multiple short-straddle strategies with different risk management techniques
✅ Multiple short-strangle strategies — OTM selling across BankNifty, Nifty50, FinNifty & Sensex
✅ Iron-fly strategies for hedged option selling
✅ Stop-loss mechanisms including fixed, percentage-based, and trailing stops
✅ Mark-to-market (MTM) based target execution
✅ Copy trading — automatically mirror a master account's positions across multiple client accounts with capital-proportional scaling
✅ Future expansion for multi-broker support
| Strategy Category | Sub-Category | Strategy Name | Zerodha | AngelOne | Upstox | Fyers | GitHub Link |
|---|---|---|---|---|---|---|---|
| Short Straddle | 0920 Expiry | FINNIFTY 0920 | ✅ | ❌ | ❌ | ❌ | View Code |
| NIFTY50 0920 | ✅ | ❌ | ❌ | ❌ | View Code | ||
| BANKNIFTY 0920 | ✅ | ❌ | ❌ | ❌ | View Code | ||
| SENSEX 0920 | ✅ | ❌ | ❌ | ❌ | View Code | ||
| Combined Premium | BANK NIFTY Combined Premium | ✅ | ✅ | ❌ | ❌ | View Code | |
| FINNIFTY Combined Premium | ✅ | ❌ | ❌ | ❌ | View Code | ||
| NIFTY50 Combined Premium | ✅ | ❌ | ❌ | ❌ | View Code | ||
| SENSEX Combined Premium | ✅ | ❌ | ❌ | ❌ | View Code | ||
| Fixed Stop Loss | BANK NIFTY Fixed SL | ✅ | ❌ | ❌ | ❌ | View Code | |
| BANK NIFTY Account-Level MTM SL | ✅ | ❌ | ❌ | ❌ | View Code | ||
| MTM Based Target | BANK NIFTY MTM-Based | ✅ | ❌ | ❌ | ❌ | View Code | |
| NIFTY50 MTM-Based | ✅ | ❌ | ❌ | ❌ | View Code | ||
| Percentage-Based Stop Loss | BANK NIFTY Percentage-Based SL | ✅ | ❌ | ❌ | ❌ | View Code | |
| Trailing Stop Loss | BANK NIFTY Trailing Percentage-Based SL | ✅ | ❌ | ❌ | ❌ | View Code | |
| Iron-Fly | ⚙️ In Development | (Coming Soon!) | |||||
| Short Strangle | 0920 Expiry | BANKNIFTY 0920 | ✅ | ❌ | ❌ | ❌ | View Code |
| NIFTY50 0920 | ✅ | ❌ | ❌ | ❌ | View Code | ||
| FINNIFTY 0920 | ✅ | ❌ | ❌ | ❌ | View Code | ||
| SENSEX 0920 | ✅ | ❌ | ❌ | ❌ | View Code | ||
| Combined Premium | BANK NIFTY Combined Premium | ✅ | ❌ | ❌ | ❌ | View Code | |
| Fixed Stop Loss | BANK NIFTY Fixed SL | ✅ | ❌ | ❌ | ❌ | View Code | |
| BANK NIFTY Account-Level MTM SL | ✅ | ❌ | ❌ | ❌ | View Code | ||
| MTM Based Target | BANK NIFTY MTM-Based | ✅ | ❌ | ❌ | ❌ | View Code | |
| NIFTY50 MTM-Based | ✅ | ❌ | ❌ | ❌ | View Code | ||
| Percentage-Based Stop Loss | BANK NIFTY Percentage-Based SL | ✅ | ❌ | ❌ | ❌ | View Code | |
| Trailing Stop Loss | BANK NIFTY Trailing Percentage-Based SL | ✅ | ❌ | ❌ | ❌ | View Code |
| Data Source | Finvasia Shoonya | Zerodha Kite | AngelOne | Upstox | Fyers |
|---|---|---|---|---|---|
| Equity Data (NSE/BSE) | ✅ Ready | ✅ Ready | ⚙️ Coming Soon | ⚙️ Coming Soon | ⚙️ Coming Soon |
| Options Data | ⚙️ In Development | ⚙️ In Development | ⚙️ Coming Soon | ⚙️ Coming Soon | ⚙️ Coming Soon |
| Futures Data | ⚙️ In Development | ⚙️ In Development | ⚙️ Coming Soon | ⚙️ Coming Soon | ⚙️ Coming Soon |
| Database Storage | ✅ PostgreSQL | ✅ PostgreSQL | ⚙️ Coming Soon | ⚙️ Coming Soon | ⚙️ Coming Soon |
| API Cost | 🆓 Free | 💰 ₹2000/month | 💰 Paid | 💰 Paid | 💰 Paid |
| GitHub Link | View Code | View Code | Coming Soon | Coming Soon | Coming Soon |
| Utility Type | Broker | Description | Status | Features | GitHub Link |
|---|---|---|---|---|---|
| Auto-Login | Zerodha Kite | Automated login with 2FA support | ✅ Ready | • TOTP Authentication • Token Management • Telegram Notifications • Retry Mechanism • Error Handling |
View Code |
| MTM Square-off System | Zerodha Kite | Real-time MTM monitoring with automated square-off | ✅ Ready | • Real-time Position Monitoring • Loss Threshold Protection • Daily Profit Target Management • Bulletproof Order Execution • Trading Discipline Mode • Volume Freeze Handling • Comprehensive Logging |
View Code |
- Clone this repository:
git clone https://github.com/buzzsubash/algo_trading_strategies_india.git
I'm always open to discussions on algo trading, whether it's:
✅ Enhancing existing strategies
✅ Designing new trading algorithms
✅ Deep-diving into strategy backtesting
✅ Exploring advanced risk management techniques
If you're interested in collaborating or discussing algo trading strategies, feel free to connect with me!
- 📱 WhatsApp: https://wa.me/919605006699 https://wa.me/6594675969
- 🐦 Twitter (X): https://x.com/buzzsubash
- 📍 LinkedIn: https://www.linkedin.com/in/buzzsubash
- 💻 GitHub: https://github.com/buzzsubash
- 📘 Facebook: https://www.facebook.com/buzzsubash/
- 🏆 Credly Certifications: https://www.credly.com/users/subash-krishnan
- 👾 Reddit: https://www.reddit.com/user/buzzsubash/
- 📝 Blog: https://emcsaninfo.wordpress.com/
🚀 Let's build, test, and innovate in the algo trading space together!
This repository contains my personal work and is intended purely for educational purposes.
These strategies are not financial or investment advice. And I am not a SEBI registered investment advisor or a research analyst.
Trading in derivatives, particularly in options, carries significant risk and can result in substantial financial losses. Over 90% of traders in index options incur losses, as highlighted by financial regulators and experts.
🔥 Trade Responsibly. Invest Wisely. Stay Safe. 🔥