MCPcopy Create free account
hub / github.com/QuantFans/quantdigger / pcontract

Function pcontract

quantdigger/util.py:18–28  ·  view source on GitHub ↗

构建周期合约结构的便捷方式。 :param str contract: 合约如:'IF000.SHEF' :param str Period: 周期如:'10.Minute' :return: 周期合约 :rtype: PContract

(contract, period)

Source from the content-addressed store, hash-verified

16 return epoch
17
18def pcontract(contract, period):
19 """ 构建周期合约结构的便捷方式。
20
21 :param str contract: 合约如:'IF000.SHEF'
22 :param str Period: 周期如:'10.Minute'
23 :return: 周期合约
24 :rtype: PContract
25 """
26 from quantdigger.kernel.datastruct import PContract, Contract, Period
27 return PContract(Contract(contract),
28 Period(period))
29
30def stock(code):
31 """ 构建周期合约结构的便捷方式。

Callers 1

main.pyFile · 0.90

Calls 3

PContractClass · 0.90
ContractClass · 0.90
PeriodClass · 0.90

Tested by

no test coverage detected