forked from lamres/capm_shiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
84 lines (84 loc) · 2.79 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
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
shinyUI(fluidPage(
tags$style(type = 'text/css', 'html, body {width:100%;height:100%}'),
tags$title("Stock Market analysis by CAPM"),
fluidRow(
column(4,
tags$h4("Parameters"),
wellPanel(
fluidRow(
column(4,
textInput("indexTicker", "Index", value = "SPFB.RTS", width = "100%")
),
column(8,
selectInput("tickersList", "Tickers list", c("rtsi_tickers.csv"), width = "100%")
)
),
fluidRow(
column(4,
dateInput(inputId = "dateFrom", label = "From", value = seq(Sys.Date(), length=2, by = "-364 days")[2],
format = "yyyy-mm-dd", width = "100%")
),
column(4,
dateInput(inputId = "dateTo", label = "To", value = Sys.Date(),
format = "yyyy-mm-dd", width = "100%")
),
column(4,
numericInput(inputId = "rfrInput", label = "Risk-free rate, %", value = 6.5,
min = 0.0, max = 100.0, step = 0.25, width = "100%")
)
),
tags$b("Pick a last period quickly"),
fluidRow(
column(3,
actionButton(inputId = "last1Button", label = "1 month", width = "100%")
),
column(3,
actionButton(inputId = "last3Button", label = "3 months", width = "100%")
),
column(3,
actionButton(inputId = "last6Button", label = "6 months", width = "100%")
),
column(3,
actionButton(inputId = "lastYearButton", label = "Year", width = "100%")
)
)
),
tags$h4("Advanced plots"),
wellPanel(
fluidRow(
column(12,
plotly::plotlyOutput(outputId = "smlPlot", width = "100%")
)
),
tags$br(),
fluidRow(
column(12,
plotly::plotlyOutput(outputId = "alphaHist", width = "100%")
)
),
tags$br(),
fluidRow(
column(12,
plotly::plotlyOutput(outputId = "assetsPlot", width = "100%")
)
),
tags$br(),
fluidRow(
column(12,
plotly::plotlyOutput(outputId = "scatterPlot", width = "100%")
)
)
)
),
column(8,
tags$h4("Analyzed stocks"),
fluidRow(
column(12,
wellPanel(
DT::dataTableOutput(outputId = "stocksTable", width = "100%")
)
)
)
)
)
))