Skip to content

๐ŸŽฏ An interactive Streamlit app to backtest SMA, EMA, and RSI trading strategies with real stock data, portfolio simulation, and beginner-friendly insights.

Notifications You must be signed in to change notification settings

Aniket2002/trading-strategy-backtester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฐ strategy-gamble

A Streamlit-powered backtesting dashboard that lets you simulate and visualize trading strategies โ€” because sometimes, strategy is a gamble.


๐Ÿš€ Features

  • ๐Ÿ“ˆ SMA/EMA crossover trading strategy
  • ๐Ÿ’ฐ Portfolio growth tracking
  • ๐Ÿงฎ Sharpe ratio, drawdown, and trade metrics
  • ๐Ÿ” Buy/sell signal markers
  • ๐Ÿ“‹ Trade logs and performance exports
  • ๐ŸŽจ Interactive Streamlit UI with clean dark theme

๐Ÿ“ฆ Run Locally

# 1. Clone the repo
git clone https://github.com/Aniket2002/strategy-gamble.git
cd strategy-gamble

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run the app
streamlit run streamlit_app.py

๐Ÿ“Š Strategy Logic

This dashboard uses a simple SMA/EMA crossover strategy:

  • ๐Ÿ“ˆ Buy when the EMA crosses above the SMA
  • ๐Ÿ“‰ Sell when the EMA crosses below the SMA
  • Simulated with $100,000 initial capital
  • Tracks portfolio value, trades, and cumulative performance

All price data is sourced from Yahoo Finance via the yfinance API.


๐Ÿคนโ€โ™‚๏ธ Because trading is part strategy, part gamble.

About

๐ŸŽฏ An interactive Streamlit app to backtest SMA, EMA, and RSI trading strategies with real stock data, portfolio simulation, and beginner-friendly insights.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages