backtest | R Documentation |
Run the backtest with the specified parametrs
backtest( data, strat, cost, qty, sell_at_end = T, price_fun = quantmod::Op, debug = F )
data |
xts data |
strat |
strategy list with the strat_fun |
cost |
trade cost |
qty |
order size |
sell_at_end |
sell at the end of the backtest. |
price_fun |
price function for buying and selling. By default, the opening price |
debug |
return additional data for debugging |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.