PerformanceAnalytics2.0.8 package

Econometric Tools for Performance and Risk Analysis

apply.fromstart

calculate a function over an expanding window always starting from the...

apply.rolling

calculate a function over a rolling window

AppraisalRatio

Appraisal ratio of the return distribution

AverageDrawdown

Calculates the average depth of the observed drawdowns.

AverageLength

Calculates the average length (in periods) of the observed drawdowns.

AverageRecovery

Calculates the average length (in periods) of the observed recovery pe...

BernardoLedoitRatio

Bernardo and Ledoit ratio of the return distribution

BetaCoMoments

Functions to calculate systematic or beta co-moments of return series

BurkeRatio

Burke ratio of the return distribution

DRatio

d ratio of the return distribution

DrawdownDeviation

Calculates a standard deviation-type statistic using individual drawdo...

DrawdownPeak

Drawdawn peak of the return distribution

ES

calculates Expected Shortfall(ES) (or Conditional Value-at-Risk(CVaR) ...

EWMAMoments

Functions for calculating EWMA comoments of financial time series

FamaBeta

Fama beta of the return distribution

findDrawdowns

Find the drawdowns and drawdown levels in a timeseries.

Frequency

Frequency of the return distribution

HurstIndex

calculate the Hurst Index The Hurst index can be used to measure wheth...

InformationRatio

InformationRatio = ActivePremium/TrackingError

lpm

calculate a lower partial moment for a time series

M2Sortino

M squared for Sortino of the return distribution

MarketTiming

Market timing models

MartinRatio

Martin ratio of the return distribution

NetSelectivity

Net selectivity of the return distribution

Omega

calculate Omega for a return series

OmegaExcessReturn

Omega excess return of the return distribution

OmegaSharpeRatio

Omega-Sharpe ratio of the return distribution

Return.convert

Convert coredata content from one type of return to another

Return.cumulative

calculate a compounded (geometric) cumulative return

RPESE.control

Controls Function for the Computation of Standard Errors for Risk and ...

Selectivity

Selectivity of the return distribution

table.AnnualizedReturns

Annualized Returns Summary: Statistics and Stylized Facts

table.Arbitrary

wrapper function for combining arbitrary function list into a table

table.Correlation

calculate correlalations of multicolumn data

table.Distributions

Distributions Summary: Statistics and Stylized Facts

table.InformationRatio

Information ratio Summary: Statistics and Stylized Facts

table.MonthlyReturns

Returns Summary: Statistics and Stylized Facts

table.ProbOutPerformance

Outperformance Report of Asset vs Benchmark

TotalRisk

Total risk of the return distribution

TrackingError

Calculate Tracking Error of returns against a benchmark

TreynorRatio

calculate Treynor Ratio or modified Treynor Ratio of excess return ove...

sortDrawdowns

order list of drawdowns from worst to best

chart.BarVaR

Periodic returns in a bar chart with risk metric overlay

chart.Boxplot

box whiskers plot wrapper

chart.CaptureRatios

Chart of Capture Ratios against a benchmark

chart.Correlation

correlation matrix chart

chart.CumReturns

Cumulates and graphs a set of periodic returns

charts.RollingPerformance

rolling performance chart

ActivePremium

Active Premium or Active Return

AdjustedSharpeRatio

Adjusted Sharpe ratio of the return distribution

CalmarRatio

calculate a Calmar or Sterling reward/risk ratioCalmar and Sterling Ra...

CAPM.dynamic

Time-varying conditional single factor model beta

CAPM.epsilon

Regression epsilon of the return distribution

CAPM.jensenAlpha

Jensen's alpha of the return distribution

CAPM.RiskPremium

utility functions for single factor (CAPM) CML, SML, and RiskPremium

CDaR.alpha

Conditional Drawdown alpha

CDaR.beta

Conditional Drawdown beta

CDD

Calculate Uryasev's proposed Conditional Drawdown at Risk (CDD or CDaR...

centeredmoments

calculate centered moment/co-moment return matrices

chart.ACF

Create ACF chart or ACF with PACF two-panel chart

chart.Bar

wrapper for barchart of returns

chart.Drawdown

Time series chart of drawdowns through time

chart.ECDF

Create an ECDF overlaid with a Normal CDF

chart.Events

Plots a time series with event dates aligned

chart.Histogram

histogram of returns

chart.QQPlot

Plot a QQ chart

chart.Regression

Takes a set of returns and relates them to a market benchmark in a sca...

chart.RelativePerformance

relative performance chart between multiple return series

chart.RiskReturnScatter

scatter chart of returns vs risk for comparing multiple instruments

chart.RollingCorrelation

chart rolling correlation fo multiple assets

chart.RollingMean

chart the rolling mean return

chart.RollingPerformance

wrapper to create a chart of rolling performance metrics in a line cha...

chart.RollingRegression

A wrapper to create charts of relative regression performance through ...

chart.Scatter

wrapper to draw scatter plot with sensible defaults

chart.SFM

Compare SFM estimated using robust estimators with that estimated by O...

chart.SnailTrail

chart risk versus return over rolling time periods

chart.StackedBar

create a stacked bar plot

chart.TimeSeries

Creates a time series chart with some extensions.

chart.VaRSensitivity

show the sensitivity of Value-at-Risk or Expected Shortfall estimates

charts.PerformanceSummary

Create combined wealth index, period performance, and drawdown chart

checkData

check input data type and format and coerce to the desired output type

checkSeedValue

Check 'seedValue' to ensure it is compatible with coredata_content att...

clean.boudt

clean extreme observations in a time series to to provide more robust ...

CoMoments

Functions for calculating comoments of financial time series

dot-coefficients

Wrapper for SFM's regression models.

DownsideDeviation

downside risk (deviation, variance) of the return distribution

DownsideFrequency

downside frequency of the return distribution

DownsideSharpeRatio

Downside Sharpe Ratio

Kappa

Kappa of the return distribution

KellyRatio

calculate Kelly criterion ratio (leverage or bet size) for a strategy

kurtosis

Kurtosis

legend

internal functions for setting useful defaults for graphs

Level.calculate

Calculate appropriate cumulative return series or asset level using xt...

maxDrawdown

caclulate the maximum drawdown from peak equity

MCA

Functions for doing Moment Component Analysis (MCA) of financial time ...

mean.geometric

calculate attributes relative to the mean of the observation series gi...

MeanAbsoluteDeviation

Mean absolute deviation of the return distribution

MinTrackRecord

Minimum Track Record Length

Modigliani

Modigliani-Modigliani measure

MSquared

M squared of the return distribution

MSquaredExcess

M squared excess of the return distribution

NCE

Functions for calculating the nearest comoment estimator for financial...

SkewnessKurtosisRatio

Skewness-Kurtosis ratio of the return distribution

PainIndex

Pain index of the return distribution

PainRatio

Pain ratio of the return distribution

PerformanceAnalytics-package

Econometric tools for performance and risk analysis.

portfolio-moments

Portfolio moments

ProbSharpeRatio

Probabilistic Sharpe Ratio

ProspectRatio

Prospect ratio of the return distribution

RachevRatio

Rachev Ratio

Return.annualized.excess

calculates an annualized excess return for comparing instruments with ...

Return.annualized

calculate an annualized return for comparing instruments with differen...

Return.calculate

calculate simple or compound returns from prices

Return.clean

clean returns in a time series to to provide more robust risk estimate...

SmoothingIndex

calculate Normalized Getmansky Smoothing Index

Return.excess

Calculates the returns of an asset in excess of the given risk free ra...

Return.Geltner

calculate Geltner liquidity-adjusted return series

Return.locScaleRob

Robust Filter for Time Series Returns

Return.portfolio

Calculate weighted returns for a portfolio of assets

Return.read

Read returns data with different date formats

Return.relative

calculate the relative return of one asset to another

SFM.alpha

Calculate single factor model (CAPM) alpha

SFM.beta

Calculate single factor model (CAPM) beta

SFM.coefficients

Calculate single factor model alpha and beta coefficients

SFM.fit.models

Compare SFM estimated using robust estimators with that estimated by O...

SharpeRatio.annualized

calculate annualized Sharpe Ratio

SharpeRatio

calculate a traditional or modified Sharpe Ratio of Return over StdDev...

ShrinkageMoments

Functions for calculating shrinkage-based comoments of financial time ...

skewness

Skewness

SortinoRatio

calculate Sortino Ratio of performance over downside risk

SpecificRisk

Specific risk of the return distribution

StdDev.annualized

calculate a multiperiod or annualized Standard Deviation

StdDev

calculates Standard Deviation for univariate and multivariate series, ...

StructuredMoments

Functions for calculating structured comoments of financial time serie...

SystematicRisk

Systematic risk of the return distribution

table.Autocorrelation

table for calculating the first six autocorrelation coefficients and s...

table.CalendarReturns

Monthly and Calendar year Return table

table.CAPM

Single Factor Asset-Pricing Model Summary: Statistics and Stylized Fac...

table.CaptureRatios

Calculate and display a table of capture ratio and related statistics

table.DownsideRisk

Downside Risk Summary: Statistics and Stylized Facts

table.DownsideRiskRatio

Downside Summary: Statistics and ratios

table.Drawdowns

Worst Drawdowns Summary: Statistics and Stylized Facts

table.DrawdownsRatio

Drawdowns Summary: Statistics and ratios

table.HigherMoments

Higher Moments Summary: Statistics and Stylized Facts

table.RollingPeriods

Rolling Periods Summary: Statistics and Stylized Facts

table.SpecificRisk

Specific risk Summary: Statistics and Stylized Facts

table.Variability

Variability Summary: Statistics and Stylized Facts

textplot

Display text information in a graphics plot.

to.period.contributions

Aggregate contributions through time

UlcerIndex

calculate the Ulcer Index

unique-comoments

Helper function for comoment matrices

UpDownRatios

calculate metrics on up and down markets for the benchmark asset

UpsideFrequency

upside frequency of the return distribution

UpsidePotentialRatio

calculate Upside Potential Ratio of upside performance over downside r...

UpsideRisk

upside risk, variance and potential of the return distribution

VaR

calculate various Value at Risk (VaR) measures

VolatilitySkewness

Volatility and variability of the return distribution

zerofill

zerofill

Collection of econometric functions for performance and risk analysis. In addition to standard risk and performance metrics, this package aims to aid practitioners and researchers in utilizing the latest research in analysis of non-normal return streams. In general, it is most tested on return (rather than price) data on a regular scale, but most functions will work with irregular return data as well, and increasing numbers of functions will work with P&L or price data where possible.