线性回归和量化交易(下)

本文介绍了如何使用线性回归法进行选股,在数据预处理后,通过每月调仓策略选择股票。当股票不再股票池中时,卖出并平均分配剩余股票仓位。此外,还探讨了在使用基本面分析时,结合股指期货进行对冲操作,以降低市场行情对交易的影响。
摘要由CSDN通过智能技术生成

使用回归法选股, 和之前选取的因子是一样的

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值