bt/backtest.py:506: PerformanceWarning: DataFrame is highly fragmented.
posidonius opened this issue · 2 comments
posidonius commented
bt/backtest.py:506: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling
frame.insertmany times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use
newframe = frame.copy() return self.backtests[strategy_name].strategy.get_transactions()
quant12345 commented
@posidonius Hi!
Could you please post the code that reproduces this warning.
posidonius commented
Could you please post the code that reproduces this warning.
Thanks for the reply. I cannot at the moment remember what produces this warning, but if I run into it again, I'll come back and post a response.
Sorry about that. Next time I'll be more detailed when posting an issue.