Loading...

Plus+ Python

Implementation of the Tail Ratio Forecasting Model to Estimate Next Day Return

Implementation of the Tail Ratio Forecasting Model to Estimate Next Day Return

Underlying Model Research
The Tail Ratio Forecasting model is developed in this paper "Returns Distribution Moments as One Day Ahead Forecasters of Crypto Currency Returns" by B Kachnowski to predict future asset prices. Extending previous research done by Quantopian, the research finds that" low order returns distribution moments seem to be useful for forecasting one day ahead crypto currency returns". What does it mean by "distribution moments"? The statistical moments are the mean, the standard deviation, the kurtosis, the top nth percentile, and the bottom nth percentile. The model is a multi variable Ordinary Least Squares (OLS) regression model. The independent variables (the distribution moments) are ultimately used to predict the T+1 Bitcoin price; this models' utility could easily be explored for other asset classes. We create a fully functional Tail Ratio Model in Python and use the data found at CryptoDataDownload; once run, the results are printed to the terminal.

Model Implementation
*Please note first* that this model has not been backtested or used in a live trading environment setting. The Python code allows you to control these parameters before executing:
    1) Which data exchange to use
    2) Which cryptocurrency asset
    3) Length of Window Size
    4) Upper Confidence Interval (must be less than 1)


Obviously, some of the bigger exchanges for #1 are Binance, Bitstamp, and Gemini. The window size is the rolling window to calculate each of the distribution moments. The confidence interval uses a function to estimate the 95th percentile confidence interval (default). The paper uses a window size of 14, and we likewise do the same. However, it is likely prudent to optimize the parameter list. While the concept will be explored in a future article, in theory it would be done like this: 1) calculate new linear models for a range of window sizes and take the one that produces the highest R^2 score. 2) Likewise optimize the confidence interval threshold. Typical distribution thresholds are .95, .975, and .99. More details for how the Tail Ratio Model functions can be found in the linked paper.






Please please please note that estimation values can vary greatly based on the parameters, and no model is perfect or allows a crystal ball into the future. Some models may provide an edge. The R^2 can vary greatly from time period to time period and so can the accuracy of any return estimation


Plus+ membership required

Create a Plus+ account to view the live codebase.

This article has a fully working, notebook-ready code block. Sign up for Plus+ to access it and the rest of the 20+ premium articles.

Subscribe to Plus+ Browse Plus+ articles