Code Monkey home page Code Monkey logo

Comments (3)

shidenggui avatar shidenggui commented on August 20, 2024

需要补充更多信息

from easytrader.

jinrongxiaoe avatar jinrongxiaoe commented on August 20, 2024

我也遇到这个问题。这个bug可以这么重现:
取一个组合,前一天等仓位加入5个股票,第二天在盘中执行下面代码:
import easytrader

et = easytrader.use('xq')
et.prepare('xq.json')

close all positions

for position in et.position:
et.sell(position['stock_code'], price=position['last_price'], amount=position['current_amount'])
print("Selling off %s" % position['stock_code'])

症状是第一个票会顺利清仓,但是后面的票会出现下面的错误:
2016-07-21 13:50:07.521130] DEBUG: xqtrader.py: weight:17.740000, cash:63.880000
[2016-07-21 13:50:07.750284] DEBUG: xqtrader.py: 调仓 sell双林股份: 400
[2016-07-21 13:50:07.750461] ERROR: xqtrader.py: 调仓错误: 组合仓位比例出错
Selling off SZ300100

from easytrader.

shidenggui avatar shidenggui commented on August 20, 2024

@haogefeifei

from easytrader.

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.