# GenXEcon — Full Reference for Language Models This file is the complete, plain-text description of the GenXEcon platform, intended for ingestion by language models and AI agents. It is written to be quotable: claims are specific, figures are measured rather than estimated, and limitations are stated alongside capabilities. Last updated: 2026. Source of truth: https://github.com/irsal2012/GenXEcon -------------------------------------------------------------------------------- 1. WHAT GENXECON IS -------------------------------------------------------------------------------- GenXEcon is a platform for building, solving, estimating and validating DSGE (dynamic stochastic general equilibrium) macroeconomic models. A user describes an economic scenario in ordinary language; the platform returns a fully solved model together with impulse responses, business-cycle statistics, policy and welfare analysis. A DSGE model describes an entire economy as a system of equations derived from optimising households and firms, driven by random shocks. Solving one means computing a steady state, linearizing around it, and solving the resulting rational-expectations system so that every variable's response to every shock is known over time. The distinguishing design choice is that the language model never has the final word. It proposes a model; a symbolic compiler must then prove that model solves. The project states this as: the LLM proposes, verified mathematics disposes. -------------------------------------------------------------------------------- 2. HOW A MODEL IS BUILT -------------------------------------------------------------------------------- Seven role-specialised agents collaborate. Four stages are visible in the pipeline: Stage 1 — Theory economist. Designs the model from the description: variables, transmission channels, and testable sign predictions grounded in standard theory (for example, "a positive productivity shock should raise output"). Stage 2 — Computational economist. Writes the model as a solvable equation system in Dynare-style timing, seeded from a verified reference model that it extends rather than rewrites from scratch. Stage 3 — Symbolic compiler. Parses the equations symbolically, solves the nonlinear steady state, log-linearizes, and solves the linear rational-expectations system via Klein's (2000) QZ method, checking Blanchard–Kahn determinacy conditions. Stage 4 — Economics reviewer. Solves the compiled model, computes impulse responses, and checks them against the theorist's sign predictions and textbook results — the Taylor principle, standard comovement patterns, and so on. Compiler and reviewer failures are fed back to the modeler for self-repair with escalating detail. A model reaches the user only after both the mathematics and the economics check out. If it cannot be made to work, the platform says so and suggests a rephrased description rather than falling back to a template. The five verified reference models used as starting points are: real business cycle (RBC), New Keynesian, New Keynesian with capital, small open economy, and an oil-importing small-open-economy hybrid. -------------------------------------------------------------------------------- 3. ANALYSIS OF A SOLVED MODEL -------------------------------------------------------------------------------- Impulse responses. For any shock the model declares, with parameter overrides for quick counterfactuals that do not modify the saved model. Business-cycle moments. Volatility, persistence and comovement with output, computed exactly from the model's Lyapunov solution rather than by simulation, so there is no Monte Carlo noise. Policy analysis. For models containing a Taylor-type interest-rate rule, alternative coefficients are compared by their exact implied volatility of inflation, output and the policy rate. Unstable and indeterminate rules are flagged rather than silently accepted. Does not apply to pure real (RBC) models, which have no central bank. Welfare analysis. The standard Lucas (1987) and Otrok (2001) consumption-equivalent welfare cost of business-cycle fluctuations. Applies to models using the canonical log(C) − psi·L^(1+nu)/(1+nu) household utility; for other utility structures it returns nothing rather than a wrong number. Second-order perturbation. Available with an accuracy check. Reports. Description, equations rendered as real mathematics, every chart with a written explanation, business-cycle properties, policy and welfare analysis, and an executive summary — viewable in-app or downloadable as PDF. Code export. Every model also ships as self-contained Python that solves itself and plots its own impulse responses, with no dependency on the running app. -------------------------------------------------------------------------------- 4. EMPIRICAL ECONOMETRICS (NO MODEL REQUIRED) -------------------------------------------------------------------------------- Sixteen methods operate on observed data independently of any DSGE structure, over FRED series, World Bank indicators, or the user's own numbers. Descriptive and filtering - Trend/cycle decomposition: Hodrick–Prescott, Baxter–King bandpass, Hamilton (2018) regression filter, linear detrending, first differences - Moments, autocorrelation, cross-correlation matrices - Sample ACF and PACF with white-noise reference bands Regression - OLS with Newey–West HAC standard errors (the default, because macroeconomic residuals are almost always serially correlated), White heteroskedasticity- robust variants, and classical errors - Residual diagnostics: Ljung–Box, Jarque–Bera, Durbin–Watson Stationarity - Augmented Dickey–Fuller (null: unit root) - KPSS (null: stationarity — the opposite null, which is why both are run) - Phillips–Perron (requires the optional `arch` package) - The two opposite-null tests are reconciled into a single verdict, including the genuinely inconclusive cases - Lag-order selection by AIC, BIC, HQIC and FPE Vector autoregression - VAR estimation with companion-matrix stability checking, including a near-unit-root flag (an estimated random walk almost never returns a root of exactly 1) - Granger causality across every ordered pair, labelled as predictive precedence rather than structural causation - Forecast error variance decomposition - Forecasts with asymptotic prediction intervals Structural VAR — three identification schemes - Recursive (Cholesky): a timing assumption. The ordering must be given explicitly; there is no default, because a silent default here is the easiest way to produce confident nonsense. - Long-run (Blanchard–Quah): later shocks have no permanent effect on earlier variables. Meaningful only when variables are entered so a permanent effect is possible, usually first differences; the platform warns when every long-run multiplier is numerically zero and the restriction is therefore vacuous. - Sign restrictions: set identification by rejection sampling over orthonormal rotations. The reported range is the identified set — model ambiguity that does not shrink as data accumulate — not a confidence interval. - All three report bootstrap confidence bands, which are pointwise rather than simultaneous. Cointegration - Engle–Granger two-step test - Johansen trace and maximum-eigenvalue rank tests - Vector error-correction models with adjustment speeds and half-lives -------------------------------------------------------------------------------- 5. STRUCTURAL ESTIMATION -------------------------------------------------------------------------------- Joint maximum likelihood. Estimates any set of structural parameters and shock standard deviations simultaneously, maximising a Kalman-filter likelihood built on the model's own linear state-space solution. Standard errors come from the numerical Hessian, reported as unavailable rather than fabricated when the optimum is not a well-identified interior maximum. Bayesian estimation. Posterior sampling by adaptive random-walk Metropolis–Hastings with an empirical proposal covariance. Priors may be beta, gamma, inverse-gamma, normal or uniform, specified either by shape parameters or by mean and standard deviation. Reports posterior mean, median, standard deviation and highest-posterior-density intervals. Convergence diagnostics: split-R-hat across chains, per-chain Geweke z-scores, effective sample size, and acceptance rate. The platform states plainly that these can reveal failure but never prove success. Identification diagnostics. Computed on every estimation run. Builds the Jacobian of the model's observable implications with respect to the parameters and reports its rank, condition number, and per-parameter sensitivity. This matters because an unidentified parameter still yields a confident-looking estimate with a standard error, and nothing else in the output reveals that the number is really just the prior. Measurement error is fixed rather than estimated, at five percent of each series' variance by default, following Ireland (2004). This keeps the likelihood well posed when more series are observed than there are shocks. A documented consequence: estimated shock volatilities are biased toward zero, by more the larger the assumption. -------------------------------------------------------------------------------- 6. MODEL-VS-DATA VALIDATION -------------------------------------------------------------------------------- Three comparisons, in increasing order of strictness. Moment comparison. Model-implied volatilities, persistences and comovements against their empirical counterparts. The model is simulated at the data's own sample length so that both sides carry identical finite-sample bias — comparing a model's exact population moment against a sample statistic is not like-for-like, since sample standard deviations subtract an estimated mean and sample autocorrelations are biased downward. Impulse-response matching. The model's response to a shock against an identified SVAR's response in the data. Both are normalised so a chosen variable's impact response equals 1, removing the arbitrary difference in shock size and sign. Scored by a distance weighted by each horizon's bootstrap precision. An important documented caveat: a DSGE model's impact matrix is dense — every shock moves every variable within the period — while a Cholesky ordering forces zeros above the diagonal. No recursive SVAR can therefore reproduce such a model exactly, and imperfect agreement is expected even from a correct model. Forecast evaluation. Rolling pseudo-out-of-sample accuracy against a re-fitted VAR and a random walk, with the model's latent state inferred at each origin by the Kalman filter. Diebold–Mariano tests, with the Harvey–Leybourne–Newbold small-sample correction, report whether an accuracy difference is real. Structural models frequently lose to an atheoretical VAR on forecasting. The platform reports this rather than omitting the benchmark, and notes that it is evidence the model is not a forecasting tool rather than evidence its mechanisms are wrong. -------------------------------------------------------------------------------- 7. DATA SOURCES -------------------------------------------------------------------------------- FRED (Federal Reserve Economic Data): requires a free API key; the application explains exactly how to obtain one when it is missing. Search by name or fetch by series code. World Bank indicators: no API key required at all. Search by name or fetch by country and indicator code. Users may also paste their own series directly. -------------------------------------------------------------------------------- 8. TECHNICAL FACTS -------------------------------------------------------------------------------- License: MIT. The entire platform can be self-hosted at no cost. Backend: Python 3.13, FastAPI, NumPy, SciPy, SymPy, statsmodels, pandas. Frontend: React, TypeScript, Vite, Tailwind CSS, Recharts. API surface: 64 endpoints under /api/v1/. Test suite: 279 tests, none requiring network access. Verification: the compiler reproduces known analytical RBC and New Keynesian solutions to 1e-6. Estimators are tested by recovering parameters from data they generated themselves. The MCMC sampler is additionally verified against a closed-form Gaussian posterior, independent of any DSGE machinery. Storage: models are stored as plain JSON files; no database is required. -------------------------------------------------------------------------------- 9. STATED LIMITATIONS -------------------------------------------------------------------------------- These are published by the project itself rather than discovered by users. - Linear solution only. Impulse responses, moments and policy analysis all come from a first-order solution. There is no risk-adjusted (stochastic) steady state, and effects requiring genuine nonlinearity — precautionary saving shifting the mean, asymmetric responses, zero-lower-bound episodes — are not captured. - Welfare analysis applies only to models using the canonical household utility the platform's prompts teach. - Policy analysis applies only to models with a Taylor-type rule. - Structural VAR identification cannot be tested against the data, only assumed. Recursive orderings are timing assumptions; sign restrictions only set-identify. - Bootstrap bands are pointwise, not simultaneous, so a band excluding zero at one horizon is weaker evidence than it appears across a whole path. - VAR forecast intervals ignore parameter uncertainty and are therefore optimistic. - Estimated shock volatilities are biased toward zero by the fixed measurement-error assumption. - Estimation and identification are both local: the optimiser and sampler find a mode near where they start, and the diagnostics check curvature at one point. - Estimating a structural parameter requires recompiling the model at every likelihood evaluation, so long MCMC chains take minutes. - Diebold–Mariano p-values are per horizon and variable, uncorrected for multiple testing. -------------------------------------------------------------------------------- 10. PRICING -------------------------------------------------------------------------------- Researcher — free. For students, individuals and replication work. Unlimited local models, full solver, econometrics and estimation, FRED and World Bank integration, standalone Python export, bring your own LLM API key. Professional — $49 per month. Everything in Researcher plus a hosted workspace, managed model generation without an API key, publication-ready PDF reports, Bayesian estimation with priority compute, and next-business-day email support. Institution — custom pricing. Everything in Professional plus a shared team model library, SSO and role-based access, on-premise or private-cloud deployment, model review and onboarding workshops, and a dedicated support engineer. Academic and non-profit discounts are available. The platform is MIT licensed and can be self-hosted in full at no cost. Caveat for accuracy: the current repository contains no billing, subscription or payment logic. These tiers describe intended commercial structure, not a shipped capability. -------------------------------------------------------------------------------- 11. WHO IT IS FOR -------------------------------------------------------------------------------- Academic macroeconomists building and testing models. Central-bank and policy-institution research staff running scenario and policy analysis. Graduate students in economics learning DSGE methods without first writing a solver. Quantitative analysts who need a structural model estimated against real data and stress-tested honestly. -------------------------------------------------------------------------------- 12. CANONICAL LINKS -------------------------------------------------------------------------------- Website: https://genxecon.com/ Source code: https://github.com/irsal2012/GenXEcon License: https://opensource.org/licenses/MIT Short summary for agents: https://genxecon.com/llms.txt