Name | pymicrostructure JSON |
Version |
0.0.2
JSON |
| download |
home_page | None |
Summary | Simulate financial markets |
upload_time | 2024-08-24 10:18:13 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | Copyright (c) 2024, ROBUST GAMMA BARTOSZ BIEGANOWSKI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
finance
quant
trading
|
VCS |
|
bugtrack_url |
|
requirements |
feedparser
html2text
sgmllib3k
tomli
numpy
pandas
matplotlib
tqdm
dill
scipy
statsmodels
seaborn
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PyMicrostructure
pymicrostructure is a powerful Python library for simulating and analyzing financial market microstructure. It provides a flexible framework for modeling various market participants, implementing trading strategies, and evaluating market performance metrics.
## Table of Contents
1. [Features](#features)
2. [Installation](#installation)
3. [Quick Start](#quick-start)
4. [Documentation](#documentation)
5. [Examples](#examples)
6. [Contributing](#contributing)
7. [License](#license)
## Features
- Flexible market simulation framework
- Various trader types (e.g., informed traders, noise traders, market makers)
- Customizable trading strategies
- Comprehensive set of market performance metrics
- Order book visualization tools
- Easy-to-use API for creating and running simulations
### Key Components
- **Markets**: Implement different market models (e.g., continuous double auction)
- **Traders**: Model various types of market participants
- **Orders**: Support for different order types (e.g., market orders, limit orders)
- **Strategies**: Implement and test different trading strategies
- **Metrics**: Analyze market efficiency, liquidity, and other performance indicators
## Installation
To install pymicrostructure, run the following command:
```bash
pip install pymicrostructure
```
## Quick Start
Here's a simple example to get you started with pymicrostructure:
```python
from pymicrostructure.markets.continuous import ContinuousDoubleAuction
from pymicrostructure.traders.market_maker import *
from pymicrostructure.traders.informed import *
from pymicrostructure.traders.noise import *
from pymicrostructure.traders.strategy import *
from pymicrostructure.visualization.summary import participant_comparison, price_path
from pymicrostructure.metrics.trader import participants_report
market = ContinuousDoubleAuction(initial_fair_price=1000)
mm = BaseMarketMaker(market,
fair_price_strategy=OrderFlowMagnitudeFairPrice(window=10, aggressiveness=1),
volume_strategy=MaxFractionVolume(fraction=0.1),
spread_strategy=OrderFlowImbalanceSpread(window=5, aggressiveness=10, min_halfspread=3),
max_inventory=1000)
informed = TWAPInformedTrader(market)
noise = NoiseTrader(market, submission_rate=1, volume_size=lambda:np.random.randint(1, 5))
market.run(300)
participant_comparison(market.participants)
price_path(market)
```
## Documentation
For detailed documentation, please visit our [documentation site](https://pymicrostructure.readthedocs.io).
## Examples
You can find more examples in the `examples/` directory of this repository. These examples cover various scenarios and use cases, such as:
- Implementing custom trading strategies
- Analyzing market liquidity
- Visualizing order book dynamics
- Comparing performance of different trader types
## Contributing
We welcome contributions to pymicrostructure! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute, report issues, or suggest enhancements.
## License
pymicrostructure is released under the MIT License. See the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "pymicrostructure",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "finance, quant, trading",
"author": null,
"author_email": "Bartosz Bieganowski <bartosz.bieganowski.office@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/15/0e/4221a804c72120129de529dfc45d131f52a090f4735e5814b39126be3b00/pymicrostructure-0.0.2.tar.gz",
"platform": null,
"description": "# PyMicrostructure\n\npymicrostructure is a powerful Python library for simulating and analyzing financial market microstructure. It provides a flexible framework for modeling various market participants, implementing trading strategies, and evaluating market performance metrics.\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Installation](#installation)\n3. [Quick Start](#quick-start)\n4. [Documentation](#documentation)\n5. [Examples](#examples)\n6. [Contributing](#contributing)\n7. [License](#license)\n\n## Features\n\n- Flexible market simulation framework\n- Various trader types (e.g., informed traders, noise traders, market makers)\n- Customizable trading strategies\n- Comprehensive set of market performance metrics\n- Order book visualization tools\n- Easy-to-use API for creating and running simulations\n\n### Key Components\n\n- **Markets**: Implement different market models (e.g., continuous double auction)\n- **Traders**: Model various types of market participants\n- **Orders**: Support for different order types (e.g., market orders, limit orders)\n- **Strategies**: Implement and test different trading strategies\n- **Metrics**: Analyze market efficiency, liquidity, and other performance indicators\n\n## Installation\n\nTo install pymicrostructure, run the following command:\n\n```bash\npip install pymicrostructure\n```\n\n## Quick Start\n\nHere's a simple example to get you started with pymicrostructure:\n\n```python\nfrom pymicrostructure.markets.continuous import ContinuousDoubleAuction\nfrom pymicrostructure.traders.market_maker import *\nfrom pymicrostructure.traders.informed import *\nfrom pymicrostructure.traders.noise import *\nfrom pymicrostructure.traders.strategy import *\n\nfrom pymicrostructure.visualization.summary import participant_comparison, price_path\nfrom pymicrostructure.metrics.trader import participants_report\n\nmarket = ContinuousDoubleAuction(initial_fair_price=1000)\nmm = BaseMarketMaker(market,\n fair_price_strategy=OrderFlowMagnitudeFairPrice(window=10, aggressiveness=1),\n volume_strategy=MaxFractionVolume(fraction=0.1), \n spread_strategy=OrderFlowImbalanceSpread(window=5, aggressiveness=10, min_halfspread=3),\n max_inventory=1000)\n\ninformed = TWAPInformedTrader(market)\nnoise = NoiseTrader(market, submission_rate=1, volume_size=lambda:np.random.randint(1, 5))\n\nmarket.run(300)\nparticipant_comparison(market.participants)\nprice_path(market)\n```\n\n## Documentation\n\nFor detailed documentation, please visit our [documentation site](https://pymicrostructure.readthedocs.io).\n\n## Examples\n\nYou can find more examples in the `examples/` directory of this repository. These examples cover various scenarios and use cases, such as:\n\n- Implementing custom trading strategies\n- Analyzing market liquidity\n- Visualizing order book dynamics\n- Comparing performance of different trader types\n\n## Contributing\n\nWe welcome contributions to pymicrostructure! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to contribute, report issues, or suggest enhancements.\n\n## License\n\npymicrostructure is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "Copyright (c) 2024, ROBUST GAMMA BARTOSZ BIEGANOWSKI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Simulate financial markets",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/BBieganowski/pymicrostructure"
},
"split_keywords": [
"finance",
" quant",
" trading"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "936325b7cc77f44902e38a0cb9e3c79a9eef4acc6d8d8f2f1ca3a426363f6ceb",
"md5": "861983e4a80ba966574d3ba925fecfcf",
"sha256": "8ed9eec183302933f894f6106c2a6fcdcba3187bddc6ad5cc40c476109ed8f0c"
},
"downloads": -1,
"filename": "pymicrostructure-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "861983e4a80ba966574d3ba925fecfcf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 28576,
"upload_time": "2024-08-24T10:18:11",
"upload_time_iso_8601": "2024-08-24T10:18:11.676674Z",
"url": "https://files.pythonhosted.org/packages/93/63/25b7cc77f44902e38a0cb9e3c79a9eef4acc6d8d8f2f1ca3a426363f6ceb/pymicrostructure-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "150e4221a804c72120129de529dfc45d131f52a090f4735e5814b39126be3b00",
"md5": "e22f8840a5f17524f068836d1ce95fed",
"sha256": "0588b9b7aa408e50528a8cac11ab1d4a7cb6b6fd20fb424f71fe2d6219846a2c"
},
"downloads": -1,
"filename": "pymicrostructure-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "e22f8840a5f17524f068836d1ce95fed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 25992,
"upload_time": "2024-08-24T10:18:13",
"upload_time_iso_8601": "2024-08-24T10:18:13.571192Z",
"url": "https://files.pythonhosted.org/packages/15/0e/4221a804c72120129de529dfc45d131f52a090f4735e5814b39126be3b00/pymicrostructure-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-24 10:18:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BBieganowski",
"github_project": "pymicrostructure",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "feedparser",
"specs": [
[
"==",
"6.0.11"
]
]
},
{
"name": "html2text",
"specs": [
[
"==",
"2024.2.26"
]
]
},
{
"name": "sgmllib3k",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "tomli",
"specs": [
[
"==",
"2.0.1"
]
]
},
{
"name": "numpy",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "pandas",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "matplotlib",
"specs": [
[
">=",
"3.9.0"
]
]
},
{
"name": "tqdm",
"specs": [
[
">=",
"4.0.0"
]
]
},
{
"name": "dill",
"specs": [
[
">=",
"0.3.4"
]
]
},
{
"name": "scipy",
"specs": [
[
">=",
"1.7.0"
]
]
},
{
"name": "statsmodels",
"specs": [
[
">=",
"0.13.0"
]
]
},
{
"name": "seaborn",
"specs": [
[
">=",
"0.11.2"
]
]
}
],
"lcname": "pymicrostructure"
}