pmorissette/bt

bt/backtest.py:506: PerformanceWarning: DataFrame is highly fragmented.

posidonius opened this issue · 2 comments

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, usenewframe = frame.copy() return self.backtests[strategy_name].strategy.get_transactions()

@posidonius Hi!

Could you please post the code that reproduces this warning.

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.