Learn R Programming

RcmdrPlugin.RiskDemo (version 3.3)

R Commander Plug-in for Risk Demonstration

Description

R Commander plug-in to demonstrate various actuarial and financial risks. It includes valuation of bonds and stocks, portfolio optimization, classical ruin theory, demography and epidemic.

Copy Link

Version

Install

install.packages('RcmdrPlugin.RiskDemo')

Monthly Downloads

465

Version

3.3

License

GPL-2

Maintainer

Arto Luoma

Last Published

February 6th, 2026

Functions in RcmdrPlugin.RiskDemo (3.3)

drawTests

Plotting time series related to COVID-19 testing
plotForecast

Forecasting new covid cases
fin.lca

Lee-Carter model fit for Finnish data
popRegionsFin

Population data on Finnish hospital districts
plotR

Plotting the effective reproduction number (R)
params

Yield curve parameter data
loglikCovid

Computing the log-likelihood of the covid model
stock.price

Computing stock prices
returns

Computing expected returns and their covariance matrix
stockData

Stock data
solveLund

Solving Lund's exponent
solveYield

Computing bond yields
bondCurve

Drawing forward and yield curves
computeRuin

Ruin probability computation with infinite time horizon
bondPrice

Computing bond prices
covidSmooth

Kalman smoothing of the covid model
dataCovid

COVID-19 statistics
RcmdrPlugin.RiskDemo-internal

Internal RiskDemo objects
bondFigure

Bond price as a function of interest rate.
computeRuinFinite

Ruin probability computation with finite time horizon
countries.mort

Mortality data
drawPositiveRate

Plotting the positive rate of COVID-19 tests or the tests per case
dataCovidFin

Confirmed COVID-19 cases in Finland
drawRuin

Plotting simulations of a surplus process
drawIncidence

Plotting incidence curves of an epidemic
drawIncidenceFin

Plotting incidence curves of an epidemic with Finnish data
portfOptim

Portfolio optimization for an index model
fin

Mortality data for Finland
RcmdrPlugin.RiskDemo-package

R Commander Plug-in for Risk Demonstration
pop.pred

Population forecasting
drawFigure

Efficient frontier and return distribution figures
drawBarsFin

Plotting epidemic statistics with Finnish data
fin.fcast

Finnish mortality forecast
drawBars

Plotting epidemic statistics