{"id":27979406,"url":"https://github.com/ferrangarciarovira/sp500-ml-forecasting","last_synced_at":"2025-05-08T02:52:55.933Z","repository":{"id":291761996,"uuid":"978693845","full_name":"ferrangarciarovira/SP500-ML-Forecasting","owner":"ferrangarciarovira","description":"Forecasting S\u0026P 500 returns using ML models across multiple time horizons (1-day, 1-week, 1-month). Includes feature engineering, rolling-window backtesting, and performance evaluation to assess predictive power and trading utility of each model.","archived":false,"fork":false,"pushed_at":"2025-05-06T11:45:30.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T12:49:14.697Z","etag":null,"topics":["backtesting","data-science","feature-engineering","financial-forecasting","investment-strategies","machine-learning","python","quantitative-finance","regression-models","sp500","time-series"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferrangarciarovira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T11:25:26.000Z","updated_at":"2025-05-06T11:45:33.000Z","dependencies_parsed_at":"2025-05-06T12:49:18.251Z","dependency_job_id":"22c84814-5d1f-4de7-9a7f-9ea524ea4853","html_url":"https://github.com/ferrangarciarovira/SP500-ML-Forecasting","commit_stats":null,"previous_names":["ferrangarciarovira/sp500-ml-forecasting"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrangarciarovira%2FSP500-ML-Forecasting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrangarciarovira%2FSP500-ML-Forecasting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrangarciarovira%2FSP500-ML-Forecasting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferrangarciarovira%2FSP500-ML-Forecasting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferrangarciarovira","download_url":"https://codeload.github.com/ferrangarciarovira/SP500-ML-Forecasting/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989963,"owners_count":21836667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backtesting","data-science","feature-engineering","financial-forecasting","investment-strategies","machine-learning","python","quantitative-finance","regression-models","sp500","time-series"],"created_at":"2025-05-08T02:52:54.497Z","updated_at":"2025-05-08T02:52:55.915Z","avatar_url":"https://github.com/ferrangarciarovira.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# S\u0026P 500 Forecasting with Machine Learning  \n\nThis project explores the predictive power of machine learning models in forecasting returns of the S\u0026P 500 index over short- to medium-term horizons. The framework includes rigorous feature engineering, model training and evaluation, and out-of-sample backtesting. The goal is to assess the viability of ML-based return forecasts in a real-world trading context.\n\n---\n\n## Project Overview\n\n- **Objective**: Identify which ML algorithms (e.g., Ridge, Lasso, XGBoost) offer consistent predictive power on equity index returns.\n- **Approach**:\n  - Predict log returns of the S\u0026P 500 using daily data.\n  - Evaluate forecasts for 1-day, 1-week, and 1-month ahead horizons.\n  - Apply rolling-window backtesting to simulate live performance.\n  - Analyze economic value through cumulative returns and Sharpe ratios.\n- **Scope**: Combines financial signal processing, time-series modeling, and ML performance evaluation in a fully reproducible pipeline.\n\n---\n\n## Models and Techniques\n\n- **Regression Models**: Ridge, Lasso, Decision Tree Regressor, XGBoost\n- **Feature Engineering**:\n  - Technical indicators (RSI, MACD, moving averages)\n  - Lagged returns, volatility, momentum factors\n  - Calendar/time features\n- **Backtesting**: Expanding and rolling-window forecasts with out-of-sample evaluation\n\n---\n\n## Repository Structure\n\n- `data/`: contains match CSV and Excel files\n- `notebooks/`: main analysis notebook\n- `reports/`: final presentation (PDF)\n- LICENSE\n- README.md\n- requirements.txt\n  \n## Tools \u0026 Libraries\n\n- `Python 3.10+`\n- `pandas`, `numpy`, `scikit-learn`, `xgboost`\n- `matplotlib`, `seaborn`, `yfinance`\n- `statsmodels` (for comparison with ARIMA/GARCH)\n\n---\n\n## Authors\n\n- Ferran García Rovira\n- Gerard Álvarez\n- Joshua Gerstner\n- Jiaren Fu\n\nFeel free to connect via [LinkedIn](https://www.linkedin.com/in/ferrangarciarovira/) or view more projects on [GitHub](https://github.com/ferrangarciarovira).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferrangarciarovira%2Fsp500-ml-forecasting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferrangarciarovira%2Fsp500-ml-forecasting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferrangarciarovira%2Fsp500-ml-forecasting/lists"}