Description Usage Arguments Value
backtestV2 the given strategies & provide the The difference between backtest & backtestV2 is , former technicallu loops all shorts/longs in one for loop. V2 - in different for loops.
1 2 | backtestV2(pf, dataset, parms, startat = 2, longE, longX, shortE, shortX,
calcLimits = calcLimits, ...)
|
pf |
- portfolio to be tested |
dataset |
- OHLCV with price objects, preferably xts |
parms |
- parameters defining slp, profit booking etc. see tradeparms function |
startat |
- From which row of the dataset to start testing. default 3 |
longE |
- A function which has conditions for long entry |
longX |
- A function that has conditions for long exit |
shortE |
- A function which has conditions for short entry |
shortX |
- A function that has conditions for short exit |
calcLimits |
- This is sample function given in this package, this can be overwritten by providing as parameter |
... |
- Can pass instrument names like instr & other things needed by longE,shortE functions etc. |
portfolio name that has all the trades,transactions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.