Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

future_account加入强平机制 #108

Closed
handsomu opened this issue Apr 26, 2017 · 1 comment
Closed

future_account加入强平机制 #108

handsomu opened this issue Apr 26, 2017 · 1 comment
Assignees

Comments

@handsomu
Copy link
Contributor

future account加入强平机制,逻辑如下:
每日结算完成之后加入对future_account的total_value判断逻辑。如果total_value<0,需要将现有仓位全部清空,对账户进行“清零”操作。
_total_cash = 0

@wh1100717
Copy link
Member

已实现

shij10 pushed a commit to shij10/rqalpha that referenced this issue Apr 29, 2017
* release 2.0.0-beta

* update README

* disable register event for offline scripts

* add repr

* persist broker if need

* fix portfolio set_state

* update i18n

* add is_st_stock && is_suspended

* update i18n

* release 2.0.0

* fix broker persist

* remove duplicate option in .gitignore

* update setup.py

* add LIVE_TRADING

* do not copy; add LIVE_TRADING

* fix RunInfo

* fix dt

* 修改配置的读取方式,不再从~/.rqalpha/config.yml读取用户配置信息,而是默认从当前命令行读取config.yml,如果没有找到,则会读取系统默认配置信息。

* 1.	config 现在不再进行版本检查
2.	generate_config 现在会生成默认系统配置信息的config.yml文件
3.	不再使用config_template.yml模板

* release 2.0.1

* fix typo

* little refactory

* little fixes

* remove run_id

* use integer value for ACCOUNT_TYPE

* support context_vars with dict input

* remove debug print

* release 2.0.2

* fix mavg and vwap

* include requirements-py2.txt

* bug fixed

* release 2.0.5

* Bug Fixed: ricequant#76

* 解决 get_mod_config_path  返回值不正确的问题

* analyser benchmark bug fixed

* release 0.2.6

* fix typo

* fix de_listed

* fix AnalyserMod

* add tick event source

* implement get_ticks for test

* fix concatenate bug

* use merge sort to merge ticks

* fill open price from snapshot

* add tick price board

* get tick from event

* rename matcher & simulation broker

* remove internal limit up & limit down from bar.py

* let matcher use price board

* enable volume_limit only when frequency is 1d/1m

* update tick model

* filter past time when universe is change

* refactor

* fix limit up / limit down

* fix limit up / limit down typo

* fix typo

* fix bug when missing market data

* fix doc typo

* add match order_book_id filter

* fix before_trading

* python2 unicode compatible

* make better_exceptions unicode str compatible with python 2.7

* print time spend when performance regress

* arg_checker: fix check_are_valid_fields, is_valid_date

* fix for python2

* add count for is_suspended and is_st_stock

* fix

* fix

* fix order_percent; clear comment

* update docs

* release 2.0.7

* update version

* fix before_trading time bug

* update FAQ doc

* remove useless code

* performance tune

* add matching type check

* publish EVENT.POST_UNIVERSE_CHANGED only when universe changes really

* cache get_account_type because it is god damn slow

* update repr of snapshot

* fix before_trading time bug

* auto set default encoding with utf8

* format code

* update sys_stock_realtime readme

* add limit up & limit down

* implement a1 b1

* add data_board

* use order_book_id to be index

* fix realtime stock cause by mod conflict

* refactor event source

* remove StockRealtimePriceBoard

* add intro/optimizing_parameters

* add batch run test code

* add batch run by main.run

* add analyser batch run performance

* fix docs

* use `from rqalpha import run` to run batch

* refactor ptimizing_parameterso

* fix subscribe bug & refactor event source

* bug fixed

* release 2.0.8

* add missing logger in api

* add missing logger in api

* add  mod_sys_analyser README.rst

* update sys_analyser README

* Update README.rst

* 增加 sys_progress Mod 对应的 README.rst 文档

* 增加 sys_risk_mod 对应的README.rst

* add sys_simulation mod README.rst

* update sys_stock_realtime mod README.rst

* update docs

* update

* seems better

* preload carray

* data type matters

* update sys_funcat docs

* add more examples into sys_funcat doc

* add mod requirement

* fix format style

* update rqalpha_mod_sys_analyser docs

* update docs

* update docs

* add optimizing parameters examples in docs

* unify is_suspended/is_st_stock

* add set_pending_cancel

* fix logic bug in order.is_final

* refactor deal_price_decider create

* format test code

* format example code

* fix test_api_base

* refactor test_api

* remove test code

* show progress bar for test_api

* fix typo

* fix test_api_future/test_api_stock

* fix doc

* fix test code

* update simulation broker

* use env.get_instrument instead of data_proxy

* update signal broker

* bug fixed

* update sys analyser mod

* format code

* update history_bars api

* add signal test algo

* disable test_api temporarily

* fix rqalpha cmd error

* format code

* update i18n

* release 2.0.9

* add error message, fix bug in test cases

* fix only export custom user mod config issue

* Update signal_broker.py

81行修改了一处BUG

* format code

* update docs

* Develop (ricequant#89)

* test

* test

* merge 2.0.6

* commit

* commit

* fix no settlement

* delete tags

* add extend_api example

* update docs

* update docs

* release 2.1.0

* release 2.1.0

* update docs

* 提供 `from rqalpha import cli` 方便第三方 Mod 扩展 `rqalpha` command

* add include_now

* fix data_proxy

* Fix ricequant#90

* fix concept testcase

* do not create position until first trade

* add quarter arg checker

* fix include_now in BEFORE_TRADING

* refactor

refactor rqalpha_mod_sys_funcat

* fix bar_count

* refactor get_price

remove useless code

* refactor sys_funcat

* Fix bug issue#94

* release 2.1.2

* add bar count scale

* don't create position

* add stock & future test case

* refactor test.py

* fix travis in 2.7 because ipython==6.0+ is not support python 2

* fix bug when running future

* fix alpha calculate error

* update test pkl

* update i18n

* require six

* only futures has settle price

* use int32/int64

* fix transaction_cost

* fix typo

* add pnl/starting_cash/fronzen_cash

* fix frozen_cash

* add requests lib requirement

* update translation

* fix tiny bug for rqalpha mod install cmd

* fix history_bars

* make price_limit as a warning switcher option for signal model

* fix history_bars when include_now=True

* remove force include_now=False

* fix history_bars

* fix regression

* support config.json as user config file

* bug fixed

* add issue template

* Update issue_template.md

* add comment

* bug fixed

* fix future calc

* fix ricequant#101

* release 2.1.3

* update version

* update pkl

* remove unused typing lib

* add deprecated property for making old version RQA compatible

* fix plot when only backtest with one day

* fix settlement price

* fix history_bars because we misuse ExecutionContext.phase()

* 增加期货账户级别仓位强平 ricequant#108

* pass test case

* update i18n

* release 2.1.4

* bug fixed

* fix frozen_cash cal

* fix clear position
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants