fBasics-package {fBasics} | R Documentation |
The Rmetrics "fbasics" package is a collection of functions to explore and to investigate basic properties of financial returns and related quantities.
The covered fields include techniques of explorative data analysis and the investigation of distributional properties, including parameter estimation and hypothesis testing.
For Explorative Data Anlysis several plot functions are available to explore the time series themselves, to show their distributional properties, and to encover correlations and dependencies.
Functions to compute Distributional Properties of financial returns and derivated and related series are enclosed. The in detail considered distributions include the normal, the student-t, the stable, the family of generalised hyperbolic, and max drawdown distributions. Moment and log-likelihood estimators allow to estimate the distributional parameters. Functions to compute moments and modes ar also avialable.
The functions from Hypothesis Testing one sample and two sample tests. Most of the one sample tests deal with testing normality. The two sample tests allow to compare two series to find out if the series are correlated or their distributions have the same distributional parameters.
Package: | fBasics |
Type: | Package |
Version: | 270.73 |
Date: | 2008 |
License: | GPL Version 2 or later |
Copyright: | (c) 1999-2008 Diethelm Wuertz and Rmetrics Foundation |
URL: | http://www.rmetrics.org |
The following chapters give a brief introduction how to optimize and analyze portfolios.
1. Explorative Data Analysis
2. Distributional Properties
3. Hypthesis Testing
Explorative data analysis of financial return series and related series
Exploratory Data Analysis is an approach for data analysis that employs a variety of techniques most of graphical nature to maximize insight into a data set, to uncover underlying structures, and to detect outliers and anomalies. For this several functions are implemented to plot the series, to plot the distribution from different views, and to visualize correlations and dependencies.
Time Series Plots: | |
seriesPlot | Returns a tailored return series plot, |
cumulatedPlot | returns a cumulated series given the returns, |
returnPlot | returns returns given the cumulated series, |
drawdownPlot | returns drawdowns given the return series, |
Density Plots: | |
histPlot | Returns a tailored histogram plot, |
densityPlot | returns a tailored kernel density estimate plot, |
logDensityPlot | returns a tailored log kernel density estimate plot, |
qqPlot | returns a quantile-quantile plot, |
scalinglawPlot | returns a scaling law plot, |
Box Plots: | |
boxPlot | Returns a side-by-side standard box plot, |
boxPercentilePlot | Returns a side-by-side box-percentile plot, |
CorrelationPlots: | |
acfPlot | autocorrelation function plot, |
pacfPlot | partial autocorrelation function plot, |
lacfPlot | lagged autocorrelation function plot, |
teffectPlot | Taylor effect plot. |
The distributional properties can be investigate for several types of distribution functions which are important in the investigation of financial returns and related time series.
Stable and Skew-Stable Distribution
[dpqr]stable | the stable and skew-stable distribution, |
stableMode | the stable and skew-stable mode, |
stableSlider | interactive stable distribution display. |
The family of Generalized Hyperbolic Distributions
GH: | |
[dpqr]gh | GH, Generlized hyperbolic distribution, |
ghFit | GH parameter estimation, |
ghMode | mode of the GH distribution, |
ghMoments | moments of the GH distribution, |
ghSlider | HYP distribution Slider, |
HYP: | |
[dpqr]hyp | HYP, hyperbolic distribution, |
hypFit | HYP parameter estimation, |
hypMode | mode of the hyperbolic distribution, |
hypSlider | HYP distribution Slider, |
NIG: | |
[dpqr]nig | NIG, hyperbolic distribution, |
nigFit | NIG parameter estimation, |
nigMode | mode of the NIG distribution, |
nigSlider | NIG distribution Slider, |
GHT: | |
[dpqr]ght | GHT, generalized hyperbolic Student-t, |
ghtFit | GHT parameter estimation, |
ghtMode | mode of the GHT distribution, |
ghtSlider | GHT distribution Slider. |
The family of Standardized Distributions
SGH: | |
[dpqr]sgh | Standardized GH distribution, |
sghFit | Standardized GH parameter estimation, |
SNIG: | |
[dpq]snig | Standardized NIG distribution, |
snigFit | Standardized NIG parameter estimation. |
The max-Drawdown Distribution
The functions compute compute drawdown statistics. Included are density, distribution function, and random generation for the maximum drawdown distributions. In addition the expectation of drawdowns for Brownian motion can be computed.
[dpr]maxdd | the max drawdown distribution, |
maxddStats | the expectation of drawdowns. |
One Sample Normality Tests
normality Tests
Two Sample Tests
correlationTest
locationTest
varianceTest
scaleTest ?
With Rmetrics version 2.7.0 ...