Skip to content

Commit 745d81c

Browse files
authored
Merge pull request #1007 from ricequant/develop
Develop
2 parents 1bc9a27 + ccf39ad commit 745d81c

43 files changed

Lines changed: 2503 additions & 2129 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.rst

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
CHANGELOG
33
==================
44

5+
6.1.5
6+
==================
7+
8+
- 回测结果图片和 Excel 报告新增年化双边换手倍数
9+
- `order_target_portfolio_smart` API 性能优化
10+
- `AbstractPosition` 类新增 property: instrument
11+
- 修复分红再投资未考虑交易费用的问题
12+
- 修复获取结算价时,只允许期货获取的问题,将品种范围扩增为: 期货、期权、现货
13+
14+
515
6.1.4
616
==================
717

@@ -159,6 +169,39 @@ CHANGELOG
159169
- `rqalpha.utils.testing` 下新增 `assert_result` 工具函数,用于断言回测结果与文件中持久化的结果相一致
160170
- 增加了专门用来持久化回测结果的自定义文件格式,兼顾了可读性和序列化能力
161171

172+
5.6.5
173+
==================
174+
- submit_order 支持 TWAPOrder、VWAPOrder 下单
175+
- 修复 reits 合约没有进行分红处理的问题
176+
- 修复 rqalpha --plot 偶发的无法正常运行的问题
177+
178+
5.6.4
179+
==================
180+
- 适配 FutureArbitrage Instrument type
181+
- portfolio.csv 文件中的超额序列拆分为算术超额和几何超额
182+
183+
5.6.3
184+
==================
185+
- 回测结果的 portfolio 文件中增加基准、超额序列
186+
- withdraw/deposit 支持盘前盘后执行
187+
188+
5.6.2
189+
==================
190+
- 优化涨跌停判断逻辑
191+
- 优化 numpy 版本限制
192+
193+
5.6.1
194+
==================
195+
- 回测支持场内交易 REITs
196+
197+
5.6.0
198+
==================
199+
- instrument 兼容 REITs 类型合约
200+
- 兼容 python==3.13
201+
202+
5.5.4
203+
==================
204+
- 修复 get_securities_margin 传入 XSHE/XSHG、sz/sh 报错的问题
162205

163206
5.5.2
164207
==================
@@ -180,6 +223,56 @@ CHANGELOG
180223
- 更新bundle数据支持将错误统一输出
181224
- 修改算法单拒单原因
182225

226+
5.4.2
227+
==================
228+
- 修复 order_target_portfolio 运行出现资金不足的问题
229+
- 优化更新 bundle 数据的流程
230+
231+
5.4.1
232+
==================
233+
- 调整拆分送股的逻辑(拆分时产生不足 1 股的情况,调整为四舍五入)
234+
235+
5.4.0
236+
==================
237+
- 优化 bundle 数据过旧的提示
238+
- 优化进行目标仓位调仓时下单失败的提示
239+
- 修复开启多线程时抛异常的问题
240+
241+
5.3.11
242+
==================
243+
- 修复增量回测报错的问题
244+
245+
5.3.10
246+
==================
247+
- 下单 API 在创建订单失败时,新增发布 ORDER_CREATION_REJECT 事件
248+
- Excel 报告引入压力测试期表现
249+
- 支持基准合约在上市前的行情(主要为指数)
250+
251+
5.3.9
252+
==================
253+
- Excel 报告的年度指标新增 alpha 和 beta
254+
- 修复买入标的时资金可能为负的问题
255+
256+
5.3.8
257+
==================
258+
- 修复部分期货获取 tick_size 报错的问题
259+
- 修复期货在交割日期 trading_pnl 数值异常的问题
260+
261+
5.3.7
262+
==================
263+
- 分红再投资产生交易流水事件
264+
- 修复获取 tick_size 报错的问题
265+
266+
5.3.6
267+
==================
268+
- 兼容 rqdata==3.0
269+
- 修复 init_positions 设置空头仓位时数值出错的问题
270+
271+
5.3.5
272+
==================
273+
- 期货回测支持使用 rqdatac 提供的时间序列费率和保证金费率数据
274+
- 印花税费率新增 PIT 模式
275+
- 兼容 python==3.12
183276

184277
5.3.3
185278
==================

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ pytest tests/integration_tests/
5050
1. **Chinese comments OK**: Domain-specific logic can use Chinese comments
5151
2. **Follow PEP 8**: Standard Python style guide
5252
3. **Test before commit**: Run pytest to ensure tests pass
53+
4. **If translatable strings change**: sync Babel artifacts using the commands in `babel.cfg`
54+
`pybabel extract -F babel.cfg --input-dirs rqalpha/ -o messages.pot`
55+
`pybabel update -i messages.pot -d rqalpha/utils/translations`
56+
update `rqalpha/utils/translations/zh_Hans_CN/LC_MESSAGES/messages.po` as needed, then run
57+
`pybabel compile -d rqalpha/utils/translations`
5358

5459
## Key Architecture Points
5560

docs/source/api/base_api.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ order_target_portfolio - 批量调仓「股票专用」
250250
.. autofunction:: order_target_portfolio
251251

252252

253+
order_target_portfolio_smart - 批量调仓「股票专用」
254+
------------------------------------------------------
255+
256+
.. autofunction:: order_target_portfolio_smart
257+
258+
253259
buy_open - 买开「期货专用」
254260
------------------------------------------------------
255261

0 commit comments

Comments
 (0)