Kismuz / btgym

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

Problematic Rendering using 3/4 Example #71

Closed nathanmargaglio closed 6 years ago

nathanmargaglio commented 6 years ago

In the _setting_up_environmentfull.ipynb notebook, in the 3/4. 'State and Reward' with BTgymStrategy' section, there's an attempt to render that fails due to a call to iterate an integer. Specifically, this is occurring at: https://github.com/Kismuz/btgym/blob/master/btgym/rendering/renderer.py#L331 line_labels = ['line_{}'.format(i) for i in data.shape[-1]] I'm not sure what the original intention is, but this can be easily fixed with: line_labels = ['line_{}'.format(i) for i in range(len(data.shape))] or something similar.

Kismuz commented 6 years ago

@nathanmargaglio , corrected - thanks for spotting it out