Showing posts with label System. Show all posts
Showing posts with label System. Show all posts

Saturday, May 8, 2010

The Bulls vs. Bears Scoring System In 2008 Market Meltdown Period

This is perfect time to go back and re-visit the meltdown of 2008 and see how our bulls vs. bears system did during that time.


Here is our bulls vs. bears scoring system for the period from 5/12/2008 to 5/8/2009 in which the “market meltdown of 2008” occurred.

There are 3 major phases in that one year period:


(1) A small meltdown market (from 5/21/2008 to 7/8/2008). Our bull bear system nicely predicted that period. It was then followed by a small upward stabilization period.

(2) A big market meltdown (started 9/3/2008 to 11/20/2008). Our bull bear system told us the beginning of the “crash” with a few “one day wonders” later.

(3) Market bottom and start a major upswing (from 3/6/2009 to 4/23/2010). Our system told us to buy only a few days after the market bottomed. A few “one day wonders” after that.

The major “problem” with our system is the existing of many “one day wonders”. The bulls or bears take over for just “one day”. These kinds of whipsaws made it hard to follow the system. There a few ways to “solve” the problem:

(1) The first one is that you can act on when there are at least 2 days of bulls or bears control. i.e., you can wait for a day, see if the signal is still valid or not

(2) The 2nd way is based on SPY chart reading. You can based on your chart reading ability to “filter out” these “one day wonders”

(3) Another way to “solve” the whipsaw is to adjust the ratio of longs and shorts. For example, bulls are in control for long time, and your portfolio is 100%, and then one day the bears score >25 and bears>bulls. You don’t have to sell all the longs and go 100% shorts. What you should do is sell some longs and add some shorts, say after one day, your portfolio become 90% longs and 10% shorts. If the signal is a false one, all you have to do cut the 10% shorts. If the bears indeed take over, you continue add shorts and cut longs, after a few days, your portfolio become 50% long and 50%shorts, and so on. This is my own weakness. I have to adjust my mind to hold both longs and shorts at the same time. It is very hard for me to root for both teams in a sports game. I will have to get better on this.

(4) Use with other people’s systems to confirm or filter the signals. I will encourage discussion among my blog visitors, so we can build a strong community to share ideas. Especially when a new signal is generated, please make comments; the new signal could be a “one day wonder”.


What do you think of my thoughts on “filtering out” the “one day wonders” and whipsaws?, which way do you like the most?, do you have any other suggestions?, I’d appreciate it if you would give me feedbacks. Thanks.

I am again open for any suggestions on how to improve this blog, and if you find this blog is helpful, you can help me by telling all your friends about this blog, or by visiting sponsor websites to learn what helps they can give you, or sharing with me ideas on how to improve this site. Thank you!

The corresponding SPY diamondWise chart for the same period is shown below

Saturday, April 24, 2010

An Easier Way to Become a Better Trader

We all want to become a better trader. There are many books and seminars on this subject. Most of them, if not all, are concentrating on the weakness of the human behavior: We are biased; or we are not disciplined enough.


Yes, we are biased on almost everything, religion and politics.

With regarding to stock market, the psychologist told us we have action bias, bias for stories, confirmation bias, conformity bias, sunk cost fallacy, disposition effect, empathy gap, endowment effect, hindsight bias, illusion of control, loss aversion, myopia, overconfidence, placebo effect, self-attribution bias and self-serving bias…etc. The list is very long.

Psychologists also told us these biases are so destructive in trading, thus they concluded “trading is 100% psychology”. Their books are best sellers, and they become famous trading coaches.

Reading market books by psychologists made me feel good in the past, because it helped me to find the “reasons” (really “excuses”) to my trading failures. However, I recently realized that “to be more disciplined” is just a lip service if you don’t have a method or a system you fully trusted, and I also realized that to change human tendency or human nature is a very hard.

I can do stock research in a rational, objective, and unbiased way when my money is not in the market. However, I am instantly biased and emotional when my hard earned money is at risk.

