使用回归法选股, 和之前选取的因子是一样的
def regression_select(context,bar_dict):
# 查询因子数据
q=query(fundamentals.eod_derivative_indicator.pe_ratio,
fundamentals.eod_derivative_indicator.market_cap,
fundamentals.eod_derivative_indicator.pb_ratio,
fundamentals.financial_indicator.return_on_equity,
fundamentals.financial_indicator.cost_to_sales,
fundamentals.income_statement.operating_revenue,
fundamentals.income_statement.net_profit,
fundamentals.income_statement.total_expense
).filter(
fundamentals.stockcode