backtestGraphics-package: A package to visualize backtest results

Description Details


Package backtestGraphics
Type: Package
Version: 0.1-1
Date: 2015-07-14
License: GPL-3


The backtestGraphics package creates an interactive graphics interface for commodity futures portfolios, equity portfolios and credit default swap. The interface contains three drop-down menus that allow the user to look at different portfolios, different investment strategies and different sectors or commodities. Summary statistics of the start date, end date, allocated capital, average GMV, number of instruments, cumulative P&L, annualized P&L, annualized volatility, sharpe ratio, best month and worst month are displayed in the summary screen. More details of the top three drawdowns, three best performers and three worst performers are displayed in another detail screen. An interactive plot for the cumulative P&L or the daily P&L is shown at the top and another interactive graph for nmv, gmv and number of contracts is displayed at the bottom.

The package contains a main function backtestGraphics that takes in a data frame of backtest results, and returns summary statistics about the data frame and plots the historical traces of market values and profits. The package also contains many helper functions that perform the calculations and plotting for the backtestGraphics function. These helper functions can only be called within the backtestGraphics function.

The package contains three data frames, commodity, equity and credit. The commodity data frame contains the backtest results for 28 commodities in the futures market. The equity data frame contains the backtest results for random 50 stocks. The credit data frame is the backtest result for credit default swap. The user can simply call backtestGraphics with these data frames. An example will be backtestGraphics(x = commodity).

In order to use the user's own data frame, sometimes the user might need to specify the column names of her data frame and pass them into the function. Type ?backtestGraphics for more details.

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