[Yuima-commits] r685 - in pkg/yuimaGUI: . inst/yuimaGUI inst/yuimaGUI/server inst/yuimaGUI/server/eda inst/yuimaGUI/server/load_data inst/yuimaGUI/server/modeling inst/yuimaGUI/server/simulation inst/yuimaGUI/ui/eda inst/yuimaGUI/ui/finance inst/yuimaGUI/ui/home inst/yuimaGUI/ui/modeling inst/yuimaGUI/ui/simulation inst/yuimaGUI/www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 25 09:39:36 CET 2018


Author: phoenix844
Date: 2018-11-25 09:39:34 +0100 (Sun, 25 Nov 2018)
New Revision: 685

Modified:
   pkg/yuimaGUI/DESCRIPTION
   pkg/yuimaGUI/inst/yuimaGUI/global.R
   pkg/yuimaGUI/inst/yuimaGUI/server.R
   pkg/yuimaGUI/inst/yuimaGUI/server/eda/llag_and_corr.R
   pkg/yuimaGUI/inst/yuimaGUI/server/functions.R
   pkg/yuimaGUI/inst/yuimaGUI/server/load_data/finance.R
   pkg/yuimaGUI/inst/yuimaGUI/server/modeling/univariate_results.R
   pkg/yuimaGUI/inst/yuimaGUI/server/settings.R
   pkg/yuimaGUI/inst/yuimaGUI/server/simulation/multivariate_results.R
   pkg/yuimaGUI/inst/yuimaGUI/server/simulation/univariate_results.R
   pkg/yuimaGUI/inst/yuimaGUI/ui.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/eda/cluster.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/eda/llag.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/finance/hedging.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/home/home.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/models.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/multi_models.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/multivariate.R
   pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/univariate.R
   pkg/yuimaGUI/inst/yuimaGUI/www/black.css
   pkg/yuimaGUI/inst/yuimaGUI/www/white.css
Log:
v1.3.0

Modified: pkg/yuimaGUI/DESCRIPTION
===================================================================
--- pkg/yuimaGUI/DESCRIPTION	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/DESCRIPTION	2018-11-25 08:39:34 UTC (rev 685)
@@ -1,9 +1,9 @@
 Package: yuimaGUI
 Type: Package
 Title: A Graphical User Interface for the 'yuima' Package
-Version: 1.2.2
+Version: 1.3.0
 Author: YUIMA Project Team
-Maintainer: Emanuele Guidotti <emanuele.guidotti at studenti.unimi.it>
+Maintainer: Emanuele Guidotti <emanuele.guidotti at hotmail.it>
 Description: Provides a graphical user interface for the 'yuima' package.
 License: GPL-2
 Depends: R(>= 3.0.0) 

Modified: pkg/yuimaGUI/inst/yuimaGUI/global.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/global.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/global.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -11,18 +11,21 @@
 suppressMessages(require(ghyp))
 
 
-# if(!exists("yuimaGUIdata"))
-#   yuimaGUIdata <- reactiveValues(series=list(), 
-#                                  model=list(), multimodel=list(), 
-#                                  usr_model = list(), usr_multimodel = list(), 
-#                                  simulation=list(), multisimulation=list(), 
-#                                  usr_simulation = list(), usr_multisimulation = list(), 
-#                                  cp=list(), 
-#                                  cpYuima=list(), 
-#                                  llag = list(), 
-#                                  cluster = list(), 
-#                                  hedging = list())
- 
+### comment this for web app version ###
+if(!exists("yuimaGUIdata"))
+  yuimaGUIdata <- reactiveValues(series=list(),
+                                 model=list(), multimodel=list(),
+                                 usr_model = list(), usr_multimodel = list(),
+                                 simulation=list(), multisimulation=list(),
+                                 usr_simulation = list(), usr_multisimulation = list(),
+                                 cp=list(),
+                                 cpYuima=list(),
+                                 llag = list(),
+                                 cluster = list(),
+                                 hedging = list())
+### comment this for web app version ###
+
+
 if(is.null(getOption("yuimaGUItheme"))) options(yuimaGUItheme = "black")
 
 #NIG distribution
