pyfilter
pyfilter copied to clipboard
How to use the pyfilter in real life?
Hello Khan! How are you? I came across your package and I think it is a really great thing. I wanted to install the package with pip but somehow it was not really working out .... In the end I got it running by simply copying the folder into site-packages and now it runs like a charm it seems.
Right now I run it with cpu but it should be possible to install pytorch cuda.
My question is - do you use the program with success for live trading? Are you doing normal trend following - or some kind of pairs trading? Did you also try it with normal close price? Are you always forecasting a whole week - or is it possible to use the program with 1 step as well?
Best regards to Sweden - Stockholm is a great city :-D
Hey!
Sorry about the late reply, didn't get any notifications and saw this just now.
Thank you for the kind words! Hm, that's strange. What errors were you getting?
Yes, exactly, you'll need to install the specific CUDA distribution of pytorch as well as pyfilter
:-)
To be honest, I've given it a try (just super naive backtesting of an index). I'm not really that literate when it comes to trading, so what I tried to do was to break down the returns into a level and a volatility component, where the first approach was to use a local linear trend model for the level and a simple Ornstein-Uhlenbeck process for the volatility. Where the hope was that I'd be able to see downturns (or upturns) quicker than just moving averages. It worked very good when you performed smoothing historically, but not so much so when just considering filtering. However, given the little amount of spare time I have (just became a father), I haven't really had the time to perform a rigorous analysis - my guess is that my approach won't work though.
Regarding the steps: you're free to choose any prediction length as the package (currently) relies exclusively on generative models! I'm currently updating the documentation, so hopefully this will become more clear when I'm done :-)
Haha, same to you!
Hello, Hello,
what great news. I became a father 4 years ago, and it turned our lives upside down :-D I hope you have had enough sleep before the start, because this will be over for some time now.
After reading your answer I was wondering if the approch you have choosen is not a bit going to far..... ? What you have created is state of the art and maybe does not need an additional local linear trend. Would it be possible to train the model on a shorter timeframe with the close price and save the model after this? Because I have problems with cuda .... After this we can make predictions and set a threshold to enter trades with a nice expected gain and "just" follow the trend :-D Let´s say predict 30 minutes into the future und update our estimate every 5 minutes .... Could you show me how this can be achieved whenever you have time? Because I really think you did a great job, but to implement it myself will be something difficult to do .... (or even NOT possible ;-D...)
Greetings I will buy your favorite Snus!
Hey again!
Sorry about the late reply, (on the phone currently, will write longer reply later) but I’ll try and construct a notebook for you!
Wow - this is Amazing news :-D Please take your time. Whenever it fits for you it fits for me!!
UPDATE: I just saw the changes - the script is really fast now :-D Good job!
Instead of the Snus now I will buy you this star wars like glider from Sweden to get fresh diapers in an incredibly fast way :-D
https://www.youtube.com/watch?v=FzhREYOK0oo
Hey!
Really sorry about the late reply, seems I'm not getting any notifications!
Haha, thanks! I haven't forgotten about the NB, but needed to close out some other stuff first. Have started on it FYI!
Dear Victor,
I found an implementation for a particle filter with a forecast in the way I imagine it.
https://pypfilt.readthedocs.io/en/latest/
All the best for you and your family