Skip to content

Commit

Permalink
new underlying SP
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuizi7 committed Nov 27, 2018
1 parent 635d888 commit 62ac21a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rqalpha/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@ class CURRENCY(CustomEnum):
UNDERLYING_SYMBOL_PATTERN = "([a-zA-Z]+)\d+"

NIGHT_TRADING_NS = ["CU", "AL", "ZN", "PB", "SN", "NI", "RB", "HC", "BU", "RU", "AU", "AG", "Y", "M", "A", "B", "P",
"J", "JM", "I", "CF", "SR", "OI", "MA", "ZC", "FG", "RM", "CY", "TA", "SC"]
"J", "JM", "I", "CF", "SR", "OI", "MA", "ZC", "FG", "RM", "CY", "TA", "SC", "SP"]
32 changes: 32 additions & 0 deletions rqalpha/data/future_info_cn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,38 @@
"open_commission_ratio": 3,
"tick_size": 0.005,
},
},
"SP": {
"hedge": {
"short_margin_ratio": 0.04,
"close_commission_today_ratio": 0.0,
"commission_type": COMMISSION_TYPE.BY_MONEY,
"close_commission_ratio": 5e-05,
"margin_type": MARGIN_TYPE.BY_MONEY,
"long_margin_ratio": 0.005,
"open_commission_ratio": 5e-05,
"tick_size": 2.0,
},
"speculation": {
"short_margin_ratio": 0.04,
"close_commission_today_ratio": 0.0,
"commission_type": COMMISSION_TYPE.BY_MONEY,
"close_commission_ratio": 5e-05,
"margin_type": MARGIN_TYPE.BY_MONEY,
"long_margin_ratio": 0.005,
"open_commission_ratio": 5e-05,
"tick_size": 2.0,
},
"arbitrage": {
"short_margin_ratio": 0.04,
"close_commission_today_ratio": 0.0,
"commission_type": COMMISSION_TYPE.BY_MONEY,
"close_commission_ratio": 5e-05,
"margin_type": MARGIN_TYPE.BY_MONEY,
"long_margin_ratio": 0.005,
"open_commission_ratio": 5e-05,
"tick_size": 2.0,
},
}
}

2 changes: 1 addition & 1 deletion rqalpha/utils/default_future_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
TRADING_PERIOD_DICT.update({
underlying_symbol: time_period1
for underlying_symbol in
["WR", "FU", "CS", "C", "L", "V", "PP", "BB", "FB", "JD", "WH", "PM", "RI", "SF", "SM", "RS", "JR", "LR", "AP"]
["WR", "FU", "CS", "C", "L", "V", "PP", "BB", "FB", "JD", "WH", "PM", "RI", "SF", "SM", "RS", "JR", "LR", "AP", "SP"]
})

# | 商品期货 Y, M, A, B, P, J, JM, I, CF, SR, OI, TA, MA, ZC, FG, RM, CY | 21:01~23:30, 09:01~10:15, 10:31~11:30, 13:31~15:00 |
Expand Down

0 comments on commit 62ac21a

Please sign in to comment.