nick-dolan / jesse-trades-info

It helps parse Jesse's JSON backtest files with trades and shows in a convenient way with tables and charts.
MIT License
85 stars 24 forks source link

Show backtest's summary metrics #7

Open macd2 opened 3 years ago

macd2 commented 3 years ago

First of all great project, but i feel there are a few metrics missing especially the trade summery which is returned by the regular backtest. What would be super cool as well would be an max drawdown marker overlay on the PNL graph.

Cheers

nick-dolan commented 3 years ago

Hey @macd2! Nice suggestion! I'm thinking about these metrics too. I still haven't added them because there are no such metrics in Jesse's .json file output.

Screenshot 2020-12-28 at 20 35 30

@saleh-mir hey! How difficult would it be to add these metrics into a .json output? I'm about: Total Closed Trades, Total Net Profit, Max Drawdown, Annual Return, Expectancy, Avg Win | Avg Loss, and so on.

I expect an output structure like this:

{
  "totalClosedTrades": 7,
  "totalNetProfit": 133.78,
  "totalNetProfitPercent": 1.34,
  "startingBalance": 10000,
  ...,
  "trades": [...]
}
saleh-mir commented 3 years ago

It won't be that difficult but very useful. I'll do it. Thanks for the great suggestion 

nick-dolan commented 3 years ago

@saleh-mir, could you also add routes in JSON?

routes = [
    ('Binance', 'LTC-USDT', '1h', 'SMACrossover')
]

Possible structure:

{
  ...,
  routes: [
    {
      exchange: 'Binance',
      pair: 'LTC-USDT',
      timeframe: '1h',
      strategy: 'SMACrossover'
    }
  ],
  ...
}

I will show it in a backtest info and draw a chart with an appropriate timeframe.