sum_data: Summarize data for the overall portfolio

Description Usage Arguments Value

Description

This function takes in a data set and returns the summary for each day's net market value, profit and loss, contract number and return rate.

Usage

1
sum_data(x, sector.selected = NULL, capital.num = NULL)

Arguments

x

A data frame that contains data for individual commodities.

sector.selected

The sector that the function is doing summarization for. When "sector.selected = NULL", the function performs summarization across the whole data set.

capital.num

The constant number of allocated capital to calculate return, number. Default value is NULL. When "capital.num = NULL", the function uses gross market value to calculate return rates for each row.

Value

A data frame that summarizes the market values and returns across all commodities.



Search within the backtestGraphics package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.