Learn R Programming

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

PerformanceAnalytics (version 0.9.4)

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

License

GPL

Maintainer

Brian G Peterson

Last Published

February 6th, 2020

Functions in PerformanceAnalytics (0.9.4)

PerformanceAnalytics-internal

internal functions for setting useful defaults for graphs
cummax.column

wrapper to calculate cummax on all columns in a matrix
SharpeRatio

Sharpe Ratio
chart.CumReturns

Cumulates and graphs a set of periodic returns
moment.third

calculate the third mathematical moment of the return function
SharpeRatio.modified

calculate a modified Sharpe Ratio of Return/modVaR
CAPM.alpha

calculate CAPM alpha
VaR.Beyond

calculate BVaR or loss Beyond traditional mean-VaR
findDrawdowns

Find the drawdowns and drawdown levels in a timeseries.
Return.annualized

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

deviation below the mean of the return distribution
SortinoRatio

calculate Sortino Ratio of performance over downside risk
rollingFunction

wrapper to apply functions over a rolling period
checkData

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

correlation matrix chart
Return.cumulative

calculate a compounded (geometric) cumulative return
chart.Boxplot

box whiskers plot wrapper, with sensible defaults
SharpeRatio.annualized

calculate annualized Sharpe Ratio
DownsideDeviation

function for downside risk of the return distribution
table.MonthlyReturns

Monthly Returns Summary: Statistics and Stylized Facts
table.Returns

Monthly and Calendar year Return table
StdDev

Standard Deviation of Monthly Returns
TrackingError

Calculate Tracking Error of returns against a benchmark
UpDownRatios

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

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

chart the rolling mean return
chart.Histogram

histogram of returns
apply.rolling

calculate a function over a rolling window
CAPM.beta

calculate CAPM beta
PerformanceAnalytics-package

Econometric tools for performance and risk analysis.
table.Drawdowns

Worst Drawdowns Summary: Statistics and Stylized Facts
CAPM.utils

utility functions for CAPM CML, SML, and RiskPremium
VaR.Marginal

Calculate the Marginal VaR of each element of a portfolio
chart.RiskReturnScatter

scatter chart of returns vs risk for comparing multiple instruments
TreynorRatio

calculate Treynor Ratio of excess return over CAPM beta
charts.RollingPerformance

rolling performance chart
CoKurtosis

calculate the co-moment for kurtosis of two assets
BetaCoKurtosis

systematic kurtosis of an asset to the initial portfolio
chart.Scatter

wrapper to draw scatter plot with sensible defaults
CalculateReturns

calculate simple or compound returns from prices
chart.Bar

wrapper for barchart of returns
edhec

EDHEC-Risk Hedge Fund Style Indices
download.SP500PriceReturns

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

Time series chart of drawdowns through time
chart.RollingRegression

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

calculate the co-moment for skewness of two assets
chart.TimeSeries

Creates a time series chart with some extensions.
moment.fourth

calculate the fourth mathematical moment of the return function
ActivePremium

Active Premium
apply.fromstart

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

Periodic returns in a bar chart with risk metric overlay
table.RollingPeriods

Rolling Periods Summary: Statistics and Stylized Facts
charts.PerformanceSummary

Create combined wealth index, period performance, and drawdown chart
BetaCoVariance

systematic beta of an asset to an initial portfolio
download.RiskFree

download 13-week US Treasury Bill Prices and calculate 13-week US Treasury Bill returns
chart.QQPlot

wrapper for qq.plot, with sensible defaults
maxDrawdown

caclulate the maximum drawdown from peak equity
KellyRatio

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

Calculates the returns of an asset in excess of the given risk free rate
BetaCoSkewness

systematic skewness of an asset to an initial portfolio
cumprod.column

wrapper to calculate cumprod on all columns in a matrix
chart.RegressionDiagnostics

regression diagnostics charts
Omega

calculate Omega for a return series
rollingCorrelation

rolling training period covariance/correlation
table.HigherMoments

Higher Moments Summary: Statistics and Stylized Facts
sortDrawdowns

order list of drawdowns from worst to best
chart.Correlation.color

correlation matrix chart, in color
mean.utils

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

wrapper function for combining arbitrary function list into a table
table.DownsideRisk

Downside Risk Summary: Statistics and Stylized Facts
table.AnnualizedReturns

Annualized Returns Summary: Statistics and Stylized Facts
chart.RollingPerformance

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

wrapper to apply any function over a rolling time window
table.Correlation

calculate correlalations of multicolumn data
InformationRatio

InformationRatio = ActivePremium/TrackingError
StdDev.annualized

calculate an annualized Standard Deviation
chart.RollingCorrelation

chart rolling correlation fo multiple assets
chart.RelativePerformance

relative performance chart between multiple return series
table.CAPM

Asset-Pricing Model Summary: Statistics and Stylized Facts
rollingRegression

Rolling Regression on Returns