Learn R Programming

Trading (version 3.2)

CalcEuroLotteryPnL: PnL calculation for EuroMillions/EuroJackpot backtesting

Description

Calculates the PnL for a pay out structure created during backtesting

Usage

CalcEuroLotteryPnL(backtested_results, plot_results = FALSE)

Value

PnL figures

Arguments

backtested_results

The EuroMillions/EuroJackpot 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

euromillions_results = EuroMillionsResults()
user_input = c(10,20,30,40,50,5,10)
backtested_results = EuroLotteryBacktesting(euromillions_results, '2005-01-01', user_input)
pnl_result = CalcEuroLotteryPnL(backtested_results, plot_results = TRUE)

Run the code above in your browser using DataLab