合约量化丨量化合约系统开发(策略详细),量化合约丨合约量化系统开发(方案源码)
量化交易有时候也被称为自动化交易,是指以先进的数学模型替代人为的主观判断,利用计算机技术进行数据分析,制定投资策略。
通常认为,人工智能产业结构分为基础层(包括软硬件设施以及数据服务)、技术层(基础框架、算法模型,后者包括深度学习、知识图谱、计算机视觉、自然语言处理、智能语音识别)、应用层(智能解决方案和应用场景)三大方面
量化交易系统开发的优势:策略及功能开发案例威:MrsFu123,可验证性;可测量性;一致性;客观性;可延伸性;
1.Testability:The major advantage of quantitative strategies is that by testing them based on historical data,it is possible to determine whether the strategy has potential profit opportunities and evaluate the system risks of quantitative strategies.
2.Measurability:Actually,it is the essence of quantification.By testing quantitative strategies with historical data,we quantitatively analyze the risks and benefits of the strategy,providing a mathematical foundation for controlling risks and optimizing fund allocation in actual transactions.
3.Consistency:Consistency is considered a major influencing factor on trading profits.Consistency refers to the consistency between the risk management,buy point and sell point rules of the strategy and historical backtesting in real trading scenarios.Only by maintaining consistency can the actual transaction results be close to the historical backtesting results.
4.Objectivity:The quantitative trading system is not influenced by people's intuitive feelings and opinions,ensuring the independence of the quantitative trading system.
5.Extensibility:Extensibility refers to an excellent quantitative strategy system that can be extended to different applications
#coding=gbk
#由.pt导成.onnx
import torch
import torchvision.models as models
#定义模型和载入模型权重
#model=models.resnet18()#【改】定义model
#model=models.resnet50()
model=models.vgg16(pretrained=False)
model.load_state_dict(torch.load("/home/xxx/.cache/torch/hub/checkpoints/vgg16-397923af.pth"))#【改】model权重地址
##set the model to inference mode
model.eval()
x=torch.randn(1,3,224,224)#生成张量
export_onnx_file="/home/xxx/model_optimization_tool/jm_log_quant/onnx_format_weight/vgg16.onnx"#【改】输出ONNX权重地址
torch.onnx.export(model,
x,
export_onnx_file,
opset_version=10,
do_constant_folding=True,#是否执行常量折叠优化
input_names=["input"],#输入名
output_names=["output"],#输出名
dynamic_axes={"input":{0:"batch_size"},#批处理变量
"output":{0:"batch_size"}})