def filter_by_year(stocks,year):
    """
    筛选出指定年份的股票信息

    :param stocks: 股票信息列表
    :param year: 年份
    :return: 指定年份的股票信息列表
    """
    result = []
    for s in stocks:
        if s.pdate.year == year:
            result.append(s)
    return result