Hikyuu
Performance.h
浏览该文件的文档.
1 /*
2  * Performance.h
3  *
4  * Created on: 2013-4-23
5  * Author: fasiondog
6  */
7 
8 #ifndef PERFORMANCE_H_
9 #define PERFORMANCE_H_
10 
11 #include <boost/function.hpp>
12 #include "TradeManager.h"
13 
14 namespace hku {
15 
21 public:
22  Performance();
23  virtual ~Performance();
24 
26  void reset();
27 
29  double get(const string& name) const;
30 
32  double operator[](const string& name) const { return get(name); }
33 
40  string report(const TradeManagerPtr& tm,
41  const Datetime& datetime = Datetime::now());
42 
49  void statistics(const TradeManagerPtr& tm,
50  const Datetime& datetime = Datetime::now());
51 
52 
53  typedef map<string, double> map_type;
54 
55 private:
56  list<string> m_name_list; //保存指标顺序
57  map_type m_result;
58 };
59 
60 } /* namespace hku */
61 #endif /* PERFORMANCE_H_ */
double operator[](const string &name) const
同 get
Definition: Performance.h:32
简单绩效统计
Definition: Performance.h:20
日期类型
Definition: Datetime.h:33
shared_ptr< TradeManager > TradeManagerPtr
客户程序应使用此类型进行实际操作
Definition: TradeManager.h:635
#define HKU_API
Definition: DataType.h:12
static Datetime now()
返回本地计算机当前时刻
Definition: Datetime.cpp:93
Hikyuu核心命名空间,包含股票数据的管理、指标实现、交易系统框架等
Definition: Block.cpp:11
map< string, double > map_type
Definition: Performance.h:53