美文网首页
quantopian

quantopian

作者: 98Future | 来源:发表于2020-02-06 13:52 被阅读0次

自动生成的模板

practice

print out closing data every minute

is_stale

can_trade 判断asset alive? 如果可以,order_target_percent to desired portfolio 配置比例

------------1990 代流行的Pairwise Trading 配对交易-----

researching

核心就是 先观察两个股票的correlation相关性。如果相关性很大,会期望涨一起涨 跌一起跌。

并且他们的Spread在Normalize之后应该有一个较为稳定的mean,两只股票的差价不能超过过大。当超过Z-score多少的Spread时候肯定不对,这个时候我们可以下手。

使用Spread.Rolling on past 30 days是因为在实战时候没有历史数据用的,必须累计30天就用30天

实战:

这个只是一个Naive Model不要太关心Returns..

-----Pipeline----

这边用了一个Mask= small prices 以及Filter

相关文章

网友评论

      本文标题:quantopian

      本文链接:https://www.haomeiwen.com/subject/fanyfftx.html