How to evaluate the performance of your crypto trading algorithm.

How to evaluate the performance of your crypto trading algorithm.

One of the advantages of algorithmic trading is backtesting. Essentially, before going live with your algo, you want a good indication of how it likely performs? Now the practice of backtesting or running trading simulations is a minefield.

In his book Advances in Financial Machine Learning, Marcos Lopez De Prado compares researching and backtesting a strategy at the same time to drink driving, which I think is very accurate. Most researchers are prone to curve fitting which is tuning/tweaking variables until you get good looking results. Curve fitting is dangerous and leads to getting REKT.

My preferred way of using backtest results is to compare algorithms. And done properly performance metrics give us very valuable insights into a strategy. Below are results generated by Quantamentaly and Enigma Catalyst for a Machine Learning based algo I nicknamed demon tamer.

Period return

This is the return generated during the period the algorithm was ran.

Annualized return

Expected return of your algorithm per year.

Number of bets

A bet is a complete trade. One which was bought and sold if long or reverse if a short trade. Positions held do not count as a bet.

Max drawdown

Max drawdown is the maximum loss suffered between two consecutive high points during the backtest.

Sharpe ratio

Sharpe ratio is average return divided by standard deviation of returns or volatility. Algorithms with high sharpe ratios offer better returns per unit of volatility/risk.

Annualized Sharpe ratio

A annualized Sharpe ratio is the sharpe ratio measured over a year.

Hit rate

Hit rate is the number of bets that made a profit compared to the total number of bets.

Average return from hits

Average return from bets that made a profit.

Average return from misses

Average return from losing bets.

Positive runs index

Some algorithms go on a run. The positive runs index is a measure of the concentration of bets with positive returns. A lower value indicates profitbale bets are spread out throughout the period of the backtest.

Negative runs index

Concentration of negative runs can be quite dangerous for an algorithm, which may result in heavy losses. A lower value is preferred.

Bets per month index

Bets per month index is a measure of the concentration of bets for the backtest period. Again a lower value indicates bets are spread out during the backtest period.

Portfolio value

Value of portfolio during the backtest period.

Algorithm period return

Return on initial capital during the backtest compared to a benchmark algorithm, which defaults to btc buy and hold.

Algorithm volatility

A measure of algorithm volatility during the backtest compared to a benchmark algorithm, which defaults to btc .

Price

Price action of traded asset with buy and sell indicators.

Profit and Loss

Profit or loss on initial capital base during the period of the backtest.

Cash

Cash position during the backtest.

Transactions

List of transactions made during the backtest.

Time under water

Time between a high water mark and the next time your P'n'L exceeds the previous maximum.

Conclusions:

Backtesting can be dangerous and past performance is no guarantee of future... However, done properly performance results reveal very valuable insights about strategies which we could compare. For a demo of Quantamentaly, where you can easily create, backtest, paper trade and launch Machine learning based strategies for live crypto trading, please contact me.


Usman K.

Serial Entrepreneur | Founder & CEO APEX:E3 | Multiple Exits | Creator of A.L.I.C.E A.I.

6 年

Brilliant!

要查看或添加评论,请登录

Michael Toye Faleti的更多文章

社区洞察

其他会员也浏览了