scikit-agent¶
A scikit-learn compatible toolkit for agent-based economic modeling.
scikit-agent is a scikit-learn compatible toolkit for agent-based economic modeling. It provides a unified interface for creating, solving, and simulating economic models using modern computational methods including reinforcement learning, neural networks, and traditional numerical techniques.
Key Features¶
Scikit-learn compatible API for easy integration with the Python scientific ecosystem
Economic model classes for consumption-savings, portfolio choice, and other standard models
Multiple solution algorithms including value function iteration, policy iteration, and neural network approaches
Simulation tools for generating synthetic data and running policy experiments
Comprehensive documentation with examples and tutorials
Quick Start¶
import skagent
# Create a basic consumption-savings model
model = skagent.models.ConsumptionSavingsModel(
periods=50, discount_factor=0.95, risk_aversion=2.0
)
# Solve the model
model.fit()
# Run simulations
results = model.simulate(n_agents=1000, n_periods=50)
Installation¶
pip install scikit-agent
For development installation:
git clone https://github.com/scikit-agent/scikit-agent.git
cd scikit-agent
pip install -e ".[dev,docs]"
Quick Links¶
Learn how to use scikit-agent with tutorials and guides
Browse our gallery of examples showcasing scikit-agent capabilities
Detailed documentation of all classes and functions