SkillAgentSearch skills...

HARK

Heterogenous Agents Resources & toolKit

Install / Use

/learn @econ-ark/HARK
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <a href="https://econ-ark.org"> <img src="https://econ-ark.org/assets/img/econ-ark-logo.png" align="center"> </a> <br> <br>

Anaconda Cloud PyPi Documentation Status Code Coverage GitHub Good First Issues DOI License Powered by NumFOCUS Donate Actions Status badge badge

<!-- Badges to be created: [![Azure](https://dev.azure.com/econ-ark/HARK/_apis/build/status/azure-pipeline%20econ-ark.hark)]( https://dev.azure.com/econ-ark/hark/_build/latest?definitionId=5) [![codecov](https://codecov.io/gh/econ-ark/hark/branch/main/graph/badge.svg)]( https://codecov.io/gh/econ-ark/hark) --> </div>

Heterogeneous Agents Resources and toolKit (HARK)

HARK is a toolkit for the structural modeling of economic choices of optimizing and non-optimizing heterogeneous agents. For more information on using HARK, see the Econ-ARK Website.

The Econ-ARK project is fiscally sponsored by NumFOCUS. Consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

<div align="center"> <a href="https://numfocus.org/project/econ-ark"> <img height="60px" src="https://numfocus.org/wp-content/uploads/2018/01/optNumFocus_LRG.png" align="center"> </a> </div> <br>

This project is bound by a Code of Conduct.

Questions/Comments/Help

We have a Gitter Econ-ARK community.

Table of Contents

Install

Install from Anaconda Cloud by running:

conda install -c conda-forge econ-ark

Install from PyPI by running:

pip install econ-ark

Once HARK is installed, you can copy its example notebooks into a local working directory of your choice from within a Python environment:

from HARK import install_examples

install_examples()

Follow the simple prompts to make an examples subdirectory inside the directory you specify.

To use the interactive notebooks, you will need to install Jupyter: pip install jupyter. Moreover, the math and text formatting in some notebooks might require the latex-envs extension. To set this up, follow these steps:

  1. Install the package: pip install jupyter_latex_envs
  2. Install associated JS files: jupyter contrib nbextension install --user
  3. Enable the extension: jupyter nbextension enable latex_envs --user --py

You can launch Jupyter from the command line with jupyter notebook, then navigate to the directory where you have installed the example notebooks. We recommend starting with /examples/Gentle-Intro/Gentle-Intro-to-HARK.ipynb, which links to the other introductory notebooks near the bottom.

Usage

We start with almost the simplest possible consumption model: A consumer with constant relative risk aversion (CRRA) utility who has perfect foresight about everything except the (stochastic) date of death.

<div align="center"> <img height="52px" src="https://github.com/econ-ark/HARK/blob/main/docs/images/usage-crra-utility-function.png"> </div>

The agent's one period problem can be recursively

Related Skills

View on GitHub
GitHub Stars380
CategoryDevelopment
Updated35m ago
Forks205

Languages

Python

Security Score

95/100

Audited on Apr 9, 2026

No findings