Learn R Programming

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

PerformanceAnalytics (version 0.9.7.1)

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

License

GPL

Maintainer

Brian G Peterson

Last Published

February 6th, 2020

Functions in PerformanceAnalytics (0.9.7.1)

SortinoRatio

calculate Sortino Ratio of performance over downside risk
CAPM.utils

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

calculate CAPM beta
Return.cumulative

calculate a compounded (geometric) cumulative return
Return.annualized

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

Create an ECDF overlaid with a Normal CDF
InformationRatio

InformationRatio = ActivePremium/TrackingError
Return.clean

clean returns in a time series to to provide more robust risk estimates
ActivePremium

Active Premium
Omega

calculate Omega for a return series
BetaCo-Moments

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

Sharpe Ratio
CAPM.alpha

calculate CAPM alpha
SharpeRatio.modified

calculate a modified Sharpe Ratio of Return/modVaR
Return.excess

Calculates the returns of an asset in excess of the given risk free rate
VaR.Marginal

Calculate the Marginal VaR of each element of a portfolio
apply.rolling

calculate a function over a rolling window
chart.BarVaR

Periodic returns in a bar chart with risk metric overlay
clean.boudt

clean extreme observations in a time series to to provide more robust risk estimates
PerformanceAnalytics-package

Econometric tools for performance and risk analysis.
sortDrawdowns

order list of drawdowns from worst to best
table.RollingPeriods

Rolling Periods Summary: Statistics and Stylized Facts
VaR.Beyond

calculate BVaR or loss Beyond traditional mean-VaR
chart.Regression

Takes a set of returns and relates them to a market benchmark in a scatterplot
sd.multiperiod

calculate a multiperiod or annualized Standard Deviation
SharpeRatio.annualized

calculate annualized Sharpe Ratio
PerformanceAnalytics-internal

internal functions for setting useful defaults for graphs
Return.read

Read returns data with different date formats
managers

Hypothetical Alternative Asset Manager and Benchmark Data
TrackingError

Calculate Tracking Error of returns against a benchmark
chart.RelativePerformance

relative performance chart between multiple return series
chart.Style

calculate and display effective style weights
SmoothingIndex

calculate Normalized Getmansky Smoothing Index
chart.Histogram

histogram of returns
chart.RollingPerformance

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

functions to compute multivariate moments of a joint distribution
UpDownRatios

calculate metrics on up and down markets for the benchmark asset
UpsidePotentialRatio

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

chart the rolling mean return
apply.fromstart

calculate a function over an expanding window always starting from the beginning of the series
Return.Geltner

calculate Geltner liquidity-adjusted return series
checkData

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

scatter chart of returns vs risk for comparing multiple instruments
cum.utils

wrapper to calculate cumprod on all columns in a matrix
mean.utils

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

Monthly and Calendar year Return table
Co-Moments

Functions for calculating comoments of financial time series
table.Drawdowns

Worst Drawdowns Summary: Statistics and Stylized Facts
CenteredMoments

calculate centered moments of a joint distribution
chart.CumReturns

Cumulates and graphs a set of periodic returns
table.DownsideRisk

Downside Risk Summary: Statistics and Stylized Facts
chart.Boxplot

box whiskers plot wrapper
download.SP500PriceReturns

download S & P Prices and calculate S & P returns
TreynorRatio

calculate Treynor Ratio of excess return over CAPM beta
CalmarRatio

calculate a Calmar or Sterling reward/risk ratio
download.RiskFree

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

calculate simple or compound returns from prices
edhec

EDHEC-Risk Hedge Fund Style Indices
KellyRatio

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

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

wrapper for barchart of returns
DownsideDeviation

downside risk (deviation, variance) of the return distribution
table.Arbitrary

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

Annualized Returns Summary: Statistics and Stylized Facts
chart.Drawdown

Time series chart of drawdowns through time
kurtosis

Kurtosis
MultivariateRisk

calculate common VaR and ES risk measures on a portfolio distribution
VaR.CornishFisher

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

A wrapper to create charts of relative regression performance through time
chart.TimeSeries

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

Plot a QQ chart
table.Autocorrelation

table for calculating the first six autocorrelation coefficients and significance
chart.SnailTrail

chart risk versus return over rolling time periods
charts.PerformanceSummary

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

caclulate the maximum drawdown from peak equity
chart.StackedBar

create a stacked bar plot
chart.VaRSensitivity

show the sensitivity of Value-at-Risk estimates
chart.Correlation

correlation matrix chart
chart.Correlation.color

correlation matrix chart, in color
chart.RollingCorrelation

chart rolling correlation fo multiple assets
findDrawdowns

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

Asset-Pricing Model Summary: Statistics and Stylized Facts
chart.Scatter

wrapper to draw scatter plot with sensible defaults
rollingStat

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

Higher Moments Summary: Statistics and Stylized Facts
weights

Selected Portfolio Weights Data
skewness

Skewness
charts.RollingPerformance

rolling performance chart
table.MonthlyReturns

Monthly Returns Summary: Statistics and Stylized Facts
table.Correlation

calculate correlalations of multicolumn data
rollingRegression

Rolling Regression on Returns