-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Enhanced Backtesting Tables #2864
Conversation
More work to be done here. |
I've worked all the way through to modifying the strategy table to calculating expectancy via the formula:
divided by stake_amount, to keep the final value consistent regardless of the stake_amount used in backtesting. My primary finding after adding all of these columns is that it adds little extra insight, but thought some may find it useful nonetheless. Updated tables in screenshots above are not committed yet, and I'm not sure if you'd like that many information in the strategy results table, some could find them useful. I noticed Avg Profit in Stake_currency was also missing, so if you agree to the guideline in the screenshot above, I could add in that as well. I'd like to hear your thoughts. |
By the way, here's an additional iteration with a draws column which I figured was also missing, everywhere not just in the strategy results table, since if you're using minimal_roi to sell at 0% profit after a certain time, there will be a lot of these draws and it's important to see them, not committed yet, just want to see your thoughts here first. Notice, how without the breakdown of wins/draws/losses you would think your strategy is winning a lot more than you think. |
I don't mind more information in general ... but i'm a bit concerned that too much information can be overwelming. Also, screen width can be a problem too (not sure how many chars in width this takes ... but i know one thing - once this starts wrapping lines - it'll loose usefulness. maybe (just an idea) we can not show most of these new columns for all pairs - and only show them as a summary at the end? Also, expectancy will require good explanation - what's a good / bad expectancy value? Assuming the calculation is the same than in edge - i find it weired that you have 95% win rate (JollingerBands), an average profit of 0.19%, total profit of 105% - but still only expect your total capital to expand by 0.39% (0.0039) ... Maybe i'm misreading this (i've not done much with expectancy before) - but should't this be aligned to the result of total-profit (somehow) ? |
Sorry for the repetitive posts, just documenting my journey step by step, here's what the final table looks like (not committed to this PR yet)
|
what if I do not have such a wide display? |
Then you have a problem, which you can solve by scrolling to the right. I was just thinking about that. |
This final table is definitely too wide.
No you can't - a regular terminal will wrap the lines - so you'll have additional new-lines within the table - which will make the result unreadable. |
What do you suggest we can do about it? Not sure it would look better if I break it onto two tables. It has all the info anyone might need to analyze a strategy, which is in my own rationale, the purpose of that strategy comparison table, to be able to thoroughly and delicately compare between strategies. |
an (extreme) example from my terminal (i've intentionally reduced the wide as i don't have the new columns available). Now the information is still okish as only the last column wraps ... but you see the wrapping. A possible alternative: So everyone can open an interactive session (no notebook required!), load the file - and display the columns he's interrested in - which i assume will differ from person to person. |
I understand, I'm not saying this is okay, I actually prefer the 133 guideline provided in other tables, but that kinda limits information available. I'm not sure which approach should we take to fix this. Maybe separate information into two tables? |
Printing extra options are just fine... But output quickly becomes too wide for many displays and screens... That's why I did not add many interesting metrics yet... I guess it should be controlled by the user, in cli options, for example. Like
or something like that... The user will then be able to choose what to print depending on her screen... |
I think I do have a better idea / proposal (came to me while driving). We could use a HTML output for this - this would not have these limitations, and would give us a lot more flexibility. It doesn't have to be anything fancy - a jinja2 template (look at our template folder), rendered with the output as a table ( In HTML / a browser, you can pan (scroll left / right) with easy / without limitation. Just render the template, storing it as a file in In the end, we can add more things to it as we have several open issues about added metrics and the highest pain-point was the "how to display". It'll also tie in rather nicely with the (long-term) plan to have an UI - which will require this step anyway - so we can also start building that step by step. for this PR, I'd like to
|
I like the HTML idea. I could work on that in a different PR. Feel free to merge this PR as it stands, I haven't made any of the expanded table commits, it's all local on my side, as I was merely on a quest exploring what's missing in the strategy results table. |
yeah, html is cool. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will merge this as is. 👍
Please make sure to keep the code for how to generate the extended table - you'll need the calculations for the HTML part anyway. 😄
Thanks for offering to work on the HTML part, too - i think that'll be a GREAT new feature, so i'm really looking forward to that!
Feel free to open an "early"/WIP PR so we can collaborate if you need any help or got questions regarding the templating (not sure if you've used that before).
Thanks a lot for your feedback and support on all my PRs, I look forward to contributing more stuff in alignment with freqtrade. I'm learning as we move forward. I'll be looking more into templating with python, if you have any pointers or advice, it would be great if you can share them. BTW, it was announced on Slack that the extended table was released to develop, but it's not accurate, only styling were released in this PR because I didn't commit the work I had on it for the extended tables. Will open the new PR sometime this weekend, so we can start collaborating on it. |
Oops, my bad, did not checked this in enough details, thought the pictures you posted were actual for this PR... |
Updated Strategy Summary to be consistent with other backtesting tables...