How john-trager/uchicago-trading-competition works
Main Components
• Data Sources & Ingestion:
• Historical Market and Economic Data (CSV files spread across archive and utc_xchange directories).
• Investor forecasts and other supplemental data.
• Data Processing & Analysis:
• Jupyter Notebooks (e.g., *.ipynb inside archive for data analysis, graph plotting, etc.).
• Python analysis scripts and utilities (e.g., metrics.py, display_results.py, utils.py).
• Trading Strategy Modules:
• Case-specific algorithms (Case 1: market making and forecasting models, Case 2: option market making with risk hedging, Case 3: portfolio optimization via Black-Litterman and possibly reinforcement learning).
• Separate “bot” implementations (files such as case1_bot.py, case2_bot.py and various my_bot_v*.py scripts).
• Model Training & Simulation:
• RL agent and training scripts (rl_agent.py, rl_train.py, rl_sim.py).
• Backtesting and simulation modules (simulation.py, weights_history.csv, weights_genetic.csv).
• Communication/Protocol Layer:
• Proto definition modules (such as proto/utc_bot.proto and round_manager.py) that seem to facilitate integration with a trading simulation platform.
• Deployment/Execution Components:
• Executable versions for different platforms (e.g., xchange_win.exe, xchange_linux) in the utc_xchange_v2.0 directory which suggest a deployment aspect or interface layer.
Relationships and Interactions
• Data flows from various input CSV files into processing scripts and notebooks.
• Processed data is then fed into the model training or trading strategy modules.
• Trading algorithms (bots) use these models and simulation/trading logic to interact with a simulated (or competition-provided) trading environment.
• The protocol components (proto directory) serve as interfaces to ensure the bots and market simulations communicate correctly.
• There is an iterative loop where experimental results (simulated trades, model evaluation) can be reviewed within notebooks and scripts, and then refinements are made (potentially reflected in varied versions in the utc_xchange directories).
Architectural Patterns
• Modular Design: Even though the code appears “disorganized” as per the README, the separation into archives for each case and further refinements in versioned directories shows a modular approach to tackling different problems.
• Experimentation Environment: The combination of Jupyter Notebooks with script-based implementations indicates an experimental and data-driven development style.
• Separation of Concerns: There is a clear separation between data ingestion/analysis, strategy logic, simulation components, and interfaces to the trading platform.
• Versioning & Iterative Development: The existence of multiple utc_xchange versions underscores the iterative nature of refining trading strategies.
Details
• Different versioned implementations (utc_xchange_v1.2 versus utc_xchange_v2.0) as perhaps “evolutionary branches” or iterations in the system.
• Use of machine learning frameworks or any libraries (inferred from notebooks like those using Keras or torch files in the logs) if applicable.
• Where external documents, presentations, or references (e.g., the slide deck and blog strategy) support understanding of the system's rationale, even though they may not be part of code execution.