Skip to content

Commit

Permalink
新增实时印花税测试文件 (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lin-Dongzhao authored Jan 22, 2024
1 parent bf88041 commit 5d24b84
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Binary file added tests/outs/test_s_pit_tax.pkl
Binary file not shown.
42 changes: 42 additions & 0 deletions tests/test_s_pit_tax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
def init(context):
context.s1 = "000001.XSHE"
context.count = 0


def before_trading(context):
context.count += 1


def handle_bar(context, bar_dict):
order_shares(context.s1, 1000)
if context.count > 1:
order_shares(context.s1, -1000)


def after_trading(context):
pass


__config__ = {
"base": {
"start_date": "2023-08-15",
"end_date": "2023-09-10",
"frequency": "1d",
"accounts": {
"stock": 1000000
},
},
"extra": {
"log_level": "error",
"show": True,
},
"mod": {
"sys_progress": {
"enabled": True,
"show": True,
},
"sys_transaction_cost": {
"pit_tax": True
}
}
}

0 comments on commit 5d24b84

Please sign in to comment.