'For a particular received BarEvent, determine whether
it is the end of the month (for that bar) and generate
a liquidation signal, as well as a purchase signal,
for each ticker.'

def calculate_signals(self, event):

    if ((event.type in [EventType.BAR, EventType.TICK]) and self._end_of_month(event.time)):
        ticker = event.ticker
        if self.tickers_invested[ticker]:
            liquidate_signal = SignalEvent(ticker, 'EXIT')
            self.events_queue.put(liquidate_signal)
        long_signal = SignalEvent(ticker, 'BOT')
        self.events_queue.put(long_signal)
        self.tickers_invested[ticker] = True
