Development
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 where there is I/O, defensive validation, documentation generated from doctested docstrings, signed releases, and archived versions with citable DOIs.
| Layer | Project | Status |
|---|---|---|
| Acquisition | fedfred — Federal Reserve data |
Released (3.0.0) |
| Acquisition | edgar-sec — SEC EDGAR filings |
Released (2.0.1) |
| Representation | toros — self-validating financial objects |
In development |
| Modeling | cultivars — time series econometrics |
Pre-released (1.0.0a4) |
| Modeling | ns-sdn — neural spectral state space |
Released (1.0.0) |
| Application | autofed — RL for monetary policy |
Research |
fedfred
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
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
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.
cultivars
Research-grade time series econometrics for Python: ARIMA to state space, VAR to structural identification, Bayesian and spectral methods, on one estimation surface.
cultivars is a single, typed, dependency-light library for the econometric time-series toolkit, written so that a research result can be reproduced from the summary it prints. Every model is a class holding a specification; fit() (or identify()) returns an immutable record that renders the same way everywhere, carries its own diagnostics, and refuses to report what its assumptions do not support. Estimation and identification are separate acts: a reduced form is fitted once and reports only what the data determine, and anything that needs an assumption — a causal ordering, a sign pattern, an instrument, a prior — is constructed from that result and restates the assumption in its own summary, so an impulse response can always be traced to what signed it.
The modeling surface is now complete across ten areas: univariate models from ARIMA and SARIMAX through the GARCH family, stochastic volatility, unobserved components and regime-switching autoregressions; reduced-form VARs, VECMs, panel, mixed-frequency and global VARs; large-dimensional Bayesian VARs with Minnesota, hierarchical and shrinkage priors, dynamic factor models and FAVAR; nonlinear, quantile and time-varying-parameter VARs with Markov switching; structural identification by recursive, long-run, sign, narrative, instrument, heteroskedasticity and non-Gaussian schemes, set-identification bounds, and perturbation-solved DSGE estimation; a linear-Gaussian state-space substrate with nonlinear and particle filters; spectral and wavelet analysis; Bayesian diagnostics and model combination; forecast evaluation; and the standard battery of unit-root, cointegration, break and stability tests. Dependencies are numpy, scipy and fedfred, so it reads FRED directly and forms the modeling layer of the acquisition-to-model stack above.
pip install --pre cultivars
ns-sdn
A neural state-space model that decomposes a non-stationary time series into a trend and a few sinusoids whose amplitude, frequency and participation move with a latent state, and reads the decomposition back as coordinates.
ns-sdn is the Non-Stationary Spectral Decomposition Network as a stable, citable Python package. At each step a GRU latent state emits a trend and $K$ sinusoids through parallel linear heads — amplitude, instantaneous frequency, phase offset and a gate per component — and the phase integrates the frequency, so every component is a chirp the state can steer. The network is trained as a one-step predictor with drift penalties on the amplitudes and frequencies, and read as an adaptive, state-driven spectral decomposition rather than a fixed-basis Fourier or stationary spectral model, drawing together implicit neural representations with periodic activations (SIREN), instantaneous-frequency analysis in the spirit of the Hilbert–Huang transform, and nonlinear state-space econometrics. It is the formulation of the IEEE-ORSS 2026 paper (Sunder and Leon) and the architecture introduced at FLAIRS-39, demonstrated on the 10-Year Treasury yield through the 2020 macroeconomic shock.
Version 1.0.0 freezes the API in the cultivars model-fit-result pattern: NSSDN is the validated specification, whose defaults reproduce the published DGS10 run to its 58,849 parameters; fit() returns a frozen NSSDNResult carrying every path the papers’ figures are drawn from — trend, amplitude, frequency, phase, gate, components and latent state — on the original scale, with conditional one-step prediction and recursive forecasting; and SpectralState reads the decomposition as a time-local measure on the frequency axis, reporting centroid, dispersion, entropy, effective component count, Wasserstein velocity and a disentanglement score, so a regime claim such as the spectral compression around 2020 is made in coordinates that survive a refit rather than in component indices. The documentation site derives the model equation by equation, the API reference carries the mathematics in every docstring, and the example gallery includes a one-command reproduction of the ORSS experiment. Developed as fellowship research under the ICSRI Fellows Program at the University of Miami Herbert Business School; MIT-licensed, with signed releases and a Zenodo DOI per version.
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.
pip install ns-sdn
Docs · PyPI · GitHub · Zenodo · Paper (IEEE-ORSS 2026) · Paper (FLAIRS-39)
autofed
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.