# Techno-Fundie System



## mit (5 September 2006)

A big discussion on this thread is around technical versus fundamental trading. One advantage with mechanical technical trading is that you can backtest and get an idea what various systems would return, otherwise you would need to forward test. A short term discretionary trader would get a history fairly quickly but it would be hard to take a fundamental trader seriously unless they have 10-15 years under their belt. 

Good fundamental data is difficult to find and incorporate into systems (although the latest beta's of Amibroker sure helps). I do have dividend data going back 15 years and have put that into Amibroker. I wondered how a simple Techno-Fundie system would perform. The system selects shares that have a minimum dividend and are in a short term bullish phase.

I was surprised how quickly a system emerged. Now the system is not me because it is too long term and boring to trade. But here are some of the stats:

The run was from the 1st-Jul-1999 until 1st September this year. Brokerage is 0.12%

Initial capital	        100000
Ending capital	    2791619
Net Profit	      2691619
Net Profit %	          2691.62%
Annual Return %	          59.04%
All trades	           1957
Avg. Profit/Loss	1375.38
Avg. Profit/Loss %	   3.51%
Avg. Bars Held	            39.57

Winners	                    (28.36 %)
Total Profit	      4914710.32
Avg. Profit	           8855.33
Avg. Profit %	             19.87%
Avg. Bars Held	           104.61

Losers	                     (71.64 %)
 Total Loss	   -2223091.32
 Avg. Loss	        -1585.66
 Avg. Loss %	           -2.97%
 Avg. Bars Held	           13.82

Max. system % drawdown	-31.91%


Not bad getting a  60% annual return through a couple of bad market periods. The percentage winners (28%) and the maximum drawdown (32%) would also make it difficult to trade this system. The maximum drawdown occured during 9/11 but the system recovered by December 2001. If I run the system from 2001 it returns 70% and the max drawdown is 23%


----------



## mit (5 September 2006)

The Amibroker code for the system is as follows:

Only want liquid stocks. EMA of daily turnover has to be over $500k

WC = ((Close * 2) + High + Low) / 4;   
Liquidity =  EMA(V*WC,60) > 500000; 


Amibroker has Open Interest (OI) as well as OHLCV. A handy place to stick stuff. This is where I put the dividends. When I originally put the dividend data into Amibroker I wasn't sure if OI could contain decimals. So to convert to cents divide by 10,000

Get total dividends over the last 250 days (approx 12 months)

TotalDividend =  Sum(OI/10000,250);

Get yield as a decimal 
TotalYield = TotalDividend / C;

Setting parameters for buy/sell yields

BuyYield = 0.03;  
SellYield = 0.02;  

Lets buy if the yield is greater than 3%

Buy = TotalYield > BuyYield 

and  enough liquidity

AND Liquidity == True

not in long term decline. That is we don't want a high dividend
because the stock has crashed.

	   AND C > EMA(C,250)

and bullish over a shorter term

	   AND EMA(C,10) > EMA(C,20)
;


buy on close

BuyPrice = C;


Sell if Yield goes below 2%

Sell = TotalYield < SellYield OR

or if stock crashes below 12 month EMA

          C < EMA(C,250);


get rid of extra buys/sells

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

find the dividends earned since we bought

BarsSinceBuy = BarsSince(Buy==1);

CollectedDividends = Sum(OI/100/100,BarsSinceBuy);

We receive capital growth and all the dividends 

SellPrice =  C + CollectedDividends;

Position is 8% of total capital

PositionSize = -8;


----------



## mit (5 September 2006)

The system above took only an hour. The only variables I played with were the dividends so it isn't curve fitted given the number of trades. It surprised me that 3% was the best cut-off. I thought that it would optimize higher.

I think more could be done. The drawdown is quite large but given the returns it would be good to run unleveraged.  Psychological it would be difficult to handle the low win rate but it does show that you can be profitable with less than 3 winners in 10 runs.

MIT


----------