We all want to buy cheap and sell dear. That’s why we buy stock at $10, because it was $20 a few days ago. We thought it is cheap. The stock will usually become even cheaper to $5. We are afraid to buy a stock at $20, because a few weeks ago, it was only $10. After the stock ups and ups to $30 a share. We kicked ourselves. We wondered why we did not buy at $20. That’s our human nature.

Bias is our human nature; it is very hard to change that. An easier way we can change is our environment.

A Chinese saying says “It is easier to reshape a mountain or a river than a person's character.”

Image that you are given a list of stocks of big winners (for example, stocks such as GOOG, AMZN, AAPL, etc. a year ago), and you are only allowed to buy from the list. You would be a market genius.

Another Chinese saying says” Surround yourself with good people; you can become a better person.”(近朱者赤 近墨者黑 )

By the same token, I think the following is true and easier to achieve

“Surround yourself with good stocks; you would become a better trader.”

The diamondwise charts can be used to judge a stock to be a good or bad stock in objective and unbiased way, because its support and resistance lines are automatically drawn based upon the behavior of the stock. My sorting and ranking method is trying to filter out bad stock, and to prevent bad stocks from entering into my watch list.

Tuesday, March 9, 2010

Top 10 ETF Model Portfolio Update on 9-Mar-2010

SymbolSharesEnter PriceCurrent PriceP/L
RSX3330.0233.2104.94
ILF2147.4247.420.00
XLY3429.0331.8294.86
IYR2245.2448.1964.90
ICF2048.0655.15141.80
EWM8811.3111.310.00
KOL3032.2837.86167.40
SLX1755.9164.77150.62
EWZ1467.3373.0680.22
XLI3528.513052.15
Cash378.7921378.792
Total11020.2821020.282
Bench-SPY93107.22114.46673.32
Cash28.54128.54
Total10673.32673.32
Past Performance
The above table based on Ranking Date on 8-Mar-2010, and Ajustment Date on 9-Mar-2010,Next Re-Ranking Date is 22-Mar-2010; The Top 10 ETF model portfolio outporforms the SP500 (profit of $1020 to $673 on the $10,000 initial investment)

Tuesday, February 23, 2010

Top 10 ETF Model Portfolio Update on 23-Feb-2010

SymbolSharesEnter PriceCurrent PriceP/L
RSX3330.0230.515.84
PPA5916.7617.3434.22
XLY3429.0330.0334.00
IYR2245.2445.240.00
ICF2048.0651.4668.00
GLD9105.41107.8922.32
KOL3032.2833.8647.40
SLX1755.9158.5344.54
EWZ1467.3367.330.00
XLI3528.5128.510.00
Cash306.861306.86
Total10304.21304.21
Bench-SPY93107.22109.81
Cash28.54128.54
Total10240.87240.87
Past Performance
Next Re-Ranking Date is 08-Mar-2010. Adjustment Date is 09-Mar-2010

Monday, February 22, 2010

Top 10 ETF Ranked on 02/22/2010 and Action Plan for 02/23/2010

Top 10 ETF Ranked on 02/22/2010 and Actions for 02/23/2010
RankSymbolPriceATRAvgVolumeK8K39Trend,PriceZoneWavePatternRelVolume20Day HV
1RSX31.490.8032413578945UP,+2UpLeg Ret.0.5911
2SLX60.731.733634979252UP,+1DownLeg Ret.1.0313
3KOL35.230.956011868942UP,+1DownLeg Ret.0.5212
4ICF51.861.0914813989358UP,+2DownLeg Ret.0.637
5PPA17.50990.24457969374UP,+2DownLeg Ret.0.695
6XLY30.210.3857991199286UP,+2DownLeg Ret.0.615
7IYR45.60.90163321459462UP,+2DownLeg Ret.0.747
8GLD109.071.64191038867960UP,+1DownLeg0.566
9EWZ69.161.85213515558048UP,+1DownLeg Ret.0.8211
10XLI28.880.45138056439375UP,+2DownLeg Ret.0.536
Past Performance
XLV, EWK, XLP, and QQQQ dropped out of Top 10; They are going to be sold at end of tomorrow.

