From 7ad047a432e5161a68427b53d0748c540aadf710 Mon Sep 17 00:00:00 2001 From: fredfortier Date: Tue, 31 Oct 2017 19:20:39 -0400 Subject: [PATCH] BUG: fixed an issue with can_trade() --- catalyst/assets/_assets.pyx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/catalyst/assets/_assets.pyx b/catalyst/assets/_assets.pyx index bd67526e..19ddacd3 100644 --- a/catalyst/assets/_assets.pyx +++ b/catalyst/assets/_assets.pyx @@ -559,6 +559,20 @@ cdef class TradingPair(Asset): end_minute=self.end_minute ) + def is_exchange_open(self, dt_minute): + """ + Parameters + ---------- + dt_minute: pd.Timestamp (UTC, tz-aware) + The minute to check. + + Returns + ------- + boolean: whether the asset's exchange is open at the given minute. + """ + #TODO: consider implementing to spot holds + return True + cpdef __reduce__(self): """ Function used by pickle to determine how to serialize/deserialize this