Functions for microeconomic analysis
Project description
Market Equilibrium Analysis
pyMicroeconomics is package for symbolic analysis and visualization of market equilibrium conditions with various supply and demand curve specifications.
Overview
This package provides tools for:
- Defining different types of supply and demand curves (linear, power, exponential, quadratic)
- Calculating market equilibrium points
- Computing consumer and producer surplus
- Visualizing market equilibrium with interactive plots
Installation
pip install pyMicroeconomics
Requirements
- Python 3.x
- SymPy
- NumPy
- Matplotlib
- IPython
- ipywidgets
- SciPy
Usage Examples
Basic Market Equilibrium Analysis
from market_equilibrium import linear_demand, linear_supply, market_equilibrium
# Create demand and supply equations
demand = linear_demand()
supply = linear_supply(c_param=20, d_param=3) # q = 20 + 3p
# Calculate equilibrium
results = market_equilibrium(demand, supply)
# Display results
from market_equilibrium import display_equilibrium_results
display_equilibrium_results(results)
Interactive Plotting
from market_equilibrium import plot_market_equilibrium
# Create interactive plot with adjustable parameters
plot_market_equilibrium(results)
Supported Curve Types
Demand Curves
- Linear: $q = a - b p$
- Power: $q = exp(a)*p^b$
- Exponential: $q = exp(ap + b)$
- Quadratic: $q = a - b p^2$
Supply Curves
- Linear: $q = c + d p$
- Power: $q = exp(c) * p^d$
- Exponential: $q = exp(c*p + d)$
- Quadratic: $q = c + d p^2$
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built using SymPy
- Visualization powered by Matplotlib and ipywidgets
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymicroeconomics-0.0.2.tar.gz.
File metadata
- Download URL: pymicroeconomics-0.0.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaa5c68b48c1f7653a08bcae638c889f013d8c2422b06207b6cea37c192204a2
|
|
| MD5 |
be405e805fe11af4b7962d0e0bcadea1
|
|
| BLAKE2b-256 |
e81129c421c3fff61d63287dcc09a173ae087c3ccdb1964ba59c2b624e3427dc
|
File details
Details for the file pymicroeconomics-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pymicroeconomics-0.0.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc1df44ed999af292f7c02dd0c2755a8d43a7b75d43c1a0c490fb7da137e218b
|
|
| MD5 |
14960508fffc5bd5c9ce65ea941e44c7
|
|
| BLAKE2b-256 |
41ae3a09392224ed3ae2b6fe1e71b0c813c725bfc9b7b92a8aa53274daabec72
|