-
Notifications
You must be signed in to change notification settings - Fork 0
/
monte_carlo.h
28 lines (21 loc) · 895 Bytes
/
monte_carlo.h
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
#ifndef _SIMULATION_H_
#define _SIMULATION_H_
#include "constants.h"
#include "data_series.h"
#include "includes.h"
#include "portfolio.h"
class monte_carlo {
public:
monte_carlo (std::vector < data_series > &historical_data, bool use_gpu);
~monte_carlo ();
void run_with_data (portfolio & p, std::vector < float >&expectancy_list, float &expectancy, float &standard_deviation, float &downside_deviation, float &downsize_75_deviation, int num_rounds, int days_back = TRADING_DAYS_PER_YEAR * 4);
void run (portfolio & p, float &expectancy, float &standard_deviation, float &downside_deviation, float &downsize_75_deviation, int num_rounds, int days_back = TRADING_DAYS_PER_YEAR * 4);
private:
std::vector < data_series > &historical_data_;
bool use_gpu_;
float *gpu_historical_data_;
float *gpu_portfolio_;
// no copy
monte_carlo (const monte_carlo &);
};
#endif