Hikyuu  0.1
| 类型定义 | 函数
StockManage 证券管理

证券管理类、证券类等 更多...

StockManage 证券管理 的协作图:

class  hku::Block
 板块类,可视为证券的容器 更多...
 
class  hku::KData
 K线数据 更多...
 
class  hku::KQuery
 按索引方式查询K线数据条件 更多...
 
class  hku::Null< KQuery >
 提供KQuery的Null值 更多...
 
class  hku::KRecord
 K线数据记录 更多...
 
class  hku::MarketInfo
 市场信息记录 更多...
 
struct  hku::Stock
 Stock基类,Application中一般使用StockPtr进行操作 更多...
 
class  hku::StockManager
 证券信息统一管理类 更多...
 
class  hku::StockTypeInfo
 证券类型信息 更多...
 
class  hku::StockWeight
 权息数据结构 更多...
 

类型定义

typedef vector< Block > hku::BlockList
 
typedef vector< KRecord > hku::KRecordList
 
typedef vector< Stock > hku::StockList
 
typedef vector< StockWeight > hku::StockWeightList
 

函数

void hku::hikyuu_init (const string &config_file_name)
 Hikyuu核心初始化,客户端必须在程序入口处调用 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &os, const KData &kdata)
 输出KData信息 更多...
 
KQuery hku::KQueryByIndex (hku_int64 start=0, hku_int64 end=Null< hku_int64 >(), KQuery::KType dataType=KQuery::DAY, KQuery::RecoverType recoverType=KQuery::NO_RECOVER)
 构造按索引方式K线查询,范围[start, end) 更多...
 
KQuery hku::KQueryByDate (const Datetime &start=Datetime::min(), const Datetime &end=Null< Datetime >(), KQuery::KType dataType=KQuery::DAY, KQuery::RecoverType recoverType=KQuery::NO_RECOVER)
 构造按日期方式K线查询,范围[startDatetime, endDatetime) 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &os, const KQuery &query)
 输出KQuery信息,如:KQuery(start, end, queryType, kType, recoverType) 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &, const KRecord &)
 输出KRecord信息,如:KRecord(datetime, open, high, low, close, transAmount, count) 更多...
 
bool HKU_API hku::operator== (const KRecord &d1, const KRecord &d2)
 比较两个KRecord是否相等,一般仅测试时使用 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &, const MarketInfo &)
 输出市场信息,如: MarketInfo(SH, 上海证劵交易所, 上海市场, 000001, 2011-Dec-06 00:00:00) 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &os, const Stock &stock)
 输出Stock信息,如:Stock(market, code, name, type, valid, startDatetime, lastDatetime) 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &, const StockTypeInfo &)
 输出证券类型信息,如:StockTypeInfo(type, description, tick, precision, minTradeNumber, maxTradeNumber) 更多...
 
HKU_API std::ostream & hku::operator<< (std::ostream &, const StockWeight &)
 输出权息信息,如:Weight(datetime, countAsGift, countForSell, priceForSell, bonus, increasement, totalCount, freeCount) 更多...
 

详细描述

证券管理类、证券类等

证券管理类、证券类等

类型定义说明

typedef vector<Block> hku::BlockList
typedef vector<KRecord> hku::KRecordList
typedef vector<Stock> hku::StockList
typedef vector<StockWeight> hku::StockWeightList

函数说明

void HKU_API hku::hikyuu_init ( const string config_file_name)

Hikyuu核心初始化,客户端必须在程序入口处调用

参数
config_file_name配置信息文件名
KQuery hku::KQueryByDate ( const Datetime start = Datetime::min(),
const Datetime end = Null<Datetime>(),
KQuery::KType  dataType = KQuery::DAY,
KQuery::RecoverType  recoverType = KQuery::NO_RECOVER 
)
inline

构造按日期方式K线查询,范围[startDatetime, endDatetime)

参数
start起始日期
end结束日期(不包含本身)
dataTypeK线类型
recoverType复权类型
参见
KQuery
KQuery hku::KQueryByIndex ( hku_int64  start = 0,
hku_int64  end = Null<hku_int64>(),
KQuery::KType  dataType = KQuery::DAY,
KQuery::RecoverType  recoverType = KQuery::NO_RECOVER 
)
inline

构造按索引方式K线查询,范围[start, end)

参数
start起始索引,支持负数
end结束索引(不包含本身),支持负数
dataTypeK线类型
recoverType复权类型
参见
KQuery
HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const StockWeight record 
)

输出权息信息,如:Weight(datetime, countAsGift, countForSell, priceForSell, bonus, increasement, totalCount, freeCount)

HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const MarketInfo market 
)

输出市场信息,如: MarketInfo(SH, 上海证劵交易所, 上海市场, 000001, 2011-Dec-06 00:00:00)

HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const StockTypeInfo stockTypeInfo 
)

输出证券类型信息,如:StockTypeInfo(type, description, tick, precision, minTradeNumber, maxTradeNumber)

HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const KRecord record 
)

输出KRecord信息,如:KRecord(datetime, open, high, low, close, transAmount, count)

HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const KData kdata 
)

输出KData信息

KData{
  size : 738501
  stock: Stock(SH, 000001, 上证指数, 指数, 1, 1990-Dec-19 00:00:00, +infinity),
  query: KQuery(0, 99999999999, INDEX, MIN, NO_RECOVER)
 }
HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const Stock stock 
)

输出Stock信息,如:Stock(market, code, name, type, valid, startDatetime, lastDatetime)

HKU_API std::ostream & hku::operator<< ( std::ostream &  os,
const KQuery query 
)

输出KQuery信息,如:KQuery(start, end, queryType, kType, recoverType)

bool HKU_API hku::operator== ( const KRecord d1,
const KRecord d2 
)

比较两个KRecord是否相等,一般仅测试时使用