-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathui.R
55 lines (55 loc) · 1.52 KB
/
ui.R
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
library(shiny)
shinyUI(fluidPage (
theme = shinytheme("darkly"),
headerPanel("Portfolio Optimization"),
sidebarPanel(
width = 3,
selectInput(
"stockX",
label = "Select Instruments",
choices =
tt,
selected = c(tt[which(tt == "ACI")], tt[which(tt == "BRACBANK")], tt[which(tt ==
"SQURPHARMA")], tt[which(tt == "GP")], tt[which(tt == "DBH")]),
multiple = T
),
textInput(
"startdate",
label = "Start Date (yyyy-mm-dd)",
value =
(Sys.Date() - 180)
),
textInput("enddate", label = "End Date (yyyy-mm-dd)", value =
Sys.Date()),
numericInput(
'minpct',
label = "Min % to be Allocated to an Inst.",
value =
5,
min = 0,
max = 100
),
numericInput(
'maxpct',
label = "Max % to be Allocated to an Inst.",
value =
80,
min = 0,
max = 100
),
selectInput(
"optimize",
label = "Select Optimization Method",
choices = c("Maximize Retrun", "Minimize Shortfall"),
selected = "Minimize Shortfall"
),
submitButton(text = "Optimize")
),
mainPanel (h1(""),
tabsetPanel(
tabPanel("Optimum Weight", plotlyOutput("p")),
tabPanel("VaR & CVaR", plotlyOutput("Y")),
tabPanel("Expected Return", plotlyOutput("Z"))
#tabPanel("Summary Output", verbatimTextOutput("X"))
))
))