Description Usage Format Examples
Two years of prices for 18 shares from the Copenhagen Stock Exchange C20 index, covering the most valuable companies. Two shares have been removed (Maersk A = almost identical to Maersk B) and ISS which is incomplete for the period considered.
1 |
A data frame (C20) with 1+18+18 columns and 517 rows (about two full years).
Format for date is 2016-04-01
Closing price for stock 'Carlsberg' .
Closing price for stock 'Christian Hansen' .
Closing price for stock 'Coloplast' .
Closing price for stock 'Danske Bank' .
Closing price for stock 'DSV' .
Closing price for stock 'Genmap' .
Closing price for stock 'GN St. Nord' .
Closing price for stock 'FL Smidth' .
Closing price for stock 'Jyske Bank' .
Closing price for stock 'Maersk B' .
Closing price for stock 'Nordea Bank' .
Closing price for stock 'Novo' .
Closing price for stock 'Novozymes' .
Closing price for stock 'Pandora' .
Closing price for stock 'TDC' .
Closing price for stock Pandora' .
Closing price for stock 'Vestas Wind' .
Closing price for stock 'Wiliam Demant' .
Average price for stock 'Carlsberg' .
Average price for stock 'Christian Hansen' .
Average price for stock 'Coloplast' .
Average price for stock 'Danske Bank' .
Average price for stock 'DSV' .
Average price for stock 'Genmap' .
Average price for stock 'GN St. Nord' .
Average price for stock 'FL Smidth' .
Average price for stock 'Jyske Bank' .
Average price for stock 'Maersk B' .
Average price for stock 'Nordea Bank' .
Average price for stock 'Novo' .
Average price for stock 'Novozymes' .
Average price for stock Pandora' .
Average price for stock 'TDC' .
Average price for stock 'Pandora' .
Average price for stock 'Vestas Wind' .
Average price for stock 'William Demant' .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # Example 1:
library(marima)
data(C20)
selects <- c(2,7,11)
cat("Multivariate model for ",colnames(C20)[selects]," \n")
Data <- data.frame(C20[,selects])
colnames(Data) <- colnames(C20)[selects]
log.Data <- log(Data)
kvar <- length(selects)
k <- c(1:kvar)
difs <- rep(1,length(selects))
difference <- rbind(k , difs)
dlog.Data <- 100*t(define.dif(log.Data,difference)$y.dif)
cat("dlog.Data represents the percentage change from day
to day. \n")
mod <- define.model(kvar = kvar, ar=c(1:2),ma=c(1))
Model <- marima(dlog.Data,
ar.pattern=mod$ar.pattern, ma.pattern=mod$ma.pattern,penalty=2)
short.form(Model$ar.estimates,leading=FALSE)
short.form(Model$ma.estimates,leading=FALSE)
# Example 2:
library(marima)
data(C20)
selects <- c(13)
cat("Univariate model for ",colnames(C20)[selects]," \n")
Data <- data.frame(C20[,selects])
colnames(Data) <- colnames(C20)[selects]
log.Data <- log(Data)
kvar <- length(selects)
k <- c(1:kvar)
difs <- rep(1,length(selects))
difference <- rbind(k , difs)
dlog.Data <- 100*t(define.dif(log.Data,difference)$y.dif)
mod <- define.model(kvar = kvar, ar=c(1:2),ma=c(1))
Model <- marima(dlog.Data,
ar.pattern=mod$ar.pattern, ma.pattern=mod$ma.pattern,penalty=2)
short.form(Model$ar.estimates,leading=FALSE)
short.form(Model$ma.estimates,leading=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.