量化交易/量化合约/合约量化/机器人系统开发(详细及案例)丨源码及运营版
量化交易(做市)机器人是一种软件程序,它通常使用API获取和解释相关信息,并根据市场数据的解释代表用户发出买麦订单。这些机器人通过监测市场价格走势,并根据一套预先设定和编程的规则作出反应,从而做出这些决定。
Trading robot:
1.The trading robot directly interacts with the exchange and represents users in buying wheat based on the interpretation of market data;It tracks market price changes and reacts according to predefined and pre programmed rules;
2.The trading robot trades on an encrypted coin exchange,系统详情唯:MrsFu123,buying the coin at a lower price and then selling it at a higher price to generate revenue.
3.The trading robot will automatically and continuously issue limit orders to profit from the price difference;
import argparse
import os.path as osp
import sys
sys.path.insert(0,'.')
import torch
from lib.models import model_factory
from configs import set_cfg_from_file
torch.set_grad_enabled(False)
parse=argparse.ArgumentParser()
parse.add_argument('--config',dest='config',type=str,
default='G:/6666Ground_segmentation0813/configs/bisenetv2_city.py',)
parse.add_argument('--weight-path',dest='weight_pth',type=str,
default='G:/6666Ground_segmentation0813/v4_model_final.pth')#最后的pytorch模型
parse.add_argument('--outpath',dest='out_pth',type=str,
default='G:/6666Ground_segmentation0813/model0124.onnx')#转成onnx的路径
args=parse.parse_args()
cfg=set_cfg_from_file(args.config)
if cfg.use_sync_bn:cfg.use_sync_bn=False
net=model_factory[cfg.model_type](cfg.n_cats,aux_mode='pred')
net.load_state_dict(torch.load(args.weight_pth),strict=False)
net.eval()
#dummy_input=torch.randn(1,3,*cfg.crop_size)
#dummy_input=torch.randn(1,3,1024,2048)
dummy_input=torch.randn(1,3,480,640)#图像的输入尺寸
input_names=['input_image']
output_names=['preds',]
torch.onnx.export(net,dummy_input,args.out_pth,
input_names=input_names,output_names=output_names,
verbose=False,opset_version=11)

