def process_initialize(context): # 创建 JoinQuantExecutor 对象 # 可选参数包括:host, port, key, client, timeout 等 # 请将下面的 IP 替换为实际 IP g.__executor = shipane_sdk.JoinQuantExecutor(host='xxx.xxx.xxx.xxx', port=8888, key='', client='')
def initialize(context): # 创建 JoinQuantExecutor 对象 # 可选参数包括:host, title, account 等 g.executor = shipane_sdk.JoinQuantExecutor(host='xxx.xxx.xxx.xxx') # 定义一个全局变量, 保存要操作的股票 # 000001(股票:平安银行) g.security = '000001.XSHE' # 设定沪深300作为基准 set_benchmark('000300.XSHG')
def process_initialize(context): # 创建 JoinQuantExecutor 对象 # 可选参数包括:host, port, client 等 # 请将下面的 IP 替换为实际 IP g.__executor = shipane_sdk.JoinQuantExecutor(host='xxx.xxx.xxx.xxx')
def process_initialize(context): # 创建 JoinQuantExecutor 对象 # 可选参数包括:host, port, title, account 等 g.__executor = shipane_sdk.JoinQuantExecutor(host='xxx.xxx.xxx.xxx')
def setUp(self): self.Order = collections.namedtuple( 'Order', ['is_buy', 'security', 'price', 'amount']) self.executor = shipane_sdk.JoinQuantExecutor(host='192.168.1.102')
import shipane_sdk if __name__ == '__main__': _executor = shipane_sdk.JoinQuantExecutor(host='106.15.37.132', port=11788, key='', client='') order = [] _executor.execute(order) print('1122')