sum_data: Summarize data for the overall portfolio

Description Usage Arguments Value


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.


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



A data frame that contains data for individual commodities.


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


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.


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

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

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