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

Function stock

quantdigger/util.py:30–41  ·  view source on GitHub ↗

构建周期合约结构的便捷方式。 Args: code (str): 股票代码 Returns: PContract. 周期合约

(code)

Source from the content-addressed store, hash-verified

28 Period(period))
29
30def stock(code):
31 """ 构建周期合约结构的便捷方式。
32
33 Args:
34 code (str): 股票代码
35
36 Returns:
37 PContract. 周期合约
38 """
39 from quantdigger.kernel.datastruct import PContract, Contract, Period
40 return PContract(Contract('%s.stock' % code),
41 Period('1.Day'))

Callers

nothing calls this directly

Calls 3

PContractClass · 0.90
ContractClass · 0.90
PeriodClass · 0.90

Tested by

no test coverage detected