ICF, PPA, IYR, EWZ made into top 10.
To buy 19 shares ICF;
To buy 57 shares PPA;
To buy 22 shares IYR;
To buy 14 shares EWZ;
The exact numbers of shares should be determined by the price of each ETF near close of tomorrow. The amount can be invested in each stock is minimum of $1000 and the cash available after the ETFs out of top 10 are sold.

Tuesday, February 16, 2010

Jeff Augen’s Price Change Behavior Model



Jeff Augen’s book The Volatility Edge in Options Trading: New Technical Strategies for Investing in Unstable Markets” is one of my favorite books.

Jeff says in his book: My goal was to develop an investment strategy based on the fundamental mathematical properties that describe financial markets. Properly executed, such a strategy should provide excellent returns in a variety of market conditions. It should also be persistent in the sense that it transcends short-term trends. A perfect strategy would embody risk-management mechanisms that allow an investor to precisely calculate the expected return and worst-case loss for a given set of trades.” That is exactly what I am trying to do recently.

In that book, Jeff introduced a new way to look price change behavior of a stock. He calculates the daily standard deviation of natural Logarithm of price change, and the price change for the stock is then expressed in terms of daily standard deviation. Below is such a plot for AAPL.

height=333





Please note that the standard deviation here is calculated from Natural Logarithm of price change. We know that the Historical Volatility(HV) is actually the standard deviation on annual basis of log of price change, so to find daily STD, all we have to do is that HV being divided the SQRT of trading days in a year (252):

Daily STD = (HV for that day)/sqrt(252)

Then we calculate the daily STD price change:

Daily STD price change for the Next day = (Daily STD)*ToDayPrice

Now we use the actual data as an example, on 02/11/2010, the Historical Volatility of AAPL is calculated as 0.3986 (I will put the script into my Financial Scripting with FreeMAT blog)

On 02/11/2010, the daily STD is 0.3986/sqrt(252) = 0.0251; thus the price change is
0.0251 * 198.670 = 4.9866 (198.670 is the close price on 02/11/2010). Note that this price change is going to be used for the NEXT day,

So the price change expressed in STD on the NEXT day (02/12/2010) is:

(200.38-198.67)/4.9866 = 0.3429   (Note 200.38 is the close price on 02/12/2010.)

So 0.3429 is the price change expressed in STD for 02/12/2010.


Our calculation of Historical Volatility is based on 20 days sliding window unless otherwise stated. It is important to note that each price change is measured against a window that ends just ahead of the change. That is, the change being measured does not influence the calculation.

Please also note that the calculation is NOT the same as the traditional Bollinger Bands, as the standard deviation in Bollinger Bands is calculated from price change alone, not the Natural Logarithm of price change. The Bollinger Bands STD usually are much larger than the STD we are talking about here.

The detailed numbers for AAPL are summarized in the table below:

Summary of Daily Moves over last 200 days (STD calculation based on 20 day sliding window); Generated on 02/12/2010


Type of Daily Move
# of Days
Percent of All Days
Avg Move
Dates of the Moves
UP over 2 STD
8
4
2.91
05/04/2009,05/26/2009,09/16/2009,10/20/2009,10/21/2009,
12/09/2009,12/24/2009,01/19/2010
UP between 1 to 2 STD
28
14
1.43

UP between 0 to 1 STD
78
39
0.42

DOWN between 0 to 1 STD
61
30.5
-0.42

DOWN between 1 to 2 STD
18
9
-1.33

DOWN over 2 STD
7
3.5
-2.45
05/12/2009,05/13/2009,08/17/2009,10/01/2009,10/30/2009,01/22/2010,01/28/2010
Total # of UP Moves
114
57
0.84

