Python + VS Code: A Practical First Setup
A bilingual first setup guide for people starting with Python, VS Code, GitHub repositories, virtual environments, and uv.
A bilingual first setup guide for people starting with Python, VS Code, GitHub repositories, virtual environments, and uv.
We will explore step by step how to estimate a Bayesian Vector Autoregression (BVAR) in Python, covering the theory and implementation from scratch: Data preparation Prior distributions and initial values Gibbs sampling for posterior simulation Structural identification and impulse response estimation Finally, we’ll show how this process becomes much simpler using MacroPy, an early-stage Python package that could be a great fit if you’re into macroeconometrics. Explore the documentation and tutorials for hands-on notebooks. ...
We will explore three methods to generate text-based variables, ranging from simple dictionary approaches to more complex, fine-tuned few-shot learning models using pre-trained LLMs. All examples in this post are implemented using FewShotX, a Python package for dictionary scoring, zero-shot, and few-shot learning in text classification. Explore the documentation and tutorials for hands-on notebooks. 1. Dictionary Methods Dictionary methods have been widely used in economics to transform textual data into quantitative indicators. A notable example is the Economic Policy Uncertainty (EPU) index developed by Baker, Bloom, and Davis (2016), where the frequency of specific terms in newspaper articles is used to capture policy-related uncertainty over time. ...