{"id":27734592,"url":"https://github.com/pmichaillat/michez-rule","last_synced_at":"2026-04-01T21:49:17.214Z","repository":{"id":253177815,"uuid":"842203611","full_name":"pmichaillat/michez-rule","owner":"pmichaillat","description":"Code and data for the paper \"Has the Recession Started?\"","archived":false,"fork":false,"pushed_at":"2025-05-29T02:22:02.000Z","size":168,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T05:39:58.693Z","etag":null,"topics":["job-vacancies","matlab","michez-rule","nowcasting","paper-with-code","recession-indicator","recession-probability","recessions","sahm-rule","unemployment"],"latest_commit_sha":null,"homepage":"https://pascalmichaillat.org/16/","language":"MATLAB","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmichaillat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-08-13T22:13:03.000Z","updated_at":"2025-08-19T11:43:12.000Z","dependencies_parsed_at":"2024-08-15T01:25:25.806Z","dependency_job_id":"801fc93f-6991-41a9-97c7-a0daa89e8d5f","html_url":"https://github.com/pmichaillat/michez-rule","commit_stats":null,"previous_names":["pmichaillat/recession-indicator","pmichaillat/michez-rule"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/pmichaillat/michez-rule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmichaillat%2Fmichez-rule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmichaillat%2Fmichez-rule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmichaillat%2Fmichez-rule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmichaillat%2Fmichez-rule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmichaillat","download_url":"https://codeload.github.com/pmichaillat/michez-rule/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmichaillat%2Fmichez-rule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708044,"owners_count":26031932,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["job-vacancies","matlab","michez-rule","nowcasting","paper-with-code","recession-indicator","recession-probability","recessions","sahm-rule","unemployment"],"created_at":"2025-04-28T13:26:04.653Z","updated_at":"2025-10-07T01:44:32.239Z","avatar_url":"https://github.com/pmichaillat.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Has the Recession Started? - Code and Data\n\nThis repository contains the code and data accompanying the paper \"Has the Recession Started?\", written by [Pascal Michaillat](https://pascalmichaillat.org) and [Emmanuel Saez](https://eml.berkeley.edu/~saez/), and published in the [Oxford Bulletin of Economics and Statistics](http://doi.org/10.1111/obes.12685) in May 2025.\n\n## Paper webpage\n\nThe paper is available at https://pascalmichaillat.org/16/.\n\n## Raw data\n\nThe raw data used by the code to produce the results in the paper are stored as CSV files in the `raw` folder.\n\n+ `20210719_cycle_dates_pasted.csv` - US business cycle dates, 1857–2021\n\t+ Source: [NBER (2023)](https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions)\n+ `CLF16OV.csv` - US labor force level, 1948–2025\n\t+ Source: [BLS (2025a)](https://fred.stlouisfed.org/series/CLF16OV)\n+ `CompositeHWI.xlsx - Sheet1.csv` - US vacancy rate, 1951–2020\n\t+ Source: [Barnichon (2010)](https://docs.google.com/spreadsheets/d/1fkMinSHkjTL99-bLZYFldQ8rHtgh8lxd)\n+ `HistoricalSeries_JME_2020January.csv` - US unemployment and vacancy rates, 1890–2017\n\t+ Source: [Petrosky-Nadeau and Zhang (2021)](https://drive.google.com/file/d/1NcuUMRR4_fOwJW6qHb-XxitVSXXONBHW)\n+ `JTSJOL.csv` - US vacancy level, 2001–2025\n\t+ Source: [BLS (2025b)](https://fred.stlouisfed.org/series/JTSJOL)\n+ `UNEMPLOY.csv` - US unemployment level, 1948–2025\n\t+ Source: [BLS (2025d)](https://fred.stlouisfed.org/series/UNEMPLOY)\n\t\n## Code\n\nThe results in the paper are obtained using MATLAB. The MATLAB code is located in the `code` folder.\n\n### Main script\n\nThe main script, `main.m`, orchestrates the production of the results in the paper. The script collects the raw data, performs the computations, and produces the 8 figures and 2 tables presented in the paper.\n\n### Computations\n\nThe main script performs the computations in three steps, using the following scripts:\n\n+ `getData.m` - Load data on US unemployment, job vacancies, and recessions\n+ `computeIndicator.m` - Compute minimum indicator\n+ `detectRecessions.m` -  Detect recessions with Michez rule\n\nThe output from the computations is stored in variables in the MATLAB workspace. These variables are then used to produce tables and figures.\n\n### Figure production\n\nBefore producing the figures, the main script calls the `formatFigure.m` script to preformat figures and predefine figure properties. The figure properties are stored in variables in the MATLAB workspace.\n\nThe main script then produces the figures using a collection of scripts:\n\n+ `figure1.m` - Produce figure 1\n+ `figure2.m` - Produce figure 2\n+ `figure3.m` - Produce figure 3\n+ `figure4.m` - Produce figure 4\n+ `figure5.m` - Produce figure 5\n+ `figure6.m` - Produce figure 6\n+ `figure7.m` - Produce figure 7\n+ `figure8.m` - Produce figure 8\n\nThe scripts display the figures in MATLAB figure windows, save each figure as a PDF file, and save the underlying data as CSV files. \n\n### Table production\n\nNext, the main script produces the tables using the following scripts:\n\n+ `table1.m` - Produce table 1\n+ `table2.m` - Produce table 2\n\nThe scripts display the tables in the MATLAB command window and save the tables as CSV file. The scripts also generate numerical results associated with the tables. The results are displayed in the command window and saved in Markdown files.\n\n## Results\n\n### Figures\n\nThe figures produced by the code are saved as PDF files. The data used to generate the figures are saved as CSV files. All the files are located in the `results` folder, each corresponding to a specific figure in the paper:\n\n+ `figure1.pdf`, `figure1.csv` - Figure 1\n+ `figure2.pdf`, `figure2.csv` - Figure 2\n+ `figure3.pdf`, `figure3.csv` - Figure 3\n+ `figure4.pdf`, `figure4.csv` - Figure 4\n+ `figure5.pdf`, `figure5.csv` - Figure 5\n+ `figure6.pdf`, `figure6.csv` - Figure 6\n+ `figure7.pdf`, `figure7.csv` - Figure 7\n+ `figure8.pdf`, `figure8.csv` - Figure 8\n\n### Tables\n\nThe tables produced by the code are saved as CSV files. The numerical results associated with each table are saved in Markdown files. All the files are located in the `results` folder, each corresponding to a specific table in the paper:\n\n+ `table1.csv`, `table1.md` - Table 1\n+ `table2.csv`, `table2.md` - Table 2\n\n## Usage\n\n1. Clone the repository to your local machine using Git or by downloading the ZIP file.\n\n2. Open MATLAB and set the `code` folder as the current folder.\n\n3. To generate the figures and tables presented in the paper, run the following command in the MATLAB command window:\n\n```matlab\nrun('main.m')\n```\n\n4. By default, the main script overwrites the files in the `results` folder. To preserve existing files, make a copy of the folder before running the script.\n\n## Software\n\nThe results were obtained using MATLAB R2024a on macOS Sequoia (Apple silicon).\n\n## License\n\nThis repository is licensed under the [MIT License](LICENSE.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmichaillat%2Fmichez-rule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmichaillat%2Fmichez-rule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmichaillat%2Fmichez-rule/lists"}