Add comprehensive project documentation and fix data pipeline

- Add detailed README with architecture diagram and usage instructions
- Add API, configuration, and development documentation
- Fix price data column handling for yfinance auto_adjust=True
- Fix model feature dimension indexing and temporal attention batching
- Add missing imports and position tracking in paper broker
- Add python-dotenv support for environment variables
- Update .gitignore with Python artifacts and environment files
This commit is contained in:
2026-05-26 14:10:48 +02:00
parent 4bf7394a0a
commit 0cf37e786a
17 changed files with 1536 additions and 277 deletions
+4 -4
View File
@@ -58,8 +58,8 @@ def main():
# Initialize model
logger.info("Initializing GNN model")
# Get number of features from first data point
num_features = train_dataset[0].x.shape[1]
# x has shape (num_stocks, seq_len, num_features); features are in the last dim
num_features = train_dataset[0].x.shape[2]
model = CorporateActionAwareGNN(num_features)
# Optimize model for AMD GPU
@@ -95,9 +95,9 @@ def main():
backtester = GNNBacktester(model, pipeline)
portfolio_values, trade_log = backtester.run_backtest(val_dataset)
# Get benchmark data
# Get benchmark data (auto_adjust=True means 'Close' already contains adjusted prices)
benchmark_data = pipeline.price_data[config.INDEX_TICKER]
benchmark_values = benchmark_data.loc[portfolio_values.index]["Adj Close"]
benchmark_values = benchmark_data.loc[portfolio_values.index]["Close"]
# Calculate performance metrics
logger.info("Calculating performance metrics")