Kismuz / btgym

Scalable, event-driven, deep-learning-friendly backtesting library
https://kismuz.github.io/btgym/
GNU Lesser General Public License v3.0
985 stars 260 forks source link

draw_plot with candles #7

Closed AdrianP- closed 7 years ago

AdrianP- commented 7 years ago

Proposition of improvement visualization

Kismuz commented 7 years ago

Cool :) I need to check it for memory leaks matplotlib is famous for. I had hard time eliminating memory leaks, especially from backtrader draw() module. That's why all figures are explicitly closed after each render call. When you run rendering for thousand times it is crucial.

Kismuz commented 7 years ago

@AdrianP- , added: https://github.com/Kismuz/btgym/blob/master/tests/render_memory_leak_test.ipynb I used it to catch memory leaks. Also useful when running DQN with big replay memory buffers. Pay attention to process/vmemory_usage_percent metric for BTgymServer process.