Metadata-Version: 2.4
Name: ConsumerDemands
Version: 0.5.0
Summary: Tools for computing general demand systems from primitives.
Author-email: Ethan Ligon <ligon@berkeley.edu>
License-Expression: CC-BY-NC-SA-4.0
Project-URL: Homepage, https://bitbucket.org/ligonresearch/demands
Requires-Python: >=3.8
Description-Content-Type: text/plain
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: plot
Requires-Dist: matplotlib; extra == "plot"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file


================
ConsumerDemands
================

A Python package for computing general consumer demand systems from
preference primitives.

Given preference parameters (alpha, beta, phi) for a Constant Frisch
Elasticity (CFE) demand system, this package computes:

- Frischian demands (given marginal utility of income and prices)
- Marshallian demands (given budget and prices)
- Hicksian demands (given utility level and prices)
- Budget shares, income elasticities, and Engel curves

Installation
============

With pip::

    pip install ConsumerDemands

For plotting support (Engel curves)::

    pip install ConsumerDemands[plot]

From source::

    git clone git@bitbucket.org:ligonresearch/demands.git
    cd demands
    pip install -e .

Quick start
===========

::

    from consumerdemands import marshallian

    y = 10.0                          # budget
    p = [1.0, 2.0]                    # prices
    parms = {'alpha': [1., 1.],       # preference weights
             'beta':  [1., 1.],       # Frisch elasticities
             'phi':   [0., 0.]}       # subsistence parameters

    x = marshallian.demands(y, p, parms)
    w = marshallian.budgetshares(y, p, parms)

License
=======

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
See LICENSE.txt for details.
