合約量化丨量化合約系統(tǒng)開(kāi)發(fā)(策略詳細(xì)),量化合約丨合約量化系統(tǒng)開(kāi)發(fā)(方案源碼)
量化交易有時(shí)候也被稱為自動(dòng)化交易,是指以先進(jìn)的數(shù)學(xué)模型替代人為的主觀判斷,利用計(jì)算機(jī)技術(shù)進(jìn)行數(shù)據(jù)分析,制定投資策略。
通常認(rèn)為,人工智能產(chǎn)業(yè)結(jié)構(gòu)分為基礎(chǔ)層(包括軟硬件設(shè)施以及數(shù)據(jù)服務(wù))、技術(shù)層(基礎(chǔ)框架、算法模型,后者包括深度學(xué)習(xí)、知識(shí)圖譜、計(jì)算機(jī)視覺(jué)、自然語(yǔ)言處理、智能語(yǔ)音識(shí)別)、應(yīng)用層(智能解決方案和應(yīng)用場(chǎng)景)三大方面
量化交易系統(tǒng)開(kāi)發(fā)的優(yōu)勢(shì):策略及功能開(kāi)發(fā)案例威:MrsFu123,可驗(yàn)證性;可測(cè)量性;一致性;客觀性;可延伸性;
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導(dǎo)成.onnx
import torch
import torchvision.models as models
#定義模型和載入模型權(quán)重
#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權(quán)重地址
##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權(quán)重地址
torch.onnx.export(model,
x,
export_onnx_file,
opset_version=10,
do_constant_folding=True,#是否執(zhí)行常量折疊優(yōu)化
input_names=["input"],#輸入名
output_names=["output"],#輸出名
dynamic_axes={"input":{0:"batch_size"},#批處理變量
"output":{0:"batch_size"}})