Metadata-Version: 2.1
Name: dz339-pygbm
Version: 1.0.post0
Summary: A python package to create simulations of geometric browninan motion.
Author-email: Dario Zela <dz339@cam.ac.uk>
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.
        
Project-URL: Documentation, https://pygbmdariodis2024.readthedocs.io/en/latest/#
Project-URL: Source, https://github.com/Dario-Zela/pygbm
Project-URL: Issues, https://github.com/Dario-Zela/pygbm/issues
Keywords: Geometric Brownian Motion,physics,simualtion
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: argparse
Requires-Dist: matplotlib

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