- Joined
- 21 June 2005
- Posts
- 105
- Reactions
- 0
My question is to all the mechanical traders on the forum, if any of you actually have used this type of Monte Carlo analysis to really work out the expected future behaviour of your systems in terms of probabilities and if so, then what program did you use for the Monte Carlo analysis. I would also really appreciate some feedback on the use of Trade Lab Strategies TradeSim program (this is not Compuvision’s TradeSim which most are familiar with). I am aware that the Compuvision’s TradeSim can perform Monte Carlo simulation to cover the situation in backtesting when there are more triggers than can be taken on a particular day.
I'm not sure what the question is here. I do heaps of MC analysis. I use Compuvision's Tradesim. Back when I was first looking at all this I remember looking at TradeLab's Tradesim and rejecting it, but I can't remember why - think it was something to do with the way it interacted with Metastock.
David Samborsky (Tradesim) has some pretty strong views re the way Tradesim handles Montecarlo analysis and how Amibroker handles it.
He has a strong arguement as to the poor nature of the Amibroker M/C testing.
I'll let him know about this thraec and he may pop in to explain.
This is not about TradeSim vs Amibroker.
Tech,
This is not about TradeSim vs Amibroker.
This is about performing MC analysis on either the actual past trades or trades generated by whichever backtester in use. The backtest gives us one sample of trades - say 100 in number stretching over months or years. We then calculate R-Multiples for each of these trades. These are fed into the MC simulator. The MC simulator randomly picks one R-multiple value from the sample and assumes it's the result of the first trade. For the next trade, it does the same thing and selects another (it could even be the same trade) trade from the population. It keeps doing a 100 times. This forms one equity curve of R-multiples. The simulator can do 1000s of such runs generating an equity curve for each. It then works out the results of DDs, profits, losing streaks, winning streaks etc and works out the statistical probabilities for each. This would be invaluable in getting an idea of what can be expected from the system in the future.
I am not sure what you mean by above. The distribution of R-multiples would vary over different phases of the market and it would vary for a single security system as well as for multiple securites system.The only issue in doing this is the big assumption that the distribution of R-multiples is constant throughout time ie a stationary process as opposed to a non-stationary process. This may be true for a single security system but may not apply to a portfolio trading system which has trades from many different securities.
There certainly would be assumptions that have to be made and recognized while interpreting the results. I suppose this would be a statistical analysis which would appeal to a trader who has a belief that trading is all about getting probability in his favour and takes the effort to understand and analyse it within the limitations of the assumptions made in the first place.In TradeSim for Metastock we avoid doing this type of MC analysis for that reason. That is not to say that it is not useful to do it but there are some underlying assumptions that have to be made which may or may not reflect what happens in the real world.
In case of multiple triggers, would it be useful to take the entire population of qualifying trades and then conduct the MC in the manner described in my previous post in order to derive the statistics required. After all the trades in the population qualified and any one of those could have been used. In this type of MC analysis, we are not working on the exact sequence of trades that would have been taken in real trading. This is more akin to the marble game where each marble is pulled for a trade and is replaced in the bag before another one is pulled.Then there is the other issue of when you have the possibility of multiple entry triggers as in a portfolio trading system. Which back test do you use to base the distribution of R-multiples on ?? If it's just a single security back test then there is only one possible back test result. However if you are analysing a portfolio trading system that uses multiple entry triggers with equal weighting then there is not one unique outcome for a back test. There are many !!
In terms of optimizing a portfolio trading system with multiple entry triggers I personally rank them according to ATR volatility in systems which work better on high volatility phases of the market and on liquidity for others. There are other valid ways to rank too. I think doing the MC in the way outlined in my previous post is even more important in such a case.This is similar to the issue of trying to optimize a portfolio trading system with multiple entry triggers which have equal weighting. Which back test do you try and optimize for because it is possible to have many different back tests from the one system and all are equally valid historical back tests yielding different results and a different set of metrics. Usually some kludge has to be made by forcing a certain sequence of trades to yield only one outcome using some kind of signal or trade ranking criteria but then there is the issue of how one determines this ranking criteria. Some assumptions are made here as well which may or may not represent the reality of the situation.
If you're simulating based on in-sample data, what information does monte-carlo simulation provide about out-of-sample performance ?
Hi David,
Many thanks for your comments. Great food for thought. Here are some of my thoughts on your comments
I am not sure what you mean by above. The distribution of R-multiples would vary over different phases of the market and it would vary for a single security system as well as for multiple securites system.
If you're simulating based on in-sample data, what information does monte-carlo simulation provide about out-of-sample performance ?
In the context of a trading system, and using marbles as an example of a stationary random process, would be the situation where you would draw a marble out of a hat and then put it back and draw again from the same hat at a later time. Each time the same hat would have the same statistical properties. In a non-stationary process each time you draw a marble it would be from a different hat each with a different set of marbles and hence different statistical properties.
Assuming a stationary random process for a portfolio trading system might be making a rather bold assumption. Also the issue is further complicated by the fact that the process may not be completely random due to an underlying trend etc and so the data contains a deterministic bias which also varies with time.
I've found it useful to look at the distribution of all trades to look for outliers and remove them altogether. By outliers I mean trades with vastly larger return than the average (greater than 10 times the average). Most systems use stop loss techniques so there shouldn't be any single trades with very large losses, however there will be some very large profits and these can wildly affect the equity curve. I think it's better to study the system without the outliers and treat them as a "bonus".He recommends calculating the R-Multiple for every trade in the backtest and then working out the Expectancy, Standard Deviation of R-Multiples (to ascertain variability of results)
I've found it useful to look at the distribution of all trades to look for outliers and remove them altogether. By outliers I mean trades with vastly larger return than the average (greater than 10 times the average). Most systems use stop loss techniques so there shouldn't be any single trades with very large losses, however there will be some very large profits and these can wildly affect the equity curve. I think it's better to study the system without the outliers and treat them as a "bonus".
And Part 2 --
If your trading system development platform provides a method for breaking ties, use it. For example, you may be able to calculate a reward-to-risk value for each of the potential trades. Take those trades that offer the best ratio. AmiBroker, for example, allows the developer to include logic to compute what is known as PositionScore. Trades that are otherwise tied will be taken in order of PositionScore for as long as there are sufficient funds.
Alternatively, Monte Carlo methods allow you to test random selection of issues to trade. My feeling is that very few traders will make a truly random selection of which issue to buy from the long list. I recommend quantifying the selection process and incorporating it into the trading system logic.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?