-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
56 lines (26 loc) · 1.04 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
library(plotly)
library(shiny)
fluidPage(
titlePanel("Black-Scholes formula for European call price"),
fluidRow(
column(12,
column(3,numericInput("S0", "Stock price at t=0:",100),
numericInput("K", "Strike price:",100),
sliderInput("r","Risk free interest rate:",min = 0, max = 1, value = 0.1,step = 0.1),
numericInput("sigma", "Volatility:",0.3,step = 0.1),
sliderInput("t","Time t (t=c-τ):",min = 0, max = 1,value=0.05,animate=TRUE,step=0.1)
),
column(width = 9,
plotlyOutput("Plot_BS_Call")
)
),
column(width = 12,
fluidRow(
column(6,
plotlyOutput("Plot_St")),
column(6,
plotlyOutput("Plot_Ct"))
)
)
)
)