PowerCast is a machine learning-based model designed to forecast electricity prices in Germany, benefiting traders, grid operators, and policymakers. It utilizes an ensemble of XGBoost and Random Forest models with energy price data, generation sources, and grid metrics. The model achieves 62.7% directional accuracy, captures 40% of extreme price spikes, and helps optimize trading strategies, ensure grid stability, and promote renewables.
- Price Trends: Peak at 110–120 €/MWh (morning & evening), drop to 70 €/MWh at night. Weekends average 65–70 €/MWh.
- Wind Impact: High wind generation reduces prices by 32.41 €/MWh, often dropping below 100 €/MWh at 20,000+ MW wind output.
- Correlations: Prices rise with fossil fuel usage (0.67) and unmet demand (0.82), but fall with renewable adoption (-0.78).
- Model Performance: RMSE: 26.00, MAE: 16.40, R²: 0.8350, capturing 40% of extreme events.
- Feature Importance: SHAP analysis highlights renewable_demand_ratio, fossil_ratio, and conventional_vs_renewable as key factors.
- Traders: Maximize profits by leveraging weekly price cycles (Sunday 65 €/MWh, Tuesday 98 €/MWh).
- Grid Operators: Store energy during low-price periods (32.41 €/MWh savings) for peak demand management.
- Policymakers: Encourage renewables to stabilize prices and reduce volatility.
- data/: Raw and processed datasets.
- models/: Trained models (XGBoost, Random Forest, Ensemble).
- notebooks/: Step-by-step Jupyter Notebooks for EDA, training, SHAP analysis, and visualizations.
- report/: Final PowerCast_Report.pdf with findings.
- src/: Python scripts for data processing, model training, and interpretation.
- Clone the repository:
git clone https://github.com/[YourUsername]/PowerCast-Germany-Electricity-Price-Forecasting.git cd PowerCast-Germany-Electricity-Price-Forecasting - (Optional) Set up a virtual environment:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Launch Jupyter Notebook:
jupyter notebook
- Data Exploration: Run
notebooks/01_data_preprocessing.ipynbandnotebooks/02_eda.ipynbfor insights. - Model Training: Train models via
notebooks/03_model_training.ipynb. - Feature Analysis: Use
notebooks/04_model_interpretation.ipynbfor SHAP feature importance. - Visualizations: Generate report charts using
notebooks/05_report_visualizations.ipynb. - Automated Pipeline: Run scripts in
src/directory for end-to-end execution.
- Remove leaky features to improve model robustness.
- Integrate weather forecasts for better accuracy.
- Develop a real-time API for live electricity price forecasting.
Contributions are welcome! Focus areas include:
- Enhancing model performance for extreme price events.
- Weather data integration for improved accuracy.
- Better visualizations for easier interpretability.
This project is licensed under the MIT License.
For questions or collaboration, contact me at [email protected].