现货量化交易机器人开发原理丨现货量化交易机器人系统开发(开发案例及源码)

简介:  For quantitative trading,the most important thing is the establishment of models.Generally speaking,it is to use modern statistics and mathematical methods,use computer technology to find laws that can bring excess returns from massive historical data to formulate strategies,and use mathematical mo

  For quantitative trading,the most important thing is the establishment of models.Generally speaking,it is to use modern statistics and mathematical methods,use computer technology to find laws that can bring excess returns from massive historical data to formulate strategies,and use mathematical models to verify and solidify these laws and strategies,and then strictly implement them through programmed trading

  机器人内置多种交易策略,从“保守-”到“激进+”,满足不同的风险类型。设置策略后,机器人将智能分配每次进单的仓位和条件,严格执行交易策略,交易补单策略,根据当前行情,云大数据实时调整。

  Calibration::Calibration(MNN::NetTmodel,uint8_tmodelBuffer,const int bufferSize,const std::string&configPath)

  :_originaleModel(model){

  //when the format of input image is RGB/BGR,channels equal to 3,GRAY is 1

  int channles=3;

  //解析json

  rapidjson::Document document;

  {

  std::ifstream fileNames(configPath.c_str());

  std::ostringstream output;

  output<<fileNames.rdbuf();

  auto outputStr=output.str();

  document.Parse(outputStr.c_str());

  if(document.HasParseError()){

  MNN_ERROR("Invalid jsonn");

  return;开发需求及案例:MrsFu123

  }

  }

  auto picObj=document.GetObject();

  //构造ImageProcess::config对象,将json内容传入

  ImageProcess::Config config;

  config.filterType=BILINEAR;

  config.destFormat=BGR;

  {

  if(picObj.HasMember("format")){

  auto format=picObj["format"].GetString();

  static std::map<std::string,ImageFormat>formatMap{{"BGR",BGR},{"RGB",RGB},{"GRAY",GRAY}};

  if(formatMap.find(format)!=formatMap.end()){

  config.destFormat=formatMap.find(format)->second;

  }

  }

  }

  if(config.destFormat==GRAY){

  channles=1;

  }

  config.sourceFormat=RGBA;

  std::string imagePath;

  _imageNum=0;

  {

  if(picObj.HasMember("mean")){

  auto mean=picObj["mean"].GetArray();

  int cur=0;

  for(auto iter=mean.begin();iter!=mean.end();iter++){

  config.mean[cur++]=iter->GetFloat();

  }

  }

  if(picObj.HasMember("normal")){

  auto normal=picObj["normal"].GetArray();

  int cur=0;

  for(auto iter=normal.begin();iter!=normal.end();iter++){

  config.normal[cur++]=iter->GetFloat();

  }

  }

  if(picObj.HasMember("width")){

  _width=picObj["width"].GetInt();

  }

  if(picObj.HasMember("height")){

  _height=picObj["height"].GetInt();

  }

  if(picObj.HasMember("path")){

  imagePath=picObj["path"].GetString();

  }

  if(picObj.HasMember("used_image_num")){

  _imageNum=picObj["used_image_num"].GetInt();

  }

  if(picObj.HasMember("feature_quantize_method")){

  std::string method=picObj["feature_quantize_method"].GetString();

  if(Helper::featureQuantizeMethod.find(method)!=Helper::featureQuantizeMethod.end()){

  _featureQuantizeMethod=method;

  }else{

  MNN_ERROR("not supported feature quantization method:%sn",method.c_str());

  return;

  }

  }

  if(picObj.HasMember("weight_quantize_method")){

  std::string method=picObj["weight_quantize_method"].GetString();

  if(Helper::weightQuantizeMethod.find(method)!=Helper::weightQuantizeMethod.end()){

  _weightQuantizeMethod=method;

  }else{

  MNN_ERROR("not supported weight quantization method:%sn",method.c_str());

  return;

  }

  }

  DLOG(INFO)<<"Use feature quantization method:"<<_featureQuantizeMethod;

  DLOG(INFO)<<"Use weight quantization method:"<<_weightQuantizeMethod;

  }

  std::shared_ptr<ImageProcess>process(ImageProcess::create(config));//生成ImageProcess对象

  _process=process;

  //read images file names

  Helper::readImages(_imgaes,imagePath.c_str(),&_imageNum);

  _initMNNSession(modelBuffer,bufferSize,channles);

  _initMaps();

  }

相关文章
|
11月前
|
机器学习/深度学习 数据采集 监控
量化交易机器人开发风控模型对比分析与落地要点
本文系统对比规则止损、统计模型、机器学习及组合式风控方案,从成本、鲁棒性、可解释性等维度评估其在合约量化场景的适用性,结合落地实操建议,为不同阶段的交易系统提供选型参考。
|
机器人 API 数据安全/隐私保护
QQ机器人插件源码,自动回复聊天机器人,python源码分享
消息接收处理:通过Flask搭建HTTP服务接收go-cqhttp推送的QQ消息47 智能回复逻辑
|
自然语言处理 算法 机器人
智能电话销售机器人源码搭建部署系统电话机器人源码
智能电话销售机器人源码搭建部署系统电话机器人源码
338 4
|
机器学习/深度学习 人工智能 运维
电话机器人源码-智能ai系统-freeswitch-smartivr呼叫中心-crm
电话机器人源码-智能ai系统-freeswitch-smartivr呼叫中心-crm
754 0
|
人工智能 自然语言处理 机器人
9.9K star!大模型原生即时通信机器人平台,这个开源项目让AI对话更智能!
"😎高稳定、🧩支持插件、🦄多模态 - 大模型原生即时通信机器人平台"
567 0
|
12月前
|
数据采集 自动驾驶 机器人
数据喂得好,机器人才能学得快:大数据对智能机器人训练的真正影响
数据喂得好,机器人才能学得快:大数据对智能机器人训练的真正影响
1113 1
|
弹性计算 自然语言处理 Ubuntu
从0开始在阿里云上搭建基于通义千问的钉钉智能问答机器人
本文描述在阿里云上从0开始构建一个LLM智能问答钉钉机器人。LLM直接调用了阿里云百炼平台提供的调用服务。
1158 4
从0开始在阿里云上搭建基于通义千问的钉钉智能问答机器人
|
机器人
陌陌自动回复消息脚本,陌陌自动打招呼回复机器人插件,自动聊天智能版
这是一款为陌陌用户设计的自动回复软件,旨在解决用户无法及时回复消息的问题,提高成交率和有效粉丝数。软件通过自动化操作实现消息检测与回复功能
|
机器学习/深度学习 人工智能 自然语言处理
TsingtaoAI具身智能机器人开发套件及实训方案
该产品套件创新性地融合了先进大模型技术、深度相机与多轴协作机械臂技术,构建了一个功能强大、灵活易用的人机协作解决方案。其核心在于将智能决策、精准感知与高效执行完美结合,为高校实训领域的发展注入新动力。
1365 10
|
人工智能 自然语言处理 算法
具身智能高校实训解决方案 ----从AI大模型+机器人到通用具身智能
在具身智能的发展历程中,AI 大模型的出现成为了关键的推动力量。高校作为培养未来科技人才的摇篮,需要紧跟这一前沿趋势,开展具身智能实训课程。通过将 AI 大模型与具备 3D 视觉的机器人相结合,为学生搭建一个实践平台。
2228 64

热门文章

最新文章