{"repo":"NadirAliOfficial/kaizen-intraday-semis-backtest","free":true,"listed":false,"github":"https://github.com/NadirAliOfficial/kaizen-intraday-semis-backtest","clone":"git clone https://github.com/NadirAliOfficial/kaizen-intraday-semis-backtest.git","description":"Mechanical intraday backtest for SMH and SOXX using progressive entry, VIX-scaled leverage, and strict end-of-day flat rules.","language":"Python","stars":13,"topics":["algorithmic-trading","backtesting","intraday","python","quantitative-finance","semiconductors","stocks"],"license":"MIT","category":"trading","readme_excerpt":"IBKR Production Trading System EMA 25/125 Strategy with Dynamic Leverage --- 📋 Overview Automated trading system for SMH (semiconductor ETF) using EMA crossover strategy with: - Signal: EMA 25 EMA 125 = BULL (enter long) - Leverage: 3.0x - 3.75x based on VIX - Stop Loss: -2% daily equity - Entry: 5 minutes before market close (3:55 PM ET) - Exit: Bear signal or stop loss --- ⚙️ Setup 1. Install Dependencies 2. Configure IBKR TWS 1. Open TWS Paper Trading 2. Go to: Edit → Global Configuration → API → Settings 3. Enable: \"Enable ActiveX and Socket Clients\" 4. Set Port: 7496 (paper) or 7497 (live) 5. Add Trusted IP: 127.0.0.1 6. Click OK and restart TWS 3. Login to TWS - Start TWS and login with paper trading credentials --- 🚀 Running the System Test Mode (Immediate Entry) - Enters position immediately - Good for testing Production Mode (3:55 PM Entry) Edit line 241: --- 📊 How It Works Daily Cycle Time Action ------ -------- 9:30 AM Records day start equity Continuous Monitors -2% stop loss 3:55 PM Enters if BULL signal + no position 4:00 PM Updates EMAs, checks bear exit When You Add Money 1. System recalculates at 4:00 PM (market close) 2. Updates EMAs with today's close price 3. Checks signal: BULL or BEAR 4. If BULL → enters position at 3:55 PM next day 5. Position sized on new total equity Stop Loss - Monitors equity every 5 seconds - If daily loss ≥ -2% → exits immediately - Can re-enter same day at 3:55 PM if BULL signal remains Leverage Scaling VIX Level Leverage ----","default_branch":null,"files":null,"tree":[],"storefront":"/r/NadirAliOfficial","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/NadirAliOfficial/kaizen-intraday-semis-backtest/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}