{"id":37558391,"url":"https://github.com/jstriaukas/midasmlpy","last_synced_at":"2026-01-16T09:03:29.938Z","repository":{"id":47652503,"uuid":"288403541","full_name":"jstriaukas/midasmlpy","owner":"jstriaukas","description":"Python implementation of the midasml approach","archived":false,"fork":false,"pushed_at":"2025-05-15T20:41:40.000Z","size":10490,"stargazers_count":24,"open_issues_count":7,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-15T21:43:24.102Z","etag":null,"topics":["forecasting-models","machine-learning","midas-regression","mixed-frequency-data","nowcasting-models","sparse-group-lasso","time-series"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jstriaukas.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":"2020-08-18T08:49:11.000Z","updated_at":"2025-05-15T20:41:43.000Z","dependencies_parsed_at":"2024-06-13T14:22:59.317Z","dependency_job_id":"f1cbc452-8431-45fb-b77e-23617dd6c37c","html_url":"https://github.com/jstriaukas/midasmlpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jstriaukas/midasmlpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstriaukas%2Fmidasmlpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstriaukas%2Fmidasmlpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstriaukas%2Fmidasmlpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstriaukas%2Fmidasmlpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstriaukas","download_url":"https://codeload.github.com/jstriaukas/midasmlpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstriaukas%2Fmidasmlpy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["forecasting-models","machine-learning","midas-regression","mixed-frequency-data","nowcasting-models","sparse-group-lasso","time-series"],"created_at":"2026-01-16T09:03:29.827Z","updated_at":"2026-01-16T09:03:29.900Z","avatar_url":"https://github.com/jstriaukas.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# midasmlpy\n\nPython implementation of the midasml approach - providing **estimation** and **prediction** methods for high-dimensional mixed-frequency time-series data\n\n## Authors\n\n* Jonas Striaukas - [jstriaukas](https://github.com/jstriaukas)\n* Kris Stern - [krisstern](https://github.com/krisstern)\n* Marcus Egelund-Müller - [Mem03](https://github.com/Mem03)\n\n## About\n\nThe *midasmlpy* package implements *estimation* and *prediction* methods for high-dimensional mixed-frequency (MIDAS) time-series and panel data in regression models.\nThe regularized MIDAS models are estimated using orthogonal (e.g. Legendre) polynomials and the sparse-group LASSO estimator.\nFor more information on the *midasmlpy* approach there are references in the footnotes[^2][^3].\n\nThe package is equipped with the fast implementation of the sparse-group LASSO estimator by means of proximal block coordinate descent.\nHigh-dimensional mixed frequency time-series data can also be easily manipulated with functions provided in the package.\n\n## The `.f90` source files\n\nThese can be found at the [midasmlpy/src](./midasmlpy/src/sparseglf90/) directory.\nCompiled `.so` files can be found at [midasmlpy/compiled](./midasmlpy/compiled) directory.\nPlease note that we have taken the `.f90` source code for sparse-group LASSO from the repo of the R package `sparsegl` on hosted GitHub at https://github.com/dajmcdon/sparsegl.\nWe have taken their source code in accordance with their GPL-2.0 license as is without any modification as of November 2nd, 2023 UTC.\n\n## Compiling the `.f90` source files with `f2py` on a Mac\n\n### The `gfortran` command to compile `.mod` files from `.f90`\n\nRun:\n\n```bash\ngfortran -c fortran_file.f90\n```\n\n### The `f2py` command to compile `.so` files from `.f90`\n\nRun:\n\n```bash\npython -m numpy.f2py -c fortran_file.f90 -m fortran_file\n```\n\n_**Note**_: Be sure the `python` executable above matches the one in your environment.\n\n## Software in other languages\n\n- A Julia implementation of the midasml method is available [here](https://github.com/ababii/Pythia.jl).\n- A MATLAB implementation of the midasml method is available [here](https://github.com/jstriaukas/midasml_mat).\n- An R implementation of the midasml method is available [here](https://github.com/jstriaukas/midasml).\n\n## Installation\n\nTo install the `midasmlpy` package, download the files and at the directory of files run:\n\n```shell\npip install .\n```\n\nTo install the `midasmlpy` package in development or “editable” mode, do the following:\n\n```shell\npip install -e .\n```\n\n## Development\n\nWe recommend using the VS Code IDE for local development. After cloning this repo, before you install the `midasmlpy` package, you should run the following commands in the Terminal one-by-one:\n\n1. Go to the source file directory\n\n   ```shell\n   cd midasmlpy/src/sparseglf90\n   ```\n2. Delete the original \"sparsegllog_module_1.pyf\" file in that directory.\n3. Compile the f90 code with `f2py`\n\n   ```shell\n   python -m numpy.f2py spmatmul.f90 log_sgl_subfuns.f90 sgl_subfuns.f90 sparsegl.f90 sparsegllog.f90 -m sparsegllog_module -h sparsegllog_module_1.pyf\n\n   python -m numpy.f2py --fcompiler=gnu95 -c sparsegllog_module_1.pyf spmatmul.f90 log_sgl_subfuns.f90 sgl_subfuns.f90 sparsegl.f90 sparsegllog.f90\n   ```\n\n   Please note that the above instructions are exactly the same as the ones at [midasmlpy/src/sparseglf90/README.md](midasmlpy/src/sparseglf90/README.md)\n4. Return to the root directory\n\n   ```shell\n   cd ../../..\n   ```\n5. To install the `midasmlpy` package for development, first ensure that you have [gfortran](https://gcc.gnu.org/wiki/GFortran) installed. Then do the following instead in “editable” mode:\n\n   ```shell\n   pip install -e .\n   ```\n\n## Testing\n\nWe are using `unittest` as the testing framework for our package. Please set up testing for this framework as per the instructions in the [Python testing in Visual Studio Code](https://code.visualstudio.com/docs/python/testing) document. If successful, VS Code should be able to autodetect the tests should be showing up at the Test Explorer view accessible via the beaker icon displayed on the VS Code Activity bar. Note we have assumed that you have the Python extension installed and a Python file open within the editor.\n\nTo run the tests, please click on the run icon next to the tests in the Test Explorer, like in the screenshot below:\n\n\u003cimg title=\"Test Explorer sample image\" alt=\"Test Explorer sample image\" src=\"./media/test-explorer-sample-image.png\" width=\"300px;\"\u003e\n\n\u003e [!NOTE]\n\u003e The run icon only shows up if you hover your cursor over the relevant test(s) in the Test Explorer.\n\n## Remarks\n\nIn case you are running the code on a different platform, you can compile the Fortran code `sglfitF.f90` by using `f2py` which is part of `numpy`. There is a guide in midasmlpy/src/sparseglf90/README.md\n\n[^1]: Babii, A., Ghysels, E., \u0026 Striaukas, J. Machine learning time series regressions with an application to nowcasting, (2022) *Journal of Business \u0026 Economic Statistics*, Volume 40, Issue 3, 1094-1106. https://doi.org/10.1080/07350015.2021.1899933.\n    \n[^2]: Babii, A., Ghysels, E., \u0026 Striaukas, J. High-dimensional Granger causality tests with an application to VIX and news, (2022) *Journal of Financial Econometrics*, nbac023. https://doi.org/10.1093/jjfinec/nbac023.\n    \n[^3]: Babii, A., R. Ball, Ghysels, E., \u0026 Striaukas, J. Machine learning panel data regressions with heavy-tailed dependent data: Theory and application, (2022) *Journal of Econometrics*. https://doi.org/10.1016/j.jeconom.2022.07.001.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstriaukas%2Fmidasmlpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstriaukas%2Fmidasmlpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstriaukas%2Fmidasmlpy/lists"}