Learn R Programming

Trading (version 3.1)

CalcUKLotteryPnL: PnL calculation for UKLottery backtesting

Description

Calculates the PnL for a pay out structure created during backtesting

Usage

CalcUKLotteryPnL(backtested_results, plot_results = FALSE)

Value

PnL figures

Arguments

backtested_results

The UKLottery 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

uklottery_results = UKLotteryResults()
user_input = c(5,10,20,30,40,50)
backtested_results = UKLotteryBacktesting(uklottery_results,, user_input)
pnl_result = CalcUKLotteryPnL(backtested_results, plot_results = FALSE)

Run the code above in your browser using DataLab