simple-back icon indicating copy to clipboard operation
simple-back copied to clipboard

do not force pandas_market_calendars

Open R-K-H opened this issue 4 years ago • 1 comments

Hello,

I was trying to setup the backtester with crypto and due to this line it's expecting an mcal name, which is not what I would expect if the .calendar() is optional.

https://github.com/MiniXC/simple-back/blob/master/simple_back/backtester.py#L812

Perhaps a check against this optional so that it doesn't try or if the feature is required, it is expanded to allow for additional calendars?

This also could be due to my lack of knowledge with pandas and calendars, however as an optional (https://minixc.github.io/simple-back/api/simple_back.html#simple_back.backtester.BacktesterBuilder.calendar) parameter, I wouldn't expect it to fail if I didn't provide one.

Thank you for this. I was going to prepare an example and submit a pull request for extending this to work with crypto data if you are interested in including such an example.

R-K-H avatar Jun 29 '20 15:06 R-K-H

.calendar is optional in that it defaults to 'NYSE' when not called. I will add a None option for not "filtering" any dates in 0.6.1, which I'll release today.

A crypto example would be amazing - it makes me wish I had added an option for intraday data (maybe for 1.0, but would be a big undertaking).

MiniXC avatar Jun 30 '20 07:06 MiniXC