Portfolio Selection

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
yp
Roundtable Fellow
Roundtable Fellow
Posts: 77
Joined: Thu Apr 17, 2003 9:11 am

correlation

Post by yp »

Great discussion.

when testing other long term trend following systems (several actually)
using a simple fixed fraction money management,
No pyramiding or othe turtle rules, we find that paying less attention to correlation and including highly correlated markets yielded better results across the board.

However, we also discovered that we had to be extra careful with risk per trade....as correlation can work both ways.

We tried limiting the markets but increasing risk per trade (logic was...since correlation was high...why not just trade more per trade and less markets....this didn't compensate for allowing correlation to work.

yp
Bondtrader
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Mon Apr 28, 2003 11:07 am
Location: Zimbabwe

Post by Bondtrader »

Forum Mgmnt, could you tell us what was the Sharpe Ratio for your test 1 from 1983 to 2002 WITH correlation limits?
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

Code: Select all

Geometric Mean Return %                     41.50%
Maximum Open Equity Drawdown %              26.50%

MAR Ratio                                     1.57
Sharpe Ratio                                  0.31
Sortino Ratio                                 0.71
Calmar Ratio                                  2.12

Maximum Monthly Open Equity Drawdown %      19.53%

Maximum Closed Trade Drawdown %             18.94%
Average Closed Trade Drawdown %              5.31%
The Sharpe and Sortino Ratios use the standard deviation of the monthly open equity returns and assume a 5% risk-free rate. The Calmar ratio uses the monthly open equity drawdown. The MAR ratio uses the maximum intra-month open equity drawdown.

I don't mind answering now since I've not addressed this issue here yet, but I'd rather not talk a whole lot of specifics about the performance of the system since there are a lot of variables that go into any test of this sort. The important thing is not the results of a given test but the results of the test changing only one variable, the correlation limits. Besides, I don't want to give away too much or we won't sell any software 8)

We'll be posting some complete results on the main web site soon, and we'll continue to post findings that are relevant to the discussions as we move forward.
Kiwi
Roundtable Knight
Roundtable Knight
Posts: 513
Joined: Wed Apr 16, 2003 1:18 am
Location: Nowhere near

Post by Kiwi »

Forum Mgmnt,

Thanks for the reply. Good point regarding power. I think that this factor plus liquidity remove quite a number of markets from the possible mix. Thanks for the test results - very useful.

SirG [Tue Apr 29, 2003 4:22 pm],

I agree with your 2nd para [Risk & ...]; I guess that my point was that, as drm7 says above, a basket of uncorrelated markets/systems protects you during times of drawdowns. This allows you to load up with more opportunity for a given systematic risk.

My own choices are based on getting maximum return for drawdown tested over a number of different time periods. The multiple time period approach minimizes overoptimization of the portfolio and tests for the effects of occaisional correlation between the market/system pairs. Given the best portfolio MAR you just need to select your acceptable drawdown and do some basic multiplication to determine return when your bet size is moved to that level. If a new market came along with a good return on one of the systems then I would retest to see how adding it to my portfolio would change the overall performance. I think this means that we agree :?
Kiwi
Roundtable Knight
Roundtable Knight
Posts: 513
Joined: Wed Apr 16, 2003 1:18 am
Location: Nowhere near

Post by Kiwi »

Chuck LeBeau says it more clearly and concisely than I was able to on:

http://traderclub.com/discus/messages/1 ... #POST13232
Mark Johnson
Roundtable Knight
Roundtable Knight
Posts: 122
Joined: Thu Apr 17, 2003 9:49 am

Post by Mark Johnson »

Forum Mgmnt, I had used DAILY data to calculate the Sharpe ratio for Thirteen. I also used Schwager's IRATE modification. Switching to MONTHLY data & leaving out the mod, for easier comparisons with your Turtle System results:

Code: Select all

annual IRATE used in calcs(%)        5.000
months of data                         276
Geometric mean annual return(%)     62.151
stdev of monthly returns(%)         10.634
Annualized stdev(%)                 36.838
Sharpe ratio                         1.551

annual min acceptable rate(%)        5.000
mthly  min acceptable rate(%)        0.407
#months with return > min acceptable   174
#months with return < min acceptable   102
monthly downside drawdown(%)         4.885
Sortino ratio                        3.378


Raw data: Thirteen's monthly returns(%):

1980:  0.00,-2.47,-1.46,-6.28,48.17,9.02,24.76,7.51
1981:  6.80,14.06,15.28,-7.20,17.63,16.73,14.27,7.40,-3.46,-0.89,0.20,-6.55
1982:  -1.37,5.11,7.34,0.75,-4.83,9.53,6.58,-8.21,6.94,12.23,3.47,-3.04
1983:  9.20,0.94,-0.64,-6.18,-0.05,-4.10,-8.52,10.43,4.43,-8.86,6.21,6.02
1984:  9.23,6.56,-1.96,8.48,13.10,13.60,7.27,-1.50,-7.84,12.61,-4.73,11.70
1985:  11.24,0.81,-0.16,-6.47,-5.56,12.06,-6.65,13.75,5.25,20.88,18.95,6.40
1986:  27.68,8.78,26.35,2.15,-2.74,-12.83,12.74,3.96,-3.91,-6.78,4.26,9.47
1987:  7.70,12.17,-1.58,13.95,15.84,1.28,3.86,10.80,-12.17,3.35,8.85,25.35
1988:  15.83,-13.30,3.11,-1.46,-15.54,12.53,12.31,5.87,13.92,1.28,-1.58,-3.83
1989:  -1.19,2.13,1.87,4.08,9.78,14.41,9.57,-0.99,-11.03,-10.28,7.97,4.14
1990:  12.91,10.57,-5.00,7.87,3.02,-15.77,5.44,10.27,13.49,15.20,5.69,3.25
1991:  14.51,5.68,-15.14,5.87,14.77,1.06,2.48,-4.97,25.65,9.28,25.81,1.97
1992:  24.99,-7.56,-3.57,-8.68,-3.61,12.85,26.51,14.88,14.20,-0.41,-15.77,10.31
1993:  19.01,-0.29,32.41,-3.22,8.56,-3.55,3.78,0.04,7.52,-5.55,-6.18,13.94
1994:  3.23,-10.54,-0.03,18.60,6.72,15.45,31.48,2.63,-2.20,16.50,0.59,-0.73
1995:  -4.01,-1.54,25.98,19.67,10.18,11.19,7.44,-13.27,-1.51,-2.17,1.14,5.35
1996:  22.13,-7.08,-5.79,5.31,10.51,-3.10,10.98,-7.86,-1.84,-10.00,15.71,17.84
1997:  5.71,1.37,3.77,6.38,0.51,-7.79,-4.37,17.19,0.25,10.31,4.99,1.15
1998:  20.50,2.10,-3.83,13.47,-12.55,11.83,4.23,-1.98,12.21,23.42,-12.39,0.56
1999:  1.15,-14.67,17.81,-10.60,7.26,4.00,19.27,-6.88,-3.57,6.91,-12.07,16.27
2000:  5.84,6.83,-1.34,-13.49,-1.26,8.73,1.02,5.33,30.83,6.94,4.40,11.84
2001:  14.15,-9.42,0.96,14.18,-11.91,10.36,-0.52,0.01,12.38,9.35,15.93,-14.97
2002:  -11.81,-0.60,-8.20,-20.26,-7.51,-1.20,27.42,20.44,3.49,6.60,-7.33,-15.43
2003:  22.28,17.29,18.35,-14.03
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

Mark,

Something doesn't seem right. I must be using a radically different formula than you are. :?

I use:

(Geometric Monthly Return - Monthly Risk Free Rate)
------------------------------------------------------------
Standard Deviation of Monthly Returns

Using this forumla I am off by either a factor of 10 on your annual return rate or a factor of about 5 on your Sharpe Ratio.

Solving for return using a Standard Deviation of 10.63 and Sharp Ratio of 1.55 I get a monthly return of 16.9% which annualizes to a rate of 651% :shock: not 62.15% :(

Solving for Sharpe Ratio using my formula yields a value of 0.349 not 1.551

I may be doing something wrong but your Sharpe Ratio appears wrong to me.
Mark Johnson
Roundtable Knight
Roundtable Knight
Posts: 122
Joined: Thu Apr 17, 2003 9:49 am

Post by Mark Johnson »

Hi Forum Mgmnt, yes we certainly are using different methods of calculation. You're computing a monthly Sharpe Ratio, I'm computing an annual one. Here's illustrative calcs done both ways on the Thirteen data:

Annual return = 62.151%
Annual risk-free rate = 5.000%
Annual standard deviation = 36.838%
Annual Sharpe Ratio = (62.151 - 5.000) / 36.838 = 1.551

Monthly return = 4.110% (since 1.04110^12 = 1.62151)
Monthly risk-free rate = 0.407% (since 1.00407^12 = 1.0500)
Monthly standard deviation = 10.634%
Monthly Sharpe Ratio = (4.110 - 0.407) / 10.634 = 0.348


(almost certainly we repeated these opposite choices with the Sortino ratio as well)
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

Mark,

Thanks for clarifying. I've always thought that an annual (or even three year) Sharpe Ratio makes much more sense but no one uses anything but monthly in the institutional equities and hedge fund world.

The craziness of the pension fund managers never ceases to amaze me.

The statistical basis for the Sharpe Ratio is the estimation of the confidence level of a parameter based on a sample.

A monthly Sharpe is fine for estimating the risk that a given months return will fall depart significantly, however, most investors are not investing for a month. Years are much more the unit that most investors actually care about.

The annual Sharpe Ratio is far better for an internal measure for all of us. Its funny how spending some time in a crazy universe can twist one's perspective.

I'll generate some annual numbers.

- Forum Mgmnt
AbsoluteReturn
Contributing Member
Contributing Member
Posts: 8
Joined: Sun Apr 27, 2003 10:05 am

Post by AbsoluteReturn »

To c.f.,

Thank you very much for your contribution from April, 29 about limiting risk in correlated positions. I think, you've presented some very interesting test results:

Test One – Correlation Limits
Return 41.5%
MAR 1.57
Max Drawdown 26.50%

Test Two – NO Correlation Limits
Return 39.1%
MAR 1.11
Max Drawdown 35.32%



Risk adjusted returns (MAR) increased from 1.11 to 1.57 in the period from 1993 to 2002. That’s enormous!
Because I think, that correlation based risk limits are very important, I've read your contribution very thoroughly, but it was not possible for me to find out, which calculations were necessary, to achieve this results. Also the chapter "Buy Strength - Sell Weakness" in the manual (The Original Turtle Trading Rules) cut not clear up the questions regarding the calculations.
So I would like to ask you, if you please could disclose the complete mathematical rules of the "optimal correlation limits".
I apologize in advance, if this question seems to be stupid or unsuitable.

Best regards from Europe
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

Code: Select all

// Add the number of units already in the market to the number
// in the closely correlated units
correlatedUnitsTotal = numberOfUnitsInPosition + closelyCorrelatedUnits;

// If the unit count is at the strongly correlated maximum then
// we can't add the new unit.
if ( correlatedUnitsTotal >= maxCloselyCorrelatedUnits )
	tooManyUnits = TRUE;

// Add the total LOOSELY correlated units.
correlatedUnitsTotal = correlatedUnitsTotal + looselyCorrelatedUnits;

// If the unit count is at the loosely correlated maximum then
// we can't add the new unit.
if ( correlatedUnitsTotal >= maxLooselyCorrelatedUnits )
	tooManyUnits = TRUE;

// Finally check if the unit count is at the directional maximum.
if ( totalDirectionalUnits >= maxDirectionalUnits )
	tooManyUnits = TRUE;
This modified code was extracted from the actual code in VeriTrader. I have removed most of the extraneous information but this is the algorithm used.

Keep in mind that for this code, there is no self-correlation in the correlated unit counts. Thus if one had 3 units of Soybeans as the only position and was adding another unit, the looselyCorrelatedUnits value would be zero, not 3. The numberOfUnitsInPosition value would be 3.
Last edited by Forum Mgmnt on Mon May 05, 2003 6:09 pm, edited 1 time in total.
AbsoluteReturn
Contributing Member
Contributing Member
Posts: 8
Joined: Sun Apr 27, 2003 10:05 am

Post by AbsoluteReturn »

Thank you very much for this detailed information.

Good luck and good trading.
Howard Brazzil
Roundtable Fellow
Roundtable Fellow
Posts: 54
Joined: Wed Apr 16, 2003 12:45 pm
Location: Houston, TX USA

Post by Howard Brazzil »

Warren Buffett reels off a good, pertinent quip at the recent stockholder's meeting:
  • Buffett: "A few mistakes that are correlated will overcome a lifetime of
    savings: you will make a few cents on the dollar when you're right, but you'll
    lose incredible sums if you're wrong.... There's nothing as deadly as
    unrecognized concentrations of risk and it happens all the time."
Full story:
http://story.news.yahoo.com/news?tmpl=s ... 1389730993
gms
Senior Member
Senior Member
Posts: 26
Joined: Mon May 19, 2003 6:33 pm

Post by gms »

About the "thirteen" system:

1. What types of stops work well with it, and
2. Of whose origination is the system?
JT
Roundtable Fellow
Roundtable Fellow
Posts: 81
Joined: Tue Apr 15, 2003 6:27 pm
Location: Washington

Post by JT »

gms;

Here is the code for thirteen. Written by Mark Johnson. I pulled this very small bit of code from www.traderclub.com There is a lot of talk of thirteen on that board. I encourage you to play around with it and tell us what you think.

Code: Select all

{ Thirteen: a trading system for FUTURES that uses the 
number "13" twice. 28 May 2001 Mark Johnson } 

vars: mysignal(0); 
mysignal = MACD(Close, 13, 130); 
if (mysignal > 0.0) then buy tomorrow at the market; 
if (mysignal < 0.0) then sell tomorrow at the market; 
Have fun!
JT
Mark Johnson
Roundtable Knight
Roundtable Knight
Posts: 122
Joined: Thu Apr 17, 2003 9:49 am

about the free system Thirteen

Post by Mark Johnson »

Thirteen was released about 2 years ago (5/28/01). The original discussion is found in http://traderclub.com/discus/messages/18/1464.html (scroll down to the bottom). Since people are asking about stops and so forth:
Some folks like to look at summary statistics such as the table above. Others prefer to analyze the entire equity curve. To make it easy for them, I have placed the complete system including TradeStation Easy Language code and the detailed daily equity curve, on the World Wide Web. You can download it from this URL:
http://www.mjohnson.com/thirteen/mj13.zip
Please feel free to download the system and horse around with it. As you will see, Thirteen does not use stops of any kind whatsoever. You might want to play with Thirteen and add some stops of your own devising. Disaster stops, breakeven stops, take-profit stops, trailing stops.... Fool with all of them and see what happens. Don't be frightened, it's only "research".

You will also see that Thirteen is pretty rudimentary. It doesn't have any filters .... but YOU could add one or more filters and see if things get better.

Thirteen only has one kind of exit and that is a Reversing Exit. You could experiment with adding other kinds of exits that are discussed at great length in the Forum. For example, you could add the Chandelier Exit, or the Yo-Yo exit, or an ADX-derived exit. Do whatever you like, have fun, learn and grow.
to Moderator: if the chatter level gets high you might want to move this Thirteen stuff to its own area...
Bondtrader
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Mon Apr 28, 2003 11:07 am
Location: Zimbabwe

Thirteen for the contest

Post by Bondtrader »

Doesn't this look like a promising entry in c.f.' system contest? It's freely available, see two posts ago, and there are a bunch of suggestions for how to improve it, see quote one post ago. However it certainly doesn't satisfy the Creativity Craving to take someone else's code, open up the hood, and install a couple of tuneup kits.
gms
Senior Member
Senior Member
Posts: 26
Joined: Mon May 19, 2003 6:33 pm

Post by gms »

JT wrote:Here is the code for thirteen... I encourage you to play around with it and tell us what you think.
Bondtrader wrote:However it certainly doesn't satisfy the Creativity Craving to take someone else's code, open up the hood, and install a couple of tuneup kits.
Then it's a good thing I get my my creative jones fulfilled from other non-trading projects, I'd say. :D

Thank you JT and Mark. JT, all it needs is a wide enough stop, maybe an additional entry filter for determining trend strength (to increase probablities it will stay above the cross), and a BE stop. More or less. That first stop is the key.
Post Reply