nbcpu


Namenbcpu JSON
Version 0.19.0 PyPI version JSON
download
home_pagehttps://entelecheia.github.io/nbcpu
SummaryQuantifying Central Bank Policy Uncertainty in a Highly Dollarized Economy: A Topic Modeling Approach
upload_time2024-03-29 21:17:16
maintainerNone
docs_urlNone
authorYoung Joon Lee
requires_python<3.13,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Measuring Central Bank Policy Uncertainty

[![pypi-image]][pypi-url]
[![version-image]][release-url]
[![release-date-image]][release-url]
[![license-image]][license-url]
[![codecov][codecov-image]][codecov-url]
[![jupyter-book-image]][docs-url]

<!-- Links: -->

[codecov-image]: https://codecov.io/gh/entelecheia/nbcpu/branch/main/graph/badge.svg?token=P414TXNSHY
[codecov-url]: https://codecov.io/gh/entelecheia/nbcpu
[pypi-image]: https://img.shields.io/pypi/v/nbcpu
[license-image]: https://img.shields.io/github/license/entelecheia/nbcpu
[license-url]: https://github.com/entelecheia/nbcpu/blob/main/LICENSE
[version-image]: https://img.shields.io/github/v/release/entelecheia/nbcpu?sort=semver
[release-date-image]: https://img.shields.io/github/release-date/entelecheia/nbcpu
[release-url]: https://github.com/entelecheia/nbcpu/releases
[jupyter-book-image]: https://jupyterbook.org/en/stable/_images/badge.svg
[repo-url]: https://github.com/entelecheia/nbcpu
[pypi-url]: https://pypi.org/project/nbcpu
[docs-url]: https://nbcpu.entelecheia.ai
[changelog]: https://github.com/entelecheia/nbcpu/blob/main/CHANGELOG.md
[contributing guidelines]: https://github.com/entelecheia/nbcpu/blob/main/CONTRIBUTING.md

<!-- Links: -->

**Quantifying Central Bank Policy Uncertainty in Cambodia: A Topic Modeling Approach**