Total # of DOWN Moves
86
43
-0.77

Total
200
100
0.15

Note:

We can make the following observations based the plot and the table above:

·        In the majority of days, the price change stays within 1 STD. 139 (78+61) days stay within 1 STD, that’s 69.5% of 200 days. (The normal distribution theory tells us that we have 68.2% probability that it should stay within 1 STD, that’s very close)
·        AAPL experienced 15 (8+7) very large price spikes (over 2 STD) in the last 200 days.
·        When move up, it is in average of 0.84 STD; When move down, it is in average of 0.77 STD; Thus AAPL moves up more than goes down.
·        Over last 200 days, it is average move up 0.15 of each day’s STD.


I am a swing/positional trader. I don’t like a stock with a large numbers of big spikes (over 2 STD).

I am also interested in to study what “hint” is given if when a stock experienced an over 2 STD price change.

Does a big spike signal the beginning of a new trend?, or is there any reason to suspect a reversal after the spike?

Here are some plots for AAPL, make your own conclusions:
height=333
For the last 200 days, when APPL downed over 2 STD, it is a good buy signal.

height=333
When APPL up over 2 STD, some are strong indication of trend up, some are short-term top.

For SPY’s last 200 days:

height=333
height=333
SPY only experienced 2 up over 2 STD over last 200 days.




Instead of studying the single stock over last n days, we can also study the behavior of the whole market, for example, we can summarize the S&P 500 stocks’ behavior on 02/12/2010.

Summary of S&P 500 Stocks Daily Price Change Behavior Model on 02/12/2010
Type of Daily Move
# of Stocks
Percent of all stocks
Avg Move
Symbols of the Moves
UP over 2 STD
1
0.20
3.75
MFE
UP between 1 to 2 STD
9
1.80
1.44
A,ANF,AON,AZO,JDSU,MOT,ODP,VIA.B,WFMI
UP between 0 to 1 STD
192
38.40
0.30

DOWN between 0 to 1 STD
281
56.20
-0.36

DOWN between 1 to 2 STD
16
3.20
-1.34
AYE,CFN,CLX,CPB,CSC,CTL,DTV,DVA,ED,FLIR,JNPR,SCG,SYMC,UNH,UTX,WLP
DOWN over 2 STD
1
0.20
-2.15
ADBE
Total # of UP Moves
202
40.40
0.37

Total # of DOWN Moves
298
59.60
-0.42

Total
500
100
-0.10

Note: On 02/12/2010, 202 stocks moved up on average of 0.37 STD, 298 stocks moved down on average 0.42 STD. For all 500 stocks, it moved down on average 0.1 STD. One stock (MFE) experienced a over 2 STD spike, and one stock (ADBE) experienced a big spike down move.



Tuesday, February 9, 2010

Our first "Top 10 ETF Model Portfolio" positions Established Today

SymbolSharesEnter PriceValueP/L
RSX3330.02990.66
XLV3230.92989.44
GLD9105.41948.69
SLX1755.91950.47
EWK8012.42993.6
XLY3429.03987.02
XLP3826.26997.88
XLI3627.42987.12
QQQQ2343.11991.53
KOL3032.28968.4
Cash195.191195.19
Total100000
Bench-SPY93107.229971.46
Cash28.54128.54
Total100000
Past Performance
The above table is based on Ranking Date on 08-Feb-2010, and Action Date on 09-Feb-2010,Next Re-Ranking Date is 22-Feb-2010

Monday, February 8, 2010

Top 10 ETF Model Portfolio's First Ranking

