predict-est.Merton-method: Prediction for a jump diffusion process

Description Usage Arguments References Examples

Description

Bayesian prediction of a stochastic process Y_t = y_0 \exp( φ t - γ2/2 t+γ W_t + \log(1+θ) N_t).

Usage

1
2
3
4
5
6
## S4 method for signature 'est.Merton'
predict(object, t, burnIn, thinning, Lambda.mat,
  which.series = c("new", "current"), M2pred = 10, only.interval = TRUE,
  level = 0.05, cand.length = 1000, pred.alg = c("Distribution",
  "Trajectory", "simpleTrajectory", "simpleBayesTrajectory"), sample.length,
  plot.prediction = TRUE)

Arguments

object

class object of MCMC samples: "est.Merton", created with method estimate,Merton-method

t

vector of time points to make predictions for

burnIn

burn-in period

thinning

thinning rate

Lambda.mat

matrix-wise definition of intensity rate function (makes it faster)

which.series

which series to be predicted, new one ("new") or further development of current one ("current")

M2pred

optional, if current series to be predicted and t missing, M2pred variables will be predicted with the observation time distances

only.interval

if TRUE: only calculation of prediction intervals (only for pred.alg = "Distribution")

level

level of the prediction intervals

cand.length

length of candidate samples (if method = "vector"), for jump diffusion

pred.alg

prediction algorithm, "Distribution", "Trajectory", "simpleTrajectory" or "simpleBayesTrajectory"

sample.length

number of samples to be drawn, default is the number of posterior samples

plot.prediction

if TRUE, prediction intervals are plotted

References

Hermann, S. (2016a). BaPreStoPro: an R Package for Bayesian Prediction of Stochastic Processes. SFB 823 discussion paper 28/16.

Hermann, S. (2016b). Bayesian Prediction for Stochastic Processes based on the Euler Approximation Scheme. SFB 823 discussion paper 27/16.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
cl <- set.to.class("Merton",
               parameter = list(thetaT = 0.1, phi = 0.05, gamma2 = 0.1, xi = c(3, 1/4)),
               Lambda = function(t, xi) (t/xi[2])^xi[1])
t <- seq(0, 1, by = 0.01)
data <- simulate(cl, t = t, y0 = 0.5)
est <- estimate(cl, t, data, 1000)
plot(est)
## Not run: 
pred1 <- predict(est, Lambda.mat = function(t, xi) (t/xi[,2])^xi[,1])
pred2 <- predict(est, Lambda.mat = function(t, xi) (t/xi[,2])^xi[,1], pred.alg = "Trajectory")
pred3 <- predict(est, pred.alg = "simpleTrajectory")
pred4 <- predict(est, pred.alg = "simpleBayesTrajectory")

## End(Not run)

SimoneHermann/BaPreStoPro documentation built on May 9, 2019, 1:46 p.m.