getPnL: Get pnl as xts series

Description Usage Arguments Value

View source: R/get_timeseries.R

Description

This method should be called only after backtest is done

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getPnL(this, ...)

## S3 method for class 'modelStrategy'
getPnL(this, start_date = NULL, end_date = NULL,
  comOn = TRUE, leg = "all", ...)

## S3 method for class 'modelPortfolio'
getPnL(this, ...)

## S3 method for class 'list'
getPnL(this, ...)

Arguments

this

modelStrategy

...

params

start_date

date type, example: start_date='2008-01-01'

end_date

date type, example: end_date='2018-01-01'

comOn

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

leg

numeric/character, number of leg, if it is equal to 'all' or 'sum', then all pnl among all legs

Value

xts zoo

xts zoo


Vitalic57/stratbuilder2pub documentation built on Dec. 18, 2019, 2:56 a.m.