Learn R Programming

fBasics (version 251.70)

ReturnSeriesBasics: Return Series Basics

Description

A collection and description of functions which allow to investigate and display the basics of financial return sderies. Tailored plot functions: ll{ seriesPlot Returns a tailored time series 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.} Basic Statistic functions are: ll{ basicStats computes an overview of basic statistical values. } For SPLUS Compatibility: ll{ stdev Returns the standard deviation of a vector or matrix. }

Usage

seriesPlot(x, type = "l", col = "steelblue", main = x@units, rug = TRUE, ...) 
histPlot(x, labels = TRUE, main = x@units, add.fit = TRUE, ...) 
densityPlot(x, col = "steelblue", main = x@units, add.fit = TRUE, ...)

qqnormPlot(x, labels = TRUE, col = "steelblue", main = x@units, ...) qqnigPlot(x, labels = TRUE, col = "steelblue", main = x@units, ...)

stdev(x, na.rm = FALSE)

basicStats(x, ci = 0.95)

Arguments

add.fit
[*Plot] - a logical, should a fit added to the Plot?
ci
confidence interval, a numeric value, by default 0.95, i.e. 95 percent.
col, main
[*Plot] - plot parameters, color and main title.
labels
a logical, should the plot be tailored?
na.rm
a logical. Should missing values be removed?
rug
a logical value by default TRUE. Should a rug representation of the data added to the plot?
type
what type of plot should be drawn. For ossible types consult the plot help page.
x
an object of class "timeSeries" or a numeric vector.
...
optional arguments to be passed.

Value

  • *Plot For the *Plot functions. beside the plot, no other values are returned. 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.

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