Return.result: Calculate returns & turnover for a portfolio of assets

Description Usage Arguments Details Value Examples

View source: R/Return.result.R

Description

This function using Return.Portfolio function

Usage

1
Return.result(R, weight = NULL, fee = 0)

Arguments

R

An xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

weight

A time series or single-row matrix/vector containing asset weights, as decimal percentages, treated as beginning of period weights.

fee

Buy/Sell fee, cost, and tax.

Details

Using a time series of returns and weights for each asset, this function calculates the returns of a portfolio with the Gross Return, Net Return (after fee), and Turnover of Portfolio.

Value

gross is before cost, net is after cost, and turnover is turnover rate

Examples

1
2
3
4
5
  ret = asset_data[,c(1,5)]
  portfolio = Return.result(ret)
  port_gross = portfolio$gross
  port_net = portfolio$net
  port_turnover = portfolio$turnover

hyunyulhenry/HenryQuant documentation built on Nov. 15, 2019, 2:28 a.m.