-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_settings.cpp
55 lines (46 loc) · 1.8 KB
/
user_settings.cpp
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
47
48
49
50
51
52
53
54
55
#include "universal_proj.h"
int main()
{
/************************************/
/*********** User Settings **********/
/************************************/
string tableDir = "./tables/"; // dir for input stock data csv
string resultDir = "./results/"; // dir for output
bool transactionCosts = false;
bool withShorts = true;
float commission = 0.005;
/************************************/
/************************************/
BCRPEngine* bcrpEngine = new BCRPEngine(tableDir,resultDir,0.01,withShorts,transactionCosts,commission);
puts("Start parsing csv data...");
/************************************/
/********* Set stocks Here ***********/
/************************************/
bcrpEngine->parseCsvData("NOK","NOK");
bcrpEngine->parseCsvData("IMMU","IMMU");
bcrpEngine->parseCsvData("BSX","BSX");
/*bcrpEngine->parseCsvData("NBIX","NBIX");
bcrpEngine->parseCsvData("BSX","BSX");
bcrpEngine->parseCsvData("HP","HPQ");
bcrpEngine->parseCsvData("STJ","STJ");*/
/*bcrpEngine->parseCsvData("TXN","TXN");
bcrpEngine->parseCsvData("MDT","MDT");
bcrpEngine->parseCsvData("AAPL","AAPL");
bcrpEngine->parseCsvData("MSI","MSI");*/
/************************************/
/************ Main flow *************/
/************************************/
puts("Finished parsing csv data.");
puts("Start finding delta and all valid portfolios...");
bcrpEngine->findDeltaAndPortfolios();
puts("Finished finding delta and all valid portfolios.");
puts("Start calculating best CRP");
bcrpEngine->calcBestCRP();
puts("Finished calculating best CRP");
puts ("Start calculating universal protfolio...");
bcrpEngine->calcUniversal();
bcrpEngine->calcAvgIndex();
puts ("****************************************");
delete bcrpEngine;
return 0;
}