# Vygenerovani jedne trajektorie X0 <- 100 dt <- 1/252 r <- 0.55 sigma <- 0.3 t <- seq (0, 4, by=dt) X <- generuj.gBp (t, dt, X0, r, sigma) plot (t, X, type="l", col="red", xlab="t", ylab="geometricky Brownuv pohyb") abline (h = X0 , lty = 2) # ============================================================================= # vynosy a jejich charakteristiky vhodne pro odhady parametru n <- length (X) R <- log (X[2:n] / X[1:(n-1)]) plot (t[1:(n-1)], R, type="l", col="red", xlab="t", ylab="log-returns") abline (h = 0 , lty = 2) hist (R, freq = FALSE) acf (R) mean (R) sd (R) library (fBasics) skewness (R, method = "moment") kurtosis (R, method = "moment") # =============================================================================