@@ -34,6 +37,10 @@
   g <- NIG.ad(alpha = alpha, delta = delta, beta = beta, mu = mu)
   rghyp(n = n, object = g)
 }
+pNIG.gui <- function(q, alpha, delta, beta, mu){
+  g <- NIG.ad(alpha = alpha, delta = delta, beta = beta, mu = mu)
+  pghyp(q = q, object = g)
+}
 
 #hyp distribution
 dhyp.gui <- function(x, alpha, delta, beta, mu){
@@ -44,6 +51,10 @@
   g <- hyp.ad(alpha = alpha, delta = delta, beta = beta, mu = mu)
   rghyp(n = n, object = g)
 }
+phyp.gui <- function(q, alpha, delta, beta, mu){
+  g <- hyp.ad(alpha = alpha, delta = delta, beta = beta, mu = mu)
+  pghyp(q = q, object = g)
+}
 
 #VG distribution
 dVG.gui <- function(x, lambda, alpha, beta, mu){
@@ -54,6 +65,10 @@
   g <- VG.ad(lambda = lambda, alpha = alpha, beta = beta, mu = mu)
   rghyp(n = n, object = g)
 }
+pVG.gui <- function(q, lambda, alpha, beta, mu){
+  g <- VG.ad(lambda = lambda, alpha = alpha, beta = beta, mu = mu)
+  pghyp(q = q, object = g)
+}
 
 #ghyp distribution
 dghyp.gui <- function(x, lambda, alpha, delta, beta, mu){
@@ -64,3 +79,7 @@
   g <- ghyp.ad(lambda = lambda, alpha = alpha, delta = delta, beta = beta, mu = mu)
   rghyp(n = n, object = g)
 }
+pghyp.gui <- function(q, lambda, alpha, delta, beta, mu){
+  g <- ghyp.ad(lambda = lambda, alpha = alpha, delta = delta, beta = beta, mu = mu)
+  pghyp(q = q, object = g)
+}

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/eda/llag_and_corr.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/eda/llag_and_corr.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/eda/llag_and_corr.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -134,7 +134,7 @@
                   i <- i+1
                 } else break
               }
-              yuimaGUIdata$llag[[id]] <<- list(type = "llag", maxLag = input$llag_maxLag, delta = delta, llag = res$lagcce, p.values = res$p.values, start = start, end = end)
+              yuimaGUIdata$llag[[id]] <<- list(type = "llag", maxLag = input$llag_maxLag, delta = delta, llag = res$lagcce, cor = res$cormat, p.values = res$p.values, start = start, end = end)
             }
           }
           if(input$llag_type=="corr"){
@@ -212,19 +212,25 @@
     info <- isolate({yuimaGUIdata$llag[[input$llag_analysis_id]]})
     if(info$type=="llag"){
       co <- ifelse(info$p.values > input$llag_plot_confidence | is.na(info$p.values), 0, info$llag)
-      co<-melt(t(co))
-      digits <- 1+as.integer(abs(log10(info$delta)))
+      co <- melt(t(co))
+      co$label <- paste(
+          round(co$value, 1+as.integer(abs(log10(info$delta)))), 
+          '\n',
+          '(',
+          apply(co, MARGIN = 1, function(x) {round(info$cor[x[1], x[2]], 2)}), 
+          ')',
+          sep = '')
     }
     if(info$type=="corr"){
       co <- info$cormat
-      co<-melt(t(co))
-      digits <- 2
+      co <- melt(t(co))
+      co$label <- round(co$value, 2)
     }
     fillColor <- switch(getOption("yuimaGUItheme"), "black"="#282828", "white"="#f0f4f5")
     textColor <- switch(getOption("yuimaGUItheme"), "black"="#CDCECD", "white"="black")
     ggplot(co, aes(Var1, Var2)) + # x and y axes => Var1 and Var2
       geom_tile(aes(fill = value)) + # background colours are mapped according to the value column
-      geom_text(aes(label = round(co$value, digits))) + # write the values
+      geom_text(aes(label = co$label)) + # write the values
       scale_fill_gradient2(low = "#ffa500", 
                            mid = switch(getOption("yuimaGUItheme"), "black"="gray30", "white"="#C7E2DF"), 
                            high = "#74d600", 

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/functions.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/functions.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/functions.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -131,6 +131,17 @@
       return (list(lower=list("nu1"=nu1, "c11"=c11, "a11"=a11), upper=list("nu1"=nu1, "c11"=c11, "a11"=a11)))
     }
   }
