'Fail if the algo has passed this Asset\'s end_date, or before the
Asset\'s start date.'

def validate(self, asset, amount, portfolio, algo_datetime, algo_current_data):

    if (amount == 0):
        return
    normalized_algo_dt = pd.Timestamp(algo_datetime).normalize()
    if asset.start_date:
        normalized_start = pd.Timestamp(asset.start_date).normalize()
        if (normalized_algo_dt < normalized_start):
            metadata = {'asset_start_date': normalized_start}
            self.handle_violation(asset, amount, algo_datetime, metadata=metadata)
    if asset.end_date:
        normalized_end = pd.Timestamp(asset.end_date).normalize()
        if (normalized_algo_dt > normalized_end):
            metadata = {'asset_end_date': normalized_end}
            self.handle_violation(asset, amount, algo_datetime, metadata=metadata)