Top 10 ETF Ranked on 02/08/2010
RankSymbolPriceATRAvgVolumeK8K39Trend,PriceZoneWavePatternRelVolume20Day HV
1RSX28.941.10400307264UP,+1UpLeg Ret.1.2211
2XLV30.680.5494353392214UP,+1UpLeg Ret.0.746
3GLD104.042.05197339432416UP,-1DownLeg0.876
4SLX53.492.40413105229UP,+1UpLeg Ret.0.7513
5EWK11.860.3341811096UP,+1DownLeg1.018
6XLY28.590.5463882722416UP,+2UpLeg Ret.1.005
7XLP25.950.3385437042217UP,+1UpLeg Ret.0.603
8XLI26.90.5816018280148UP,+1UpLeg Ret.1.126
9QQQQ42.670.831326370822012UP,+1UpLeg Ret.0.696
10KOL31.211.34822153115UP,+1UpLeg Ret.0.4912
Past Performance
Click to show all stock charts from this table
This is the first official ranking for Top 10 ETF model portfolio, the model portfolio will buy at end of Tuesday(09-Feb-2010)'s price. Here are numbers of shares of each ETF the model portfolio would buy, assuming the today's close price and initial investment of $10,000. The next re-ranking date is 2 weeks from today.

To Buy 32 shares KOL at 31.21


To Buy 34 shares RSX at 28.94

To Buy 18 shares SLX at 53.49

To Buy 32 shares XLV at 30.68

To Buy 9 shares GLD at 104.04

To Buy 84 shares EWK at 11.86

To Buy 34 shares XLY at 28.59

To Buy 37 shares XLI at 26.90

To Buy 38 shares XLP at 25.95

To Buy 23 shares QQQQ at 42.67 

Sunday, February 7, 2010

Top 10 ETFs for Mechanical Trading

Top 10 ETF Ranked on 02/05/2010
RankSymbolPriceATRAvgVolumeK8K39Trend,PriceZoneWavePatternRelVolume20Day HV
1RSX29.671.1739085472416UP,+1UpLeg Ret.1.8611
2PPA16.650.32652163621UP,+1UpLeg Ret.1.285
3XLY28.770.5663896023624UP,+2UpLeg Ret.1.305
4SLX54.372.494238463515UP,+1UpLeg Ret.1.7013
5GLD104.682.25200042453321UP,+1DownLeg1.636
6XLV30.830.5896946973019UP,+1UpLeg Ret.1.486
7KOL31.831.448666252310UP,+1UpLeg Ret.2.2412
8IWS35.650.7915851603622UP,+1UpLeg Ret.1.276
9ICF49.271.4417504304220UP,+2UpLeg Ret.1.608
10EWK12.030.354176962215UP,+1DownLeg2.428
Past Performance
Click to show all stock charts from this table
We will start a new portfolio based on Monday (08-Feb-2010) close ranking, so the official buy date is by end of Tuesday(09-Feb-2010), but we play to buy 5 ETFs on Monday, then another 5 on Tuesday. Then every 2 weeks, we will re-balance our portfolio with new Top 10 ETFs. Assume the initial investment of $10,000, here are the actions we will take for the next two days:
To Buy 31 shares KOL at 31.83
To Buy 33 shares RSX at 29.67
To Buy 18 shares SLX at 54.37
To Buy 20 shares ICF at 49.27
To Buy 34 shares XLY at 28.77
To Buy 9 shares GLD at 104.68
To Buy 32 shares XLV at 30.83
To Buy 28 shares IWS at 35.65
To Buy 60 shares PPA at 16.65
To Buy 83 shares EWK at 12.03

Thursday, February 4, 2010

Bullish Options Expiration Week Strategy

Inspired by an article about historical bullishnesss during Options Expiration week. I did a simple test on this strategy for the past 3 years. Since options expiration is the 3rd Friday each month, so I would buy SPY on the 2nd Friday of each month, and sell SPY on the 3rd Friday of each month. The testing results are shown below, even though it would beat S&P buy and hold, it lost about 10% of initial investment of $10,000. I may further this research in the future. Stay tuned.