+  if (name == "Hawkes Power Law Kernel"){
+    if (strict==TRUE) return (list(lower=list("nu"=0, "k"=NA, "beta"=NA, 'gamma'=NA), upper=list("nu"=NA,  "k"=NA, "beta"=NA, 'gamma'=NA)))
+    else { 
+      x <- as.numeric(diff(data))
+      t1 <- tail(time(data),n=1)
+      t0 <- time(data)[1]
+      n <- length(x[x!=0])
+      nu <- n/as.numeric(t1-t0)
+      return (list(lower=list("nu"=nu, "k"=0, "beta"=0, 'gamma'=-1), upper=list("nu"=nu, "k"=0, "beta"=0, 'gamma'=1)))
+    }
+  }
   if (name %in% defaultModels[names(defaultModels) == "COGARCH"]){
     mod <- setModelByName(name = name, jumps = jumps,  AR_C = AR_C, MA_C = MA_C)
     par <- getAllParams(mod, "COGARCH")
@@ -499,6 +510,11 @@
   if (name == "Frac. Geometric Brownian Motion" | name == "gBm") return(yuima::setModel(drift="mu*x", diffusion="sigma*x", solve.variable = "x", hurst = NA))
   if (name == "Frac. Ornstein-Uhlenbeck (OU)" | name == "OU") return(yuima::setModel(drift="-theta*x", diffusion="sigma", solve.variable = "x", hurst = NA))
   if (name == "Hawkes") return(yuima::setHawkes())
+  if (name == "Hawkes Power Law Kernel") {
+    df <- setLaw(rng = function(n){as.matrix(rep(1,n))}, dim = 1)
+    countMod <- setModel(drift = c("0"), diffusion = matrix("0",1,1), jump.coeff = matrix(c("1"),1,1), measure = list(df = df), measure.type = "code", solve.variable = c("N"), xinit=c("0"))
+    return(yuima::setPPR(yuima = countMod, counting.var="N", gFun="nu", Kernel = as.matrix("k/(beta+(t-s))^gamma"), lambda.var = "lambda", var.dx = "N", lower.var="0", upper.var = "t"))
+  }
   if (name == "Power Low Intensity") return(yuima::setPoisson(intensity="alpha*t^(beta)", df=setJumps(jumps = jumps), solve.variable = "x"))
   if (name == "Constant Intensity") return(yuima::setPoisson(intensity="lambda", df=setJumps(jumps = jumps), solve.variable = "x"))
   if (name == "Linear Intensity") return(yuima::setPoisson(intensity="alpha+beta*t", df=setJumps(jumps = jumps), solve.variable = "x"))
@@ -620,6 +636,7 @@
         
         }
         if (name == "Hawkes") mod <- paste(mod, ifelse(mod=="","","\\\\"), "kern(t-s) = c_{11}\\exp\\left[-a_{11}\\left(t-s\\right)\\right]")
+        if( name == "Hawkes Power Law Kernel") mod <- paste(mod, ifelse(mod=="","","\\\\"), "kern(t-s) = \\frac{k}{\\left[\\beta+(t-s)\\right]^{\\gamma}}")
       }
       return(paste("$$",mod,"$$"))
     }
