HawkesProcesses.jl

    Functions

    HawkesProcesses.fitMethod
    fit(events::Array{<:Number, 1}, maxT::Number, its::Int64)

    Arguments

    • events The array of event times to fit the Hawkes process too.
    • maxT The boundary time over which the events were observed.
    • its Number of iterations to sample for.

    Notes

    • All events must be unique
    source
    HawkesProcesses.hierarchical_fitMethod
    hierarchical_fit(eventsTimesList, maxT, its)

    Arguments

    • eventTimesList An array of arrays of events.
    • maxT The boundary time over which the events were observed.
    • its Number for of iterations to sample for.
    source
    HawkesProcesses.intensityMethod
    intensity(ts, events, background, kappa, kernel)

    Evaluate the intensity over a timegrid for some observed events with given Hawkes parameters.

    Arguments

    • ts::Array{<:Number,1}: time grid to evalue the intensity over
    • events::Array{<:Number,1}: Events of the process
    • background: Background rate
    • kappa::Float64: Kappa value
    • kernel::Function: Kernel function

    Notes

    • kappa must be between 0 and 1
    source
    HawkesProcesses.compensatorMethod
    compensator(ts::Number, events::Array{<:Number}, bg::Number, kappa::Number, kern::Distributions.Distribution)

    The compensator or integrated intensity function.

    Arguments

    • ts::Number time to which evaluate the integrated intensity function.
    • events::Array{<:Number} events from the intensity function.
    • bg::Number Background rate.
    • kappa::Number Kappa parameter
    • kern::Distributions.Distribution Distribution of the kernel.

    Examples

    source
    HawkesProcesses.simulateMethod
    simulate(bg::Number, kappa::Float64, kern::Function, maxT::Number)

    Simulate a Hawkes process between 0 and maxT with parameters bg, kappa, kern.

    Arguments

    • bg: The background rate of the Hawkes process. Constant or positive function.
    • kappa: The kappa parameter of the Hawkes process.
    • kern : The kernel function of the Hawkes process.
    • maxT : Maximum time that the Hawkes process will be simulated for.

    Notes

    • kappa must be between 0 and 1 for a stable Hawkes process.

    Examples

    ``julia kern_f(x) = pdf.(Distributions.Exponential(1/0.5), x)

    simevents = simulate(0.5, 0.5, kern_f, 100) ``

    source
    HawkesProcesses.likelihoodMethod
    likelihood(events::Array{<:Number, 1}, background::Float64, kappa::Float64, kernel::Distributions.Distribution, maxT::Number)

    Calculate the log likelihood of a Hawkes process for given parameters.

    Arguments

    • events Vector of events to calculate the likelihood for.
    • background Background rate.
    • kappa Kappa parameter.
    • kernel Function or distribution of the kernel.
    • maxT Maximum time of the process.

    Notes

    • The kernel function must be a proper probability distribution.

    Examples

    source
    HawkesProcesses.time_change_nullMethod
    time_change_null(events, maxT)

    Calculate the residuals for some events from a constant Poisson process.

    Arguments

    • events::Array{<:Number} the events from the process.
    • maxT::Number the maximum window time.
    source
    HawkesProcesses.time_change_hawkesMethod
    time_change_hawkes(events, bg, kappa, kern)

    Calculate the residuals using the time change theorem for a Hawkes process.

    Arguments

    • events::Array{<:Number} the events from the process.
    • bg the background rate of the Hawkes process.
    • kappa the kappa parameter of the Hawkes process.
    • kern the kernel distriubtion of the Hawkes process.
    source

    Index