量化合約及合約量化機器人系統開發(開發策略)丨量化合約原始碼部署

xiaofufu發表於2023-02-28

  什麼是智慧量化交易機器人?從本質上說,交易機器人是一種軟體程式,它直接與交易所進行互動(通常使用API獲取和解釋相關資訊),並根據市場資料的解釋發出買賣訂單。這些機器人透過監測市場價格走勢,並根據一套預先設定和程式設計的規則做出反應,從而做出這些決定。通常,一個交易機器人會分析市場行為,例如交易量、訂單、價格和時間,它們通常可以根據您自己的喜好進行編輯。


  What is a quantitative robot?


  Quantitative robots use excellent and effective mathematical analysis models to carry out the formulation of investment proposals,buy and sell operations,and closely combine with AI technology and Internet big data to calculate probability events and improve profitability


  void Calibration::_initMNNSession(const uint8_t*modelBuffer,const int bufferSize,const int channels){


  _interpreter.reset(MNN::Interpreter::createFromBuffer(modelBuffer,bufferSize));


  MNN::ScheduleConfig config;


  _session=_interpreter->createSession(config);


  _inputTensor=_interpreter->getSessionInput(_session,NULL);


  _inputTensorDims.resize(4);


  auto inputTensorDataFormat=MNN::TensorUtils::getDescribe(_inputTensor)->dimensionFormat;


  DCHECK(4==_inputTensor->dimensions())<<"Only support 4 dimensions input";


  if(inputTensorDataFormat==MNN::MNN_DATA_FORMAT_NHWC){


  _inputTensorDims[0]=1;


  _inputTensorDims[1]=_height;


  _inputTensorDims[2]=_width;


  _inputTensorDims[3]=channels;


  }else if(inputTensorDataFormat==MNN::MNN_DATA_FORMAT_NC4HW4){


  _inputTensorDims[0]=1;詳細說明及案例:MrsFu123


  _inputTensorDims[1]=channels;


  _inputTensorDims[2]=_height;


  _inputTensorDims[3]=_width;


  }else{


  DLOG(ERROR)<<"Input Data Format ERROR!";


  }


  if(_featureQuantizeMethod=="KL"){


  _interpreter->resizeTensor(_inputTensor,_inputTensorDims);


  _interpreter->resizeSession(_session);


  }else if(_featureQuantizeMethod=="ADMM"){


  DCHECK((_imageNum*4*_height*_width)<(INT_MAX/4))<<"Use Little Number of Images When Use ADMM";


  _inputTensorDims[0]=_imageNum;


  _interpreter->resizeTensor(_inputTensor,_inputTensorDims);


  _interpreter->resizeSession(_session);


  }


  _interpreter->releaseModel();


  }


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69956839/viewspace-2937453/,如需轉載,請註明出處,否則將追究法律責任。

相關文章