Currently in some backtesting pipelines the bottleneck could be a metric computation. It isn't a good situation. We should discover why is it happening.
Proposal
We should try to understand why metrics are computed very slow for a big number of segments.
The problem probably lies in per-segment metric computation. We could compute it more optimally, but our current Metric implementation isn't suited for that: it is very strict about how metric is computed using metric_fn. Probably, we could significantly improve even this kind of computation if we could iterate over segments more optimally.
Steps:
Profile metric computation for different number of segments and features;
Find out what place is bottleneck;
Describe the problem in the comments of the issue.
🚀 Feature Request
Currently in some backtesting pipelines the bottleneck could be a metric computation. It isn't a good situation. We should discover why is it happening.
Proposal
We should try to understand why metrics are computed very slow for a big number of segments.
The problem probably lies in per-segment metric computation. We could compute it more optimally, but our current
Metric
implementation isn't suited for that: it is very strict about how metric is computed usingmetric_fn
. Probably, we could significantly improve even this kind of computation if we could iterate over segments more optimally.Steps:
Test cases
No response
Additional context
No response