Python package caerus
Project description
caerus
In Greek mythology, Caerus (same as kairos) was the personification of opportunity, luck and favorable moments. He was shown with only one lock of hair. His Roman equivalent was Occasio or Tempus. Caerus was the youngest child of Zeus.
caerus is a python package providing that determines the local-minima with the corresponding local-maxima within the given time-frame. The method is build using a forward rolling window to iteratively evaluate thousands of windows. For each window a score of percentages is computed from the start-to-stop position. The resulting matrix is a [window x length dataframe] for which only the high scoring percentages, e.g. those above a certain value (minperc) are used. The best scoring percentages is then aggregated by sum per time-point followed by a cut using the threshold. The resulting regions are subsequently detected, and represent the starting-locations of the trade. The stop-locations are determined based on the distance and percentage of te start-locations. As an example, if you want to have best regions, use threshold=1, minperc=high and nlargest=1 (small).
Here are just a few of the things that caerus does well: - Ouput contains detected start-stop regions of local minima and maxima. - Figures are created. - Parameter gridsearch. - Designed for the detection of complex trend movements.
Contents
Installation
- Install caerus from PyPI (recommended). caerus is compatible with Python 3.6+ and runs on Linux, MacOS X and Windows.
- A new environment can be created as following:
conda create -n env_caerus python=3.7
conda activate env_caerus
pip install caerus
- Alternatively, install caerus from the GitHub source:
# Directly install from github source
pip install -e git://github.com/erdogant/caerus.git@0.1.0#egg=master
pip install git+https://github.com/erdogant/caerus#egg=master
Import caerus package
from caerus import caerus
Example 1:
cs = caerus()
X = cs.download_example()
cs.fit(X)
cs.plot()
Example 2:
cs = caerus()
X = cs.download_example(name='facebook')
cs.fit(X)
cs.plot()
Example gridsearch:
cs = caerus()
X = cs.download_example(name='facebook')
cs.gridsearch(X)
cs.plot()
# Change some gridsearch parameters
cs.gridsearch(X, window=np.arange(50,550,100), minperc=np.arange(1,20,5))
cs.plot()
Citation
Please cite caerus in your publications if this is useful for your research. Here is an example BibTeX entry:
@misc{erdogant2020caerus,
title={caerus},
author={Erdogan Taskesen},
year={2020},
howpublished={\url{https://github.com/erdogant/caerus}},
}
References
Maintainer
Erdogan Taskesen, github: [erdogant](https://github.com/erdogant/caerus)
Contributions are welcome.
This work is created and maintained in my free time. If you wish to buy me a <a href="https://erdogant.github.io/donate/?currency=USD&amount=5">Coffee</a> for this work, it is very appreciated.
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 Distribution
File details
Details for the file caerus-0.1.4.tar.gz
.
File metadata
- Download URL: caerus-0.1.4.tar.gz
- Upload date:
- Size: 61.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966e1e7cddb7d3d389c3c0f1c4d5f8fa71bab606b3d0279ac80af305b5c84e75 |
|
MD5 | dccfd4c445428dad231228f29db14e96 |
|
BLAKE2b-256 | 4972aa5ecb4b4997e9d362fce51f9e8f2e9f75665400f00abac3689911cf778a |
File details
Details for the file caerus-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: caerus-0.1.4-py3-none-any.whl
- Upload date:
- Size: 60.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9810b41a20b889debf3aae8a21e2cdf1113d671e4693440c50ff0ad49ecc9e |
|
MD5 | a712143204e7a5fb2cc269cc1f7898b0 |
|
BLAKE2b-256 | e44184b4e2be5ad2f967c85da27098b7ec9678498b1da9aa8f04a55883912098 |