Skip to main content

================
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.

Metadata

Release files for ConsumerDemands 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ConsumerDemands 0.5.0
File Interpreter ABI Platform
consumerdemands-0.5.0-py3-none-any.whl Python 3 none any Details

Release files / consumerdemands-0.5.0-py3-none-any.whl

Download URL consumerdemands-0.5.0-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
483ad06e8aefb2e649ff75c6b0bd6e0b0089b5d763dc55d3a3f33f85c061eba6
BLAKE2b-256 checksum
How to use checksums
75249cbc1c49c25566fa1e3c04a1d539deff29caff0e37fdc7a5500f2d7585fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page