Skip to content

Commit

Permalink
release 0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWang committed Mar 31, 2017
1 parent b1df978 commit 4356e31
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
CHANGELOG
==================

2.0.2
2.0.6
==================

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

.. code-block:: python3
Expand Down
38 changes: 38 additions & 0 deletions docs/source/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,44 @@
History
==================

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.2
==================

Expand Down
2 changes: 1 addition & 1 deletion rqalpha/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.5
2.0.6

0 comments on commit 4356e31

Please sign in to comment.