Investing $10000 on SPY During Option Expiration Week Each Month
Entry at 2nd Friday of Each MonthExit at 3rd Friday of Each MonthP/L
12-Jan-2007; Buy 69 shares at $143.2419-Jan-2007; Sell 69 shares at $142.82-28.98
09-Feb-2007; Buy 69 shares at $143.9416-Feb-2007; Sell 69 shares at $145.73123.51
09-Mar-2007; Buy 71 shares at $140.7816-Mar-2007; Sell 71 shares at $138.53-159.75
20-Apr-2007; Buy 67 shares at $148.6227-Apr-2007; Sell 67 shares at $149.5360.97
11-May-2007; Buy 66 shares at $150.8618-May-2007; Sell 66 shares at $152.62116.16
08-Jun-2007; Buy 66 shares at $151.0415-Jun-2007; Sell 66 shares at $153.07133.98
13-Jul-2007; Buy 64 shares at $154.8520-Jul-2007; Sell 64 shares at $153.5-86.4
10-Aug-2007; Buy 69 shares at $144.7117-Aug-2007; Sell 69 shares at $144.710
14-Sep-2007; Buy 67 shares at $148.921-Sep-2007; Sell 67 shares at $151.97205.69
12-Oct-2007; Buy 63 shares at $156.3319-Oct-2007; Sell 63 shares at $149.67-419.58
09-Nov-2007; Buy 68 shares at $145.1416-Nov-2007; Sell 68 shares at $145.7944.2
14-Dec-2007; Buy 67 shares at $147.1721-Dec-2007; Sell 67 shares at $148.1364.32
11-Jan-2008; Buy 71 shares at $140.1518-Jan-2008; Sell 71 shares at $132.06-574.39
08-Feb-2008; Buy 75 shares at $133.0715-Feb-2008; Sell 75 shares at $135.14155.25
14-Mar-2008; Buy 77 shares at $129.6128-Mar-2008; Sell 77 shares at $131.56150.15
11-Apr-2008; Buy 74 shares at $133.3818-Apr-2008; Sell 74 shares at $138.48377.4
09-May-2008; Buy 71 shares at $138.916-May-2008; Sell 71 shares at $142.7269.8
13-Jun-2008; Buy 73 shares at $136.1520-Jun-2008; Sell 73 shares at $131.58-333.61
18-Jul-2008; Buy 79 shares at $126.0525-Jul-2008; Sell 79 shares at $125.48-45.03
08-Aug-2008; Buy 77 shares at $129.4215-Aug-2008; Sell 77 shares at $130.2160.83
12-Sep-2008; Buy 79 shares at $126.0919-Sep-2008; Sell 79 shares at $124.12-155.63
10-Oct-2008; Buy 112 shares at $88.517-Oct-2008; Sell 112 shares at $93.21527.52
14-Nov-2008; Buy 115 shares at $86.6221-Nov-2008; Sell 115 shares at $79.52-816.5
12-Dec-2008; Buy 112 shares at $88.9919-Dec-2008; Sell 112 shares at $88.19-89.6
09-Jan-2009; Buy 112 shares at $89.0916-Jan-2009; Sell 112 shares at $85.06-451.36
13-Feb-2009; Buy 120 shares at $82.7620-Feb-2009; Sell 120 shares at $77.42-640.8
13-Mar-2009; Buy 131 shares at $76.0920-Mar-2009; Sell 131 shares at $76.7181.22
10-Apr-2009; Buy 116 shares at $85.8117-Apr-2009; Sell 116 shares at $87.08147.32
08-May-2009; Buy 107 shares at $92.9815-May-2009; Sell 107 shares at $88.71-456.89
12-Jun-2009; Buy 105 shares at $95.0819-Jun-2009; Sell 105 shares at $92.04-319.2
10-Jul-2009; Buy 113 shares at $87.9617-Jul-2009; Sell 113 shares at $94.13697.21
14-Aug-2009; Buy 99 shares at $100.7921-Aug-2009; Sell 99 shares at $102.97215.82
11-Sep-2009; Buy 95 shares at $104.7718-Sep-2009; Sell 95 shares at $106.72185.25
09-Oct-2009; Buy 93 shares at $107.2616-Oct-2009; Sell 93 shares at $108.89151.59
13-Nov-2009; Buy 91 shares at $109.6220-Nov-2009; Sell 91 shares at $109.43-17.29
11-Dec-2009; Buy 90 shares at $111.1118-Dec-2009; Sell 90 shares at $110.21-81
08-Jan-2010; Buy 87 shares at $114.5715-Jan-2010; Sell 87 shares at $113.64-80.91
Total Profit=-$988.73; Win Percent=19/37; AverageWin=$198.32; AverageLose=$264.27;
Edge=(1+198.32/264.27)*(19/37) -1 = -0.10;
Granted, sample size is small, but Edge is neagtive, thus I will not bet on this strategy

