Skip to content

Relationship to Dolo and DYNARE

For users familiar with existing economic modeling frameworks


Overview

Bellman-DDSL extends and remains compatible with Dolo, while addressing a different problem class than DYNARE. This document explains where each tool fits and how DDSL relates to both.


The Three Tools at a Glance

Aspect DYNARE Dolo Bellman-DDSL
Primary problem class DSGE (perturbation around steady state) Heterogeneous agents, global methods Modular Bellman problems with explicit information structure
Solution methods Perturbation (1st-3rd order), perfect foresight Time iteration, VFI, EGM, policy iteration Inherits Dolo methods + explicit ADC factorization
Typical models Representative agent macro Consumption-savings, portfolio choice Multi-stage decisions, sequential information revelation
Language MATLAB/Octave-based .mod files Python + YAML Python + extended YAML (dolo-plus)
Nonlinearity Local (around steady state) Global Global

DYNARE: When to Use It

DYNARE excels at Dynamic Stochastic General Equilibrium (DSGE) models solved via perturbation methods—linearization or higher-order Taylor expansions around a deterministic steady state.

Use DYNARE when: - Your model has a well-defined steady state - Shocks are "small" (perturbation is accurate) - You need Bayesian estimation, IRFs, or variance decomposition - You're working with representative-agent New Keynesian models

DYNARE limitations that motivated Dolo/DDSL: - Perturbation breaks down with large shocks or binding constraints - Occasionally-binding constraints require special handling (OccBin) - Heterogeneous agent models need different methods entirely


Dolo: The Foundation

Dolo is a Python framework for solving nonlinear rational expectations models using global methods. It uses YAML for model specification and compiles equations into vectorized NumPy functions.

Dolo's key features: - Time iteration, value function iteration, endogenous grid method (EGM) - Complementarity constraints (borrowing limits, etc.) - Discretization of continuous shocks - Vectorized evaluation for grid-based methods

Dolo's YAML structure:

symbols:
  states: [w]
  controls: [c]
  exogenous: [y]

equations:
  transition: |
    w[t] = exp(y[t]) + a[t-1] * R
  arbitrage: |
    β * R * c[t+1]^(-γ) - c[t]^(-γ) ⊥ 0 ≤ c[t] ≤ w[t]

calibration:
  β: 0.96
  γ: 2.0


Bellman-DDSL: Extending Dolo

Bellman-DDSL (and its implementation dialect dolo-plus) extends Dolo with:

1. Explicit Information Structure (ADC)

Dolo uses [t-1], [t], [t+1] indices that conflate time with information. dolo-plus introduces perch indices that explicitly mark information availability:

Dolo Index dolo-plus Perch (preferred) Aliases Meaning
[t-1] [<] [_arvl], [<-], [-1] Arrival (what's known entering the stage)
[t] unmarked [_dcsn], [-], [0] Decision (what's known when choosing)
[t+1] [>] [_cntn], [->], [+1] Continuation (what's known after choosing)

Why this matters: In multi-stage problems (e.g., portfolio choice before consumption), shocks can reveal between decisions. The ADC structure makes this explicit:

# dolo-plus syntax
equations:
  arvl_to_dcsn_transition: |
    w[0] = exp(y[0]) + b[-1] * R    # shock y revealed at decision perch

2. Modular Stage Composition

Dolo models are monolithic—one equations: block covers the entire period. dolo-plus decomposes problems into stages that compose:

Period = Stage₁ ∘ Stage₂ ∘ ... ∘ Stageₙ

Each stage has its own arrival/decision/continuation structure. Stages connect via connectors (one stage's continuation becomes the next stage's arrival).

3. Separation of Model, Method, and Calibration

Dolo mixes mathematical specification with numerical settings. dolo-plus separates these into three files:

File Contents Dolo Equivalent
stage.yml Pure math (symbols, equations) Part of model file
methodization.yml Algorithm choices Hard-coded in solver
calibration.yml Parameter values calibration: block

4. Explicit Operators

Dolo handles expectations implicitly (the solver integrates). dolo-plus makes operators explicit:

# Dolo (implicit)
expectations: [mr]
expectation: |
  mr[t] = β * c[t+1]^(-γ) * R

# dolo-plus (explicit)
dcsn_to_arvl_mover:
  ShadowBellman: |
    dV[-1] = R * E_y(dV[0])    # E_y is an explicit operator

Backwards Compatibility

Plain Dolo YAML remains valid dolo-plus YAML. The extensions are opt-in:

  • Stage mode activates when dolo_plus: metadata is present
  • Without metadata, [t] indices work as in vanilla Dolo
  • Existing Dolo models parse and run unchanged

Migration Path

From Dolo to dolo-plus

  1. Start with working Dolo model
  2. Add dolo_plus: metadata to enable stage mode
  3. Convert indices: [t-1][-1], [t][0], [t+1][+1]
  4. Split transitions if modeling multi-stage problems
  5. Make operators explicit (optional, for complex information structures)

From DYNARE

DYNARE models typically need reformulation rather than translation:

  1. Identify the state vector and decision variables
  2. Choose global solution method (VFI, time iteration, EGM)
  3. Handle constraints via complementarity syntax
  4. Discretize shocks (Tauchen, Rouwenhorst, quadrature)

The mathematical structure changes significantly—DYNARE's perturbation around steady state becomes global iteration over a grid.


When to Use Each Tool

Use Case Recommended Tool
DSGE estimation, IRFs, perturbation DYNARE
Heterogeneous agents, consumption-savings Dolo
Multi-stage decisions, explicit information timing dolo-plus / DDSL
Portfolio + consumption (sequential decisions) dolo-plus / DDSL
Lifecycle models with complex timing dolo-plus / DDSL

Summary

Feature DYNARE Dolo dolo-plus / DDSL
Local vs global Local (perturbation) Global Global
Information structure Implicit Implicit ([t] indices) Explicit (ADC perches)
Modularity Monolithic Monolithic Stage composition
Separation of concerns Mixed Mixed Model / method / calibration
Operators N/A Implicit Explicit (E_y, argmax)
Backwards compatible ✓ (with Dolo)

Further Reading