How anjaniputra15/prosperity-crushers works
Project Type and Purpose
• Type: Algorithmic trading research/backtesting framework with deployment and visualization
• Purpose:
– Ingest historical trading data by simulation round
– Provide a modular backtester engine
– Load and execute multiple strategy “plugins”
– Evaluate performance and generate visual reports
– Deploy chosen strategies into the live simulation environment
File Structure (Top-Level Components)
• data/
– CSV datasets grouped by simulation round (round1…round5, tutorial)
• backtester/
– Core engine: engine.py, benchmark.py
– Interfaces: algo.py (strategy plugin interface), datamodel.py, log.py
– Tests: test_backtester.py, test_backtester_macarons.py
• deployment/
– Round-specific trader implementations: round1/…/round5/
– Final deployment scripts: final/etf_deployment.py, kelp_deployment.py, etc.
– Shared datamodels: deployment/datamodel.py
• visualiser/
– Visualization scripts: visualiser.py
– Requirements, README for charting and reporting
• Individual contributor folders (Nathan/, Steven/, jack/, kieren/, max/)
– Research notebooks and one-off strategy prototypes
README for Insights
• Confirms components: research notes, strategies, backtesting frameworks, evaluation tools
Main Components
A. Data Ingestion Layer
– Component: CSV Loader
– Reads data/round*/prices_*.csv and trades_*.csv
B. Backtesting Engine
– engine.py (simulation loop, order matching, P&L calculation)
– datamodel.py (market state, order books, fills)
– algo.py (strategy interface)
– log.py / benchmark.py (performance metrics)
C. Strategy Plugins
– Individual Python modules implementing Algo interface
– Examples: kelp.py, basket_trade.py, resin_10k.py, etc.
– Lives in root or contributor folders but plugged into backtester
D. Deployment Layer
– Round-specific trader.py scripts
– Final production scripts in deployment/final/
– Use deployment/datamodel.py and wrap live order submission logic
E. Visualization & Reporting
– visualiser.py: reads backtester/log output, produces charts, tables
F. Research & Prototyping
– Jupyter notebooks under contributor folders (Nathan/, Steven/, jack/, etc.)
– Feeding new algorithms back into “Strategy Plugins”
Relationships and Data Flows
• Data Ingestion → Backtester Engine
• Backtester Engine ↔ Strategy Plugin (calls strategy.on_tick(), sends orders)
• Backtester Engine → Log / Benchmark → Visualization
• Backtester Engine → Deployment Layer (for live sim)
• Research Notebooks → Strategy Plugin (iterative prototyping)
Architectural Patterns and Principles
• Plugin architecture (algo.py interface)
• Layered separation: Data / Core engine / Strategy / Deployment / Visualization
• Single Responsibility: each module has a clear domain
• Test coverage for engine and strategy validation
Technologies, Frameworks, and Libraries
• Python 3.x
• Jupyter Notebooks for research
• CSV files for data
• pytest or unittest for backtester tests
• Matplotlib / Pandas / Seaborn (implied) for visualiser
• No external database – file-based data store