Code Monkey home page Code Monkey logo

Comments (4)

handsomu avatar handsomu commented on September 27, 2024

目前股票的撮合逻辑是用的当天收盘价。说到底,在当前bar既做策略逻辑的生成,又用于成交,多少都会有点”使用未来数据“的问题。只不过股票有T+1的限制,所以使用当前bar进行成交没有那么大影响罢了。您所说使用当天开盘价进行撮合成交,在我看来其实与使用当天收盘价,或者平均成交价,区别不太大——都是当天的bar数据嘛。如果非要说调整的话,那可能也是用当天bar做策略逻辑生成,使用下一个bar的开盘价(或其他价格)做撮合成交。您觉得呢?

from rqalpha.

shaoshoutianheyu avatar shaoshoutianheyu commented on September 27, 2024

我觉得可以按照zipline的思路 当个bar出信号 下个bar以开盘价成交,这样比较符合实际

from rqalpha.

akulatatama avatar akulatatama commented on September 27, 2024

@shaoshoutianheyu 我们最近的更新会提供用类似zipline的方法的另外一种撮合,以后会以这种撮合为主。发布了以后再close这个case。

from rqalpha.

wh1100717 avatar wh1100717 commented on September 27, 2024

@jaskell 其实每个人回测都有自己的业务场景,在自己的业务场景中合理,可能对于别人来说并不合理。

所以新版本的RQAlpha提供了两种撮合方式,以当前Bar的Close价格进行撮合,或者以下一个Bar的Open价格来撮合,您可以直接通过配置的方式来选择自己需要的撮合方式。具体参考 参数配置

如果这两种撮合方式也不能满足您的需求,您也可以 通过 扩展 Mod 的方式 自己写一个撮合引擎扩展(AbstractMatcher) 来自定义撮合逻辑。

from rqalpha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.