CalcSetForLifePnL: PnL calculation for Set For Life backtesting

View source: R/CalcSetForLifePnL.R

CalcSetForLifePnLR Documentation

PnL calculation for Set For Life backtesting

Description

Calculates the PnL for a pay out structure created during backtesting

Usage

CalcSetForLifePnL(backtested_results, plot_results = FALSE)

Arguments

backtested_results

The Set For Life results backtested against the user input

plot_results

(Optional) If TRUE, the P&L historical graphs are plotted, default FALSE

Value

PnL figures

Author(s)

Tasos Grivas <tasos@openriskcalculator.com>

Examples


setforlife_results = SetForLifeResults()
user_input = c(10,20,30,40,50,5)
backtested_results = SetForLifeBacktesting(setforlife_results, date_since='2005-01-01', user_input)
pnl_result = CalcSetForLifePnL(backtested_results, plot_results = FALSE)

Trading documentation built on April 13, 2025, 5:10 p.m.