Open-source Python infrastructure for computational economics, built as one stack: acquisition libraries pull from primary sources, representation layers give the data typed structure, and modeling libraries sit on top. Each package is independently useful and released to the same standard — full type coverage, sync/async parity, defensive validation, and archived releases with citable DOIs.

Layer Project Status
Acquisition fedfred — Federal Reserve data Released
Acquisition edgar-sec — SEC EDGAR filings Released
Representation toros — self-validating financial objects In development
Modeling cultivars — Bayesian & structural VAR In development
Modeling ns-sdn — neural spectral state space In development
Application autofed — RL for monetary policy Research

fedfred

fedfred banner

OpenSSF Best Practices Coverage PyPI version Python versions License PyPI Downloads Conda Downloads Repology DOI

A modern Python package for interacting with the Federal Reserve Bank of St. Louis FRED, GeoFRED, ALFRED, and FRASER APIs.

fedfred is a feature-rich Python client for the Federal Reserve Economic Data (FRED) API, designed to make working with economic time series ergonomic and production-ready. It provides full coverage of the FRED, ALFRED, and GeoFRED/Maps endpoints behind a clean, typed interface, with first-class support for returning data as pandas, polars, or dask objects — and GeoDataFrames for geospatial series. Built for serious use, it includes both synchronous and asynchronous clients, built-in rate limiting and caching to respect API limits, and defensive type-safe handling of responses, making it suitable for everything from interactive research notebooks to automated data pipelines.

pip install fedfred

Docs · PyPI · conda-forge · GitHub


edgar-sec

edgar-sec banner

OpenSSF Best Practices Coverage PyPI version Python versions License PyPI Downloads Conda Downloads Repology

A feature-rich Python package for interacting with the US Securities and Exchange Commission API: EDGAR.

edgar-sec is a research-grade, fully-typed Python SDK for the entire SEC EDGAR REST API — the structural twin of fedfred for federal securities-disclosure data. It provides ergonomic, discoverable access to the full endpoint surface (submissions, company concepts, company facts, frames, and CIK/ticker resolution) through a small public front door, with every response returned as a typed dataclass rather than a raw dict for IDE autocomplete and mypy safety. Built to the same quality bar as its sibling, it offers strict parity between synchronous and asynchronous clients, a built-in rate limiter that respects EDGAR’s fair-access rules, optional local caching, and defensive type-safe handling of responses throughout.

Currently in redevelopment as the acquisition layer of the toros stack, feeding filings into toros for structured representation.

pip install edgar-sec

Docs · PyPI · conda-forge · GitHub


toros

toros banner

Status: in development Last commit

A powerful DataFrame extension for representing complex financial objects.

toros is a pandas-backed data representation library that turns SEC filing data into self-validating financial objects. It uses registered DataFrame accessors to enforce financial semantics — type, unit, period, and taxonomy constraints — directly within the pandas backend, and layers specialized frame types (such as financial-statement representations) on top through inheritance. It serves as the interactive, semantically-aware data container that edgar-sec materializes filings into, giving researchers pandas ergonomics with domain-correct structure and validation rather than raw, untyped tables.

Flagship project of toros-dev.

GitHub


cultivars

cultivars banner

Status: in development Last commit

A modern computing library in Python for vector autoregressions and other autoregressive economic models.

cultivars is a research-grade Python SDK for autoregressive time-series modeling, built to cover the Bayesian and time-varying methods that existing Python tooling handles poorly or not at all. Where reduced-form VAR and ARIMA are treated as table stakes, its focus is the harder surface: Bayesian VAR at scale (Minnesota, NIW, SSVS, horseshoe, and hierarchical priors), time-varying-parameter VAR with stochastic volatility, and structural identification beyond Cholesky — sign, narrative, and proxy/IV schemes passed as composable strategy objects rather than bespoke classes.

Every model, from univariate AR through TVP-SVAR-SV, composes through a single state-space substrate and decomposes into an immutable Spec, a transient Estimator, and a serializable Result, giving a typed, dataclass-shaped API with consistent fit, forecast, IRF, and FEVD surfaces. Designed to integrate directly with fedfred and edgar-sec, it forms the modeling layer of a FRED-to-model-to-analysis stack that no other Python library currently offers.

GitHub


ns-sdn

ns-sdn banner

Status: research project FLAIRS DOI DOI Last commit

A modern neural architecture in Python for decomposing non-stationary time series into interpretable trend and spectral components.

ns-sdn (Non-Stationary Spectral Decomposition Network) is a PyTorch implementation of the neural state-space architecture of the same name, packaging the model components developed across the repository’s research notebooks so that the results in its companion papers are fully reproducible and the architecture is reusable beyond them.

NS-SDN represents a time series as a time-varying trend plus a sum of latent sinusoidal components whose amplitude, instantaneous frequency, phase, and a learned gating weight are emitted at each step from a recurrent latent state through parallel projection heads — an adaptive, state-driven spectral decomposition rather than a fixed-basis Fourier or stationary spectral model. It draws together implicit neural representations with periodic activations (SIREN), instantaneous-frequency analysis in the spirit of the Hilbert–Huang transform, and nonlinear state-space econometrics, and it doubles as both a conditional one-step forecaster and an interpretable neural spectral-analysis tool that exposes regime-dependent trend, amplitude, frequency, and gating dynamics — demonstrated on the 10-Year Treasury yield through the 2020 macroeconomic shock.

Within the broader stack it supplies the nonlinear spectral state space (the NSSM formulation) that the autofed reinforcement-learning agent trains inside, serving as the nonlinear counterpart to cultivars’ linear structural time-series models.

Paper (FLAIRS-39) · Paper (IEEE-ORSS 2026) · GitHub


autofed

autofed banner

Status: research project

Reinforcement learning for optimal monetary policy under model uncertainty.

Autonomous Fed is a reinforcement learning research project that reframes monetary policy as a control problem, in which an RL agent learns the central bank’s reaction function rather than having a fixed Taylor rule imposed on it. Benchmarked against Hinterlang & Tänzer’s Bundesbank work (Discussion Paper No. 51/2021), it replicates their RL environment and extends it by training policy agents inside two distinct economic environments — a linear one built on TVP-SVAR and a nonlinear one built on the NSSM state-space formulation that links to the NS-SDN project — then comparing learned policy behavior across both.

The aim is a clean replication-plus-extension contribution targeting Computational Economics, demonstrating how optimal monetary policy under uncertainty changes when the agent’s model of the economy moves from linear structural dynamics to a richer nonlinear spectral state space.

GitHub