Algorithmic strategies implemented from scratch in Python — each with a clear mathematical foundation, configurable parameters, and live backtesting.
A systematic trend-following strategy that utilizes three moving averages (20, 40, and 80 periods) to identify and capture sustained market trends across major indices such as Nifty 50, SPY, and Hang Seng Index. The strategy generates signals based on the relative position of price to all three moving averages, ensuring stronger trend confirmation and reducing false entries.
Exploits the tendency of prices to revert to the mean after extreme moves. Buy when RSI drops below the oversold threshold (e.g. 30). Exit when RSI recovers above the overbought level (e.g. 70), take-profit is hit (+5%), or stop-loss is triggered (−2%).
Uses dynamic bands that expand and contract with volatility. The upper and lower bands are set at N standard deviations from a rolling mean. Buy when price touches the lower band (oversold); sell when it touches the upper band (overbought).
Captures the empirically documented tendency for assets with strong recent performance to continue performing well. Buy when N-day return exceeds a threshold. Hold for a fixed period or exit when momentum reverses.
A short-term mean reversion strategy that exploits oversold conditions. Buy at the open after N consecutive down-close days — a classic pullback signal. Exit at the next day's open (overnight hold) or same-day close (intraday).
A classic channel breakout strategy. Go long when price closes above the rolling N-day high — a signal of upside momentum. Exit when price falls below the rolling M-day low, protecting profits on the way down. Entry and exit periods are independently configurable for fine-tuned risk management.
The legendary rule-based system taught by Richard Dennis in the 1980s. Enters long on N-day High breakouts and short on N-day Low breakdowns. Each trade is protected by an ATR-based Stop Loss and a 2× ATR Take Profit — capturing big trending moves while strictly controlling downside risk.