There are a couple quirks in the data provided by Bank of Canada.
    Check that no new quirks have been introduced in the latest download.

def check_known_inconsistencies(bill_data, bond_data):
    """
    There are a couple quirks in the data provided by Bank of Canada.
    Check that no new quirks have been introduced in the latest download.
    """
    inconsistent_dates = bill_data.index.sym_diff(bond_data.index)
    known_inconsistencies = [
        # bill_data has an entry for 2010-02-15, which bond_data doesn't.
        # bond_data has an entry for 2006-09-04, which bill_data doesn't.
        # Both of these dates are bank holidays (Flag Day and Labor Day,
        # respectively).
        pd.Timestamp('2006-09-04', tz='UTC'),
        pd.Timestamp('2010-02-15', tz='UTC'),
        # 2013-07-25 comes back as "Not available" from the bills endpoint.
        # This date doesn't seem to be a bank holiday, but the previous
        # calendar implementation dropped this entry, so we drop it as well.
        # If someone cares deeply about the integrity of the Canadian trading
        # calendar, they may want to consider forward-filling here rather than
        # dropping the row.
        pd.Timestamp('2013-07-25', tz='UTC'),
    ]
    unexpected_inconsistences = inconsistent_dates.drop(known_inconsistencies)
    if len(unexpected_inconsistences):
        in_bills = bill_data.index.difference(bond_data.index).difference(
            known_inconsistencies
        )
        in_bonds = bond_data.index.difference(bill_data.index).difference(
            known_inconsistencies
        )
        raise ValueError(
            "Inconsistent dates for Canadian treasury bills vs bonds. \n"
            "Dates with bills but not bonds: {in_bills}.\n"
            "Dates with bonds but not bills: {in_bonds}.".format(
                in_bills=in_bills,
                in_bonds=in_bonds,
            )
        )