Print a ledgr config
Usage
# S3 method for class 'ledgr_config'
print(x, ...)Examples
bars <- data.frame(
ts_utc = as.POSIXct("2020-01-01", tz = "UTC") + 86400 * 0:2,
instrument_id = "AAA",
open = c(100, 101, 102),
high = c(101, 102, 103),
low = c(99, 100, 101),
close = c(100, 101, 102),
volume = 1000
)
strategy <- function(ctx, params) ctx$flat()
bt <- ledgr_backtest(data = bars, strategy = strategy, initial_cash = 1000)
if (interactive()) print(bt$config)
close(bt)