什么是量化交易?
量化交易(Quantitative Trading)是通过数学模型和计算机算法对市场进行分析和预测,And based on this,a trading strategy is developed for investment trading.与传统的基本面分析、技术分析等方法不同,Quantitative trading emphasizes the use of a large amount of data and scientific methods for research,reducing the impact of human factors and improving the efficiency and accuracy of trading.
量化交易的特征在于,它是一种基于数据和科学方法的交易方式,通常涉及大量数据分析、统计学、计算机科学等知识领域。Compared with traditional trading,quantitative trading uses more sophisticated and efficient trading strategies,which can more quickly obtain market information,analyze Market trend and laws,and make corresponding trading decisions
Generally speaking,although robots can usually be programmed according to users'tastes and preferences,trading robots still analyze market behavior,such as transaction volume,orders,prices,and time.
// wrapping input tensor, convert nhwc to nchw
std::vector dims{1, INPUT_SIZE, INPUT_SIZE, 3};
auto nhwc_Tensor = MNN::Tensor::create(dims, NULL, MNN::Tensor::TENSORFLOW);
auto nhwc_data = nhwc_Tensor->host();
auto nhwc_size = nhwc_Tensor->size();
::memcpy(nhwc_data, image.data, nhwc_size);
std::string input_tensor = "data";
auto inputTensor = net->getSessionInput(session, nullptr);
inputTensor->copyFromHostTensor(nhwc_Tensor);
// run network
net->runSession(session);
// get output data
std::string output_tensor_name0 = "conv5_fwd";
MNN::Tensor *tensor_lmks = net->getSessionOutput(session, output_tensor_name0.c_str());
MNN::Tensor tensor_lmks_host(tensor_lmks, tensor_lmks->getDimensionType());
tensor_lmks->copyToHostTensor(&tensor_lmks_host);