- is this result realistic?
- have we overfit (fooled ourselves)?
- what range of values might we expect out of sample?
- how much confidence do we have in our model?
updated 13 May 2017
Without replacement:
Without replacement but with in-place perturbation:
nrsim <- mcsim( Portfolio = "bbands"
, Account = "bbands"
, n=1000
, replacement=FALSE
, l=1, gap=10)
nrblocksim <- mcsim( Portfolio = "bbands"
, Account = "bbands"
, n=1000
, replacement=FALSE
, l=10, gap=10)
P&L Quantiles:
| 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| -Inf | 0 | 0 | 0.0017 | Inf |
| 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| -Inf | 0 | 0 | 0.0016 | Inf |
rsim <- mcsim( Portfolio = "bbands"
, Account = "bbands"
, n=1000
, replacement=TRUE
, l=1, gap=10)
rblocksim <- mcsim( Portfolio = "bbands"
, Account = "bbands"
, n=1000
, replacement=TRUE
, l=10, gap=10)
P&L Quantiles:
| 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| -Inf | 0 | 0 | 0.0013 | Inf |
| 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| -Inf | 0 | 0 | 0.0012 | Inf |
Un-/Lightly Correlated Symbols:
Correlated Symbols:
Disadvantages:
Advantages:
creates a distribution around the trading dynamics, not just the daily P&L
best for modeling "skill vs. luck"
nrtxsim <- txnsim( Portfolio = "bbands"
, n=100
, replacement=FALSE)
## Loading required package: data.table
## ## Attaching package: 'data.table'
## The following objects are masked from 'package:xts': ## ## first, last
wrtxsim <- txnsim( Portfolio = "bbands"
, n=100
, replacement=TRUE)
Comments:
P&L Quantiles:
| 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| -19134 | -4774 | -701 | 4435 | 15730 |
P&L Quantiles:
| 0% | 25% | 50% | 75% | 100% |
|---|---|---|---|---|
| -19134 | -4774 | -701 | 4435 | 15730 |
Aronson, David. 2006. Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals. Wiley.
Bailey, David H, and Marcos López de Prado. 2012. “The Sharpe Ratio Efficient Frontier.” Journal of Risk 15 (2): 13. http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1821643.
———. 2014. “The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting and Non-Normality.” Journal of Portfolio Management, Forthcoming. http://www.davidhbailey.com/dhbpapers/deflated-sharpe.pdf.
Bailey, David H, Jonathan M Borwein, Marcos López de Prado, and Qiji Jim Zhu. 2014. “The Probability of Backtest Overfitting.” http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2326253.
Harvey, Campbell R., and Yan Liu. 2015. “Backtesting.” SSRN. http://ssrn.com/abstract=2345489.
White, Halbert L. 2000. “System and Method for Testing Prediction Models and/or Entities.” Google Patents. http://www.google.com/patents/US6088676.