Giter VIP home page Giter VIP logo

heterogeneous-agent-trade's Introduction

HAT: Heterogenous Agent Trade

This repository contain code associated with the paper Heterogenous Agent Trade.

This is a work in progress. Please let me know of any problems. Functionality may change rapidly.


What is HAT?

HAT is a model where aggregate trade arises from the explicit aggregation of household-level decisions.

Households live lives similar to the "standard incomplete markets model" where agents face to idiosyncratic productivity and taste shocks (a new part) and have access to a risk free asset. Trade in goods follows the Armington tradition with producers in each country producing a national variety. A Ricardian version is in progress.

The twist is that households have random utility over these varieties and they make a discrete choice over the varieties to consume in addition to their savings decisions. The explicit aggregation of household-level decisions then determines aggregate trade flows, trade elasticities, and the gains from trade.

I view HAT (and related models) as providing a foundation to systematically think about the distributional affects of trade reforms, their dynamics, and complementary policies to mitigate the downsides of globalization.

HAT also provides a laboratory where there is non-trivial connection between international trade and finance. Issues such as sequencing of reforms (trade or capital account first) and the value of those reforms, the distributional issues of those reforms are all natural questions to ask of this framework. I might get to it one day.


How?

The goal here is to provide code and informative notebooks to illustrate how things work.

The base code is in julia (there is a python version but it needs to be updated) with the goal of implementing things using transparent and well developed methods. Most the notation in the code tries to closely follow the paper.

This is still preliminary but below are core elements of the code:

  • ha-trade-environment.jl is behind the household problem and the environment it faces.

  • ha-trade-solution.jl provides method to solve the household problem in one country, find the stationary distribution within a country, find a world equilibrium.

  • two-country.ipynb is a jupyter notebook that runs through a two country example of how (some) things work.

  • log-model.ipynb is a jupyter notebook that runs through a two country example with log preferences and illustrating how the model collapses to a constant elasticity model.


Want to know more?

Much of this is a continuation of my thinking across several papers that connect models of household heterogeneity with trade:


Support and Disclaimers

This project was developed with research support from the National Science Foundation (NSF Award number 1948800).

The views expressed herein are those of the author and not necessarily those of the Federal Reserve Bank of Minneapolis or the Federal Reserve System.

heterogeneous-agent-trade's People

Contributors

mwaugh0328 avatar thasenzagl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.