Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixpatzelt/scorr
Fast and flexible two- and three-point correlation analysis for time series using spectral methods.
https://github.com/felixpatzelt/scorr
correlation correlations python scientific spectral-methods time-series
Last synced: 23 days ago
JSON representation
Fast and flexible two- and three-point correlation analysis for time series using spectral methods.
- Host: GitHub
- URL: https://github.com/felixpatzelt/scorr
- Owner: felixpatzelt
- License: mit
- Created: 2017-09-28T23:42:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-07T23:30:22.000Z (almost 6 years ago)
- Last Synced: 2024-11-23T21:16:29.455Z (about 1 month ago)
- Topics: correlation, correlations, python, scientific, spectral-methods, time-series
- Language: Python
- Size: 5.78 MB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
scorr
=====Fast two- and three-point correlation analysis for time series
using spectral methods.The calculations are FFT-based for optimal performance and offer many options
for normalisation, mean removal, averaging, and zero-padding. In particular,
averaging over pandas groups of different sizes (e.g. different days) is
supported.
====================== ======================================================
Function Synopsis
====================== ======================================================
acorr Calculate autocorrelation or autocovariance
acorr_grouped_df Calculate acorr for pandas groups and average
corr_mat Convert correlation vector to matrix
fft2x Calculate cross-bispectrum
fftcrop Return cropped fft or correlation
get_nfft Find a good FFT segment size for pandas groups of
different sizes
padded_x3corr_norm Normalise and debias three-point cross-correlations
padded_xcorr_norm Normalise and debias two-point cross-correlations
x3corr Calculate three-point cross-correlation matrix
x3corr_grouped_df Calculate x3corr for pandas groups and average
xcorr Calculate two-point cross-correlation or covariance
xcorr_grouped_df Calculate xcorr for pandas groups and average
xcorrshift Convert xcorr output so lag zero is centered
====================== ======================================================The algorithms to calculate three-point correlations and details of daily
averaging over high-frequency trading data are described in:
Patzelt, F. and Bouchaud, J-P. (2017):
Nonlinear price impact from linear models.
Journal of Statistical Mechanics: Theory and Experiment, 12, 123404.
Preprint at `arXiv:1708.02411 /arxiv.org/abs/1708.02411>`_.More code from the same publication is released in the `priceprop
`_ package.Please find further
explanations in the docstrings and in the examples
directory.Installation
------------pip install scorr
Dependencies (automatically installed)
--------------------------------------- Python 2.7 or 3.6
- NumPy
- SciPy
- Pandas
Optional Dependencies required only for the examples (pip installable)
----------------------------------------------------------------------- Jupyter
- Matplotlib
- colorednoise