#pragma once
#include <spdlog/spdlog.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <iostream>
#include <string>
#include <memory>
#include <map>
using namespace std;
class ConfigMakerCore
{
public:
ConfigMakerCore() = delete;
ConfigMakerCore(string marketDepthDataConfigPath);
virtual ~ConfigMakerCore();
public:
void Parser();
void DumpMainContractsJson();
private:
bool Check();
bool InitSourceTradingTimeMap();
bool IsInDaySession(const std::string& time, const std::vector<std::string>& timeRange);
bool IsInNightSession(const std::string& time, const std::vector<std::string>& timeRange);
bool IsTradingTime(const string& exchangeInstru, const std::string& time);
string GetExchangeInstru(const string& exchangeInstrument);
string GetMainContractsDailyPath();
private:
shared_ptr<string> m_marketDepthDataConfigPath;
shared_ptr<string> m_marketDepthDataCSVPath;
shared_ptr<string> m_sourceTradingTimeConfigPath;
shared_ptr<spdlog::logger> m_coreLogger;
shared_ptr<string> m_csvName;
map<string, map<string, vector<vector<string>>>> m_sourceTradingTimeMap;
map<string, map<string, string>> m_mainContractsMap;
};
量化交易之One Piece篇 - 生成主力合约文件(.h文件)
原创
©著作权归作者所有:来自51CTO博客作者ErwinSmith的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
量化交易开发之基本语法(三)
本教程则是以量化的情景从零讲解python编程,所以将更适合想学做量化策略的人。
数据 变量名 python -
量化交易开发之函数API(四)
我们讲解一下python中的函数知识
API 数据 python -
量化交易开发之初识量化(一)
本系列课程将开启手把手保姆级实战课程,开发属于你自己的量化策略!!!
量化交易 策略因子 实战教学 -
量化交易之One Piece篇 - 生成主力合约文件(.cc文件)
【代码】量化交易之One Piece篇 - 生成主力合约文件(.cc文件)
onepiece json #include Parse -
量化交易之One Piece篇 - MarketCTP.h
【代码】量化交易之One Piece篇 - MarketCTP.h。
c++ linux one piece #include ios -
量化交易之One Piece篇 - OnePieceEnum.h
【代码】量化交易之One Piece篇 - OnePieceEnum.h。
one piece #pragma -
量化交易之One Piece篇 - 模板 - IPluginContext.h
【代码】量化交易之One Piece篇 - 模板 - IPluginContext.h。
c++ one piece #include ios #pragma -
量化交易之One Piece篇 - 模板 - IMarketApi.h
【代码】量化交易之One Piece篇 - 模板 - IMarketApi.h。
c++ one piece #pragma #include -
量化交易之One Piece篇 - 模板 - ITraderApi.h
【代码】量化交易之One Piece篇 - 模板 - ITraderApi.h。
one piece c++ #include #pragma Data -
量化交易之One Piece篇 - 模板 - ICoreListener.h
【代码】量化交易之One Piece篇 - 模板 - ICoreListener.h。
one piece c++ #include #pragma -
量化交易之One Piece篇 - ContractData.h & ContractData.cc - 合约模型
【代码】量化交易之One Piece篇 - ContractData.h & ContractData.cc - 合约模型。
算法 one piece 模型 Data #include -
量化交易之One Piece篇 - one_piece_server.py(stable版)
【代码】量化交易之One Piece篇 - one_piece_server.py(stable版)
python 开发语言 GAP json 启动脚本 -
量化交易之One Piece篇 - spdlog - 示例demo
【代码】量化交易之One Piece篇 - spdlog - 示例demo。
c++ 算法 开发语言 #include -
量化交易之One Piece篇 - OrderData.h - 订单模型
【代码】量化交易之One Piece篇 - OrderData.h - 订单模型。
算法 模型 #include ios #pragma