-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
94 lines (92 loc) · 4.37 KB
/
test.py
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
from datetime import datetime as dt
import pandas as pd
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go
app.layout = html.Div(children=[
html.Div(
children=[
html.H2(children="Bitcoin Leveraged Trading Backtest Analysis", className='h2-title'),
],
className='study-browser-banner row'
),
html.Div(
className="row app-body",
children=[
html.Div(
className="twelve columns card",
children=[
html.Div(
className="padding row",
children=[
html.Div(
className="two columns card",
children=[
html.H6("Select Exchange",),
dcc.RadioItems(
id="exchange-select",
options=[
{'label': label, 'value': label} for label in df['Exchange'].unique()
],
value='Bitmex',
labelStyle={'display': 'inline-block'}
)
]
),
# Leverage Selector
html.Div(
className="two columns card",
children=[
html.H6("Select Leverage"),
dcc.RadioItems(
id="leverage-select",
options=[
{'label': str(label), 'value': str(label)} for label in df['Margin'].unique()
],
value='1',
labelStyle={'display': 'inline-block'}
),
]
),
html.Div(
className="three columns card",
children=[
html.H6("Select a Date Range"),
dcc.DatePickerRange(
id="date-range",
display_format="MMM YY",
start_date=df['Entry time'].min(),
end_date=df['Entry time'].max()
),
]
),
html.Div(
id="strat-returns-div",
className="two columns indicator pretty_container",
children=[
html.P(id="strat-returns", className="indicator_value"),
html.P('Strategy Returns', className="twelve columns indicator_text"),
]
),
html.Div(
id="market-returns-div",
className="two columns indicator pretty_container",
children=[
html.P(id="market-returns", className="indicator_value"),
html.P('Market Returns', className="twelve columns indicator_text"),
]
),
html.Div(
id="strat-vs-market-div",
className="two columns indicator pretty_container",
children=[
html.P(id="strat-vs-market", className="indicator_value"),
html.P('Strategy vs. Market Returns', className="twelve columns indicator_text"),
]
),
]
)
])
])
])