Learn R Programming

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

PerformanceAnalytics (version 0.9.5)

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.5

License

GPL

Maintainer

Brian G Peterson

Last Published

February 6th, 2020

Functions in PerformanceAnalytics (0.9.5)

BetaCoKurtosis

systematic kurtosis of an asset to the initial portfolio
UpDownRatios

calculate metrics on up and down markets for the benchmark asset
apply.rolling

calculate a function over a rolling window
SharpeRatio

Sharpe Ratio
chart.Bar

wrapper for barchart of returns
chart.Correlation

correlation matrix chart
InformationRatio

InformationRatio = ActivePremium/TrackingError
CoKurtosis

calculate the co-moment for kurtosis of two assets
maxDrawdown

caclulate the maximum drawdown from peak equity
rollingFunction

wrapper to apply functions over a rolling period
DownsideDeviation

function for downside risk of the return distribution
CalculateReturns

calculate simple or compound returns from prices
Return.cumulative

calculate a compounded (geometric) cumulative return
Omega

calculate Omega for a return series
ActivePremium

Active Premium
chart.CumReturns

Cumulates and graphs a set of periodic returns
chart.RollingRegression

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

calculate CAPM alpha
sd.multiperiod

calculate a multiperiod or annualized Standard Deviation
chart.RegressionDiagnostics

regression diagnostics charts
CalmarRatio

calculate a Calmar or Sterling reward/risk ratio
SharpeRatio.modified

calculate a modified Sharpe Ratio of Return/modVaR
chart.RollingMean

chart the rolling mean return
BetaCoSkewness

systematic skewness of an asset to an initial portfolio
chart.Histogram

histogram of returns
VaR.Marginal

Calculate the Marginal VaR of each element of a portfolio
Return.annualized

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

calculate Sortino Ratio of performance over downside risk
charts.PerformanceSummary

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

wrapper to draw scatter plot with sensible defaults
KellyRatio

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

calculate Treynor Ratio of excess return over CAPM beta
chart.RiskReturnScatter

scatter chart of returns vs risk for comparing multiple instruments
download.SP500PriceReturns

download S & P Prices and calculate S & P returns
chart.RollingPerformance

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

deviation below the mean of the return distribution
chart.Boxplot

box whiskers plot wrapper, with sensible defaults
chart.QQPlot

wrapper for qq.plot, with sensible defaults
table.Correlation

calculate correlalations of multicolumn data
table.RollingPeriods

Rolling Periods Summary: Statistics and Stylized Facts
table.Drawdowns

Worst Drawdowns Summary: Statistics and Stylized Facts
SharpeRatio.annualized

calculate annualized Sharpe Ratio
findDrawdowns

Find the drawdowns and drawdown levels in a timeseries.
chart.Drawdown

Time series chart of drawdowns through time
PerformanceAnalytics-internal

internal functions for setting useful defaults for graphs
BetaCoVariance

systematic beta of an asset to an initial portfolio
mean.utils

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

wrapper to apply any function over a rolling time window
chart.TimeSeries

Creates a time series chart with some extensions.
chart.Correlation.color

correlation matrix chart, in color
PerformanceAnalytics-package

Econometric tools for performance and risk analysis.
CAPM.beta

calculate CAPM beta
VaR.Beyond

calculate BVaR or loss Beyond traditional mean-VaR
table.MonthlyReturns

Monthly Returns Summary: Statistics and Stylized Facts
table.DownsideRisk

Downside Risk Summary: Statistics and Stylized Facts
TrackingError

Calculate Tracking Error of returns against a benchmark
table.CAPM

Asset-Pricing Model Summary: Statistics and Stylized Facts
table.AnnualizedReturns

Annualized Returns Summary: Statistics and Stylized Facts
rollingCorrelation

rolling training period covariance/correlation
table.HigherMoments

Higher Moments Summary: Statistics and Stylized Facts
moment.third

calculate the third mathematical moment of the return function
charts.RollingPerformance

rolling performance chart
CoSkewness

calculate the co-moment for skewness of two assets
rollingRegression

Rolling Regression on Returns
statsTable

wrapper function for combining arbitrary function list into a table
managers

Hypothetical Alternative Asset Manager Data and Fixed Income Benchmarks
chart.BarVaR

Periodic returns in a bar chart with risk metric overlay
UpsidePotentialRatio

calculate Upside Potential Ratio of upside performance over downside risk
edhec

EDHEC-Risk Hedge Fund Style Indices
checkData

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

utility functions for CAPM CML, SML, and RiskPremium
download.RiskFree

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

order list of drawdowns from worst to best
Return.excess

Calculates the returns of an asset in excess of the given risk free rate
moment.fourth

calculate the fourth mathematical moment of the return function
chart.RollingCorrelation

chart rolling correlation fo multiple assets
table.Returns

Monthly and Calendar year Return table
chart.RelativePerformance

relative performance chart between multiple return series
cum.utils

wrapper to calculate cumprod on all columns in a matrix
apply.fromstart

calculate a function over an expanding window always starting from the beginning of the series
VaR.CornishFisher

calculate various Value at Risk (VaR) measures