Vladimir has shared some great filter implementations (eg: thread 1, thread 2) that inspired me to tinker with them a bit.  As can be expected, it seems that Kalman, Laguerre and EMAs show favorable results when combined for trend entry/exit signals. I’ve attached a simple algorithm that trades Crypto (or any ‘trendy’ asset), using crossovers between the three. It borrows from Vladimir’s original code but it has been refactored so the logic can more readily evolve.

In the algorithm you’ll note I’m using something called a SmartRollingWindow  —this is a simple utility I whipped up to more easily check for indicator crossovers and falling/rising/flat values. I hope people find it useful.

As for the strategy itself, I’d love to hear suggestions from the community on how to make it more tradable for liquid Crypto (BTC, ETH, etc). Specifically:

  1. How might you adjust the filters? What would you change?
  2. What regime filter would you use? Long-term MA? ADX?
  3. How would you manage money? Volatility-based sizing?
  4. How might you improve the exits? Trailing stops?


Thanks in advance.

PS: 

  • Vladimir : I took your Kalman filter logic and turned it into an indicator.  It seems to work fine, but please take a look to make sure it still performs as expected.
  • Tagging you, Simone Pantaleoni, as I believe you're exploring similar use of for crypto trends 

Author