- Documentation: [https://nbcpu.entelecheia.ai][docs-url]
- GitHub: [https://github.com/entelecheia/nbcpu][repo-url]
- PyPI: [https://pypi.org/project/nbcpu][pypi-url]

## Abstract

Understanding and measuring central bank policy uncertainty is vital for predicting economic outcomes, especially in economies like Cambodia, where monetary policy tools are underdeveloped and the economy is heavily dollarized. This study presents a comprehensive analysis of central bank policy uncertainty in Cambodia, employing a dual-model approach using Latent Dirichlet Allocation (LDA) to classify and measure the intensity of policy uncertainty across key areas such as exchange rate policy, currency stabilization, and de-dollarization. By leveraging articles from major Cambodian news outlets, collected and filtered through automated methods, the research creates a rich dataset spanning from 2014 to 2023. The study estimates the document-topic and topic-word distributions from this corpus of news articles, thereby deriving measures of policy uncertainty. Through a combination of narrative evaluation and comparison with established uncertainty measures, the research offers a robust evaluation of the topic-based uncertainty measures, providing valuable insights into the specific sources of policy uncertainty and their evolution over time. The findings contribute to the broader understanding of economic policy uncertainty in emerging economies and have potential applications in risk assessment, decision-making, policy formulation, and strategic planning. Future directions include integrating additional analytical layers such as sentiment analysis and machine learning predictions to achieve a more nuanced understanding of economic uncertainty. The insights derived from this study hold significant implications for economists, policymakers, investors, and business leaders, emphasizing the importance of this research in the context of Cambodia's unique monetary policy challenges.
Supplementary Materials

## Introduction

The research code is publicly available as a Python package named `nbcpu`, hosted on [GitHub](http://github.com/entelecheia/nbcpu) and published on [PyPI](https://pypi.org/project/nbcpu/). Built on the [Hydra Fast Interface (HyFI)](https://hyfi.entelecheia.ai) framework and integrated with plugins [ThematOS](https://thematos.entelecheia.ai) and [Lexikanon](https://lexikanon.entelecheia.ai), `nbcpu` offers a streamlined command-line interface for replicating the experiments described in this research.

## Installation

`nbcpu` requires Python 3.8 or higher and can be installed using the following command:

```bash
pip install -U nbcpu
```

## Usage

### Overview

The `nbcpu` package is designed to facilitate the entire workflow of the research, encompassing crawling, processing, topic modeling, and analysis. The interface is structured into four main parts, each corresponding to a specific phase of the research.

### Configuration

The configuration for `nbcpu` is located in the `src/nbcpu/conf` directory and is divided into several sub-configurations. The main configuration file, `nbcpu`, orchestrates the entire workflow and includes the following sections:

- **Defaults:** Specifies the default configurations for various tasks.
- **Tasks:** Lists the tasks to be executed, such as fetching data, filtering datasets, and running topic models.
- **Global Settings:** Defines global parameters like the number of workers and paths to datasets and workspace.

A snippet of the configuration file is provided below:

```yaml
## @package _global_
defaults:
  - __init__
  - /fetcher@khmer_all: khmer_all
  - /task@nbcpu-datasets: nbcpu-datasets
  - /runner@nbcpu-topic_noprior: nbcpu-topic_noprior
  - /task@nbcpu-datasets_noprior_filter: nbcpu-datasets_noprior_filter
  - /runner@nbcpu-topic_prior: nbcpu-topic_prior
  - /runner@nbcpu-topic_uncertainty: nbcpu-topic_uncertainty
  - /task@nbcpu-datasets_uncertainty_filter: nbcpu-datasets_uncertainty_filter
  - /runner@nbcpu-topic_uncertainty_filtered: nbcpu-topic_uncertainty_filtered
  - override /project: nbcpu

_config_name_: nbcpu
verbose: false
tasks:
  - khmer_all
  - nbcpu-datasets
  - nbcpu-topic_noprior
  - nbcpu-datasets_noprior_filter
  - nbcpu-topic_prior
  - nbcpu-topic_uncertainty
  - nbcpu-datasets_uncertainty_filter
  - nbcpu-topic_uncertainty_filtered

nbcpu-topic_uncertainty_filtered:
  calls:
    - train
    - infer
  infer_args:
    model_config_file: ${__project_root_path__:}/workspace/nbcpu-topic_uncertainty_filtered/model/configs/model(2)_config.yaml
  corpus_to_infer:
    text_col: tokens
    data_load:
      data_file: ${__project_root_path__:}/workspace/datasets/processed/topic_noprior_filtered/train.parquet

global:
  num_workers: 100
  datasets_path: ${__get_path__:datasets}
  workspace_path: ${__project_workspace_path__:}
```

### Running Experiments

The entire workflow can be executed with the following command:

```bash
nbcpu +workflow=nbcpu
```

This command triggers the sequence of tasks defined in the configuration, including data fetching, preprocessing, topic modeling, and uncertainty analysis.

## Changelog

See the [CHANGELOG] for more information.

## Contributing

Contributions are welcome! Please see the [contributing guidelines] for more information.

## License

This project is released under the [MIT License][license-url].


            

Raw data

            {
    "_id": null,
    "home_page": "https://entelecheia.github.io/nbcpu",
    "name": "nbcpu",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Young Joon Lee",
    "author_email": "entelecheia@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/27/12/4ee399ea4e7238f3b089ed11de3b279b74e8a899b0d11b9e801031a4b73d/nbcpu-0.19.0.tar.gz",
    "platform": null,
    "description": "# Measuring Central Bank Policy Uncertainty\n\n[![pypi-image]][pypi-url]\n[![version-image]][release-url]\n[![release-date-image]][release-url]\n[![license-image]][license-url]\n[![codecov][codecov-image]][codecov-url]\n[![jupyter-book-image]][docs-url]\n\n<!-- Links: -->\n\n[codecov-image]: https://codecov.io/gh/entelecheia/nbcpu/branch/main/graph/badge.svg?token=P414TXNSHY\n[codecov-url]: https://codecov.io/gh/entelecheia/nbcpu\n[pypi-image]: https://img.shields.io/pypi/v/nbcpu\n[license-image]: https://img.shields.io/github/license/entelecheia/nbcpu\n[license-url]: https://github.com/entelecheia/nbcpu/blob/main/LICENSE\n[version-image]: https://img.shields.io/github/v/release/entelecheia/nbcpu?sort=semver\n[release-date-image]: https://img.shields.io/github/release-date/entelecheia/nbcpu\n[release-url]: https://github.com/entelecheia/nbcpu/releases\n[jupyter-book-image]: https://jupyterbook.org/en/stable/_images/badge.svg\n[repo-url]: https://github.com/entelecheia/nbcpu\n[pypi-url]: https://pypi.org/project/nbcpu\n[docs-url]: https://nbcpu.entelecheia.ai\n[changelog]: https://github.com/entelecheia/nbcpu/blob/main/CHANGELOG.md\n[contributing guidelines]: https://github.com/entelecheia/nbcpu/blob/main/CONTRIBUTING.md\n\n<!-- Links: -->\n\n**Quantifying Central Bank Policy Uncertainty in Cambodia: A Topic Modeling Approach**\n\n- Documentation: [https://nbcpu.entelecheia.ai][docs-url]\n- GitHub: [https://github.com/entelecheia/nbcpu][repo-url]\n- PyPI: [https://pypi.org/project/nbcpu][pypi-url]\n\n## Abstract\n\nUnderstanding and measuring central bank policy uncertainty is vital for predicting economic outcomes, especially in economies like Cambodia, where monetary policy tools are underdeveloped and the economy is heavily dollarized. This study presents a comprehensive analysis of central bank policy uncertainty in Cambodia, employing a dual-model approach using Latent Dirichlet Allocation (LDA) to classify and measure the intensity of policy uncertainty across key areas such as exchange rate policy, currency stabilization, and de-dollarization. By leveraging articles from major Cambodian news outlets, collected and filtered through automated methods, the research creates a rich dataset spanning from 2014 to 2023. The study estimates the document-topic and topic-word distributions from this corpus of news articles, thereby deriving measures of policy uncertainty. Through a combination of narrative evaluation and comparison with established uncertainty measures, the research offers a robust evaluation of the topic-based uncertainty measures, providing valuable insights into the specific sources of policy uncertainty and their evolution over time. The findings contribute to the broader understanding of economic policy uncertainty in emerging economies and have potential applications in risk assessment, decision-making, policy formulation, and strategic planning. Future directions include integrating additional analytical layers such as sentiment analysis and machine learning predictions to achieve a more nuanced understanding of economic uncertainty. The insights derived from this study hold significant implications for economists, policymakers, investors, and business leaders, emphasizing the importance of this research in the context of Cambodia's unique monetary policy challenges.\nSupplementary Materials\n\n## Introduction\n\nThe research code is publicly available as a Python package named `nbcpu`, hosted on [GitHub](http://github.com/entelecheia/nbcpu) and published on [PyPI](https://pypi.org/project/nbcpu/). Built on the [Hydra Fast Interface (HyFI)](https://hyfi.entelecheia.ai) framework and integrated with plugins [ThematOS](https://thematos.entelecheia.ai) and [Lexikanon](https://lexikanon.entelecheia.ai), `nbcpu` offers a streamlined command-line interface for replicating the experiments described in this research.\n\n## Installation\n\n`nbcpu` requires Python 3.8 or higher and can be installed using the following command:\n\n```bash\npip install -U nbcpu\n```\n\n## Usage\n\n### Overview\n\nThe `nbcpu` package is designed to facilitate the entire workflow of the research, encompassing crawling, processing, topic modeling, and analysis. The interface is structured into four main parts, each corresponding to a specific phase of the research.\n\n### Configuration\n\nThe configuration for `nbcpu` is located in the `src/nbcpu/conf` directory and is divided into several sub-configurations. The main configuration file, `nbcpu`, orchestrates the entire workflow and includes the following sections:\n\n- **Defaults:** Specifies the default configurations for various tasks.\n- **Tasks:** Lists the tasks to be executed, such as fetching data, filtering datasets, and running topic models.\n- **Global Settings:** Defines global parameters like the number of workers and paths to datasets and workspace.\n\nA snippet of the configuration file is provided below:\n\n```yaml\n## @package _global_\ndefaults:\n  - __init__\n  - /fetcher@khmer_all: khmer_all\n  - /task@nbcpu-datasets: nbcpu-datasets\n  - /runner@nbcpu-topic_noprior: nbcpu-topic_noprior\n  - /task@nbcpu-datasets_noprior_filter: nbcpu-datasets_noprior_filter\n  - /runner@nbcpu-topic_prior: nbcpu-topic_prior\n  - /runner@nbcpu-topic_uncertainty: nbcpu-topic_uncertainty\n  - /task@nbcpu-datasets_uncertainty_filter: nbcpu-datasets_uncertainty_filter\n  - /runner@nbcpu-topic_uncertainty_filtered: nbcpu-topic_uncertainty_filtered\n  - override /project: nbcpu\n\n_config_name_: nbcpu\nverbose: false\ntasks:\n  - khmer_all\n  - nbcpu-datasets\n  - nbcpu-topic_noprior\n  - nbcpu-datasets_noprior_filter\n  - nbcpu-topic_prior\n  - nbcpu-topic_uncertainty\n  - nbcpu-datasets_uncertainty_filter\n  - nbcpu-topic_uncertainty_filtered\n\nnbcpu-topic_uncertainty_filtered:\n  calls:\n    - train\n    - infer\n  infer_args:\n    model_config_file: ${__project_root_path__:}/workspace/nbcpu-topic_uncertainty_filtered/model/configs/model(2)_config.yaml\n  corpus_to_infer:\n    text_col: tokens\n    data_load:\n      data_file: ${__project_root_path__:}/workspace/datasets/processed/topic_noprior_filtered/train.parquet\n\nglobal:\n  num_workers: 100\n  datasets_path: ${__get_path__:datasets}\n  workspace_path: ${__project_workspace_path__:}\n```\n\n### Running Experiments\n\nThe entire workflow can be executed with the following command:\n\n```bash\nnbcpu +workflow=nbcpu\n```\n\nThis command triggers the sequence of tasks defined in the configuration, including data fetching, preprocessing, topic modeling, and uncertainty analysis.\n\n## Changelog\n\nSee the [CHANGELOG] for more information.\n\n## Contributing\n\nContributions are welcome! Please see the [contributing guidelines] for more information.\n\n## License\n\nThis project is released under the [MIT License][license-url].\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Quantifying Central Bank Policy Uncertainty in a Highly Dollarized Economy: A Topic Modeling Approach",
    "version": "0.19.0",
    "project_urls": {
        "Homepage": "https://entelecheia.github.io/nbcpu",
        "Repository": "https://github.com/entelecheia/nbcpu"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee5c29a40e99ecd83567337c21be2e7af0efe7ffcc894f260a63cf046bd5801d",
                "md5": "f38d0e1bf5a0c7b987c9ad63f32fdebd",
                "sha256": "fc119293b52dc268b8b8349d415256ba7b3da8eacbb864b6a44b191033daf80e"
            },
            "downloads": -1,
            "filename": "nbcpu-0.19.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f38d0e1bf5a0c7b987c9ad63f32fdebd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 27279,
            "upload_time": "2024-03-29T21:17:14",
            "upload_time_iso_8601": "2024-03-29T21:17:14.267254Z",
            "url": "https://files.pythonhosted.org/packages/ee/5c/29a40e99ecd83567337c21be2e7af0efe7ffcc894f260a63cf046bd5801d/nbcpu-0.19.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27124ee399ea4e7238f3b089ed11de3b279b74e8a899b0d11b9e801031a4b73d",
                "md5": "87f1a006cea93f8d1387455e4ef39d84",
                "sha256": "0bb17127e4d60b8049f1834fa17b951f43f2081c63027a1a14688dd7bb1c2ce7"
            },
            "downloads": -1,
            "filename": "nbcpu-0.19.0.tar.gz",
            "has_sig": false,
            "md5_digest": "87f1a006cea93f8d1387455e4ef39d84",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 18516,
            "upload_time": "2024-03-29T21:17:16",
            "upload_time_iso_8601": "2024-03-29T21:17:16.064738Z",
            "url": "https://files.pythonhosted.org/packages/27/12/4ee399ea4e7238f3b089ed11de3b279b74e8a899b0d11b9e801031a4b73d/nbcpu-0.19.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 21:17:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "entelecheia",
    "github_project": "nbcpu",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nbcpu"
}
        
Elapsed time: 0.25678s