Random selection without priorities being set
Author: 4scott
Creation Date: 11/14/2011 1:39 PM
profile picture

4scott

#1
A procedure I have created returns just under 50% winning trades in Raw trading mode. But the results are consistently higher when I run it in Portfolio mode in a cash situation where WLP must randomly choose which, say, 5 symbols to trade when, say, 12 meet the criteria.

In portfolio mode, the results are several percentage points above the "Raw" results, no matter how many times I run it. Shouldn't the percentage of winning trades be essentially unchanged from the Raw test over a great many runs, on average? This doesn't happen.

I haven't inserted any priorities in my code, so I'm wondering if WLP's randomization method is truly random. It picks a higher percentage of "winners" in portfolio mode. Is there an explanation for this?
profile picture

Eugene

#2
WL does not pick no winners or losers, only assigning a random priotity to an individual trade paying no respect to what could happen before or shall happen after it.

"In portfolio mode" is way too general. There are dozens of money management techniques out there each capable of considerably affecting the end result in its own way.
profile picture

4scott

#3
Thanks, Eugene. I have tested it many times in a variety of the Portfolio Simulation Modes including Fixed Dollar, Percent of Equity, and Max Entries per day. These modes bring winning trade results that are consistently above 55%, whereas the Raw Trade testing is just below 50%.

All of the simulated runs, including those in Raw Trading Mode, return a profit because the profit % is higher in winning trades than the loss % is in losing trades. But for some reason I can't fathom, the portfolio simulations mentioned above also have more winning than losing trades (unlike Raw trades), so this brings significantly better results that I don't dare trust.

As an experiment I entered all raw trade losses/gains and entered them in a spreadsheet. I had the spreadsheet select about 1/3 of those results on a random basis. I ran it thousands of times. When done, the ratio of winners to losers was essentially the same for the partial set as for the entire set. I would expect WLP to perform the same way, but it doesn't.
profile picture

Cone

#4
Here's a simple example. A simulation has 3 raw trades and uses 100% of equity sizing. Trade A is a winner, Trade B is a loser, and Trade C is a loser. Trades B and C occur on the same bar.

Raw Profit consistently returns 33.3% winners.

Portfolio Simulation can only accept Trade B or C. With random priority, it consistently returns 50% winners because one of the losing trades MUST be rejected.

I hope this helps you understand why Raw Profit does not equal a Portfolio Simulation mode backtest. This is how it must work. Remember this is a simple example with only 3 trades, and if you investigate enough, you'll be able to determine the trades that makes your simulation perform the way it does. (You'll probably find that the trades that are being rejected occur on the days with many losing trades. When these losers are rejected, the Portfolio Simulation will consistently have a better winning percentage than RP mode. This is a likely scenario in a dip-buyer-type system that could lose every trade on a day with a huge sell off.)
profile picture

4scott

#5
Thank you, Cone, for your example which does indeed explain the difference in %.

One question, and it's probably a dumb one. Given your explanation, including many losses occurring on the same day (or wins, for that matter), if the portfolio simulation of a system that proposes more trades than the $ balance allows is run many times and consistently shows a profitable return over the entire trading period, is that likely to be a better indicator than raw trade results that may not be as good? Obviously, a trading system can suddenly stop working and there are no guarantees about the future, etc. But in backtesting, isn't the portfolio method (with its random selections) more realistic of what would have happened during that period?

profile picture

Cone

#6
Sure, the Portfolio Simulation is more realistic because it has the real constraint of limited capital, which raw profit does not have. However, within a Portfolio Simulation that includes many raw profit trades that are rejected, there could be a large number of outcomes, and that dynamic can be investigated using Monte Carlo-Lab.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).