How thekuldeepsingh/trading-strategy-backtester works
Project Type and Purpose
• This is a monolithic full-stack web application built with Python and Flask.
• Purpose: Provide an interactive backtester for moving-average‐crossover trading strategies, with user inputs, simulation engine, and interactive Plotly charts.
File Structure
• Top level:
• app.py – the Flask application (routes, control flow, backtest orchestration)
• requirements.txt – Python dependencies
• templates/ – Jinja2 HTML templates (layout.html, index.html, about.html, contact.html, docs.html)
• No separate “static” folder, so CSS/JS (Bootstrap, Plotly) are likely pulled via CDN in layout.html.
• No database directory: the simulation runs in memory and returns results directly.
README for Additional Insights
• Backend: Flask 2.3.3 handles HTTP requests, runs backtesting logic.
• Frontend: Bootstrap 5 for responsive UI, Plotly 5.16.1 for interactive charts.
• Core simulation uses control-flow constructs (loops, conditionals) and pandas/NumPy for data manipulation.
Elements
• Clear labels for each component (e.g., “Flask Route: /run_backtest”).
• Backend services in blue
• Data processing in green
• Frontend components in orange
• External libraries/services in gray