-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathStats.h
More file actions
46 lines (36 loc) · 1 KB
/
Copy pathStats.h
File metadata and controls
46 lines (36 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef __STATS__H__
#define __STATS__H__
class Market;
class OrderBook;
#include "Types.h"
#include <vector>
#include <sstream>
#include <map>
typedef enum
{
ASK,
BID,
MID,
SPREAD,
LAST,
MARKET,
LIMIT,
ALL
} TimeSeriesType ;
class Stats
{
public :
Stats(OrderBook * myOrderBook);
virtual ~Stats();
std::vector<double> getPriceTimeSeries(TimeSeriesType dataType, double samplePeriod);
std::vector<double> getOrderSignsTimeSeries(TimeSeriesType dataType);
void printTimeSeries(TimeSeriesType dataType, double samplePeriod);
void printAutocorrelation(std::string tag, std::vector<double> data, int lagMax, int deltaLag);
void plotPDF(const std::string name, const std::vector<double> data, int nBins = -1) {};
void plotNormalizedPDF(const std::string name, const std::vector<double> data, int nBins = -1) {};
void printSummary() ;
private :
OrderBook * m_OrderBook ;
std::map<int,double> getAutocorrelation(std::vector<double> data, int lagMax, int deltaLag) ;
};
#endif /*STATS_H_*/