Considering some input arguments, this function performs n simulations with random trades in a price matrix, saving 3 performance indicators (annualized return, annualized standard deviation and annualized sharpe) at each simulation
For example, suppose that you're a trader and have earned 15% of annualized logarithm return over 248 trading days (1 year) where you traded, in average, for long positions only, 5 stocks for each day and for 50 days. This function will check if a monkey with no skill whatsoever can, in average, replicate your return after transaction costs (defined by the user). If such mamel can do it, maybe you should review your approach at trading.
From the academic point of view, this is called as the bootstrap method for assessing performance. The present code is a variant of such.
The use of random seeds for portfolio performance is not new. The first paper to use it, as I recall is Cumby and Modest (1987). More recently, a more formal approach at the method was given in Burns (2006).
For a practical application of the codes published here, please check the papers of Perlin (2007a) and Perlin (2007b).
References:
BURNS, P. J. (2006) "Random Portfolios for Evaluating Trading Strategies". Available at SSRN: http://ssrn.com/abstract=881735
CUMBY, E., MODEST, D. (1987) "Testing for Market Timing Ability: A Framework for Evaluation". Journal of Financial Economics 25, 169-189.
PERLIN, M. S. (2007a) "Evaluation of Pairs Trading Strategy at the Brazilian Financial Market". Available at SSRN: http://ssrn.com/abstract=952242
PERLIN, M. S. (2007b) "M of a Kind: A Multivariate Approach at Pairs Trading" . Available at SSRN: http://ssrn.com/abstract=952782 |