"A package to estimate process parameters for Ornstein-Uhlenbeck"
Project description
ouparams
A python module to Find Process Parameters for Ornstein-Uhlenbeck Processes
Input:
- x the process dataset in numpy array format
Output:
- mu, sigma, theta
Ornstein–Uhlenbeck process with long-term mean mu, volatility sigma, and mean reversion speed theta.
Installation
Clone the github repository and install it with pip install .
or
pip install git+https://github.com/mghadam/ouparams.git
Usage
# A sample OU process in numpy array format
import numpy
ds = numpy.array([0.8, 0.58606434, 0.49098481, 0.49343492, 0.54575029,0.51207641, 0.50084814, 0.52559959, 0.53000366, 0.53668143])
# Estimating the OU parameters
from ouparams import ouparams
mu, sigma, theta = ouparams.find(ds)
# 0.5171166243459767, 0.038885729337555484, 1.5906939803229536
The calculation matches with Mathematica's FindProcessParameters for OrnsteinUhlenbeckProcess
ds = {0.8, 0.58606434, 0.49098481, 0.49343492, 0.54575029, 0.51207641,
0.50084814, 0.52559959, 0.53000366, 0.53668143};
FindProcessParameters[ds,
OrnsteinUhlenbeckProcess[\[Mu], \[Sigma], \[Theta]]]
{\[Mu] -> 0.517117, \[Sigma] -> 0.0388857, \[Theta] -> 1.59069}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ouparams-0.0.1.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ouparams-0.0.1.tar.gz.
File metadata
- Download URL: ouparams-0.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eca530fa9dd6da7c039ac681f2d7fc7d167016ec0c0135d5db1b98a945a20419
|
|
| MD5 |
bde7c2158fba2a44823fc97645483613
|
|
| BLAKE2b-256 |
a18e499c1b957d91561d15414c0c2b03cb2a168d90636b4986579981fa9aef6b
|
File details
Details for the file ouparams-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ouparams-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
669fbe41b883545f6e3b5a6d2e660392fcacff453466c5402b1eb838622e2734
|
|
| MD5 |
3fbd629a59cc5f929fdc1d267da62c9b
|
|
| BLAKE2b-256 |
bc5b8223258a050505e1d9dcc0dbad8e6a7a6c208ae07fa4d1f5d7cd0979c21b
|