Meet Jesse, a Python trading framework for cryptocurrencies

Meet Jesse, a Python trading framework for cryptocurrencies

4 years agoNews By Saleh Mir

Today, I am proud to announce that Jesse is initially released. You no longer have to struggle for weeks just to backtest a trading strategy.

After working for more than two years, trying out two programming languages, countless modifications of the API design for defining strategies, writing hundreds of unit tests, writing countless strategies, sharing with a test team and receiving feedback, I can confidently say that Jesse is ready for the initial release to the public.

Why use Jesse?

To summarize it: Jesse is more accurate, and way more simple than other solutions out there. If I have to summarize Jesse in one word, that word would be simplicity.

How to get started

Head over to the documentation. Installation is easily done with pip. Most of you already have the required stack installed. For those who don't, we've prepared guides for all major operating systems. We even offer an installer script for Ubuntu and a docker image.

How does it work?

In Jesse, strategies are candle-based. A simple algorithm is followed per each new candle which is displayed in the below flowchart:

I call Jesse a framework because it breaks down the complexity of defining trading strategies into a couple of methods:

class ExampleStrategy(Strategy):
    def should_long(self):
        return False
		
    def should_short(self):
        return False
		
    def should_cancel(self):
        return False
		
    def go_long(self):
        pass
		
    def go_short(self):
        pass

Notice that we broke down a strategy into three boolean methods, and two execution methods. Of course, Jesse covers you while the rest of your trading journey: risk-management, technical analysis, loading candle data even for various symbols and timeframes (in the same strategy!), backtesting, and much more to come.

How accurate is it?

Pretty much actually. Backtest results can never be the same as live trading and Jesse isn't an exception to that. However, it does perform a good enough job. Good enough that you don't need to worry about the accuracy of your backtests.

For example, the look-ahead bias is one of the most frequent mistakes quants make when developing strategies. In case you're not familiar with the look-ahead, it means using future data in your strategies which is unrealistic because unless you're a psychic you won't be able to do the same in live trading.

Tradingview is filled with free strategies that perform great on paper but not so much in real-time. Jesse takes care of the look-ahead bias for you, behind the scenes! That means you can even use anchor time frame candles and technical indicators with not worry.

Backtest results

Backtest simulation results are similar to Tradingview's and are nothing new. Here's the result of a very good strategy of mine being backtested with candles from 2016 until today:

Backtest results

And are the generated charts:

portfolio-chart

What's next?

We have plans for the short term future and long term. When I say short-term, I mean code that is already implemented and working but isn't production-ready. It needs more testings, and more documentation. Here are features we'll be releasing in a short future:

  • Optimization mode: Optimize mode uses the Genetics algorithm behind the scene to find pretty good (not necessarily the best) parameters for your strategy. Parameters are defined in a neat API. We even designed a dashboard that helps you prevent overfitting.
  • live-trade mode: enabling you to trade your strategies on live markets without changing a single line of code in your strategy.
  • paper-trade mode: Like live-trade mode except that it uses paper money instead.

What you can do to help

The main framework is open-source and hosted on GitHub under the MIT license. What I need you to do is:

  • Install it, try to write your strategies with it
  • If you like something, let us know
  • If you don't like something, again let us know
  • Spread the word! We're trying to build a community here. The more quants join our community, the more feedback we can receive, and the better Jesse can get.

Please use the Forum for asking quesitons, or giving us your feedback.

And last but not least, please subscribe to our newsletter to receive our announcements about new updates and products as soon as they're out.

❤️ Like Jesse?

If you like this project, please consider supporting me for free by using my referral links.

It's a win-win, you get free discounts and bonuses, and it helps me to develop more features and content:


Thank you 🙏