fixed_commission_backtest.Rd
Fixed Commission Backtest
fixed_commission_backtest(
prices,
theo_weights,
trade_buffer = 0,
initial_cash = 10000,
commission_pct = 0,
capitalise_profits = FALSE
)
Matrix of trade prices. Column 1 must be the timestamp or index.
Matrix of theoretical weights. Column 1 must be the timestamp or index.
Trade buffer parameter
Inital cash balance
Percent commission charged on trades
If TRUE, utilise profits and initial cash balance in determining position sizes. If FALSE, profits accrue as a cash balance and are not reinvested.
long dataframe of results - dates, trades, commissions, value of portfolio components
theo_weights
should be date-aligned with prices
- it is up to the user to lag theo_weights
as necessary to
ensure that trades occur at appropriate prices.