calc_pnl: Calculate cumulative pnl, mean pnl, dollar sharpe ratio

Description Usage Arguments Value

View source: R/calc_pnl.R

Description

This function takes in a data frame and calculates the cumulative P&L, daily P&L, annualized P&L, P&L volatility and dollar sharpe ratio as well as three biggest drawdowns. There are also average daily return rate and the standard deviation of daily return rates.

Usage

1
calc_pnl(x, trade.freq = 7)

Arguments

x

A data frame that contains data for individual commodities.

trade.freq

The trading frequency of the portfolio, numeric

Value

a list ith cumulative pnl, mean pnl, annualized volatility of pnl, dollar sharpe ratio and drawdown


backtestGraphics documentation built on May 29, 2017, 3:11 p.m.

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