Learn R Programming

fBasics (version 260.72)

ReturnSeriesBasics: Return Series Basics

Description

A collection and description of functions which allow to investigate and display the basics of financial return sderies. List of Functions: ll{ basicStats Computes an overview of basic statistical values, seriesPlot Returns a tailored return series plot, cumulatedPlot Returns a tailored cumulatede return plot, histPlot Returns a tailored histogram plot, densityPlot Returns a tailored kernel density estimate plot, qqnormPlot Returns a tailored Normal quantile-quantile plot, qqnigPlot Returns a tailored NIG quantile-quantile plot, boxPlot Returns a side-by-side standard box plot, boxPercentilePlot Returns a side-by-side box-percentile plot, returnSeriesGUI Opens a GUI for return series plots.}

Usage

basicStats(x, ci = 0.95)

seriesPlot(x, labels = TRUE, type = "l", col = "steelblue", ylab = "Returns", rug = TRUE, ...) cumulatedPlot(x, index = 100, labels = TRUE, type = "l", col = "steelblue", ylab = "Index", rug = TRUE, ...) histPlot(x, labels = TRUE, col = "steelblue", add.fit = TRUE, rug = TRUE, skipZeros = TRUE, ...) densityPlot(x, labels = TRUE, col = "steelblue", add.fit = TRUE, rug = TRUE, skipZeros = TRUE, ...)

qqnormPlot(x, labels = TRUE, col = "steelblue", rug = TRUE, scale = TRUE, ...) qqnigPlot(x, labels = TRUE, col = "steelblue", rug = TRUE, ...)

boxPlot(x, col = "steelblue", ...) boxPercentilePlot(x, col = "steelblue", ...)

returnSeriesGUI(x)

Arguments

add.fit
[*Plot] - a logical, should a fit added to the Plot?
ci
[basicsStats] - confidence interval, a numeric value, by default 0.95, i.e. 95 percent.
col, ylab
[*Plot] - plot parameter, color, main title, and y label to be used. Only active when labels=TRUE.
index
[cumulatedPlot] - a numeric value, by default 100. The function cumulates column by colum the returns and multiplies the result with the index value: index*exp(colCumsums(x)).
labels
a logical, should the plot be tailored?
rug
a logical value by default TRUE. Should a rug representation of the data added to the plot?
scale
a logical value by default TRUE. Should the time series be scale for further investigation?
skipZeros
a logical, should zeros be skipped in the return Series?
type
what type of plot should be drawn. For ossible types consult the plot help page.
x
an object of class "timeSeries" or any other object which can be transformed by the function as.timeSeries into an object of class timeSeries.
...
optional arguments to be passed.

Value

  • basicsStats returns data frame with the following entries and row names: nobs, NAs, Minimum, Maximum , 1. Quartile, 3. Quartile, Mean, Median, Sum, SE Mean, LCL Mean, UCL Mean, Variance, Stdev, Skewness, Kurtosis. *Plot For the *Plot functions, beside the plot no values are returned. returnSeriesGUI For the returnSeriesGUI function, beside the graphical user interface no values are returned.

Examples

Run this code
## basicStats -
   # Simulated Monthly Return Data:
   tS = timeSeries(matrix(rnorm(12)), timeCalendar())
   # ... must be univariate:
   basicStats(tS)

Run the code above in your browser using DataLab