Intro
Library to generate Brownian motion random walks for multiple series that exhibit mean reversion, correlation, skew, kurtosis, and/or custom distributions that do not follow typical normal distributions.
This can be used for testing trading strategies, risk analysis, tokenomics design stress testing, Monte Carlo simulations, and inputs into existing testing, modeling, and simulation frameworks such as cadCAD and radCAD - see the Examples folder for details.
Installation and Usage
pip install brownian_motion_generator
from brownian_motion_generator import brownian_motion_generator as bmg
Common Use Cases
- Stress testing collateral based systems. Generating random walks of asset prices can help to identify potential exploits or risks of undercollateralization.
- Optimizing rates of emission/inflation. Generating random walks of TVL/users/revenue growth can help to identify how emissions may need to be tweaked.
- Identifying critical thresholds. Generating random walks of user activity, TVL, and/or protocol revenues can help identify any crucial levels to hit (or avoid) where sustainable growth kicks in (or death spiral feedback loops begin).
- Understanding risks and levels of exposure to general market conditions or the performance of a given asset outside your control. Generating random walks of S&P 500 or BTC prices can help identify the degree and critical levels in macro risks.
- Model positive feedback loops and/or death spirals in user behavior. For example generating random walks of NFT marketplace trading activity helps protocols identify and minimize the risks of wash trading.
- Assumption testing. Generating random walks of critical model inputs can stress test any general system design to identify which assumptions must hold true for the system to be sustainable, and/or identity any assumptions which are unlikely to hold true in practice based on realistic random walks.
How to Use
See the Examples folder for tutorials in Jupyter notebook and equivalent html file format. Tutorials cover quick examples of generating multiple simulations of multiple correlated series with mean reverting, correlated, and/or non-normal distributions of returns, and how to integrate the generated random walks into existing simulation frameworks such as radCAD.
Feedback, Questions, Improvements?
Please open an issue on GitHub or get in touch
Credits
Original credit to these two resources which were the building blocks:
Metadata
Release files for brownian-motion-generator 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brownian_motion_generator-1.1.0.tar.gz | 18.8 kB | Without provenance | Details for brownian_motion_generator-1.1.0.tar.gz |
Release files / brownian_motion_generator-1.1.0.tar.gz
| Download URL | brownian_motion_generator-1.1.0.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2136774970429a27b0b6563d6cfea128d458cd37cf46d35bb54198a7583fcdf8
|
|
BLAKE2b-256 checksum How to use checksums |
99389f5410bf78c74287328c5fcfb145d4ca6defa79f7c033e58d8fbfd53bd8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for brownian-motion-generator 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.