Learn R Programming

Trading (version 3.1)

CalcUKThunderBallPnL: PnL calculation for UKThunderBall backtesting

Description

Calculates the PnL for a pay out structure created during backtesting

Usage

CalcUKThunderBallPnL(backtested_results, plot_results = FALSE)

Value

PnL figures

Arguments

backtested_results

The UKThunderBall results backtested against the user input

plot_results

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

Author

Tasos Grivas <tasos@openriskcalculator.com>

Examples

Run this code

ukthunderball_results = UKThunderBallResults()
user_input = c(10,20,30,31,32,5)
backtested_results = UKThunderballBacktesting(ukthunderball_results, user_input = user_input)
pnl_result = CalcUKThunderBallPnL(backtested_results, plot_results = FALSE)

Run the code above in your browser using DataLab