Central Bank API Reference¶
This section documents the Central Bank agent in the macromodel package, which is responsible for monetary policy, interest rate setting, and macroeconomic stabilization.
macromodel.agents.central_bank.central_bank.CentralBank
¶
Central Bank agent responsible for monetary policy.
This class implements central bank operations including: - Policy rate setting - Inflation targeting - Growth considerations - Monetary policy rules
The agent manages monetary policy through: - Interest rate adjustments - Inflation target maintenance - Economic growth monitoring - Policy rule implementation
Attributes:
| Name | Type | Description |
|---|---|---|
functions |
dict[str, Any]
|
Mapping of function names to implementations |
states |
dict[str, float | ndarray]
|
State variables including: - targeted_inflation_rate: Target inflation level - rho: Interest rate smoothing parameter - r_star: Natural real interest rate - xi_pi: Inflation gap response coefficient - xi_gamma: Output growth response coefficient |
ts |
TimeSeries
|
Time series data for central bank variables |
from_pickled_agent(synthetic_central_bank: SyntheticCentralBank, configuration: CentralBankConfiguration, country_name: str, all_country_names: list[str], n_industries: int) -> CentralBank
classmethod
¶
Create a Central Bank instance from pickled data.
Initializes the bank with: - Policy parameters from synthetic data - Configuration settings - Country-specific information - Initial state variables
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
synthetic_central_bank
|
SyntheticCentralBank
|
Synthetic data containing policy parameters and initial states |
required |
configuration
|
CentralBankConfiguration
|
Configuration parameters for bank operations |
required |
country_name
|
str
|
Name of the country this bank serves |
required |
all_country_names
|
list[str]
|
List of all countries |
required |
n_industries
|
int
|
Number of industries |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CentralBank |
CentralBank
|
Initialized central bank agent |
reset(configuration: CentralBankConfiguration) -> None
¶
Reset the central bank agent to initial state.
Resets all state variables and updates function implementations based on the provided configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
CentralBankConfiguration
|
New configuration parameters for the reset state |
required |
compute_rate(inflation: float, growth: float) -> float
¶
Calculate the policy interest rate.
Determines appropriate policy rate based on: - Current inflation relative to target - Economic growth rate - Previous policy rate - Monetary policy rule parameters
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inflation
|
float
|
Current inflation rate |
required |
growth
|
float
|
Current economic growth rate |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
New policy interest rate |
save_to_h5(group: h5py.Group)
¶
Save central bank data to HDF5 format.
Stores all time series data in the specified HDF5 group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group
|
Group
|
HDF5 group to save data in |
required |
Functions¶
Policy Rate Determination¶
macromodel.agents.central_bank.func.policy_rate.PolicyRate
¶
Abstract base class for determining policy interest rates.
This class defines strategies for setting monetary policy rates based on: - Inflation developments - Economic growth - Policy objectives - Previous rate levels
The rate setting process considers: - Price stability targets - Economic growth goals - Policy transmission lags - Financial stability