量化合約跟單系統(tǒng)開發(fā)(開發(fā)策略)丨合約量化跟單系統(tǒng)開發(fā)(對接API火幣/幣安/OK)
量化的關(guān)鍵在于策略家預(yù)先建立的策略信號。比如有人用macd金叉作為進(jìn)場信號,其實(shí)就是簡單的量化;macd處理了一些基本的K線數(shù)據(jù),然后畫出來,就是量化,After processing the data with the golden cross structure on the chart,you choose to enter the market,which is quantitative trading.量化交易不是高頻交易,每個指標(biāo)其實(shí)都是一種量化,每個量化交易者都在創(chuàng)造一個新的指標(biāo);通過你理解的算法組合數(shù)據(jù),用電腦計(jì)算,形成自己的交易系統(tǒng),這就是真正的量化交易
量化交易兩層含義:
一是從狹義上來講,是指量化交易的內(nèi)容,將交易條件轉(zhuǎn)變成為程序,自動下單;
二是從廣義上來講,是指系統(tǒng)交易方法,就是一個整合的交易系統(tǒng)。Based on a series of trading conditions,an intelligent decision-making system is developed to combine rich professional experience with trading conditions and manage risk control during the trading process.
int PFLD::Impl::LoadModel(const char*root_path){
std::string model_file=std::string(root_path)+"/pfld-lite.mnn";
landmarker_=std::shared_ptr<MNN::Interpreter>(MNN::Interpreter::createFromFile(model_file.c_str()));
MNN::ScheduleConfig config;
config.numThread=1;
config.type=static_cast<MNNForwardType>(device_);
MNN::BackendConfig backendConfig;
backendConfig.precision=(MNN::BackendConfig::PrecisionMode)precision_;
backendConfig.power=(MNN::BackendConfig::PowerMode)power_;
backendConfig.memory=(MNN::BackendConfig::MemoryMode)memory_;
config.backendConfig=&backendConfig;
session_=landmarker_->createSession(config);
//nhwc to nchw
std::vector<int>dims{1,inputSize_,inputSize_,3};
input_tensor_=MNN::Tensor::create<float>(dims,NULL,MNN::Tensor::TENSORFLOW);
initialized_=true;
return 0;
}