-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
138 lines (108 loc) · 4.61 KB
/
index.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Analysis</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="Portfolio Analyser">
<meta name="keywords" content="stocks, equities, portfolio, analysis, manager, analyser, engineering">
<meta name="author" content="Abhishek Shenoy">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css"/> -->
<link rel="stylesheet" type="text/css" href="./assets/css/tagsinput.css" />
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput-typeahead.css" />
</head>
<body>
<style>
#menu {
padding: 10px;
}
.plot {
position: absolute;
}
#pareto-plot {
top: 80px;
}
#parallel-plot {
top: 80px;
right: 20px;
}
#timeseries-plot {
margin: 720px 0 0 0;
}
</style>
<!-- <div id="asset-prices"></div> -->
<div id="main">
<nav id="menu">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" style="font-size: 14px;">Tickers</span>
<select multiple id="tickers" data-role="tagsinput" style="width:240px;" data-toggle="tooltip"
title="Load price data once and use plots for analysing!"> </select>
</div>
<button id="go" class="btn btn-primary">
Load Data
<span id="go-loading" class="spinner-border spinner-border-sm" role="status"
aria-hidden="true"></span>
</button>
  
<div class="input-group-prepend">
<span class="input-group-text" style="font-size: 12px;">Amount</span>
<input id="total" class="form-control" type="number" value="0" style="width:100px;"
data-toggle="tooltip"
title="Leave as 0 to plot percentages or enter amount to plot number of shares based on current price."></input>
</div>
  
<div class="input-group-prepend">
<span class="input-group-text" style="font-size: 12px;">Free Interest</span>
<input id="free-rate" class="form-control" type="number" value="0" step=".01"
style="width:80px;"></input>
<span class="input-group-text">%</span>
</div>
  
<div class="input-group-prepend">
<div class="input-group-text" style="font-size: 14px;"><input type="checkbox" id="prune"
aria-label="Prune" checked> Prune</div>
</div>
  
<div class="input-group-prepend">
<div class="input-group-text" style="font-size: 14px;"><input type="checkbox" id="longshort"
aria-label="Long Short" checked> Long Short</div>
</div>
   
<button id="simulate" class="btn btn-primary">
<span id="sim-available">Simulate</span>
<span id="sim-loading" class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span>
</button>
</div>
</nav>
<div id="pareto-plot" class="plot"></div>
<div id="parallel-plot" class="plot"></div>
<div id="timeseries-plot" class="plot"></div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<!--<script>
var data_file = "./main_data_old.json";
$.get( data_file, function( data ){
assets = data["columns"];
timestamps = data["index"];
// Convert row arrays to column arrays
for (var i=0; i < data["columns"].length; i++){
main_data.push(arrayColumn(data["data"], i));
}
});
</script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/6.6.0/math.min.js"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script async defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script async defer
src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js"></script> -->
<script src="./assets/js/tagsinput.js"></script>
<script src="./assets/js/app.js"></script>
</body>
</html>