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

sync with the latest #1

Merged
merged 511 commits into from
Apr 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
511 commits
Select commit Hold shift + click to select a range
de1388d
release 2.0.0-beta
Mar 27, 2017
8cbe3b1
update README
Mar 27, 2017
1e4db13
disable register event for offline scripts
hmn21 Mar 28, 2017
7d7e1f8
Merge branch 'feature/portfolio_refactory'
hmn21 Mar 28, 2017
c2001e8
add repr
hzliu Mar 28, 2017
fd333e6
persist broker if need
hzliu Mar 28, 2017
ad25758
fix portfolio set_state
hzliu Mar 28, 2017
7e6629b
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Mar 29, 2017
e7c63a5
update i18n
Mar 29, 2017
a6d6002
add is_st_stock && is_suspended
Mar 29, 2017
4c4d0c6
update i18n
Mar 29, 2017
a6be6e7
release 2.0.0
Mar 29, 2017
4170a10
fix broker persist
hzliu Mar 29, 2017
45a553b
remove duplicate option in .gitignore
Mar 29, 2017
4edfe3a
update setup.py
Mar 29, 2017
d99ddb7
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Mar 29, 2017
481de62
add LIVE_TRADING
hzliu Mar 29, 2017
170ee25
do not copy; add LIVE_TRADING
hzliu Mar 29, 2017
422221e
fix RunInfo
hzliu Mar 29, 2017
20656e7
fix dt
hzliu Mar 29, 2017
3a12df5
修改配置的读取方式,不再从~/.rqalpha/config.yml读取用户配置信息,而是默认从当前命令行读取config.yml,如果没…
Mar 30, 2017
3191744
1. config 现在不再进行版本检查
Mar 30, 2017
af464f2
release 2.0.1
Mar 30, 2017
7d0b96d
fix typo
Mar 30, 2017
02ae8cf
little refactory
hzliu Mar 30, 2017
3b8cb5a
little fixes
hzliu Mar 30, 2017
d568abe
remove run_id
hzliu Mar 30, 2017
2d7dc02
use integer value for ACCOUNT_TYPE
hzliu Mar 30, 2017
9c1bd1b
support context_vars with dict input
Mar 30, 2017
15a03d4
remove debug print
Mar 30, 2017
1a8a07e
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Mar 30, 2017
deae06f
release 2.0.2
Mar 30, 2017
878b29f
fix mavg and vwap
hzliu Mar 30, 2017
59225e1
include requirements-py2.txt
Mar 31, 2017
21f4404
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Mar 31, 2017
58a454a
bug fixed
Mar 31, 2017
3ee5afc
release 2.0.5
Mar 31, 2017
85b60ad
Bug Fixed: https://github.com/ricequant/rqalpha/issues/76
Mar 31, 2017
60b1bdf
解决 get_mod_config_path 返回值不正确的问题
Mar 31, 2017
b1df978
analyser benchmark bug fixed
Mar 31, 2017
4356e31
release 0.2.6
Mar 31, 2017
c3104c6
fix typo
hzliu Mar 31, 2017
781cab1
fix de_listed
hzliu Mar 31, 2017
2624201
fix AnalyserMod
hzliu Mar 31, 2017
c0f23bc
add tick event source
cedricporter Mar 22, 2017
d9d7668
implement get_ticks for test
cedricporter Mar 22, 2017
1fe1940
fix concatenate bug
cedricporter Mar 22, 2017
877c48e
use merge sort to merge ticks
cedricporter Mar 27, 2017
42a3d4a
fill open price from snapshot
cedricporter Mar 31, 2017
4202e8d
add tick price board
cedricporter Mar 31, 2017
dc8e40e
get tick from event
cedricporter Mar 31, 2017
3294d0d
rename matcher & simulation broker
cedricporter Mar 31, 2017
c01b7b6
remove internal limit up & limit down from bar.py
cedricporter Mar 31, 2017
a5eefa3
let matcher use price board
cedricporter Mar 31, 2017
d5a5633
enable volume_limit only when frequency is 1d/1m
cedricporter Mar 31, 2017
36746d1
update tick model
cedricporter Mar 31, 2017
3212228
filter past time when universe is change
cedricporter Mar 31, 2017
90d8e96
refactor
cedricporter Mar 31, 2017
8c8455f
fix limit up / limit down
cedricporter Mar 31, 2017
b3f3111
fix limit up / limit down typo
cedricporter Mar 31, 2017
d4eeac1
fix typo
Apr 1, 2017
c5f0fd9
fix bug when missing market data
cedricporter Apr 1, 2017
224935e
fix doc typo
Apr 1, 2017
f7c556e
add match order_book_id filter
cedricporter Apr 1, 2017
cdce623
fix before_trading
cedricporter Apr 1, 2017
5266ead
python2 unicode compatible
Apr 1, 2017
b537968
make better_exceptions unicode str compatible with python 2.7
Apr 1, 2017
c590173
print time spend when performance regress
Apr 1, 2017
057f503
Merge branch 'develop' of https://github.com/ricequant/rqalpha into d…
Apr 1, 2017
e28b7dc
arg_checker: fix check_are_valid_fields, is_valid_date
hzliu Apr 3, 2017
f01a8cd
fix for python2
hzliu Apr 3, 2017
81d9760
add count for is_suspended and is_st_stock
hzliu Apr 3, 2017
ba487a3
fix
hzliu Apr 3, 2017
3243c75
fix
hzliu Apr 3, 2017
a55a6cb
fix order_percent; clear comment
hzliu Apr 3, 2017
442745d
update docs
Apr 5, 2017
563d174
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Apr 5, 2017
b21db3b
release 2.0.7
Apr 5, 2017
d2df80b
update version
Apr 5, 2017
90bbff5
fix before_trading time bug
cedricporter Apr 5, 2017
35eb727
update FAQ doc
Apr 5, 2017
9042a96
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Apr 5, 2017
e5a4bf4
remove useless code
cedricporter Apr 5, 2017
c54fc14
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 5, 2017
4cdda7f
performance tune
cedricporter Apr 5, 2017
e19d052
add matching type check
cedricporter Apr 5, 2017
5ce0717
publish EVENT.POST_UNIVERSE_CHANGED only when universe changes really
cedricporter Apr 5, 2017
88a3ec2
cache get_account_type because it is god damn slow
cedricporter Apr 5, 2017
1180271
update repr of snapshot
cedricporter Apr 5, 2017
b11e27c
fix before_trading time bug
cedricporter Apr 5, 2017
1595fdd
auto set default encoding with utf8
Apr 5, 2017
6a2d66e
format code
cedricporter Apr 5, 2017
a99b054
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 5, 2017
46a2377
update sys_stock_realtime readme
cedricporter Apr 5, 2017
599dcf8
add limit up & limit down
cedricporter Apr 5, 2017
7d4d669
implement a1 b1
cedricporter Apr 5, 2017
44d658c
add data_board
cedricporter Apr 5, 2017
d6b2437
use order_book_id to be index
cedricporter Apr 5, 2017
725c780
fix realtime stock cause by mod conflict
cedricporter Apr 5, 2017
3d5ccf0
refactor event source
cedricporter Apr 5, 2017
d06e840
remove StockRealtimePriceBoard
cedricporter Apr 5, 2017
f4aebaf
add intro/optimizing_parameters
cedricporter Apr 5, 2017
e6ef4f4
add batch run test code
cedricporter Apr 5, 2017
b5bfb2f
add batch run by main.run
cedricporter Apr 5, 2017
e0443ac
add analyser batch run performance
cedricporter Apr 5, 2017
24e6731
fix docs
cedricporter Apr 5, 2017
d9c54f7
use `from rqalpha import run` to run batch
cedricporter Apr 5, 2017
95de526
refactor ptimizing_parameterso
cedricporter Apr 5, 2017
09df03f
fix subscribe bug & refactor event source
cedricporter Apr 5, 2017
8315e25
bug fixed
Apr 6, 2017
2f5b999
release 2.0.8
Apr 6, 2017
1e1ef6b
add missing logger in api
cedricporter Apr 6, 2017
d82ae39
add missing logger in api
cedricporter Apr 6, 2017
fa5ae06
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 6, 2017
0b76d2e
add mod_sys_analyser README.rst
Apr 6, 2017
fc096bf
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 6, 2017
9e7d01b
update sys_analyser README
Apr 6, 2017
605386f
Update README.rst
wh1100717 Apr 6, 2017
5386ed8
增加 sys_progress Mod 对应的 README.rst 文档
Apr 6, 2017
eb88b1f
增加 sys_risk_mod 对应的README.rst
Apr 6, 2017
4cba206
add sys_simulation mod README.rst
Apr 6, 2017
1f9290c
update sys_stock_realtime mod README.rst
Apr 6, 2017
8f454c8
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 6, 2017
704034a
Merge branch 'master' into develop
cedricporter Apr 6, 2017
3440bb8
update docs
Apr 6, 2017
5f33415
update
Apr 6, 2017
107a6ee
seems better
hzliu Apr 6, 2017
da14e39
preload carray
hzliu Apr 6, 2017
ca9927f
data type matters
hzliu Apr 6, 2017
5631fcb
update sys_funcat docs
cedricporter Apr 6, 2017
551e6a3
add more examples into sys_funcat doc
cedricporter Apr 6, 2017
19eacb6
add mod requirement
cedricporter Apr 6, 2017
bf6efde
fix format style
cedricporter Apr 6, 2017
abfd9a5
update rqalpha_mod_sys_analyser docs
cedricporter Apr 6, 2017
e54348f
update docs
Apr 7, 2017
0362212
update docs
Apr 7, 2017
78f98ef
add optimizing parameters examples in docs
cedricporter Apr 7, 2017
7e5db68
unify is_suspended/is_st_stock
hzliu Apr 6, 2017
25c67d8
add set_pending_cancel
hzliu Apr 6, 2017
32de1c5
fix logic bug in order.is_final
cedricporter Apr 7, 2017
1c73257
refactor deal_price_decider create
cedricporter Apr 7, 2017
3d75a2f
format test code
cedricporter Apr 7, 2017
6493722
format example code
cedricporter Apr 7, 2017
00063b9
fix test_api_base
cedricporter Apr 8, 2017
9d88cad
refactor test_api
cedricporter Apr 8, 2017
ac0be92
remove test code
cedricporter Apr 8, 2017
1ab1834
show progress bar for test_api
cedricporter Apr 8, 2017
19da31c
fix typo
hzliu Apr 8, 2017
0aed0bb
fix test_api_future/test_api_stock
cedricporter Apr 8, 2017
677dfd4
fix doc
Cuizi7 Apr 8, 2017
6092ee8
fix test code
cedricporter Apr 8, 2017
a99fb3a
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 8, 2017
1d84cdb
update simulation broker
Apr 10, 2017
3d5684c
use env.get_instrument instead of data_proxy
Apr 10, 2017
5271be9
update signal broker
Apr 10, 2017
c4081fd
bug fixed
Apr 10, 2017
392a988
update sys analyser mod
Apr 10, 2017
1e27ce3
format code
Apr 10, 2017
b810bb7
update history_bars api
cedricporter Apr 10, 2017
ff1182c
add signal test algo
Apr 10, 2017
7d84bb7
disable test_api temporarily
cedricporter Apr 10, 2017
96054b8
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 10, 2017
88ca9cf
fix rqalpha cmd error
Apr 10, 2017
1a06782
format code
Apr 10, 2017
5beae01
update i18n
Apr 10, 2017
7961fa1
release 2.0.9
Apr 10, 2017
048fac4
add error message, fix bug in test cases
Apr 11, 2017
87e725a
fix only export custom user mod config issue
Apr 11, 2017
2aeade0
Update signal_broker.py
merz9b Apr 11, 2017
e9d1e95
Merge pull request #88 from merz9b/patch-1
wh1100717 Apr 11, 2017
03df45d
Merge branches 'develop' and 'master' of https://github.com/ricequant…
Apr 11, 2017
c4a40a5
format code
Apr 11, 2017
0506e9f
update docs
Apr 11, 2017
8f1a498
Develop (#89)
bsknight Apr 11, 2017
aadb59e
add extend_api example
Apr 11, 2017
be9b5ab
update docs
Apr 11, 2017
944f088
update docs
wh1100717 Apr 11, 2017
5b93372
release 2.1.0
wh1100717 Apr 11, 2017
279af05
Merge branches 'develop' and 'master' of https://github.com/ricequant…
wh1100717 Apr 11, 2017
b78c14e
release 2.1.0
wh1100717 Apr 11, 2017
927d3c8
update docs
wh1100717 Apr 12, 2017
ba38484
提供 `from rqalpha import cli` 方便第三方 Mod 扩展 `rqalpha` command
wh1100717 Apr 12, 2017
33b1df9
add include_now
hzliu Apr 11, 2017
eeb9a09
fix data_proxy
hzliu Apr 11, 2017
5da0c00
Merge branches 'develop' and 'master' of https://github.com/ricequant…
wh1100717 Apr 13, 2017
de40647
Fix https://github.com/ricequant/rqalpha/issues/90
wh1100717 Apr 13, 2017
86a4083
fix concept testcase
Apr 17, 2017
849ac72
do not create position until first trade
hmn21 Apr 17, 2017
08d4d31
add quarter arg checker
hmn21 Apr 17, 2017
611e30d
fix include_now in BEFORE_TRADING
hzliu Apr 13, 2017
6348a49
refactor
cedricporter Apr 7, 2017
f62252c
fix bar_count
cedricporter Apr 17, 2017
00e2d8c
refactor get_price
cedricporter Apr 17, 2017
0aef3ba
refactor sys_funcat
cedricporter Apr 18, 2017
6a05531
Fix bug issue#94
wanghc02 Apr 19, 2017
3b0ac38
Merge pull request #97 from wanghc02/bug/issue94
wh1100717 Apr 19, 2017
a782368
release 2.1.2
wh1100717 Apr 19, 2017
8417a18
add bar count scale
cedricporter Apr 19, 2017
2c1e470
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 19, 2017
a53b762
don't create position
hzliu Apr 20, 2017
788c7af
add stock & future test case
cedricporter Apr 20, 2017
d504767
Merge branch 'develop' of github.com:ricequant/rqalpha into develop
cedricporter Apr 20, 2017
83bb91a
refactor test.py
cedricporter Apr 20, 2017
c57fd9a
fix travis in 2.7 because ipython==6.0+ is not support python 2
cedricporter Apr 20, 2017
2ce43a3
fix bug when running future
cedricporter Apr 20, 2017
12d9a35
fix alpha calculate error
hmn21 Apr 20, 2017
45aa09e
Merge remote-tracking branch 'origin/master' into develop
hmn21 Apr 20, 2017
808bfd6
update test pkl
wh1100717 Apr 21, 2017
45db1bf
update i18n
wh1100717 Apr 21, 2017
1300ac7
require six
wh1100717 Apr 21, 2017
622ceda
only futures has settle price
hzliu Apr 21, 2017
c3d6438
use int32/int64
hzliu Apr 21, 2017
da04bb5
fix transaction_cost
hzliu Apr 21, 2017
3ee944a
fix typo
hzliu Apr 21, 2017
385bb6f
add pnl/starting_cash/fronzen_cash
hzliu Apr 21, 2017
5b0bb80
fix frozen_cash
hzliu Apr 21, 2017
282fdf6
add requests lib requirement
wh1100717 Apr 24, 2017
131b683
update translation
cedricporter Apr 24, 2017
b766e60
fix tiny bug for rqalpha mod install cmd
wh1100717 Apr 24, 2017
5db6f25
fix history_bars
cedricporter Apr 24, 2017
60473ad
make price_limit as a warning switcher option for signal model
wh1100717 Apr 24, 2017
5908bb6
fix history_bars when include_now=True
cedricporter Apr 24, 2017
e9b7ccd
remove force include_now=False
cedricporter Apr 24, 2017
ba2df4d
fix history_bars
cedricporter Apr 24, 2017
dd99a94
fix regression
hzliu Apr 24, 2017
a07cc2a
support config.json as user config file
wh1100717 Apr 24, 2017
6f0464f
Merge branch 'develop' of https://github.com/ricequant/rqalpha into d…
wh1100717 Apr 24, 2017
a2ec4b8
bug fixed
wh1100717 Apr 25, 2017
69e6c63
add issue template
cedricporter Apr 25, 2017
ae2c544
Update issue_template.md
wh1100717 Apr 25, 2017
8e17cec
add comment
wh1100717 Apr 25, 2017
c464042
Merge branches 'develop' and 'master' of https://github.com/ricequant…
wh1100717 Apr 25, 2017
574156c
bug fixed
wh1100717 Apr 25, 2017
d4d2698
fix future calc
hzliu Apr 25, 2017
d146c83
fix https://github.com/ricequant/rqalpha/issues/101
wh1100717 Apr 25, 2017
5fe914d
release 2.1.3
wh1100717 Apr 25, 2017
2b57fd0
update version
wh1100717 Apr 25, 2017
c5fb540
update pkl
wh1100717 Apr 25, 2017
a1f6b2d
remove unused typing lib
wh1100717 Apr 25, 2017
5956fb0
add deprecated property for making old version RQA compatible
wh1100717 Apr 26, 2017
acf070f
fix plot when only backtest with one day
cedricporter Apr 26, 2017
f0afcbb
fix settlement price
hzliu Apr 26, 2017
7b9ab97
fix history_bars because we misuse ExecutionContext.phase()
cedricporter Apr 26, 2017
f41e20f
增加期货账户级别仓位强平 https://github.com/ricequant/rqalpha/issues/108
wh1100717 Apr 26, 2017
9407595
pass test case
wh1100717 Apr 26, 2017
1e93773
update i18n
wh1100717 Apr 26, 2017
a0992e6
release 2.1.4
wh1100717 Apr 26, 2017
8439b68
bug fixed
wh1100717 Apr 26, 2017
9c74b66
fix frozen_cash cal
wh1100717 Apr 26, 2017
d6483c4
fix clear position
hzliu Apr 26, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 提 ISSUE 须知

请先阅读文档 [rqalpha文档](http://rqalpha.readthedocs.io/)

如果仍有问题的话请在 [issue列表](https://github.com/ricequant/rqalpha/issues) 中寻找是否有相关问题的解决方案

如果没有的话 麻烦开一个issue 描述以下问题:

## 1. RQAlpha的版本

## 2. Python的版本

## 3. 是Windows/Linux/MacOS or others?

## 4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置

## 5. 您出现的错误堆栈日志信息
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ rqalpha.system.log
*.pk
*.h5
.vscode
.idea
*.c
*.so
*.pyc
Expand All @@ -20,4 +19,4 @@ persist/
.coverage
.tox
rqalpha_test_coverage_report/
.tmp.pkl
.tmp.pkl
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@ install:
# Install bcolz
- pip install Cython
- pip install bcolz
- pip install -r requirements.txt

# Install Test Deps
- pip install TA-Lib
- pip install coveralls
- pip install -U setuptools
- pip install funcat
- pip install ipython==5.3.0
- pip install .
script:
- ls $HOME/.rqalpha/bundle/
- ls -al $HOME/.rqalpha/
- ls -al $HOME/.rqalpha/bundle/
- |
if [ ! -d $HOME/.rqalpha/config.yml ]; then
if [ ! -f $HOME/.rqalpha/bundle/instruments.pk ]; then
rqalpha update_bundle
fi
- coverage run --source=rqalpha test.py
cache:
directories:
- $HOME/.cache/pip
- $HOME/.rqalpha
- $HOME/.rqalpha/bundle
after_success:
coveralls
191 changes: 191 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,194 @@
==================
CHANGELOG
==================

2.1.4
==================

- 解决 history_bars 在 before_trading 获取的是未来数据的问题
- 解决 before_trading 获取结算价是当前交易日结算价的问题
- 增加 RQAlpha 向前兼容(0.3.x) `Issue 100 <https://github.com/ricequant/rqalpha/issues/100>`_
- 期货增加强平机制: 及当前账户权益<=0时,清空仓位,资金置0 `Issue 108 <https://github.com/ricequant/rqalpha/issues/108>`_
- 解决回测时只有一个交易日时,只有回测数据显示的问题

2.1.3
==================

- Fix `Issue 101 <https://github.com/ricequant/rqalpha/issues/101>`_
- Fix `Issue 105 <https://github.com/ricequant/rqalpha/issues/105>`_
- 解决运行 RQAlpha 时缺少 `six` | `requests` 库依赖的问题
- 解决安装RQAlpha时在某些情况下报错的问题
- 解决第三方 Mod 安装后配置文件路径有误的问题
- 现在可以通过 `rqalpha mod install -e .` 的方式来安装依赖 Mod 了
- 现在运行策略时会检测当前目录是否存在 `config.yml` 或者 `config.json` 来作为配置文件
- 解决股票下单就存在 `position` 的问题,现在只有成交后才会产生 `position` 了。
- 修复 `portfolio` 和 `future_account` 计算逻辑的一些问题
- 修复 `transaction_cost` 在某个 position 清空以后计算不准确的问题
- 在信号模式下 `price_limit` 表示是否输出涨跌停买入/卖出的报警信息,但不会阻止其买入/卖出

2.1.2
==================

- 提供 :code:`from rqalpha import cli` 方便第三方 Mod 扩展 `rqalpha` command
- :code:`history_bars` 增加 :code:`include_now` option
- Fix `Issue 90 <https://github.com/ricequant/rqalpha/issues/90>`_
- Fix `Issue 94 <https://github.com/ricequant/rqalpha/issues/94>`_

2.1.0
==================

- Fix `Issue 87 <https://github.com/ricequant/rqalpha/issues/87>`_
- Fix `Issue 89 <https://github.com/ricequant/rqalpha/pull/89>`_
- Fix 无法通过 :code:`env.config.mod` 获取全部 `mod` 的配置信息
- 增加 :code:`context.config` 来获取配置信息
- 提供 :code:`from rqalpha import export_as_api` 接口,方便扩展自定义 API

2.0.9
==================

- Fix `Issue 79 <https://github.com/ricequant/rqalpha/issues/79>`_
- Fix `Issue 82 <https://github.com/ricequant/rqalpha/issues/82>`_
- Fix :code:`rqalpha cmd` 失效

2.0.8
==================

- Fix `Issue 81 <https://github.com/ricequant/rqalpha/issues/81>`_
- 解决 `mod_config.yml` 文件解析出错以后,所有的命令报错的问题
- 默认在 Python 2.x 下 `sys.setdefaultencoding("utf-8")`
- 优化 `UNIVERSE_CHANGED` 事件,现在只有在universe真正变化时才触发

2.0.7
==================

- Fix `Issue 78 <https://github.com/ricequant/rqalpha/issues/78>`_
- `is_st_stock` | `is_suspended` 支持 `count` 参数
- 解决大量 Python 2.x 下中文乱码问题

2.0.6
==================

- 解决在 Python 2.x 下安装 RQAlpha 提示 `requirements-py2.txt Not Found` 的问题
- 解决 `Benchmark` 无法显示的问题
- 解决 `rqalpha mod list` 显示不正确的问题
- 现在可以通过配置 `base.extra_vars` 向策略中预定义变量了。用法如下:

.. code-block:: python3

from rqalpha import run

config = {
"base": {
"strategy_file": "strategy.py",
"start_date": "2016-06-01",
"end_date": "2016-07-01",
"stock_starting_cash":100000,
"benchmark": '000300.XSHG'
},
"extra":{
"context_vars":{
"short":5,
"middle":10,
"long":21
}
}
}

result_dict = run(config)

# 以下是策略代码:

def handle_bar(context):
print(context.short) # 5
print(context.middle) # 10
print(context.long) # 21

2.0.1
==================

- 修改配置的读取方式,不再从 `~/.rqalpha/config.yml` 读取自定义配置信息,而是默认从当前路径读取 `config.yml`,如果没找到,则会读取系统默认配置信息
- 现在不再对自定义信息进行版本检查
- :code:`rqalpha generate_config` 现在会生成包含所有默认系统配置信息的 `config.yml` 文件。
- :code:`RUN_TYPE` 增加 :code:`LIVE_TRADING`
- 修复 :code:`history_bars` 获取日期错误产生的问题
- 修复执行 :code:`context.run_info` 会报错的问题
- 修复持久化报错的问题
- 增加 Order Persist 相关内容


2.0.0
==================

2.0.0 详细修改内容请访问:`RQAlpha 2.0.0 <https://github.com/ricequant/rqalpha/issues/65>`_

**Portfolio/Account/Position 相关**

- 重新定义了 :code:`Portfolio`, :code:`Account` 和 :code:`Position` 的角色和关系
- 删除大部分累计计算的属性,重新实现股票和期货的计算逻辑
- 现在只有在 :code:`Portfolio` 层级进行净值/份额的计算,Account级别不再进行净值/份额/收益/相关的计算
- 账户的恢复和初始化现在只需要 :code:`total_cash`, :code:`positions` 和 :code:`backward_trade_set` 即可完成
- 精简 :code:`Position` 的初始化,可以从 :code:`real_broker` 直接进行恢复
- :code:`Account` 提供 :code:`fast_forward` 函数,账户现在可以从任意时刻通过 :code:`orders` 和 :code:`trades` 快速前进至最新状态
- 如果存在 Benchmark, 则创建一个 :code:`benchmark_portfolio`, 其包含一个 :code:`benchmark_account`
- 策略在调用 :code:`context.portfolio.positions[some_security]` 时候,如果 position 不存在,不再每次都创建临时仓位,而是会缓存,从而提高回测速度和性能
- 不再使用 :code:`clone` 方法
- 不再使用 :code:`PortfolioProxy` 和 :code:`PositionProxy`

**Event 相关**

- 规范 Event 的生成和相应逻辑, 使用 Event object 来替换原来的 Enum
- 抽离事件执行相关逻辑为 :code:`Executor` 模块

**Mod 相关**

- 规范化 Mod 命名规则,需要以 `rqalpha_mod_xxx` 作为 Mod 依赖库命名
- 抽离 :code:`slippage` 相关业务逻辑至 :code:`simulation mod`
- 抽离 :code:`commission` 相关业务逻辑至 :code:`simulation mod`
- 抽离 :code:`tax` 相关业务逻辑至 :code:`simulation mod`
- `rqalpha mod list` 命令现在可以格式化显示 Mod 当前的状态了

**Environment 和 ExecutionContext 相关**

- 现在 :code:`ExecutionContext` 只负责上下文相关的内容,不再可以通过 :code:`ExecutionContext` 访问其他成员变量。
- 扩展了 :code:`Environment` 的功能,RQAlpha 及 Mod 均可以直接通过 :code:`Environment.get_instance()` 来获取到环境中核心模块的引用
- :code:`Environment` 还提供了很多常用的方法,具体请直接参考代码

**配置及参数相关**

- 重构了配置相关的内容,`~/.rqalpha/config.yml` 现在类似于 Sublime/Atom 的用户配置文件,用于覆盖默认配置信息,因此只需要增加自定义配置项即可,不需要全部的配置内容都存在
- 将Mod自己的默认配置从配置文件中删除,放在Mod中自行管理和维护
- 独立存在 `~/.rqalpha/.mod_conifg.yml`, 提供 `rqalpha mod install/uninstall/enable/disable/list` 命令,RQAlpha 会通过该配置文件来对Mod进行管理。
- 抽离 :code:`rqalpha run` 的参数,将其中属于 `Mod` 的参数全部删除,取代之为Mod提供了参数注入机制,所以现在 `Mod` 可以自行决定是否要注入参数或者命令来扩展 RQAlpha 的功能
- 提供了 :code:`rqalpha-cmd` 命令,`Mod` 推荐在该命令下注入自己的命令来实现功能扩展
- 不再使用 `--strategy-type`, 改为使用 `--security` 选项
- `--output-file` | `--report` | `--plot` | `--plot-save`参数 转移至 `sys_analyser` Mod 中
- `plot` | `report` 命令,转移至 `sys_analyser` Mod 中
- `--signal` | `--slippage` | `--commission-multiplier` | `--matching-type` | `--rid` 转移至 `sys_simulation` Mod 中

**Risk 计算**

- 修复 `tracking error <https://www.ricequant.com/api/python/chn#backtest-results-factors>`_ 计算错误
- 修改 `sharpe <https://www.ricequant.com/api/python/chn#backtest-results-risk-adjusted-returns>`_ , `sortino <https://www.ricequant.com/api/python/chn#backtest-results-risk-adjusted-returns>`_ , `information ratio <https://www.ricequant.com/api/python/chn#backtest-results-risk-adjusted-returns>`_ , `alpha <https://www.ricequant.com/api/python/chn#backtest-results-returns>`_ 计算逻辑。参考 `晨星 <https://gladmainnew.morningstar.com/directhelp/Methodology_StDev_Sharpe.pdf>`_ 的方法, 先计算单日级别指标, 再进行年化。与原本直接基于年化值计算相比, 在分析时间较短的情况下, 新的指标计算结果会系统性低于原指标结果。
- 引入单日无风险利率作为中间变量计算上述指标。单日无风险利率为通过 `中国债券信息网 <http://yield.chinabond.com.cn/cbweb-mn/yield_main>`_ 获取得到对应期限的年化国债到期收益率除以244得到
- 修改指标说明若干

**其他**

- 修改了 :code:`Order` 和 :code:`Trade` 的字段和函数,使其更通用
- 为 :code:`RqAttrDict` 类增加 :code:`update` 方法,现在支持动态更新了
- :code:`arg_checker` 增加 :code:`is_greater_or_equal_than` 和 :code:`is_less_or_equal_than` 函数
- 删除 :code:`DEFAULT_FUTURE_INFO` 变量,现在可以直接通过 :code:`data_proxy` 获取相关数据
- 通过 `better_exceptions <https://github.com/Qix-/better-exceptions>`_ 提供更好的错误堆栈提示体验
- 对字符串的处理进行了优化,现在可以正确在 Python2.x/3.x 下显示中文了
- 修复 :code:`update_bundle` 直接在代码中调用会报错的问题
- 增加对于下单量为0的订单过滤,不再会创建订单,也不再会输出警报日志
- 增加 :code:`is_suspended` 和 :code:`is_st_stock` API 的支持

0.3.14
==================

- Hotfix :code:`UnboundLocalError: local variable 'signature' referenced before assignment`

0.3.13
==================

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include requirements.txt
include requirements-py2.txt
include rqalpha/VERSION.txt
recursive-include rqalpha/resource *.png
Loading