Tuesday, February 2, 2010

Top 10 ETFs for Mechanical Trading

The actual portfolio will start next Monday (Feb.8), stay tuned.


Top 10 ETF Ranked on 02/02/2010
RankSymbolPriceATRAvgVolumeK8K39
1RSX32.740.8733147866960
2SLX58.882.304030494632
3KOL34.211.437059503420
4ICF51.041.2615063265235
5IYR44.951.05168985155538
6EWK130.261659359548
7EWN20.510.421204778947
8XLY29.690.4858693765951
9XLI28.320.53135591925844
10GLD109.131.72167425198947
How to use the ranking
Click to show all stock charts from this table
Based on list: ETF_List_1.txt and 6 months

Monday, February 1, 2010

A simple mechanical trading system that beats S&P in a big way

(1) Calculate the relative strength ranking from a carefully selected list of 77 ETFs on the 6 months period.
(2) Select top 10 ranks ETF, buy theses 10 ETFs with equal dollar amount.
(3) Re-calculate ranking every 2 weeks. Sold any ETFs droped from top 10 at the next day closed prices, and replaced with ETFs that make into top 10.
(4) Do nothing during the 2 weeks waiting period.

The results for the last 3 years shown below:
Year 2009:






















Year 2008:






















Year 2007:




It beated S&P in BIG way 3 years in a row !!!


Note:
(1)The commisions are not included in the testing.
(2) I cannot go back to year 2006, because many ETFs were not available in year 2006.
(3) Different starting day may change the results little bit.
(4) Different re-balance period will change results too. We are using 2 weeks.
(5) The list of ETFs is the most important factor.

(6) Year 2007 was a range market year. Year 2008 was a down market. Year 2009 was a up market. And this strategy performed good in all 3 years.

I know the past performance may not repeat in the future, but I will start put my real money into this strategy starting next week.

I will also put the current ranking in this blog. Please check back later.

Friday, January 29, 2010

The "Holy Grail" Formula for Trading

Let’s develop the “holy grail” formula for trading.

Collect all the trades you did last year, separate them into two groups: winners and losers. Now calculate the following:

AverageWin=(Sum of all winners in dollar amount)/(total number of winners)
AverageLoss=(Sum of all losers in dollar amount)/(total number of losers)

Total numbers of trades= (Total number of winners) + (Total number of losers)

Win% = (Total number of winners)/ (Total numbers of trades)
Loss% = (Total number of losers)/( Total numbers of trades)


Total Profit = (Sum of all winners in dollar amount) – (Sum of all losers in dollar amount)

Divided by (Total number of trades) on both sides of the above equation,

(Total Profit)/(Total number of trades) = (Sum of all winners in dollar amount)/ (Total number of trades) – (Sum of all losers in dollar amount)/ (Total number of trades)

Now let’s study the first term of right side of the equation: (Sum of all winners in dollar amount)/ (Total number of trades)

(Sum of all winners in dollar amount)/ (Total number of trades) = AverageWin * Win%

Similarly,

(Sum of all losers in dollar amount)/ (Total number of trades) = AverageLoss * Loss%

Now let’s define:

Average Profit per trade =(Total Profit)/(Total number of trades),

