Learn R Programming

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

PerformanceAnalytics (version 0.9.6)

Econometric tools for performance and risk analysis.

Description

Library of econometric functions for performance and risk analysis. This library aims to aid practitioners and researchers in utilizing the latest research in analysis of non-normal return streams. In general, this library is most tested on return (rather than price) data on a monthly scale, but most functions will work with daily or irregular return data as well.

Copy Link

Version

Install

install.packages('PerformanceAnalytics')

Monthly Downloads

41,537

Version

0.9.6

License

GPL

Maintainer

Brian G Peterson

Last Published

February 6th, 2020

Functions in PerformanceAnalytics (0.9.6)

chart.RelativePerformance

relative performance chart between multiple return series
CAPM.alpha

calculate CAPM alpha
SharpeRatio

Sharpe Ratio
charts.RollingPerformance

rolling performance chart
BetaCoKurtosis

systematic kurtosis of an asset to the initial portfolio
KellyRatio

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

download 13-week US Treasury Bill Prices and calculate 13-week US Treasury Bill returns
CalmarRatio

calculate a Calmar or Sterling reward/risk ratio
Omega

calculate Omega for a return series
chart.Correlation

correlation matrix chart
chart.BarVaR

Periodic returns in a bar chart with risk metric overlay
UpsidePotentialRatio

calculate Upside Potential Ratio of upside performance over downside risk
table.Drawdowns

Worst Drawdowns Summary: Statistics and Stylized Facts
TreynorRatio

calculate Treynor Ratio of excess return over CAPM beta
UpDownRatios

calculate metrics on up and down markets for the benchmark asset
VaR.Beyond

calculate BVaR or loss Beyond traditional mean-VaR
BetaCoVariance

systematic beta of an asset to an initial portfolio
table.RollingPeriods

Rolling Periods Summary: Statistics and Stylized Facts
chart.RegressionDiagnostics

regression diagnostics charts
Return.excess

Calculates the returns of an asset in excess of the given risk free rate
charts.PerformanceSummary

Create combined wealth index, period performance, and drawdown chart
chart.RiskReturnScatter

scatter chart of returns vs risk for comparing multiple instruments
SmoothingIndex

calculate Normalized Getmansky Smoothing Index
table.Arbitrary

wrapper function for combining arbitrary function list into a table
maxDrawdown

caclulate the maximum drawdown from peak equity
chart.QQPlot

Plot a QQ chart
chart.TimeSeries

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

Cumulates and graphs a set of periodic returns
chart.ECDF

Create an ECDF overlaid with a Normal CDF
PerformanceAnalytics-internal

internal functions for setting useful defaults for graphs
BetaCoSkewness

systematic skewness of an asset to an initial portfolio
Return.annualized

calculate an annualized return for comparing instruments with different length history
chart.RollingCorrelation

chart rolling correlation fo multiple assets
chart.Histogram

histogram of returns
Return.Geltner

calculate Geltner liquidity-adjusted return series
sortDrawdowns

order list of drawdowns from worst to best
rollingStat

wrapper to apply any function over a rolling time window
InformationRatio

InformationRatio = ActivePremium/TrackingError
chart.Scatter

wrapper to draw scatter plot with sensible defaults
chart.Drawdown

Time series chart of drawdowns through time
SortinoRatio

calculate Sortino Ratio of performance over downside risk
rollingRegression

Rolling Regression on Returns
ActivePremium

Active Premium
moment.third

calculate the third mathematical moment of the return function
table.HigherMoments

Higher Moments Summary: Statistics and Stylized Facts
Return.calculate

calculate simple or compound returns from prices
Return.read

Read returns data with different date formats
Return.cumulative

calculate a compounded (geometric) cumulative return
mean.utils

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

Downside Risk Summary: Statistics and Stylized Facts
chart.RollingRegression

A wrapper to create charts of relative regression performance through time
CAPM.utils

utility functions for CAPM CML, SML, and RiskPremium
table.CAPM

Asset-Pricing Model Summary: Statistics and Stylized Facts
CoKurtosis

calculate the co-moment for kurtosis of two assets
PerformanceAnalytics-package

Econometric tools for performance and risk analysis.
chart.RollingPerformance

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

calculate the co-moment for skewness of two assets
sd.multiperiod

calculate a multiperiod or annualized Standard Deviation
chart.Bar

wrapper for barchart of returns
chart.Boxplot

box whiskers plot wrapper
download.SP500PriceReturns

download S & P Prices and calculate S & P returns
SharpeRatio.modified

calculate a modified Sharpe Ratio of Return/modVaR
SharpeRatio.annualized

calculate annualized Sharpe Ratio
apply.fromstart

calculate a function over an expanding window always starting from the beginning of the series
chart.RollingMean

chart the rolling mean return
managers

Hypothetical Alternative Asset Manager Data and Fixed Income Benchmarks
findDrawdowns

Find the drawdowns and drawdown levels in a timeseries.
checkData

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

calculate correlalations of multicolumn data
table.MonthlyReturns

Monthly Returns Summary: Statistics and Stylized Facts
table.CalendarReturns

Monthly and Calendar year Return table
moment.fourth

calculate the fourth mathematical moment of the return function
CAPM.beta

calculate CAPM beta
DownsideDeviation

downside risk (deviation, variance) of the return distribution
chart.Regression

Takes a set of returns and relates them to a market benchmark in a scatterplot
chart.Correlation.color

correlation matrix chart, in color
TrackingError

Calculate Tracking Error of returns against a benchmark
VaR.CornishFisher

calculate various Value at Risk (VaR) measures
apply.rolling

calculate a function over a rolling window
chart.ACF

Create ACF chart or ACF with PACF two-panel chart
VaR.Marginal

Calculate the Marginal VaR of each element of a portfolio
table.Autocorrelation

table for calculating the first six autocorrelation coefficients and significance
edhec

EDHEC-Risk Hedge Fund Style Indices
cum.utils

wrapper to calculate cumprod on all columns in a matrix
table.AnnualizedReturns

Annualized Returns Summary: Statistics and Stylized Facts