Closed wtld closed 1 year ago
Use the module constant currency_metrics instead of the hard coded list. This way you can modify this list from within your own program e.g.:
pf.statistics.currency_metrics = [] stats = pf.optimizer_summary(strategies, metrics=('total_net_profit', 'profit_factor', 'total_num_trades', 'sharpe_ratio'))
Otherwise, these metrics are strings in the DataFrame returned by optimizer_summary and cannot be sorted or analyzed.
I think that was the intention to create the variable currency_metrics in statistics module :)
Welcome wtld!!
I think your suggestion is a good one. I'll try to commit your PR is a couple days.
Farrell
Thank you for this PR!!
Use the module constant currency_metrics instead of the hard coded list. This way you can modify this list from within your own program e.g.:
Otherwise, these metrics are strings in the DataFrame returned by optimizer_summary and cannot be sorted or analyzed.
I think that was the intention to create the variable currency_metrics in statistics module :)