-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (153 loc) · 5.74 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<html>
<head>
<title>Options Calculator</title>
<link rel="stylesheet" type="text/css" href="./static/css/style.css">
<link rel="stylesheet" type="text/css" href="./static/css/jquery.datetimepicker.css">
</head>
<body>
<section>
<h2>Premium Greeks</h2>
<div id="premiums">
<form id="premium-calc">
<div class="row">
<div class="col-3">
<label for="input-spot" class="form-label">Spot</label>
<input type="number" id="input-spot" placeholder="(Ex. 100.0)" value="860" step="0.01">
</div>
<div class="col-3">
<label for="input-strike" class="form-label">Strike</label>
<input type="number" id="input-strike" placeholder="(Ex. 100.0)" value="840" step="0.01">
</div>
<div class="col-3">
<label for="datetimepicker" class="form-label">Expiry</label>
<input type="text" id="datetimepicker" class="datetimepicker" placeholder="(Ex. 2015-12-30 15:30:00)">
</div>
</div>
<div class="row">
<div class="col-3">
<label for="input-volt" class="form-label">Volatility (%)</label>
<input type="number" step="0.01" id="input-volt" placeholder="(Ex. 25)" value="40">
</div>
<div class="col-3">
<label for="input-intrate" class="form-label">Interest (%)</label>
<input type="number" step="0.01" id="input-intrate" placeholder="(Ex. 3)" value="3">
</div>
<!--
<div class="col-3">
<label for="input-divyld" class="form-label">Dividend</label>
<input type="number" id="input-divyld" placeholder="(Ex. 0.0)" value="0.0">
</div>
-->
</div>
<div class="row">
<div class="col-1">
<button type="submit" class="btn btn-default" id="calc-button">Calculate</button>
</div>
</div>
</form>
</div>
<br><br>
<div id="premium-results" style="display:none;">
<table>
<thead>
<tr>
<th>Call Option Premium</th>
<th>Put Option Premium</th>
<th>Call Option Delta</th>
<th>Put Option Delta</th>
<th>Option Gamma</th>
</tr>
</thead>
<tbody>
<tr>
<td class="results-value positive" id="call-option-prem-value"></td>
<td class="results-value positive" id="put-option-prem-value"></td>
<td class="results-value positive" id="call-option-delta-value"></td>
<td class="results-value negative" id="put-option-delta-value"></td>
<td class="results-value positive" id="option-gamma-value"></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Call Option Theta</th>
<th>Put Option Theta</th>
<th>Call Option Rho</th>
<th>Put Option Rho</th>
<th>Option Vega</th>
</tr>
</thead>
<tbody>
<tr>
<td class="results-value negative" id="call-option-theta-value"></td>
<td class="results-value positive" id="put-option-theta-value"></td>
<td class="results-value positive" id="class-option-rho-value"></td>
<td class="results-value negative" id="put-option-rho-value"></td>
<td class="results-value positive" id="option-vega-value"></td>
</tr>
</tbody>
</table>
</div>
</section>
<section>
<h2>Implied Volatility Estimation</h2>
<div id="volatility">
<form id="iv-calc">
<div class="row">
<div class="col-3">
<label for="input-prem" class="form-label">Premium</label>
<input type="number" step="0.01" id="input-prem" placeholder="(Ex. 20)" value="20">
</div>
<div class="col-3">
<label for="type-call">Call</label> <input type="radio" id="type-call" name="input-type" value="1" checked>
<label for="type-put">Put</label> <input type="radio" id="type-put" name="input-type" value="0">
</div>
<div class="col-3">
<label for="input-intrate" class="form-label">Interest (%)</label>
<input type="number" step="0.01" id="input-intrate" placeholder="(Ex. 3)" value="3">
</div>
</div>
<div class="row">
<div class="col-3">
<label for="input-spot" class="form-label">Spot</label>
<input type="number" id="input-spot" placeholder="(Ex. 100.0)" value="860" step="0.01">
</div>
<div class="col-3">
<label for="input-strike" class="form-label">Strike</label>
<input type="number" id="input-strike" placeholder="(Ex. 100.0)" value="840" step="0.01">
</div>
<div class="col-3">
<label for="datetimepicker" class="form-label">Expiry</label>
<input type="text" id="datetimepicker" class="datetimepicker" placeholder="(Ex. 2015-12-30 15:30:00)">
</div>
</div>
<div class="row">
<div class="col-1">
<button type="submit" class="btn btn-default" id="calc-button-iv">Calculate</button>
</div>
</div>
</form>
</div>
<br><br>
<div id="iv-results" style="display:none;">
<table>
<thead>
<tr>
<th>Implied Volatility</th>
</tr>
</thead>
<tbody>
<tr>
<td class="results-value positive" id="option-volatility-value"></td>
</tr>
</tbody>
</table>
</div>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="./static/js/jquery.datetimepicker.js?V5.1" type="text/javascript"></script>
<script src="./static/js/app.js" type="text/javascript"></script>
<script src="./static/js/gaussian.js" type="text/javascript"></script>
</body>
</html>