sharpe: Sharpe ratio calculation of a portfolio.

Description Usage Arguments Value Examples

View source: R/portfolio_construction.R View source: R/summary_stats.R

Description

The function gives the Sharpe ratio of a PF, given its constituents' expected returns, its covariances and weights.

Usage

1
sharpe(expectedreturn, covmatrix, par)

Arguments

expectedreturn

A matrix of expected returns.

covmatrix

A matrix containing the covarinaces of the PF's constituents, with their variance on the main diagonale

par

A matrix containing the weights of the PF constituents. All weights, except for one, have to be provided, as the last one is choosen, such that the weights sum up to 100 percent.

Value

Numeric vector conraining the Sharpe ratio.

Examples

1
2
3
sharpe(expectedreturn = matrix(c(1, 2)),
covmatrix = matrix(c(0.004, 0.7, 0.7, 0.002), nrow = 2),
par = c(0.2))

MatthiasSpeicher/gryffindorrobo documentation built on Dec. 27, 2019, 2:15 a.m.