from datetime import datetime


def is_target_tax_year(trade_date, tax_year):
    """
    Check if the trade date is within the target tax year.
    """
    year_start = datetime(tax_year, 1, 1, 0, 0, 0)
    next_year_start = datetime(tax_year+1, 1, 1, 0, 0, 0)
    return year_start <= trade_date < next_year_start