Learn R Programming

hawkes (version 0.0-4)

simulateHawkes: Hawkes process simulation Function

Description

The function simulates a Hawkes process for the given parameter, and until a time horizon.

Usage

simulateHawkes(lambda0, alpha, beta, horizon)

Arguments

lambda0
Vector of initial intensity, a scalar in the monovariate case.
alpha
Matrix of excitation, a scalar in the monovariate case. Excitation values are all positive.
beta
Vector of betas, a scalar in the monovariate case.
horizon
Time horizon until which the simulation is to be conducted.

Value

Returns a vector of jump times in the monovariate case, and a list of such vectors for every component in the multivariate case.

Details

Notice that in the scalar case, one must have beta>alpha for the process to be stable, and in the multivariate case, the matrix (diag(beta)-alpha) must have eigen values with strictly positive real parts for the process to be stable.

References

Y. Ogata. (1981) On Lewis simulation method for point processes. IEEE Transactions on Information Theory, 31

Examples

Run this code
#One dimensional Hawkes process
lambda0<-0.2
alpha<-0.5
beta<-0.7
horizon<-3600#one hour
h<-simulateHawkes(lambda0,alpha,beta,horizon)

#Multivariate Hawkes process
lambda0<-c(0.2,0.2)
alpha<-matrix(c(0.5,0,0,0.5),byrow=TRUE,nrow=2)
beta<-c(0.7,0.7)
horizon<-3600#one hour
h<-simulateHawkes(lambda0,alpha,beta,horizon)

Run the code above in your browser using DataLab