Exciting Additions to Quantpylib
In our last post, we used our GeneticRegression library released to take a look at crypto trend following returns, with code:
And yet again, we have more features. We added to the list of genetic primitives the functions:
tanh
sigmoid
dot products
weighted mean
volume weighted moving averages
volume weighted variance, standard deviation
For those of you who do not know what the volume statistics do, read my previous post on dual momentum. For those of you who do not know tanh and sigmoid functions, they are vanishing gradient functions that work well as predictor transforms when the input variable is subject to large tails. They should be useful for generating your signal outputs. If you want an example, here is a paper by Bouchaud fitting trend signals to a hyperbolic tangent:
https://arxiv.org/abs/1404.3274
Quantpylib examples: https://hangukquant.github.io/simulator/simulator/
The updated list of primitives: https://hangukquant.github.io/simulator/gene/#list-of-primitives
The quantpylib repo can be accessed by commenting your Github ID here:
I have also cleaned up the repo’s deprecated code, and cleaned up the various dependency files into a single requirements.txt. You can simple run the bash script ./install.sh and you should be good to go, to run all examples. Works for me on AWS Linux, Mac and Windows envs.
Not yet in the official documentation, but an exciting development is that the cotyledons of an order gateway can actually be seen in the repo. I am writing out the code now as we speak.
The integration between data pipeline, alpha research, alpha backtesting and alpha execution should be an absolutely beautiful process, once the gateway is rolled out.