Skip to main content

Python package caerus

Project description

caerus

Python PyPI Version License Downloads Downloads BuyMeCoffee

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://www.buymeacoffee.com/erdogant">Coffee</a> for this work, it is very appreciated.

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

caerus-0.1.6.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

caerus-0.1.6-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file caerus-0.1.6.tar.gz.

File metadata

  • Download URL: caerus-0.1.6.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5

File hashes

Hashes for caerus-0.1.6.tar.gz
Algorithm Hash digest
SHA256 510e163399dff8431031bbac6aeac33f48e495f65fc1e2251817f2c330f7fd2b
MD5 2afa690727eb00707523ba1704734cce
BLAKE2b-256 386a72c05308d9f1f12c299084c8b533b238c9e14e82a96441b5dcd457e5d5e3

See more details on using hashes here.

File details

Details for the file caerus-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: caerus-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5

File hashes

Hashes for caerus-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 77ca3ec6ee11d15d926d52e8a26ccdeb581130efb8a5345df8a726bdd3512b35
MD5 a6a163a77a92aeec6f31bf0a0bde3ca5
BLAKE2b-256 4dc824f29f03528d174feb7c63fbb2facdaa65aa4468847bd593045fa47bd35b

See more details on using hashes here.

Supported by

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