# ofrapi documentation
This repository contains a Python wrapper to easily retrieve data from the Office of Financial Research (OFR) in Pandas format using the official API.
## APIs of the Office of Financial Research (OFR)
- **[Short-term Funding Monitor: ofrapi.stfm](ofrapi/stfm/README.md)**
- **[Hedge Fund Monitor: ofrapi.hfm](ofrapi/hfm/README.md)**
- **[Bank Systemic Risk Monitor: ofrapi.bsrm](ofrapi/bsrm/README.md)**
- **[Financial Stress Index: ofrapi.fsi](ofrapi/fsi/README.md)**
## Installation
```commandline
pip install ofrapi
```
## Short-term Funding Monitor
The Short-term Funding Monitor (STFM) application programming interface (API) allows a remote application to query the Office of Financial Research for data without the need for a human intermediary to download data manually. While some API calls might be used every day, others are intended for use when setting up a remote application for a periodic refresh.
We have provided this open interface for public use. This API does not require tokens or registration, so feel free to use it immediately.
### Get Series Information (ofrapi.stfm.get_series_info)
The following retrieve the metadata attached to each specified series.
| Method | Description |
|--------------------------|-----------------------------------------------------------------------------------------|
| ```metadata_mnemonics``` | Retrieves all series as unique identifiers referred to as mnemonics. |
| ```metadata_query``` | Retrieves the information for a specified series. |
| ```metadata_search``` | Retrieves a list of series with identifying information that matches a query condition. |
### Get Series Data (ofrapi.stfm.get_series_data)
The following retrieve the data for specified series.
| Method | Description |
|-------------------------|------------------------------------------------------------------------------|
| ```series_timeseries``` | Retrieves the data for a single series. |
| ```calc_spread``` | Retrieves the spread between two series as a list of data points and values. |
### Get Series Information & Data (ofrapi.stfm.series_info_data)
The following retrieve the metadata and data for specified series.
| Method | Description |
|------------------------|----------------------------------------------------------------------------|
| ```series_full``` | Retrieves the information and data for a single series. |
| ```series_multifull``` | Retrieves the information and data for a group of series. |
| ```series_dataset``` | Retrieves the information and data for all series in a specified data set. |
## Hedge Fund Monitor
The Hedge Fund Monitor (HFM) application programming interface (API) allows a remote application to query the Office of Financial Research for data without the need for a human intermediary to download data manually. While some API calls might be used every day, others are intended for use when setting up a remote application for a periodic refresh.
We have provided this open interface for public use. This API does not require tokens or registration, so feel free to use it immediately.
### Get Series Information (ofrapi.hfm.get_series_info)
The following retrieve the metadata attached to each specified series.
| Method | Description |
|--------------------------|-----------------------------------------------------------------------------------------|
| ```metadata_mnemonics``` | Retrieves all series as unique identifiers referred to as mnemonics. |
| ```metadata_query``` | Retrieves the information for a specified series. |
| ```metadata_search``` | Retrieves a list of series with identifying information that matches a query condition. |
### Get Series Data (ofrapi.hfm.get_series_data)
The following retrieve the data for specified series.
| Method | Description |
|-------------------------|------------------------------------------------------------------------------|
| ```series_timeseries``` | Retrieves the data for a single series. |
| ```calc_spread``` | Retrieves the spread between two series as a list of data points and values. |
### Get Series Information & Data (ofrapi.hfm.series_info_data)
The following retrieve the metadata and data for specified series.
| Method | Description |
|------------------------|----------------------------------------------------------------------------|
| ```series_full``` | Retrieves the information and data for a single series. |
| ```series_multifull``` | Retrieves the information and data for a group of series. |
| ```series_dataset``` | Retrieves the information and data for all series in a specified data set. |
| ```categories``` | Returns a csv file containing the data for a category. |
## Bank Systemic Risk Monitor
The OFR Bank Systemic Risk Monitor (BSRM) is a collection of key measures for monitoring systemic risks posed by the largest banks. These include systemic importance scores for international and U.S. banks, the OFR’s Contagion Index, and other common measures of systemic risk.
### Get Bank Systemic Risk Monitor data (ofrapi.bsrm)
| Method | Description |
|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| ```get_basel_scores``` | Retrieves a Basel scores from a set of financial indicators to identify global systemically important banks (G-SIBs). |
| ```get_us_systemic_scores``` | Retrieves a U.S. G-SIB Surcharges data. |
| ```get_contagion_index``` | Retrieves the OFR's Contagion Index. |
| ```get_leverage``` | Retrieves total assets, total equity, and leverage data that are common measures used to gauge systemic risk. |
| ```get_short_term_wholesale_funding``` | Retrieves short-term wholesale funding data. |
## Financial Stress Index
The OFR Financial Stress Index (OFR FSI) is a daily market-based snapshot of stress in global financial markets. It is constructed from 33 financial market variables, such as yield spreads, valuation measures, and interest rates. The OFR FSI is positive when stress levels are above average, and negative when stress levels are below average.
### Get Financial Stress Index data (ofrapi.fsi)
| Method | Description |
|------------------------------|-----------------------------------------------------------------------------------------------|
| ```financial_stress_index``` | Retrieves the OFR Financial Stress Index with five categories and three region contributions. |
## API Documentation
- [Short-term Funding Monitor - API (OFR)](https://www.financialresearch.gov/short-term-funding-monitor/api/).
- [Hedge Fund Monitor - API (OFR)](https://www.financialresearch.gov/hedge-fund-monitor/api/).
- [Bank Systemic Risk Monitor - NO API (OFR)](https://www.financialresearch.gov/bank-systemic-risk-monitor/).
- [Financial Stress Index - NO API (OFR)](https://www.financialresearch.gov/financial-stress-index/).
Raw data
{
"_id": null,
"home_page": "https://github.com/Jaldekoa/ofrapi",
"name": "ofrapi",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Jon Aldekoa",
"author_email": "jaldekoa@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/34/bb/e3c63b83ea34401cff6414d13f963dce7ebf59999296e6c4493a4dec461a/ofrapi-0.0.5.tar.gz",
"platform": "Any",
"description": "# ofrapi documentation\nThis repository contains a Python wrapper to easily retrieve data from the Office of Financial Research (OFR) in Pandas format using the official API.\n\n## APIs of the Office of Financial Research (OFR)\n- **[Short-term Funding Monitor: ofrapi.stfm](ofrapi/stfm/README.md)**\n- **[Hedge Fund Monitor: ofrapi.hfm](ofrapi/hfm/README.md)**\n- **[Bank Systemic Risk Monitor: ofrapi.bsrm](ofrapi/bsrm/README.md)**\n- **[Financial Stress Index: ofrapi.fsi](ofrapi/fsi/README.md)**\n\n## Installation\n```commandline\npip install ofrapi\n```\n\n## Short-term Funding Monitor\nThe Short-term Funding Monitor (STFM) application programming interface (API) allows a remote application to query the Office of Financial Research for data without the need for a human intermediary to download data manually. While some API calls might be used every day, others are intended for use when setting up a remote application for a periodic refresh.\n\nWe have provided this open interface for public use. This API does not require tokens or registration, so feel free to use it immediately.\n\n### Get Series Information (ofrapi.stfm.get_series_info)\nThe following retrieve the metadata attached to each specified series.\n\n| Method | Description |\n|--------------------------|-----------------------------------------------------------------------------------------|\n| ```metadata_mnemonics``` | Retrieves all series as unique identifiers referred to as mnemonics. |\n| ```metadata_query``` | Retrieves the information for a specified series. |\n| ```metadata_search``` | Retrieves a list of series with identifying information that matches a query condition. |\n\n### Get Series Data (ofrapi.stfm.get_series_data)\nThe following retrieve the data for specified series.\n\n| Method | Description |\n|-------------------------|------------------------------------------------------------------------------|\n| ```series_timeseries``` | Retrieves the data for a single series. |\n| ```calc_spread``` | Retrieves the spread between two series as a list of data points and values. |\n\n### Get Series Information & Data (ofrapi.stfm.series_info_data)\nThe following retrieve the metadata and data for specified series.\n\n| Method | Description |\n|------------------------|----------------------------------------------------------------------------|\n| ```series_full``` | Retrieves the information and data for a single series. |\n| ```series_multifull``` | Retrieves the information and data for a group of series. |\n| ```series_dataset``` | Retrieves the information and data for all series in a specified data set. |\n\n\n## Hedge Fund Monitor\nThe Hedge Fund Monitor (HFM) application programming interface (API) allows a remote application to query the Office of Financial Research for data without the need for a human intermediary to download data manually. While some API calls might be used every day, others are intended for use when setting up a remote application for a periodic refresh.\n\nWe have provided this open interface for public use. This API does not require tokens or registration, so feel free to use it immediately.\n\n### Get Series Information (ofrapi.hfm.get_series_info)\nThe following retrieve the metadata attached to each specified series.\n\n| Method | Description |\n|--------------------------|-----------------------------------------------------------------------------------------|\n| ```metadata_mnemonics``` | Retrieves all series as unique identifiers referred to as mnemonics. |\n| ```metadata_query``` | Retrieves the information for a specified series. |\n| ```metadata_search``` | Retrieves a list of series with identifying information that matches a query condition. |\n\n### Get Series Data (ofrapi.hfm.get_series_data)\nThe following retrieve the data for specified series.\n\n| Method | Description |\n|-------------------------|------------------------------------------------------------------------------|\n| ```series_timeseries``` | Retrieves the data for a single series. |\n| ```calc_spread``` | Retrieves the spread between two series as a list of data points and values. |\n\n### Get Series Information & Data (ofrapi.hfm.series_info_data)\nThe following retrieve the metadata and data for specified series.\n\n| Method | Description |\n|------------------------|----------------------------------------------------------------------------|\n| ```series_full``` | Retrieves the information and data for a single series. |\n| ```series_multifull``` | Retrieves the information and data for a group of series. |\n| ```series_dataset``` | Retrieves the information and data for all series in a specified data set. |\n| ```categories``` | Returns a csv file containing the data for a category. |\n\n\n## Bank Systemic Risk Monitor\nThe OFR Bank Systemic Risk Monitor (BSRM) is a collection of key measures for monitoring systemic risks posed by the largest banks. These include systemic importance scores for international and U.S. banks, the OFR\u2019s Contagion Index, and other common measures of systemic risk.\n\n### Get Bank Systemic Risk Monitor data (ofrapi.bsrm)\n\n| Method | Description |\n|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| ```get_basel_scores``` | Retrieves a Basel scores from a set of financial indicators to identify global systemically important banks (G-SIBs). |\n| ```get_us_systemic_scores``` | Retrieves a U.S. G-SIB Surcharges data. |\n| ```get_contagion_index``` | Retrieves the OFR's Contagion Index. |\n| ```get_leverage``` | Retrieves total assets, total equity, and leverage data that are common measures used to gauge systemic risk. |\n| ```get_short_term_wholesale_funding``` | Retrieves short-term wholesale funding data. |\n\n## Financial Stress Index\nThe OFR Financial Stress Index (OFR FSI) is a daily market-based snapshot of stress in global financial markets. It is constructed from 33 financial market variables, such as yield spreads, valuation measures, and interest rates. The OFR FSI is positive when stress levels are above average, and negative when stress levels are below average.\n\n### Get Financial Stress Index data (ofrapi.fsi)\n\n| Method | Description |\n|------------------------------|-----------------------------------------------------------------------------------------------|\n| ```financial_stress_index``` | Retrieves the OFR Financial Stress Index with five categories and three region contributions. |\n\n\n## API Documentation\n- [Short-term Funding Monitor - API (OFR)](https://www.financialresearch.gov/short-term-funding-monitor/api/).\n- [Hedge Fund Monitor - API (OFR)](https://www.financialresearch.gov/hedge-fund-monitor/api/).\n- [Bank Systemic Risk Monitor - NO API (OFR)](https://www.financialresearch.gov/bank-systemic-risk-monitor/).\n- [Financial Stress Index - NO API (OFR)](https://www.financialresearch.gov/financial-stress-index/).\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Python API wrapper for Office of Financial Research (OFR)",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/Jaldekoa/ofrapi"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f327df768d5b89a4ac51ed37dbdd530bcf14e8dd87aa3bcc50af6c20a7fd6dc",
"md5": "7f0c08c01756a0bd9c787ecf60c07bc1",
"sha256": "295ec6f02cda1101b50bc79849b2e0c1304963dc4bf9444131967853b4e5a0db"
},
"downloads": -1,
"filename": "ofrapi-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f0c08c01756a0bd9c787ecf60c07bc1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15474,
"upload_time": "2024-09-07T14:49:08",
"upload_time_iso_8601": "2024-09-07T14:49:08.263762Z",
"url": "https://files.pythonhosted.org/packages/6f/32/7df768d5b89a4ac51ed37dbdd530bcf14e8dd87aa3bcc50af6c20a7fd6dc/ofrapi-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "34bbe3c63b83ea34401cff6414d13f963dce7ebf59999296e6c4493a4dec461a",
"md5": "e128f48e0a0e6c5181de5c619b4d5f2d",
"sha256": "7cfc90ee017e25ca9f328e8fcbb95b0d4d7026a0c1143e780b67dd3352072411"
},
"downloads": -1,
"filename": "ofrapi-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "e128f48e0a0e6c5181de5c619b4d5f2d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11040,
"upload_time": "2024-09-07T14:49:09",
"upload_time_iso_8601": "2024-09-07T14:49:09.661708Z",
"url": "https://files.pythonhosted.org/packages/34/bb/e3c63b83ea34401cff6414d13f963dce7ebf59999296e6c4493a4dec461a/ofrapi-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-07 14:49:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Jaldekoa",
"github_project": "ofrapi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "ofrapi"
}