@@ -1395,7 +1412,7 @@
       }
       else {
         dimension <- length(simulation at data@zoo.data)
-        if (modelYuimaGUI$info$class=="COGARCH") dimension <- dimension - 2
+        if (modelYuimaGUI$info$class %in% c("CARMA","COGARCH")) dimension <- dimension - 2
         if (saveTraj==TRUE){
           x <- do.call(merge,simulation at data@zoo.data)
           if(i==1) {

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/load_data/finance.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/load_data/finance.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/load_data/finance.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -10,7 +10,7 @@
     withProgress(message = 'Loading: ', value = 0, {
       for (i in symb){
         incProgress(1/length(symb), detail = i)
-        x <- try(getSymbols(i, src = input$sources ,auto.assign = FALSE, from = input$dR[1], to = input$dR[2]))
+        x <- try(window(getSymbols(i, src = input$sources ,auto.assign = FALSE), start = input$dR[1], end = input$dR[2]))
         if (class(x)[1]=="try-error")
           err <- cbind(err,i)
         else {

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/modeling/univariate_results.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/modeling/univariate_results.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/modeling/univariate_results.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -197,7 +197,55 @@
         #dx <- dx-sign(dx)*threshold
         for (i in names(y$qmle at coef)) assign(i, value = as.numeric(y$qmle at coef[i]))
         dx <- data.frame("V1" = dx)
-        if(y$info$jumps=="Gaussian"){
+        switch(y$info$jumps,
+          "Gaussian" = {
+            dfun <- dnorm
+            pfun <- "pnorm"
+            args <- list(mean = mu_jump, sd = sigma_jump)  
+          },
+          "Constant" = {
+            dfun <- dconst
+            pfun <- "pconst"
+            args <- list(k = k_jump)
+            pconst <- function(q, k){q>=k}
+          },
+          "Uniform" = {
+            dfun <- dunif
+            pfun <- "punif"
+            args <- list(min = a_jump, max = b_jump)
+          },
+          "Inverse Gaussian" = {
+            dfun <- dIG
+            pfun <- "pIG"
+            args <- list(delta = delta_jump, gamma = gamma_jump)
+          },
+          "Normal Inverse Gaussian" = {
+            dfun <- dNIG.gui
+            pfun <- "pNIG.gui"
+            args <- list(alpha = alpha_jump, beta = beta_jump, delta = delta_jump, mu = mu_jump)
+          },
+          "Hyperbolic" = {
+            dfun <- dhyp.gui
+            pfun <- "phyp.gui"
+            args <- list(alpha = alpha_jump, beta = beta_jump, delta = delta_jump, mu = mu_jump)
+          },
+          "Student t" = {
+            dfun <- dt
+            pfun <- "pt"
+            args <- list(df = nu_jump, ncp = mu_jump)
+          },
+          "Variance Gamma" = {
+            dfun <- dVG.gui
+            pfun <- "pVG.gui"
+            args <- list(lambda = lambda_jump, alpha = alpha_jump, beta = beta_jump, mu = mu_jump)
+          },
+          "Generalized Hyperbolic" = {
+            dfun <- dghyp.gui
+            pfun <- "pghyp.gui"
+            args <- list(lambda = lambda_jump, alpha = alpha_jump, delta = delta_jump, beta = beta_jump, mu = mu_jump)
+          }
+        )
+        if(exists('args') & exists('dfun') & exists('pfun')){
           output$model_modal_plot_distr <- renderPlot({
             return(
               ggplot(dx, aes(x = V1)) + 
@@ -206,41 +254,19 @@
                   axis.title=element_text(size=12),
                   legend.position="none"
                 ) +
-                stat_function(fun = dnorm, args = list(mean = mu_jump, sd = sigma_jump), fill = "blue",color = "blue", geom = 'area', alpha = 0.5) +
+                stat_function(fun = dfun, args = args, fill = "blue",color = "blue", geom = 'area', alpha = 0.5) +
                 geom_density(alpha = 0.5, fill = "green", color = "green") +
                 xlim(-4, 4) + 
                 labs(fill="", title = "Empirical VS Estimated Distribution", x = "Increments", y = "Density")
             )
           })
-          ksTest <- try(ks.test(x = as.numeric(dx$V1), "pnorm", mean = mu_jump, sd = sigma_jump))
+          ksTest <- try(do.call(what = 'ks.test', args = append( list(x = as.numeric(dx$V1), y = pfun), lapply(args, FUN = function(x) x)) ))
           output$model_modal_plot_test <- renderUI({
             if(class(ksTest)!="try-error")
               HTML(paste("<div><h5 class='hModal'>Kolmogorov-Smirnov p-value (the two distributions coincide): ", format(ksTest$p.value, scientific=T, digits = 2), "</h5></div>"))
-          })
+          }) 
         }
-        if(y$info$jumps=="Uniform"){
-          output$model_modal_plot_distr <- renderPlot({
-            return(
-              ggplot(dx, aes(x = V1)) + 
-                theme(
-                  plot.title = element_text(size=14, face= "bold", hjust = 0.5),
-                  axis.title=element_text(size=12),
-                  legend.position="none"
-                ) +
-                stat_function(fun = dunif, args = list(min = a_jump, max = b_jump), fill = "blue",color = "blue", geom = 'area', alpha = 0.5) +
-                geom_density(alpha = 0.5, fill = "green", color = "green") +
-                xlim(min(dx$V1),max(dx$V1)) + 
-                labs(fill="", title = "Empirical VS Estimated Distribution", x = "Increments", y = "Density")
-            )
-          })
-          ksTest <- try(ks.test(x = as.numeric(dx$V1), "punif", min = a_jump, max = b_jump))
-          output$model_modal_plot_test <- renderUI({
-            if(class(ksTest)!="try-error")
-              HTML(paste("<div><h5 class='hModal'>Kolmogorov-Smirnov p-value (the two distributions coincide): ", format(ksTest$p.value, scientific=T, digits = 2), "</h5></div>"))
-          })
-        }
-        
-        
+      
         delta <- y$model at sampling@delta
         jumps <- ifelse(abs(diff(x))>threshold,1,0)
         jumps[is.na(jumps)] <- 0

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/settings.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/settings.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/settings.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -1,5 +1,6 @@
-#use it for shinyapps.io
-yuimaGUIdata <- reactiveValues(series=list(),
+#shinyapp web app
+if(!exists("yuimaGUIdata"))
+  yuimaGUIdata <- reactiveValues(series=list(),
                                model=list(), multimodel=list(),
                                usr_model = list(), usr_multimodel = list(),
                                simulation=list(), multisimulation=list(),
@@ -205,6 +206,7 @@
                     "Compound Poisson" = "Exponentially Decaying Intensity",
                     "Compound Poisson" = "Periodic Intensity",
                     "Point Process" = "Hawkes",
+					"Point Process" = "Hawkes Power Law Kernel",
                     #"Fractional process"="Frac. Geometric Brownian Motion",
                     #"Fractional process"="Frac. Brownian Motion",
                     "Fractional process"="Frac. Ornstein-Uhlenbeck (OU)",

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/simulation/multivariate_results.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/simulation/multivariate_results.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/simulation/multivariate_results.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -136,9 +136,9 @@
 observe({
   if(!is.null(params_multi_simulate_showSimulation_plot$id) & !is.null(params_multi_simulate_showSimulation_plot$y) & !is.null(params_multi_simulate_showSimulation_plot$z) ){
     id <- unlist(strsplit(params_multi_simulate_showSimulation_plot$id, split = " "))
-    if(id[1] %in% names(yuimaGUIdata$multisimulation)) if(length(yuimaGUIdata$multisimulation[id[1]])>=as.numeric(id[2])) if(yuimaGUIdata$multisimulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 10){
+    if(id[1] %in% names(yuimaGUIdata$multisimulation)) if(length(yuimaGUIdata$multisimulation[[id[1]]])>=as.numeric(id[2])) if(yuimaGUIdata$multisimulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 1){
       if(is.na(yuimaGUIdata$multisimulation[[id[1]]][[as.numeric(id[2])]]$hist[1])){
-        shinyjs::toggle("multi_simulate_showSimulation_hist_div", condition = yuimaGUIdata$multisimulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 10)
+        shinyjs::toggle("multi_simulate_showSimulation_hist_div", condition = yuimaGUIdata$multisimulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 1)
         
         filtered.colnames <- gsub(colnames(yuimaGUIdata$multisimulation[[id[1]]][[as.numeric(id[2])]]$trajectory), pattern = "_sim.*", replacement = "")
         seriesnames <- unique(filtered.colnames)

Modified: pkg/yuimaGUI/inst/yuimaGUI/server/simulation/univariate_results.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server/simulation/univariate_results.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server/simulation/univariate_results.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -71,8 +71,8 @@
   if(!is.null(input$simulate_showSimulation_simID)){
     if(input$simulate_showSimulation_simID %in% rownames(yuimaGUItable$simulation)) {
       id <- unlist(strsplit(input$simulate_showSimulation_simID, split = " "))
-      shinyjs::toggle("simulate_showSimulation_hist_div", condition = yuimaGUIdata$simulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 10)
-      if(yuimaGUIdata$simulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 10){
+      shinyjs::toggle("simulate_showSimulation_hist_div", condition = yuimaGUIdata$simulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 1)
+      if(yuimaGUIdata$simulation[[id[1]]][[as.numeric(id[2])]]$info$nsim > 1){
         if(!is.na(yuimaGUIdata$simulation[[id[1]]][[as.numeric(id[2])]]$hist[1])){
           if(!is.null(input$simulate_showSimulation_hist_nBins)){
             output$simulate_showSimulation_hist <- renderPlot({

Modified: pkg/yuimaGUI/inst/yuimaGUI/server.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/server.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -3,9 +3,14 @@
 
 server <- function(input, output, session) {
   
-  # session$onSessionEnded(function() {
-  #   stopApp()
-  # })
+  ### comment this for web app version ###
+  session$onSessionEnded(function() {
+    stopApp()
+  })
+  ### comment this for web app version ###
+  
+  debug.gui <- function(){}
+  debug(debug.gui)
 
   source("server/settings.R", local = TRUE)
   source("server/functions.R", local = TRUE)

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/eda/cluster.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/eda/cluster.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/eda/cluster.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -21,7 +21,7 @@
                         column(4,br(),br(),
                                div(align="center",
                                    selectInput("cluster_linkage", "Linkage", choices = c("Complete"="complete", "Single"="single", "Average"="average", "Ward"="ward.D", "Ward squared"="ward.D2", "McQuitty"="mcquitty", "Median"="median", "Centroid"="centroid")),
-                                   selectInput("cluster_distance", "Distance", choices = c("Percentage Increments Distribution"="MYdist_perc", "Increments Distribution"="MYdist_ass", "Markov Operator"="MOdist", "Euclidean"="euclidean", "Maximum"="maximum", "Manhattan"="manhattan", "Canberra"="canberra", "Minkowski"="minkowski")),
+                                   selectInput("cluster_distance", "Metric", choices = c("Percentage Increments Distribution"="MYdist_perc", "Increments Distribution"="MYdist_ass", "Markov Operator"="MOdist", "Euclidean"="euclidean", "Maximum"="maximum", "Manhattan"="manhattan", "Canberra"="canberra", "Minkowski"="minkowski")),
                                    shinyjs::hidden(numericInput("cluster_distance_minkowskiPower", label = "Power", value = 2)))
                         )
         )),

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/eda/llag.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/eda/llag.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/eda/llag.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -69,7 +69,7 @@
                                               column(6),
                                               column(2,actionButton("llag_deleteAll_analysis", label = "Delete All"))
                                             ),
-                                            HTML("<div id = 'llag_plot_howToRead'><h4><b>How to read the plot:</b><br/>If the lead-lag is positive: 'row.name' anticipates 'col.name of 'X' periods<br/>If the lead-lag is negative: 'row.name' follows 'col.name' with 'X' delay periods<br/><br/><b>'X'</b> are the numbers in the plot above.<br/>They are expressed in days if you are using time series, or in the same unit of measure of time if you are using numerical time index.</h4></div>")
+                                            HTML("<div id = 'llag_plot_howToRead'><h4><b>How to read the plot:</b><br/>If the lead-lag is positive: 'row.name' anticipates 'col.name of 'X' periods<br/>If the lead-lag is negative: 'row.name' follows 'col.name' with 'X' delay periods<br/><br/><b>'X'</b> are the numbers in the plot above.<br/>They are expressed in days if you are using time series, or in the same unit of measure of time if you are using numerical time index.<br/>The numbers in round brackets are correlations between the series shifted by the corresponding estimated lead-lag parameter.</h4></div>")
                         )))
         )
 )
\ No newline at end of file

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/finance/hedging.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/finance/hedging.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/finance/hedging.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -3,7 +3,7 @@
           column(12,
                  h3("Here you can manage the risk of a portfolio composed of options and the underlying asset.",class = "hTitle"),
                  h4("The evolution of the underlying asset is simulated by the models you estimated in the Modeling section.", br(),
-                    "After performing the simulation, click on the 'Show P&L' button in the 'Profit&Loss' tab and customize your portfolio.",br(),
+                    "After performing the simulation, click on the Show P&L button in the Profit&Loss tab and customize your portfolio.",br(),
                     "The Profit&Loss distribution of your portfolio will be displayed (it includes transaction costs that you can customize)."),
                  hr(class = "hrHeader")
           )
@@ -12,7 +12,7 @@
         tabsetPanel(id = "panel_hedging", type = "tabs",
                     tabPanel(title = "Start simulations",
                              fluidRow(column(12, br(),
-                                             h4("Click on the model by which to simulate the evolution of the underlying asset"),
+                                             h4("Click on the model in order to simulate the evolution of the underlying asset"),
                                              DT::dataTableOutput("hedging_databaseModels")
                              )
                              ),

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/home/home.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/home/home.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/home/home.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -10,13 +10,13 @@
         fluidRow(
           column(8,
                  h4("Step 1", class = "hTitle"),
-                 h4("Load the data you wish to analyze in the section 'Data I/O'.", br(), 
+                 h4("Load the data you wish to analyze in the section Data I/O.", br(), 
                     "The interface provides an easy way to load economic data (e.g. GDP) or a financial series (stocks and shares) from the Internet. If you prefer, you can load data from your own files.",br(),
-                    "Once the data is loaded, you can then use the 'Explorative Data Analysis' and 'Modeling' sections."),
+                    "Once the data is loaded, you can then use the Explorative Data Analysis and Modeling sections."),
                  h4("Step 2", class = "hTitle"),
-                 h4("Model data in section 'Modeling'.", br(),
+                 h4("Model data in section Modeling.", br(),
                     "Here you can fit models choosing between a number of default options or defining your own model.", br(),
-                    "Now you are ready to go to the 'Simulate' section."),
+                    "Now you are ready to go to the Simulate section."),
                  h4("Step 3", class = "hTitle"),
                  h4("Read the short explanation at the beginning of each section for further information. Enjoy!")
           ),

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/models.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/models.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/models.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -5,9 +5,9 @@
                                  h3("Univariate Model Estimation",class = "hTitle"),
                                  h4("Select the data and the model you wish to estimate. Each model will be fitted to each selected series.",
                                     br(),
-                                    "Click on the 'Set Range' and 'Advanced Settings' buttons to customize the estimation process.",
+                                    "Click on the Set Range and Advanced Settings buttons to customize the estimation process.",
                                     br(),
-                                    "A number of default models are available but you can set your own model (tab 'Set model') and use it for estimation and/or simulation purposes."),
+                                    "A number of default models are available but you can set your own model (tab Set model) and use it for estimation and/or simulation purposes."),
                                  hr(class = "hrHeader")
                           )
                         ),

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/multi_models.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/multi_models.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/modeling/multi_models.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -5,9 +5,9 @@
                                  h3("Multivariate Model Estimation",class = "hTitle"),
                                  h4("Select the data and the model you wish to estimate. The model will be fitted to the selected series.",
                                     br(),
-                                    "Click on buttons 'Set Range' and 'Advanced Settings' to customize the estimation process.",
+                                    "Click on buttons Set Range and Advanced Settings to customize the estimation process.",
                                     br(),
-                                    "Building your own multivariate model will soon be possible"
+                                    'Building your own multivariate model is not possible at the moment.'
                                     #"Some default models are available but you can set your own model (tab 'Set model') and use it for estimation and/or simulation purposes."
                                     ),
                                  hr(class = "hrHeader")

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/multivariate.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/multivariate.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/multivariate.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -6,7 +6,7 @@
                     #br(),
                     #"If you want to simulate a model that has not been estimated, you can use the 'Non-estimated models' tab.",
                     br(),
-                    "Click on the 'Set Simulation' and 'Advanced Settings' buttons to customize the simulation process."),
+                    "Click on the Set Simulation and Advanced Settings buttons to customize the simulation process."),
                  hr(class = "hrHeader")
           )
         ),

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/univariate.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/univariate.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui/simulation/univariate.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -4,9 +4,9 @@
                  h3("Univariate Simulation",class = "hTitle"),
                  h4("Select the estimated models you wish to simulate.",
                     br(),
-                    "If you want to simulate a model that has not been estimated, you can use the 'Non-estimated models' tab.",
+                    "If you want to simulate a model that has not been estimated, you can use the Non-estimated models tab.",
                     br(),
-                    "Click on the 'Set Simulation' and 'Advanced Settings' buttons to customize the simulation process."),
+                    "Click on the Set Simulation and Advanced Settings buttons to customize the simulation process."),
                  hr(class = "hrHeader")
           )
         ),

Modified: pkg/yuimaGUI/inst/yuimaGUI/ui.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/ui.R	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/ui.R	2018-11-25 08:39:34 UTC (rev 685)
@@ -30,17 +30,12 @@
     div(id="sessionButtons",
       fluidRow( downloadButton("saveSession", label = "Save Session")),
       br(),
-	  fluidRow(column(1),column(9,fileInput("loadSession", label = "Load Session", multiple=FALSE)))
+	    fluidRow(column(1),column(9,fileInput("loadSession", label = "Load Session", multiple=FALSE)))
     ),
-    br(),
+    hr(),br(),
     div(id="theyuimaprojct",
-        a("User Guide", href="https://yuima-project.com/manuals/", target="_blank"),br(),
-        a("Troubleshooting", href="https://yuima-project.com/category/troubleshooting-yuimagui/", target="_blank"),br(),
-        br(),
-        a("Spreading the word", href="https://yuima-project.com/category/conferences/", target="_blank"),br(),
-        a("About Us", href="https://yuima-project.com/the-yuima-team/", target="_blank"),br(),
-        br(),
-        a("Contact Us", href="https://yuima-project.com/contact-us/", target="_blank")
+        a("User Guide", href="https://yuimaproject.com/wp-content/uploads/2018/08/manual_yuimagui_v1-02.pdf", target="_blank"),br(),
+        br()
     )
   )
 )

Modified: pkg/yuimaGUI/inst/yuimaGUI/www/black.css
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/www/black.css	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/www/black.css	2018-11-25 08:39:34 UTC (rev 685)
@@ -115,11 +115,10 @@
 }
 
 #theyuimaprojct{
-  margin-top: 100px;
   text-align: center;
 }
 #theyuimaprojct a {
-  color:green;
+  color:orange;
 }
 
 

Modified: pkg/yuimaGUI/inst/yuimaGUI/www/white.css
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/www/white.css	2018-10-30 02:18:40 UTC (rev 684)
+++ pkg/yuimaGUI/inst/yuimaGUI/www/white.css	2018-11-25 08:39:34 UTC (rev 685)
@@ -96,11 +96,10 @@
 }
 
 #theyuimaprojct{
-  margin-top: 100px;
   text-align: center;
 }
 #theyuimaprojct a {
-  color:green;
+  color:orange;
 }
 
 



More information about the Yuima-commits mailing list