量化合约开发(详情及规则),量化合约系统开发(项目及方案)
First of all,we should clarify the basic concept of quantitative trading: Quantitative trading refers to an investment method that uses modern statistics and mathematical methods to trade through computer technology.Quantitative trading selects a variety of"high probability"events that can achieve excess returns from massive historical data to formulate strategies,uses quantitative models to verify and solidify these laws and strategies,and then strictly implements the solidified strategies to guide investment,in order to obtain sustained,stable and higher than average returns. int main(int argc,const char*argv[]){ if(argc<4){ DLOG(INFO)<<"Usage:./quantized.out src.mnn dst.mnn preTreatConfig.jsonn"; return 0; }需求及案例源码I35设计7O98开发O7I8 const char*modelFile=argv[1]; const char*preTreatConfig=argv[3]; const char*dstFile=argv[2]; DLOG(INFO)<<">>>modelFile:"<<modelFile; DLOG(INFO)<<">>>preTreatConfig:"<<preTreatConfig; DLOG(INFO)<<">>>dstFile:"<<dstFile std::unique_ptr<MNN::NetT>netT; {//读取原始的model文件,借助于flattbuffer生成Net对象 std::ifstream input(modelFile); std::ostringstream outputOs; outputOs<<input.rdbuf(); netT=MNN::UnPackNet(outputOs.str().c_str());//获取Net对象 }开发方案及项目:MrsFu123 //temp build net for inference flatbuffers::FlatBufferBuilder builder(1024); auto offset=MNN::Net::Pack(builder,netT.get());//打包模型准备放入buffer中 builder.Finish(offset); int size=builder.GetSize(); auto ocontent=builder.GetBufferPointer(); //创建两个buffer,两个都用来放模型数据 std::unique_ptr<uint8_t>modelForInference(new uint8_t[size]); memcpy(modelForInference.get(),ocontent,size); std::unique_ptr<uint8_t>modelOriginal(new uint8_t[size]); memcpy(modelOriginal.get(),ocontent,size); netT.reset(); netT=MNN::UnPackNet(modelOriginal.get()); //进行量化操作,主要这个靠的是Calibration类 DLOG(INFO)<<"Calibrate the feature and quantize model..."; std::shared_ptr