plotPnL: Plot change of profit and loss through backtest period

View source: R/genericStrategy.R

plotPnL.StrategyR Documentation

Plot change of profit and loss through backtest period

Description

Plot change of profit and loss through backtest period

Usage

## S3 method for class 'Strategy'
plotPnL(
  this,
  comOn = TRUE,
  leg = "all",
  graph_type = "ggplot2",
  each_year = FALSE,
  adjust = FALSE,
  return_type = "plot",
  cutoff = FALSE,
  start,
  end
)

Arguments

this

Strategy

comOn

bool, if true then commission will be included in the 'trades' graph

leg

numeric/character, number or numbers of legs, if it is equal to 'all' or 'sum', then all pnl among all legs will be summed, if it is equal to 'sep', then pnl among legs will be plotted

graph_type

character, ggplot2 / xts / plotly

each_year

logical, if TRUE, then each graph will start with 0 each year

adjust

logical, if TRUE, then values will be divided by getMoney(this)

return_type

character, plot or data

cutoff

logical, if true then vertical line will plotted on graph where model was created


Vitalic57/stratbuilder3gen documentation built on March 30, 2022, 6:58 a.m.