How aureusa/financial_forecasting works
This repository is a stock and cryptocurrency forecasting framework with an MLP–LSTM ensemble and a rolling trading simulator. Its main workflow retrieves market prices, derives SMA trends and residuals, trains separate models, and combines their predictions for evaluation; a second workflow repeatedly retrains models and simulates portfolio decisions. The graph reflects the README’s documented capabilities and the shown call/import evidence; some simulator internals are only partially excerpted, so uncertain links are omitted or marked unverified.
Main entry points: forecastFactoryEnsemble.py Forecast workflow · training.py Train workflow · dynamic.py Trading environment · network_constructor.py Network construction
Components 20
Market data
- Stock retrieval
data_pipeline/stockGetter.py - Feature preparation
data_pipeline/dataPipeline.py - Market features
market/data.py
Model training
- Train workflow
pipelines/training.py - Network construction
naive_model/network_constructor.py - MLP residual model
naive_model/mlp.py - LSTM trend model
naive_model/lstm.py - Data normalization
naive_model/normalizer.py - Saved models
saved_models
Forecasting
- Forecast workflow
forecast/forecastFactoryEnsemble.py - Ensemble prediction
forecast/ensembleModel.py
Market simulation
- Simulation workflow
pipelines/market_sim.py - Trading environment
market/dynamic.py - Simulation data
market/data.py - Rolling models
market/model.py - State persistence
utils.py
Evaluation
- Forecast testing
pipelines/testing.py - Prediction plots
visualisation/visualize_simple.py
Other components
- User
- Yahoo Finance
Connections 23
- User → Train workflow: starts training
README.md - Train workflow → Feature preparation: prepares data
pipelines/training.py - Feature preparation → Stock retrieval: retrieves prices
data_pipeline/dataPipeline.py - Stock retrieval → Yahoo Finance: downloads prices
data_pipeline/stockGetter.py - Train workflow → Network construction: trains networks
pipelines/training.py - Network construction → MLP residual model: constructs model
naive_model/network_constructor.py - Network construction → LSTM trend model: constructs model
- Train workflow → Saved models: saves models
- User → Forecast workflow: requests forecast
README.md - Forecast workflow → Feature preparation: loads market data
forecast/forecastFactoryEnsemble.py - Forecast workflow → Ensemble prediction: requests predictions
forecast/forecastFactoryEnsemble.py - Ensemble prediction → MLP residual model: predicts residuals
forecast/ensembleModel.py - Ensemble prediction → LSTM trend model: predicts trend
forecast/ensembleModel.py - Forecast testing → Forecast workflow: evaluates forecasts
pipelines/testing.py - Forecast workflow → Prediction plots: plots predictions
forecast/forecastFactoryEnsemble.py - User → Simulation workflow: starts simulation
README.md - Simulation workflow → Trading environment: rolls market
pipelines/market_sim.py - Trading environment → Simulation data: gets features
market/dynamic.py - Trading environment → Rolling models: retraining models
market/dynamic.py - Rolling models → MLP residual model: trains residual model
market/model.py - Rolling models → LSTM trend model: trains trend model
market/model.py - Trading environment → State persistence: saves state
market/dynamic.py - Simulation data → Stock retrieval: retrieves prices
market/data.py