cuemacro / finmarketpy

Python library for backtesting trading strategies & analyzing financial markets (formerly pythalesians)
http://www.cuemacro.com
Apache License 2.0
3.45k stars 494 forks source link

Plotting for HF data #39

Open flipdazed opened 4 years ago

flipdazed commented 4 years ago

Matplotlib is extremely slow at handling lots of data.

Suggest resampling kwarg for plotting to resample on a new time horizon

saeedamen commented 4 years ago

Thanks @flipdazed! For the TradingModel class, lots of the plotting methods already have resample parameter. So if for example your strategy is an intraday strategy the plots by default only plot for every business day. You can also change the plotting engine to Plotly from Matplotlib too.

eg def plot_strategy_pnl(self, strip=None, silent_plot=False, reduce_plot=True, resample='B')

Or do you do you mean more generally, it would be good to have this functionality for chartpy, which is a dependency that is used here?