Description Usage Arguments Details Value Examples
Make judgements of an input quantler obj.
1 | backtest(trade.info, cash = 0, is.tax = T, tax.rate = 0.003)
|
trade.info |
A data frame contains the signal of trade information and stock data. |
cash |
Trade money at start. |
is.tax |
Boolean values of True or False, add trading commission or not. |
tax.rate |
Tax rate per trade, only valide when set is.tax to True. |
is.pic |
Plot results or not. |
is.pic.whole |
Should the pic output be in one piece together or in a list which contains all segments of different pics, only valied when is.pic is True. |
plotlevel |
Values in one of "1min", "60mins", "1day", only valied when is.pic is True. |
is.simple |
Boolean values of True or False, which means if the judgement should be done in a simple way to run faster, only valied when is.pic is True. |
Trade.info must be a data frame in the form of: data.frame( stock.code(character), stock.name(character), stock.price(numeric), stock.time(POSIXCT("yyyy-mm-dd hh:mm")), stock.date(as.Date("yyyy-mm-dd")), strategy.b(integer in c(-1, 0, 1), 0:"hold", 1:"buy", -1:"sell"), strategy.s(c(0,0,1,-1,0,0,....), 0:"hold", 1:"buy", -1:"sell") )
A list contains the information of trading results.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.