Now we have:

Average Profit per trade= AverageWin * Win% - AverageLoss * Loss%

Since Loss%=1-Win%, so the above equation becomes,

Average Profit per trade= AverageWin * Win% - AverageLoss * (1-Win%)

Average Profit per trade= (AverageWin + AverageLoss )* Win% - AverageLoss

Now if divided both sides by AverageLoss,

(Average Profit per trade)/(AverageLoss)=(1 + AverageWin/AverageLoss) *Win%– 1

Before we continue to make conclusions from the equation, let’s use some actual numbers. Let’s say your collect all your trades last year, the numbers are as follows:

Total Trades=100;
Total number of winners=60
Total number of losers=40
Sum of all winners = $12,000
Sum of all losers = $4,000
Total Profit=$12000 - $4000 = $8000
Average Profit per trade=$8000/100=$80

AverageWin = $12000/60 = $200
AverageLoss = $4000/40 = $100
Win%=60/100

Now let’s calculate the right side of our final equation:

(1 + AverageWin/AverageLoss) *Win%– 1 = (1+ 200/100) * 60% -1 = 1.8 -1 = 0.8

So,
(Average Profit per trade)/(AverageLoss)=0.8 =80%
Or,

(Average Profit per trade)=80% * (AverageLoss) =0.8*100=$80.


Now let’s again look at more details about this equation

(Average Profit per trade)/(AverageLoss)=(1 + AverageWin/AverageLoss) *Win%– 1
We can make the following conclusions:

If the right side (1 + AverageWin/AverageLoss) *Win%– 1 is equal to 0, then Average profit per trade is zero

If the right side (1 + AverageWin/AverageLoss) *Win%– 1 is less than 0, then Average profit per trade is less than zero, i.e., we will lose

If the right side (1 + AverageWin/AverageLoss) *Win%– 1 is greater than 0, then Average profit per trade is always positive, i.e., we will win.

In summary, if we want to win, all we have to do is to make
"(1 + AverageWin/AverageLoss) *Win%– 1" great than zero.

We can call the term as “expected gain” or I’d like call it “Edge”

"Expected Gain" or Edge = (1 + AverageWin/AverageLoss) *Win%– 1

To be winners in the market, all we have to do it is to make “Edge” positive.

There are two factors determine the Edge:

1.The ratio of AverageWin/AverageLoss
2.The win%

Engineers are usually smart people, they always try to be perfect. That’s why they always try to get a higher Win%.

“…engineers and accountants are usually bad traders” -claimed by many trading experts, especially people with psychology backgrounds in books or internet articles.

Let’s say your Win% is 80%, but AverageWin=100, AverageLoss=1000,

Your Edge or expected gain is

(1+ 100/1000)*0.8 -1 = -0.12, Which is NEGATIVE, that means you will lose money.

So, Win% is 80% means nothing if your AverageWin/AverageLoss is small.

Now, if your Win% is only 50%, but your Win/Loss ration is 2, then your edge is

(1+2)*0.5 – 1 =0.5

That means you will win.

“My percentage of winners is only about 50/50, because I cut my losers very quickly. The maximum loss I allow is 7 percent, and usually I am out of a losing stock a lot quicker. I make my money on the few stocks a year that double and triple in price. The profits in those trades easily makes up for all the small losers. “ - David Ryan
Next time, if you see some advertisements such as this one, "Join us, Trade Stocks, Futures, And Forex With Up To 80% Accuracy …",you know what to ask them.



“Human nature does not operate to maximize gain but rather to maximize the chance of a gain. The desire to maximize the number of winning trades (or minimize the number of losing trades) works against the trader. The success rate of trades is the least important performance statistic and may even be inversely related to performance.
Two of the cardinal sins of trading - giving losses too much rope and taking profits prematurely - are both attempts to make current positions more likely to succeed, to the severe detriment of long-term performance.”-
William Eckhardt

My Favorite Books