Learn R Programming

⚠️There's a newer version (2.0.8) of this package.Take me there.

PerformanceAnalytics (version 1.0.4.4)

Econometric tools for performance and risk analysis.

Description

Collection of econometric functions for performance and risk analysis. 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.

Copy Link

Version

Install

install.packages('PerformanceAnalytics')

Monthly Downloads

41,537

Version

1.0.4.4

License

GPL

Maintainer

Brian G Peterson

Last Published

March 31st, 2012

Functions in PerformanceAnalytics (1.0.4.4)

Co-Moments

Functions for calculating comoments of financial time series
ActivePremium

Active Premium
Return.annualized

calculate an annualized return for comparing instruments with different length history
DownsideDeviation

downside risk (deviation, variance) of the return distribution
sd.multiperiod

calculate a multiperiod or annualized Standard Deviation
apply.rolling

calculate a function over a rolling window
TreynorRatio

calculate Treynor Ratio of excess return over CAPM beta
findDrawdowns

Find the drawdowns and drawdown levels in a timeseries.
table.AnnualizedReturns

Annualized Returns Summary: Statistics and Stylized Facts
chart.Drawdown

Time series chart of drawdowns through time
Omega

calculate Omega for a return series
chart.ACF

Create ACF chart or ACF with PACF two-panel chart
chart.VaRSensitivity

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

caclulate the maximum drawdown from peak equity
chart.Bar

wrapper for barchart of returns
chart.Scatter

wrapper to draw scatter plot with sensible defaults
prices

Selected Price Series Example Data
Return.relative

calculate the relative return of one asset to another
clean.boudt

clean extreme observations in a time series to to provide more robust risk estimates
CDD

Calculate Uryasev's proposed Conditional Drawdown at Risk (CDD or CDaR) measure
Return.cumulative

calculate a compounded (geometric) cumulative return
table.DownsideRisk

Downside Risk Summary: Statistics and Stylized Facts
chart.Correlation

correlation matrix chart
chart.TimeSeries

Creates a time series chart with some extensions.
chart.RollingPerformance

wrapper to create a chart of rolling performance metrics in a line chart
InformationRatio

InformationRatio = ActivePremium/TrackingError
chart.Events

Plots a time series with event dates aligned
Return.Geltner

calculate Geltner liquidity-adjusted return series
chart.Histogram

histogram of returns
chart.CaptureRatios

Chart of Capture Ratios against a benchmark
Return.centered

calculate centered Returns
table.CalendarReturns

Monthly and Calendar year Return table
SortinoRatio

calculate Sortino Ratio of performance over downside risk
chart.Boxplot

box whiskers plot wrapper
charts.PerformanceSummary

Create combined wealth index, period performance, and drawdown chart
CAPM.alpha

calculate CAPM alpha
PerformanceAnalytics-internal

internal functions for setting useful defaults for graphs
weights

Selected Portfolio Weights Data
ES

calculates Expected Shortfall(ES) (or Conditional Value-at-Risk(CVaR) for univariate and component, using a variety of analytical methods.
chart.RollingCorrelation

chart rolling correlation fo multiple assets
SharpeRatio.annualized

calculate annualized Sharpe Ratio
UpDownRatios

calculate metrics on up and down markets for the benchmark asset
chart.RollingMean

chart the rolling mean return
managers

Hypothetical Alternative Asset Manager and Benchmark Data
charts.RollingPerformance

rolling performance chart
table.CaptureRatios

Calculate and display a table of capture ratio and related statistics
chart.RiskReturnScatter

scatter chart of returns vs risk for comparing multiple instruments
CalmarRatio

calculate a Calmar or Sterling reward/risk ratio
table.TrailingPeriods

Rolling Periods Summary: Statistics and Stylized Facts
chart.CumReturns

Cumulates and graphs a set of periodic returns
Return.read

Read returns data with different date formats
Return.clean

clean returns in a time series to to provide more robust risk estimates
Return.calculate

calculate simple or compound returns from prices
chart.SnailTrail

chart risk versus return over rolling time periods
TrackingError

Calculate Tracking Error of returns against a benchmark
Return.excess

Calculates the returns of an asset in excess of the given risk free rate
apply.fromstart

calculate a function over an expanding window always starting from the beginning of the series
SmoothingIndex

calculate Normalized Getmansky Smoothing Index
chart.BarVaR

Periodic returns in a bar chart with risk metric overlay
skewness

Skewness
PerformanceAnalytics-package

Econometric tools for performance and risk analysis.
table.Correlation

calculate correlalations of multicolumn data
table.Autocorrelation

table for calculating the first six autocorrelation coefficients and significance
Return.portfolio

Calculates weighted returns for a portfolio of assets
UpsidePotentialRatio

calculate Upside Potential Ratio of upside performance over downside risk
chart.QQPlot

Plot a QQ chart
kurtosis

Kurtosis
checkData

check input data type and format and coerce to the desired output type
table.CAPM

Asset-Pricing Model Summary: Statistics and Stylized Facts
textplot

Display text information in a graphics plot.
chart.Regression

Takes a set of returns and relates them to a market benchmark in a scatterplot
table.Stats

Returns Summary: Statistics and Stylized Facts
sortDrawdowns

order list of drawdowns from worst to best
CAPM.beta

calculate CAPM beta
table.HigherMoments

Higher Moments Summary: Statistics and Stylized Facts
KellyRatio

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

wrapper function for combining arbitrary function list into a table
SharpeRatio

calculate a traditional or modified Sharpe Ratio of Return over StdDev or VaR or ES
edhec

EDHEC-Risk Hedge Fund Style Indices
StdDev

calculates Standard Deviation for univariate and multivariate series, also calculates component contribution to standard deviation of a portfolio
Beta Co-Moments

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

Create an ECDF overlaid with a Normal CDF
VaR

calculate various Value at Risk (VaR) measures
chart.RollingRegression

A wrapper to create charts of relative regression performance through time
zerofill

zerofill
table.Drawdowns

Worst Drawdowns Summary: Statistics and Stylized Facts
mean.utils

calculate attributes relative to the mean of the observation series given, including geometric, stderr, LCL and UCL
chart.RelativePerformance

relative performance chart between multiple return series
chart.StackedBar

create a stacked bar plot
CAPM.utils

utility functions for CAPM CML, SML, and RiskPremium