This function simulates paths of a compound Poisson risk process that is perturbed by a Wiener process. Multiple paths can be simulated simultaneously.

1 2 |

`m` |
Number of sample points for each path |

`window` |
Beginning and end of the time window |

`num` |
Number of paths to be simulated |

`sigma` |
Volatility of the Wiener process |

`freq` |
Frequency of the claims |

`drift` |
Drift (premium intensity) of the process |

`jumpdist` |
A function that returns realizations of the claim distribution |

`...` |
Additional arguments for |

Possible choices for `jumpdist`

include `rexp`

,
`rgamma`

and `rlnorm`

.

It is assumed that the function specified for `jumpdist`

interprets
its first argument as the vector length of its return value, i. e. the
number of simultaneously generated random variables.

The path realizations of the Wiener process are generated using the circulant embedding method (see references).

A time-series object/time-series object containing the simulated sample path(s).

Dietrich, C. and Newsam, G. (1997) *Fast and Exact Simulation of
Stationary Gaussian Processes through Circulant Embedding of the
Covariance Matrix*. SIAM Journal on Scientific Computing **18**(4),
pp. 1088-1107

`rhypoexp`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
require(sdprisk)
rriskproc(m = 1001,
window = c(0, 5),
num = 1,
sigma = sqrt(0.4),
freq = 1,
drift = 2,
jumpdist = rhypoexp,
rate = c(1, 10))
# The same can be achieved using
# jumpdist = function(n) rexp(n, 1) + rexp(n, 10)
rriskproc(window = c(0, 10),
jumpdist = function(n) {
rexp(n, 1) + rexp(n, 10)
})
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.