close
The Wayback Machine - https://web.archive.org/web/20210818174756/https://github.com/freqtrade/freqtrade/issues/5106
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing on CAGR and MDD in backtest results #5106

Open
quantfor opened this issue Jun 8, 2021 · 3 comments
Open

Showing on CAGR and MDD in backtest results #5106

quantfor opened this issue Jun 8, 2021 · 3 comments

Comments

@quantfor
Copy link

@quantfor quantfor commented Jun 8, 2021

This is a very simple enchantment, but I think it is so helpful for intuitively comparing strat's performances.

Example

Such as this image, showing CAGR and MDD is extremely intuitive for comparing strategies, higher CAGR(profitability) and lower MDD(risk) is better!

It's about showing CAGR (geometric mean of yearly profits, (current total stake)/(starting wallet)^(1/years passed), (simply,) years_passed = days_passed/365) and MDD (((strat's)max - min / max) * 100%, currently freqtrade has the drawdown, but it is unintuitive because it gives ratio based on starting wallet stakes).

This will make freqtrade's backtests look more intuitive and easier to compare strats.
How do you guys think about this very little enchantments?

@quantfor
Copy link
Author

@quantfor quantfor commented Jun 8, 2021

Consideration: (this is not essential)
Maybe adding the sharp ratio for backtest can be also good. And we have codes in the hyperopt so all we need to do is just using that code. But can there be a little performance changes for backtesting? If so, just adding option params(such as --sharp true) to show sharp ratio might be good.

@xmatthias
Copy link
Member

@xmatthias xmatthias commented Jun 9, 2021

we do have an issue for sharp already (#1907 ) - but so far, it was not important enough for anyone to actually spend time to implement it.

We have a section for strategy metrics - i'll surely not mind having others added there as well if they make sense.
I'm however not sure what MDD will be based on - you say "max - min / max" ... but max / min of what? absolute wallet? relative profits ... you can do min/max calculations on many things - so it's kinda unclear to me for now how this calculation should look like.

@quantfor
Copy link
Author

@quantfor quantfor commented Jun 9, 2021

That means absolute wallet including current open positions(maximum total stake - minimum total stake / maximum total stake)

I think it has already there named max drawdown high and low. That will do exact thing.
The problem of current drawdown ratio is it is calculated through (high-low / starting stake) but it is not intuitive because profit compounds, so if drawdown happened later on, it gives bigger ratio, so it highly depends on when max drawdowns happened. So adding one more metrics that does not influenced by compounding. (And I found this exact thing extremely useful in other systemic trading tools, they are using it too.)

1
This means (-)21% MDD

(And for sharp ratio - I agree it's not a necessary thing. So can bother with it later.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants