Python and Cython scripts of machine learning, econometrics and statistical features for financial analysis
Project description
Documentation: http://fynance.readthedocs.io/en/latest/index.html
Source code: http://github.com/ArthurBernard/Fynance
Fynance is Python (and Cython) package, it provides machine learning, econometric and statistical tools designed for financial analysis and backtest of trading strategy. The documentation is available with some examples of the use of functions and objects.
The fynance.features and fynance.algorithms.allocation subpackages are stable. Other subpackages (fynance.models, fynance.backtest) are actively developed and may evolve.
Presentation
The fynance package contains currently five subpackages:
- Algorithms (fynance.algorithms) contains:
Portfolio allocations (e.g. ERC, HRP, IVP, MDP, MVP, etc.).
Rolling objects for algorithms (e.g. rolling_allocation, etc.).
- Backtesting objects (fynance.backtest) contains:
Module to plot profit and loss, and measure of performance.
- Feature tools (fynance.features) contains:
Financial indicators (e.g. bollinger_band, cci, hma, macd_hist, macd_line, rsi, etc.).
Statistical momentums (e.g. sma, ema, wma, smstd, emstd wmstd, etc.).
Metrics (e.g. annual_return, annual_volatility, calmar, diversified_ratio, mdd, sharpe, z_score, etc.).
Scale (e.g. Scale object, normalize, standardize, roll_normalize, roll_standardize, etc.).
Rolling functions (e.g. roll_min, roll_max).
- Time-series models (fynance.models) contains:
Econometric models (e.g. MA, ARMA, ARMA_GARCH and ARMAX_GARCH, etc.).
Neural network models with PyTorch (e.g. MultiLayerPerceptron, etc.).
Rolling objects for models, currently work only with neural network models (e.g. _RollingBasis, RollMultiLayerPerceptron, etc.).
Please refer you to the documentation to see more details on different tools available in fynance package. Documentation contains some descriptions and examples for functions, classes and methods.
Installation
From PyPI
$ pip install fynance
From source (GitHub)
$ git clone https://github.com/ArthurBernard/Fynance.git
$ cd Fynance
$ pip install -e ".[dev]"
$ python setup.py build_ext --inplace
Demo
Backtest (performance, drawdown and rolling sharpe ratio) of a trading strategy did with a rolling neural network (see Notebooks/Exemple_Rolling_NeuralNetwork.ipynb for more details):
Loss functions and performances (trading strategy) of five rolling neural networks on the training and testing period (see Notebooks/Exemple_Rolling_NeuralNetwork.ipynb for more details):
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
Built Distributions
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 fynance-1.3.1.tar.gz.
File metadata
- Download URL: fynance-1.3.1.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c11c950244e65354595f09975c60ec29cef0c82255078082862076327eb5cfdb
|
|
| MD5 |
a3826296bf0ee17efb9f4fd1d98c6725
|
|
| BLAKE2b-256 |
38bfe5d5816d2dc98dbda7d54240f46e7cd962279a689d56b8989b3b1abeda43
|
Provenance
The following attestation bundles were made for fynance-1.3.1.tar.gz:
Publisher:
release.yml on ArthurBernard/Fynance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fynance-1.3.1.tar.gz -
Subject digest:
c11c950244e65354595f09975c60ec29cef0c82255078082862076327eb5cfdb - Sigstore transparency entry: 1452091838
- Sigstore integration time:
-
Permalink:
ArthurBernard/Fynance@be42c5abc3b11984790878d4448427a871f6dc3e -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/ArthurBernard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be42c5abc3b11984790878d4448427a871f6dc3e -
Trigger Event:
push
-
Statement type:
File details
Details for the file fynance-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fynance-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
092f59d8b5bedea0b85c03fb9278956532e51c2d49fd85f8953a7377efa23074
|
|
| MD5 |
eb577ddc7bb65b3e337636280ac3604a
|
|
| BLAKE2b-256 |
9bef451266ac3bbdcf06b9f08df74d88f11e4c4a7bfe3c3731b70f9bf603118f
|
Provenance
The following attestation bundles were made for fynance-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on ArthurBernard/Fynance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fynance-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
092f59d8b5bedea0b85c03fb9278956532e51c2d49fd85f8953a7377efa23074 - Sigstore transparency entry: 1452092172
- Sigstore integration time:
-
Permalink:
ArthurBernard/Fynance@be42c5abc3b11984790878d4448427a871f6dc3e -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/ArthurBernard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be42c5abc3b11984790878d4448427a871f6dc3e -
Trigger Event:
push
-
Statement type:
File details
Details for the file fynance-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fynance-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26c724d23e098b434a2c97c32066ef56ae524e241ff1985d73143032f38a0f60
|
|
| MD5 |
a6340377c981a29017038ab8d7572352
|
|
| BLAKE2b-256 |
3470d18c702687c4a89ed1ca5024cdd979ab17f5e1d2d13eadd6b9fe4e12d098
|
Provenance
The following attestation bundles were made for fynance-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on ArthurBernard/Fynance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fynance-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
26c724d23e098b434a2c97c32066ef56ae524e241ff1985d73143032f38a0f60 - Sigstore transparency entry: 1452092015
- Sigstore integration time:
-
Permalink:
ArthurBernard/Fynance@be42c5abc3b11984790878d4448427a871f6dc3e -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/ArthurBernard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be42c5abc3b11984790878d4448427a871f6dc3e -
Trigger Event:
push
-
Statement type:
File details
Details for the file fynance-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fynance-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a511eaf8876b7670adc8f5402d694a069307b97e3926231b4f23da804cb75c6b
|
|
| MD5 |
e182433aa1d924d51d91c36ab1c5f6b8
|
|
| BLAKE2b-256 |
df41a6c4b8ea07a4d0e5f3d09a4a0490629b42429227303b1d71e88ba3a24d2c
|
Provenance
The following attestation bundles were made for fynance-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on ArthurBernard/Fynance
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fynance-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
a511eaf8876b7670adc8f5402d694a069307b97e3926231b4f23da804cb75c6b - Sigstore transparency entry: 1452092320
- Sigstore integration time:
-
Permalink:
ArthurBernard/Fynance@be42c5abc3b11984790878d4448427a871f6dc3e -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/ArthurBernard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be42c5abc3b11984790878d4448427a871f6dc3e -
Trigger Event:
push
-
Statement type: