Name | dz339-pygbm JSON |
Version |
1.0.post0
JSON |
| download |
home_page | None |
Summary | A python package to create simulations of geometric browninan motion. |
upload_time | 2024-11-06 12:18:44 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | Copyright (c) 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 |
geometric brownian motion
physics
simualtion
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PYGBM
A python package to create simulations of geometric browninan motion
## Features
It can be used as a python package by importing it, as shown in the test, or it can be used inline in linux.
## Installation
Download the pygbm repo and use `pip install -e .`.
## Usage
The class GBMSimulator is initialised with the starting location, the drift and the diffusion of the system, and then the method simulate_path can be run to get the path.
An example simulation is below:
```python
from pygbm.gbm_simulator import GBMSimulator
import matplotlib.pyplot as plt
# Parameters for GBM
y0 = 1.0
mu = 0.05
sigma = 0.2
T = 1.0
N = 100
# Initialize simulator
simulator = GBMSimulator(y0, mu, sigma )
# Simulate path
t_values, y_values = simulator.simulate_path_analytical(T, N)
# Plot the simulated path
plt.plot(t_values , y_values , label ="GBM Path")
plt.xlabel(" Time ")
plt.ylabel("Y(t)")
plt.title("Simulated Geometric Brownian Motion Path")
plt.legend()
plt.show()
```
This program can also be run on the cli by using the pygbm command, with the method subargument, as below
```bash
pygbm euler --y0 1.0 --mu 0.05 --sigma 0.2 --T 1.0 --N 100 --output gbm_plot.png
```
## Documentation
To change
Link to the [documentation page](https://pygbmdariodis2024.readthedocs.io/en/latest/#).
## Contributing
Contributions via pull requests are welcome!
## License
This project is licensed under the MIT License - see the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "dz339-pygbm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "Geometric Brownian Motion, physics, simualtion",
"author": null,
"author_email": "Dario Zela <dz339@cam.ac.uk>",
"download_url": "https://files.pythonhosted.org/packages/2b/1d/ca208317a6edc20ea4c1fde17dfc4a3655aa2e9d6b3133e62d9d90f0fc80/dz339_pygbm-1.0.post0.tar.gz",
"platform": null,
"description": "# PYGBM\n\nA python package to create simulations of geometric browninan motion\n\n## Features\nIt can be used as a python package by importing it, as shown in the test, or it can be used inline in linux.\n\n## Installation\n\nDownload the pygbm repo and use `pip install -e .`.\n\n## Usage\nThe class GBMSimulator is initialised with the starting location, the drift and the diffusion of the system, and then the method simulate_path can be run to get the path.\n\nAn example simulation is below:\n\n```python\nfrom pygbm.gbm_simulator import GBMSimulator\nimport matplotlib.pyplot as plt\n\n# Parameters for GBM\ny0 = 1.0\nmu = 0.05\nsigma = 0.2\nT = 1.0\nN = 100\n\n# Initialize simulator\nsimulator = GBMSimulator(y0, mu, sigma )\n\n# Simulate path\nt_values, y_values = simulator.simulate_path_analytical(T, N)\n\n# Plot the simulated path\nplt.plot(t_values , y_values , label =\"GBM Path\")\nplt.xlabel(\" Time \")\nplt.ylabel(\"Y(t)\")\nplt.title(\"Simulated Geometric Brownian Motion Path\")\nplt.legend()\nplt.show()\n```\n\nThis program can also be run on the cli by using the pygbm command, with the method subargument, as below\n```bash\npygbm euler --y0 1.0 --mu 0.05 --sigma 0.2 --T 1.0 --N 100 --output gbm_plot.png\n```\n\n## Documentation\n\nTo change\nLink to the [documentation page](https://pygbmdariodis2024.readthedocs.io/en/latest/#).\n\n## Contributing\n\nContributions via pull requests are welcome!\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
"bugtrack_url": null,
"license": "Copyright (c) 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. ",
"summary": "A python package to create simulations of geometric browninan motion.",
"version": "1.0.post0",
"project_urls": {
"Documentation": "https://pygbmdariodis2024.readthedocs.io/en/latest/#",
"Issues": "https://github.com/Dario-Zela/pygbm/issues",
"Source": "https://github.com/Dario-Zela/pygbm"
},
"split_keywords": [
"geometric brownian motion",
" physics",
" simualtion"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "543b92cbf15ead5bfd3369d28b68f15e2c1dee7b070216aee938a1715cb6db43",
"md5": "817a3d945cf949619f4505bb227bf678",
"sha256": "f07e57e548c9dea897601520e6966ab5a05cc2160abadd45b19423e3008a01a5"
},
"downloads": -1,
"filename": "dz339_pygbm-1.0.post0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "817a3d945cf949619f4505bb227bf678",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 9045,
"upload_time": "2024-11-06T12:18:42",
"upload_time_iso_8601": "2024-11-06T12:18:42.506989Z",
"url": "https://files.pythonhosted.org/packages/54/3b/92cbf15ead5bfd3369d28b68f15e2c1dee7b070216aee938a1715cb6db43/dz339_pygbm-1.0.post0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2b1dca208317a6edc20ea4c1fde17dfc4a3655aa2e9d6b3133e62d9d90f0fc80",
"md5": "def3d6c044a004a0635cfb32f9a6fe0d",
"sha256": "49f2fc935285a9df25b02e5785599a98c3b5460c22ab7e6fe0b9e99940e9d8fb"
},
"downloads": -1,
"filename": "dz339_pygbm-1.0.post0.tar.gz",
"has_sig": false,
"md5_digest": "def3d6c044a004a0635cfb32f9a6fe0d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 9495,
"upload_time": "2024-11-06T12:18:44",
"upload_time_iso_8601": "2024-11-06T12:18:44.604330Z",
"url": "https://files.pythonhosted.org/packages/2b/1d/ca208317a6edc20ea4c1fde17dfc4a3655aa2e9d6b3133e62d9d90f0fc80/dz339_pygbm-1.0.post0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-06 12:18:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Dario-Zela",
"github_project": "pygbm",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "dz339-pygbm"
}