Skip to main content

No project description provided

Project description

stochax 📈

Stochastic processes in python

pre-commit Documentation Status

The file pyproject.toml contains the packages needed for the installation. The code requires python3.12+.

Installation

To install the package the simplest procedure is:

pip install stochax

Now you can test the installation... In a python shell:

import stochax as sx

sx.__version__

Installation from source

Once you have cloned the repository

pip install .

To use the develop mode just write pip install -e ..

Examples

Data simulation

import stochax as sx

abm = sx.ArithmeticBrownianMotion(mu=0.25, sigma=1.7)
realizations = abm.simulate(
    initial_value=1,
    n_steps=5
)

print(realizations)
          0
0  1.000000
1  3.567428
2  4.163523
3  4.874200
4  6.132376
5  5.651274

Model fit

import stochax as sx

abm = sx.ArithmeticBrownianMotion(mu=0.25, sigma=1.7)
realizations = abm.simulate(
    initial_value=1,
    n_steps=100
)
gbm = sx.GeometricBrownianMotion()
gbm.calibrate(realizations)

print(gbm)
GeometricBrownianMotion(mu=0.08278617288074738, sigma=0.33330614384487633)

Further examples can be found the examples folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stochax-0.2.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stochax-0.2.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file stochax-0.2.0.tar.gz.

File metadata

  • Download URL: stochax-0.2.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stochax-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6839b0926e1cd2d4c8c787f78f180233e5edda0e5d38442d48259aeba0b48e60
MD5 feb6f5450c58bb8fa4e431d286188d16
BLAKE2b-256 6650f685754b25ddf8c9a80ad8718595cb151eac1876cb195fe053abff816470

See more details on using hashes here.

Provenance

The following attestation bundles were made for stochax-0.2.0.tar.gz:

Publisher: python-publish.yml on agdiiura/stochax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stochax-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stochax-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stochax-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd7b494fd310b2cd78d038e3cdb21ce4dbffef409117c6175f635b6d605e3da6
MD5 c4261c2cab50f75214f717ba0a9d7388
BLAKE2b-256 996a3a298967f01e51d9cbedb1506244627fe0fdec993de4dd15de49895df5c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for stochax-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on agdiiura/stochax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page