Skip to contents

Overview of package fBasics

fBasics-package fBasics
Portfolio modelling, optimization and backtesting
fBasicsData Capitalization cars2 DowJones30 HedgeFund msft.dat nyse PensionFund swissEconomy SWXLP usdthb
fBasics data sets

Tests

correlationTest() pearsonTest() kendallTest() spearmanTest()
Correlation tests
ksnormTest() jbTest() shapiroTest() normalTest() jarqueberaTest() dagoTest() adTest() cvmTest() lillieTest() pchiTest() sfTest()
Tests for normality
ks2Test()
Two sample Kolmogorov-Smirnov test
locationTest()
Two sample location tests
scaleTest()
Two sample scale tests
varianceTest()
Two sample variance tests
fHTEST-class fHTEST show,fHTEST-method
Class "fHTEST"

Other statistical functions

pdl()
Polynomial distributed lags
basicStats()
Basic time series statistics
dmaxdd() pmaxdd() rmaxdd() maxddStats()
Drawdown statistics
rowStats() rowSds() rowVars() rowSkewness() rowKurtosis() rowMaxs() rowMins() rowProds() rowQuantiles() rowStdevs() rowAvgs()
Row statistics
normMED() normIQR() normSKEW() normKURT()
Robust moments for the Normal distribution
sampleMED() sampleIQR() sampleSKEW() sampleKURT()
Robust moments for the GLD
sampleLmoments()
Sample L-moments
set.lcgseed() get.lcgseed() runif.lcg() rnorm.lcg() rt.lcg()
Generator for Portable random innovations
volatility()
Compute volatility

Distributions and distribution fitting

nFit() tFit() stableFit()
Parametric fit of a distribution
fDISTFIT-class show,fDISTFIT-method
Class "fDISTFIT"
distCheck()
Distribution check

Hyperbolic Distribution

dhyp() phyp() qhyp() rhyp()
Hyperbolic distribution
hypFit()
Fit a Hyperbolic distribution
hypMode()
Hyperbolic mode
hypMean() hypVar() hypSkew() hypKurt() hypMoments()
Hyperbolic distribution moments
hypMED() hypIQR() hypSKEW() hypKURT()
Robust moments for the HYP
hypSlider()
Hyperbolic distribution slider

Generalized Hyperbolic Distribution

dgh() pgh() qgh() rgh()
Generalized Hyperbolic Distribution
ghFit()
GH Distribution Fit
ghMode()
Generalized Hyperbolic Mode
ghMean() ghVar() ghSkew() ghKurt() ghMoments()
Generalized Hyperbolic Distribution Moments
ghMED() ghIQR() ghSKEW() ghKURT()
Robust Moments for the GH
ghSlider()
Generalized Hyperbolic Distribution Slider

Generalized Hyperbolic Student-t

dght() pght() qght() rght()
Generalized Hyperbolic Student-t distribution
ghtFit()
GHT distribution fit
ghtMode()
Generalized Hyperbolic Student-t Mode
ghtMean() ghtVar() ghtSkew() ghtKurt() ghtMoments()
Generalized Hyperbolic Student-t Moments
ghtMED() ghtIQR() ghtSKEW() ghtKURT()
Robust Moments for the GHT

Generalized Lambda Distribution

dgld() pgld() qgld() rgld()
Generalized Lambda Distribution
gldFit()
GH Distribution Fit
gldMode()
Generalized Lambda Distribution Mode
gldMED() gldIQR() gldSKEW() gldKURT()
Robust Moments for the GLD

Normal Inverse Gaussian Distribution

dnig() pnig() qnig() rnig()
Normal Inverse Gaussian Distribution
nigFit()
Fit of a Normal Inverse Gaussian Distribution
nigMode()
Normal Inverse Gaussian Mode
nigMean() nigVar() nigSkew() nigKurt()
Moments for the Normal Inverse Gaussian
nigMED() nigIQR() nigSKEW() nigKURT()
Robust Moments for the NIG
nigShapeTriangle()
NIG Shape Triangle
nigSlider()
nigerbolic Distribution Slider

Standardized distributions

dsgh() psgh() qsgh() rsgh()
Standardized Generalized Hyperbolic Distribution
sghFit()
Standardized GH distribution fit
dsght() psght() qsght() rsght()
Standardized generalized hyperbolic Student-t Distribution
dsnig() psnig() qsnig() rsnig()
Standardized Normal Inverse Gaussian Distribution
snigFit()
Fit of a Standardized NIG Distribution

Spline smoothed distribution

dssd() pssd() qssd() rssd()
Spline Smoothed Distribution
ssdFit()
Fit density using smoothing splines

Vector and matrix utilities

colVec() rowVec()
Column and row vectors
gridVector()
Grid vector coordinates
hilbert()
Hilbert matrix
inv()
The inverse of a matrix
kron()
Kronecker product
norm2()
Matrix norm
pascal()
Pascal matrix
isPositiveDefinite() makePositiveDefinite()
Positive definite matrices
rk()
The rank of a matrix
tr()
Trace of a matrix
triang() Triang()
Upper and lower triangular matrices
tslag()
Lagged or leading vector/matrix
vec() vech()
Stacking vectors and matrices

Plotting

acfPlot() pacfPlot() lacfPlot() teffectPlot()
Autocorrelation function plots
boxPlot() boxPercentilePlot()
Time series box plots
histPlot() densityPlot() logDensityPlot()
Histogram and density plots
qqnormPlot() qqnigPlot() qqghtPlot() qqgldPlot()
Quantile-Quantile plots
returnSeriesGUI()
Return series plots
scalinglawPlot()
Scaling law behaviour
seriesPlot() cumulatedPlot() returnPlot() drawdownPlot()
Financial time series plots
stableSlider()
Slider GUI for Stable Distribution
interactivePlot()
Interactive Plot Utility

Interpolation

linearInterp() linearInterpp()
Bivariate Linear Interpolation
krigeInterp()
Bivariate Krige Interpolation
akimaInterp() akimaInterpp()
Bivariate Spline Interpolation

Special functions

Heaviside() Sign() Delta() Boxcar() Ramp()
Heaviside and related functions
tsHessian()
Two sided approximated Hessian

Colour

S4 utilities

getModel() getTitle() getDescription() getSlot() getArgs()
General S4 Class Extractor Functions

Package utilities

listFunctions() countFunctions() listIndex()
List exported functions in a package
print(<control>)
Print control

Deprecated functions

Reexported functions

The following functions are re-exported from packages ‘timeDate’ and ‘timeSeries’, for convenience. If you need more functionality from those packages, run ‘library()’ in your session.

as.timeSeries kurtosis skewness
Objects exported from other packages

Unclassified

TODO: these are generic functions for the corresponding base R ones (which serve as default methods). Seem abandoned. Remove?

stdev(<default>) termPlot(<default>)
Generic functions extensions

S+ compatibility

colIds() rowIds()
Set and retrieve column/row names