Repository navigation
trendfollowing 1.0.1
Centralises the return conventions shared by the two trend-following papers into a single module, and fixes paper typos. First tagged release.
Added
trendfollowing.conventions: the single source for the conventions both papers fix. ExportsAF_DAILY = 260(the paper's trading-day annualisation, used in place of the 252 thatqisinfers from the calendar density of the futures panel, so the papers pass the constant explicitly rather than relying on inference),PPY_QUARTERLY = 4,PPY_MONTHLY = 12andcompute_daily_annualised_vol. Sharpe ratios are arithmetic throughout —sqrt(a) * mean / stdof periodic simple excess returns — because the JOIM paper's regime decomposition (Proposition 1) is exact only under arithmetic means and the SIFIN paper's analytic Sharpe ratios use the same convention. All four symbols are re-exported from the package top level.
Changed
- Replication scripts (
aggregated_skewness_fig.py,sg_sharpe_test.py,verify_skewness_directions.py) now take their annualisation and Sharpe convention fromtrendfollowing.conventionsinstead of restating it locally. - Daily futures data are stored as prices built from log returns; returns are extracted with
qis.to_returnswith theis_log_returnsflag stated at the call, and periodic returns for regime sampling are arithmetic simple returns at calendar anchors.
Fixed
- Typos in the SIFIN paper source; removed a stray
sg.logand a generated.thmfile from the repository.
Notes
- Install:
pip install trendfollowing==1.0.1 - No prior tags exist; this is the first tagged release, superseding 1.0.0 on PyPI.