PFstats: PFstats

Description Usage Arguments Value Examples

View source: R/CQF_FA_Functions.R

Description

This function creates all important descriptive statistics such as VaR, ES, Return for a portfolio

Usage

1
2
3
PFstats(weights.vector, daily.returns.data.wide,
  num.trade.days.per.year = 250, long.term.mean.return = 0,
  long.term.sd.return = 0.01)

Arguments

weights.vector

vector that contains the relative weights of the individual assets of the portfolio

daily.returns.data.wide

data.frame including the daily returns of the specific assets as well as a reference date

num.trade.days.per.year

Number of trading days per year, default set to 250

Value

a list with a data.frame PF.return.result.table that includes all statistics, as well as two graphs - histogram with returns and a correlation matrix

Examples

1
2
3
weights.vector          <- c(0.7,0.3)
daily.returns.data.wide <- data.frame(ref.date=c(Sys.Date()-2:0), asset1.ret=c(-0.02,0.005,0.004), asset2.ret=c(0,-0.001,0.02))
PFstats(weights.vector=weights.vector, daily.returns.data.wide=daily.returns.data.wide)

theteetrinker/CQFFA documentation built on July 17, 2019, 3:37 p.m.