diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b192ca0..cc9ba58 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Changelog ========= +:Version: 1.0.0 of 2017-09-29 + +Some minor documentation and metadata changes. This version is included with +Patzelt and Bouchaud (JSTAT 2017) as an online supplement. + :Version: 1.0-rc.1 of 2017-09-25 diff --git a/README.rst b/README.rst index 136ba35..dea7bd8 100644 --- a/README.rst +++ b/README.rst @@ -8,17 +8,9 @@ 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. - -The algorithms to calculate three-point correlations are described in: - - Patzelt, F. and Bouchaud, J-P.: - Nonlinear price impact from linear models. - Journal of Statistical Mechanics (2017). - Preprint at arXiv:1708.02411. - ====================== ====================================================== -Command Synopsis +Function Synopsis ====================== ====================================================== acorr Calculate autocorrelation or autocovariance acorr_grouped_df Calculate acorr for pandas groups and average @@ -36,6 +28,13 @@ 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.: + Nonlinear price impact from linear models. + Journal of Statistical Mechanics (2017, in print). + Preprint at `arXiv:1708.02411 `_. Please find further explanations in the docstrings and in the examples directory. @@ -46,11 +45,25 @@ Installation pip install scorr - -Dependencies ------------- - - Python 2.7 - - NumPy - - SciPy - - Pandas +Dependencies (automatically installed) +-------------------------------------- + + - Python 2.7 + - NumPy + - SciPy + - Pandas + + +Optional Dependencies required only for the examples (pip installable) +---------------------------------------------------------------------- + + - Jupyter + - Matplotlib + - colorednoise + + +Note +---- + +Python 3 is *NOT* supported as of yet! \ No newline at end of file diff --git a/examples/scorr_periodic_vs_aperiodic_vs_unbiased.ipynb b/examples/scorr_periodic_vs_aperiodic_vs_unbiased.ipynb index a48c265..1466cce 100644 --- a/examples/scorr_periodic_vs_aperiodic_vs_unbiased.ipynb +++ b/examples/scorr_periodic_vs_aperiodic_vs_unbiased.ipynb @@ -28,9 +28,22 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'corr2'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mscorr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorr2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m~/Documents/uni/papers/impact_report/demo_code/packaged/testenv3/lib/python3.6/site-packages/scorr/__init__.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mcorr2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mcorr3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__reload_submodules__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mhelpers\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'corr2'" + ] + } + ], "source": [ "import scorr" ] @@ -870,8 +883,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Analyse as an finite, aperiodic signal\n", - "Here we assume that the signal is zero everywhere outside of the interval [0, tmax]. Hence we pad with zeros (default) to demix the causal and anti-causal part." + "## Analyse as a finite, aperiodic signal\n", + "Here we assume that the signal is zero everywhere outside of the interval [0, tmax]. Hence we pad with as many zeros as data points to demix the causal and anti-causal part." ] }, { @@ -3524,21 +3537,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 2", + "display_name": "Python 3", "language": "python", - "name": "python2" + "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.14" + "pygments_lexer": "ipython3", + "version": "3.6.2" } }, "nbformat": 4, diff --git a/examples/three_point_correlations_padding.ipynb b/examples/three_point_correlations_padding.ipynb index bcbdbb3..a1d0590 100644 --- a/examples/three_point_correlations_padding.ipynb +++ b/examples/three_point_correlations_padding.ipynb @@ -979,7 +979,6 @@ "ax[1].set_title('Scorr (using FFT)')\n", "ax[1].imshow(C3, **ikwa)\n", "#ax[1].imshow((C3_nofft -C3), **ikwa) # alternatively show difference\n", - "#ax[1].imshow(scorr.fftshift(C3), **ikwa)\n", "\n", "format_axes(ax)\n", "fig.tight_layout()" diff --git a/examples/two_point_vs_three_point_correlations.ipynb b/examples/two_point_vs_three_point_correlations.ipynb index d828011..45179e2 100644 --- a/examples/two_point_vs_three_point_correlations.ipynb +++ b/examples/two_point_vs_three_point_correlations.ipynb @@ -21,9 +21,9 @@ "\n", "and the two-point correlation matrix\n", "\n", - "$C_{s c, s c}(\\ell,j)$ \n", + "$C_{s c, s c}(\\ell,j)$,\n", "\n", - "that was used to approximated by the prior before the developement of the spectral method implemented by `scorr.x3corr`." + "which was used to approximated the prior matrix before the developement of the spectral method implemented by `scorr.x3corr`." ] }, { diff --git a/setup.py b/setup.py index 518d2cf..74dc186 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='scorr', - version='1.0.0-rc.1', + version='1.0.0', description=( 'Fast and flexible two- and three-point correlation analysis ' 'for time series using spectral methods.' @@ -20,7 +20,7 @@ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2 :: Only', 'Programming Language :: Python :: 2.7', #'Programming Language :: Python :: 3', #'Programming Language :: Python :: 3.6', @@ -34,7 +34,7 @@ ], url='http://github.com/felixpatzelt/scorr', download_url=( - 'https://github.com/felixpatzelt/scorr/archive/1.0.0-rc.1.tar.gz' + 'https://github.com/felixpatzelt/scorr/archive/1.0.0.tar.gz' ), author='Felix Patzelt', author_email='felix@neuro.uni-bremen.de',