# System Development Setback



## Bin57again (26 August 2006)

Hi all
I recently discovered a basic flaw in a system I'm developing and it's set me back months. I've spent the last 2 weeks trying to get the system back on track but I seem to be drifting further and further away. I keep bringing myself back to my original fundamentals of the system but I'm getting somewhat disheartened. I was wondering what others do in terms of inspiration or coping with setbacks. Should I just give up the idea and move on to a different system? To put things in context, I'm a newbie and this is my first system - I thought I'd found that elusive edge but I haven't. The experts seem to roll out systems which have an edge every 5 mins but us newbies can't get anything to work!! I find myself thinking I might as well give up and follow the buy and pray brigade (which is frightening). By the way, what's the difference between the buy and hold brigade's "dollar cost averaging" and buying in a down market?
Thanks in advance and wishing you all a great w/e.


----------



## macca (26 August 2006)

Hi Bin 57,

NONE   

Dollar cost averaging is a fancy term invented by stock brokers to encourage people back into the market to stop the prices falling.

It is also very handy for traders wishing to exit a falling stock 

It can be OK to buy a stock once it has stabilised at a new level, but I don't like to buy them on the way down, my puny amount is not going to stop the rot


----------



## Kauri (26 August 2006)

macca said:
			
		

> Dollar cost averaging is a fancy term invented by stock brokers to encourage people back into the market to stop the prices falling.
> 
> It is also very handy for traders wishing to exit a falling stock




_ But our Government reckon it's a good thing_.....   

A federal Liberal backbencher says people who bought shares in the last Government sell-off should be given first priority in the next Telstra sale.

Cameron Thompson has welcomed the Government's decision but says people who invested in the company when the share price was high should have first choice this time round.

"Those people provided a massive capital injection into Telstra at a very important stage in the process," he said.

"Their return on the investment hasn't been realised. 

"Now that the opportunity is here to buy again. I think those people should be the number one cabs off the rank."


----------



## NettAssets (26 August 2006)

There is a bit of a difference in developing a system with an edge and designing a flashy ad. that says you have.

It sounds from your reference to joining the buy and pray brigade that your system is trying to be a stock picker and not referencing the exit and money management enough.

If your edge was in picking stocks that are going to perform then I think you are looking for your edge in the wrong direction.

A lot of very good systems will do just as well with random entry into the market (obviously restricted to targeted segment)

Are you drifting further away in backtesting over the same time frame?
have a look at the way the indexes or sectors where moving as you where testing. It may be the testing at fault not the system.

Best of luck and don't throw it in just yet.

John


----------



## NettAssets (26 August 2006)

Bin57again said:
			
		

> .  By the way, what's the difference between the buy and hold brigade's "dollar cost averaging" and buying in a down market?







> NONE
> 
> Dollar cost averaging is a fancy term invented by stock brokers to encourage people back into the market to stop the prices falling.





It only the same thing if you are already holding stock you have purchased at a higher price of course
John


----------



## tech/a (26 August 2006)

Think Nett Assets has nailed your systems problem.

A system isnt simply a plan of trading.
It much more than an exit/entry and stop and even Money Management.
A combination of all aspects wont guarentee a profitable system.

You need to be able to test the system over a number of years and if portfolio testing over 1000s if not 10s of 1000s of trades.
You need the system to have a positive expectancy and need to know what its *"Blueprint"* is so that you can monitor its performance through *"Benchmarking"* without this information you dont have a system,more a trading plan which as you have found can be in consistant and you are left without a clue as to wether this is a normal drawdown situation for the method you have or if in actual fact the method ever had a chance to run a profit.

All question which if you dont have an answer to mean you need to either have someone with the software to test and answer the questions---or you need to purchase it.
I use Metastock and Tradesim but most use Amibroker which is also very good.

On dollar cost averaging,this is buying more stock from an originating high purchase price as the stock falls.The lower buy price averages the break even price lower as the stock falls.
The risk is that the stock never recovers and or you run out of funds.
Purchasing on pullbacks is a one off at a level below the highs traded by the stock.Astute traders have a stop loss inplace to quit a stock quickly enough to save capital and slowley enough to give the stock a chance.

In a system rules would be in place for stops.---ofcourse tested for result.


----------



## Milk Man (26 August 2006)

I dont agree with the dollar cost averaging scenario, especially not in trading. Its like a sinking ship deciding to take on more water for mine. It may have its place in investing particularly if youre looking for underpriced stocks. I have no experience with stock *investing* (except my own company) so i'm not the person to ask.


----------



## GreatPig (26 August 2006)

Dollar cost averaging is an investment methodology used by the Lichello AIM algorithm and the Navra funds.

If you have AmiBroker, you can play with the AIM algorithm by downloading the plugin from this thread. Get the latest version from the last message.

Cheers,
GP


----------



## Bin57again (27 August 2006)

Thanks to all for your replies. I guess I'm still getting to grips with Amibroker and system development generally. My main problems are:
1. Backtesting different groups of stocks in different timeframes - for example, if you set a date of, say, 01.01.04 onwards and you had a maximum number of positions at 5, you might have Zfx as one of your trades if Zfx triggers an entry signal on 02.01.04. However, if Zfx doesn't trigger until say 01.04.04 you may already have your 5 positions - ADB,ADZ,BHP,COH and RIO - in which case you weren't able to take advantage of Zfx. The result of omitting Zfx could be the difference between a profitable and non-profitable system.
2. Not fully understanding how to switch on and off a system by reference to equity curve. Could someone explain this to me please? For example, say I trade some trending following system - classic channel breakout - the system is profitable for the first 12 months but I can't take a view of how the next 12 months will go. I begin year 2 badly. I could take a view by reference to consecutive losses (e.g. I plan in advance that more than 6 consecutive losses means I need to revisit) but how do I use the equity curve? Is this simply hitting a drawdown limit which is more than is acceptable/ greater than the limit in backtesting?


----------



## Milk Man (27 August 2006)

If you intend on catching the big moves and having a low win/loss ratio then it may be a good idea to have more positions. Depending on capital, I used to do at least 8 positions. The exception being low capital systems where the brokerage would chew out profits too much. I.E. If I had a $10000 system I would generally have positions.


----------



## kaveman (27 August 2006)

Bin57
The portfolio backtest simulates real trading. If your backtest missed some good trades because there was no cash available to enter, then you would have missed that trade in the real world as well.
To get different results to average out the backtest results of your system you could try chaning the positionscore, which will alter the preference of entering positions if you get more signals on a bar than you have cash or max allowed positions for.
You could also try changing the date of starting the backtest. I often do this and will often only need to week difference in start date to change the entire results.
If you still feel that your tests are missing the good trades then maybe you need to change your system to refine your entry or exit conditions. Just remember that this can become a life long struggle and in the end it may never actually improve the results. backtests are good at giving an indication of how well you might have done in the past, but will not ensure the future returns. The nest a backtest can do is give you some assurance that your system has a reasonable chance of being profitable

The use of an equity stop or string of losses can be done using the advanced backtest coding. Not something recommended for the AFL beginner unless you have a good ability to pick up coding, or find a good example that can be used (plenty of examples if you can find them in the yahoo group archives)


----------



## tech/a (27 August 2006)

Hmmm.---further to Kaves excellent comments (Amibroker based).

*A well designed system will perform similarly regardless which stocks * are taken by the system.

The only way to find this out is with Monte Carlo simulation of 1000s of Portfolio combinations.

Bins problem with all due respect is the lack of experience in systems developement and the requirement that need to be met by a robust system.
If his or any other system fails because a single stock or a group of stocks are missed then he doesnt have a system with positive expectancy.

Montecarlo simulation is like giving 20000 people your method with your capital allocation and telling them to go trade it over the next X years then report back to you the results.

With the 3 systems I use over 20000 portfolios not 1 portfolio unprofitable.
The deviation from highest return to lowest is around 20% and the largest drawdown either Initial OR Peak to Valley deviates by not more than 5%.

There is much to understanding systems developement and Short term Benchmarks and performance are vastly different to Longterm.

As for the question of trading your equity curve there are a number of ways of implementing this.
IE you can exit once your equity curve declines quicker than the index your trading.OR you could make a composite of your trading universe and Benchmark equity curve against that.
*THE MOST * common thing to do is to 
A) switch off your system if the equity takes a drop below X% from the most recient high.
B) Switch off buying when equity curve is in drawdown.

If your really serious about systems developement and you have a mathamatical bent *the BIBLE * in my veiw is Kaufmann Trading Systems and Methods.*ISBN 0-471-14879-2.*

Even without a mathamatical bent reading or more to the point *REFERENCING* this book will teach the reader a great deal about developement of profitable trading methods (Systems).Infact youll soon find out how much you *DONT KNOW*


----------



## CanOz (10 April 2007)

Some interesting views on System Development here.

Cheers,


----------



## nizar (10 April 2007)

CanOz said:


> Some interesting views on System Development here.
> 
> Cheers,




Indeed.
Thanks for bumping up this thread.

Just in response to one of the points raised about number of open positions, and how this may cause you to miss out on big winners eg. ZFX.

Many people have good systems that -- in an attempt to create a perfect system -- complicate the system too much.

If any1 wants to improve your system, i suggest to look at your money management ie, position sizing, and how it can be optimised.

I was looking at Steve's blog and found monte carlo results of one the weekly systems he was testing, both had exactly the same entry/exit, both had average trade length one year, both had very acceptable drawdowns (about 10%ish), both traded the same universe (asx300), both were tested from 1999 to 2006. 

Monte carlo simulation results: System one returned >2,000% on average, while system two returned about 400% on average. The difference:
Both systems had 100k capital.
System 1 used 10% initial capital or 10k position sizes per trade.
System 2 used 10% of *remaining capital* per trade.

I thought that was very interesting... 5 -fold!!
Why? Because you can take on more positions


----------



## Porper (10 April 2007)

nizar said:


> Indeed.
> Thanks for bumping up this thread.
> 
> System 1 used 10% initial capital or 10k position sizes per trade.
> ...




This is the part I don't get.

Hindsight says if you optimised your position size to 10% per trade you make 2000% profit.

So if you trade this system in the future and have 10 losses in a row (and I know this can happen from experience) you lose all your capital. 

I'd rather sleep at night and make the measly 400%


----------



## CanOz (10 April 2007)

Porper said:


> This is the part I don't get.
> 
> Hindsight says if you optimised your position size to 10% per trade you make 2000% profit.
> 
> ...




Yeah, there is merrit in getting the risk of ruin effect (From Brett Penfold's book) to less than 1%.

Cheers,


----------



## Pager (10 April 2007)

Porper said:


> This is the part I don't get.
> 
> 
> So if you trade this system in the future and have 10 losses in a row (and I know this can happen from experience) you lose all your capital.





Thats incorrect Porper, if you have say $10,000 and risk 10% ($1000) and lose, your balence is $9000, so your 10% risk is $900 on the next trade not $1000, get down to say $5000 then a 10% risk is $500, so 10 losing trades wont wipe you out, still not very nice though  .


Cheers

Pager


----------



## nizar (10 April 2007)

Porper said:


> This is the part I don't get.
> 
> Hindsight says if you optimised your position size to 10% per trade you make 2000% profit.
> 
> ...




10% of remaining capital for position sizing.

Pager you are doing a bit better but both of you need to think again.

I havent mentioned initial stops. You all assumed that the system mentioned above has no stops?? Really???

Risk management for such a system is probably initial stop of 10%.
Effectively a maximum of 1% when stopped out.

But maybe its not. Im just guessing, that part wasnt mentioned in Stevos blog. Coz its not important. The point was that money management is the way to go improve your system.


----------



## Porper (10 April 2007)

nizar said:


> Risk management for such a system is probably initial stop of 10%.
> Effectively a maximum of 1% when stopped out.
> 
> But maybe its not. Im just guessing, that part wasnt mentioned in Stevos blog. Coz its not important. The point was that money management is the way to go improve your system.




Yes, sorry didn't read the post correctly.

However all we are doing is still playing with the numbers.

The more positions on means you will replicate the market to a closer degree.

Who is to say profit can't be maximised further by putting 5 trades on using 20% equity on each trade with extremely tight stops.All that happens is that your win percentage is very low but win/loss ratio very high which should in theory be more profitable.Of course when you get caught out and have a big gap down you are doomed unless a GSL is used.

To some extent this boils down to your risk tolerance and not just optomization of the system.


----------



## nizar (10 April 2007)

Porper said:


> Yes, sorry didn't read the post correctly.
> 
> However all we are doing is still playing with the numbers.
> 
> ...




ALl great points.

I dont disagree with any of the above.

My point was that money management is probably the most important part of a system, and at the very least, it carries much more significance than entries. So this is where good systems can be tweaked into great systems.

Just thought Id share something i read on a blog of who i consider a great trader.


----------



## Rob_ee (10 April 2007)

Being new to the market I wonder just how accurate a picture you would get from back-testing seeing that most have made good money in the BULL market over the past years.

Even the most incompetent amateur would have a good chance of making a great deal of $$ on just about anything.

So seeing that an oscilating stot, a converging MACD , crossing MA or any of the other myriad favourite indicators out there would have given good entry points over the past years how would they relate to todays market ??



Rob


----------



## tech/a (10 April 2007)

Rob_ee said:


> Being new to the market I wonder just how accurate a picture you would get from back-testing seeing that most have made good money in the BULL market over the past years.
> 
> Even the most incompetent amateur would have a good chance of making a great deal of $$ on just about anything.
> 
> ...




Rob.
In isolation there would be few who havent had a few profitable trades.
But I think you'd be suprised how few actually out perform the market year in year out --- regardless of overall market conditions.

A few points.

(1) Shorter term methods are not really effected by longer term market fluctuations so if this is a concern then perhaps your design should concerntrate on shorter term.

(2) With the advent of CFD trading developing a methodology which also en compasses the short side easier and in un certain times a balance of portfolio maybe wise---even a bias toward the short side when clearly bearish.

(3) I have written much on the importance of your system "Blueprint" and how to use it when traking your system--this is the key to determining if your system is trading outside market conditions used during developement.

(4) You could also trade your equity curve "Stevo" does to the extent that if his equity curve is taking a dive he wont take a new open position until it turns up again.

In all of the above dont forget that Tax is at full rate for trades which are held for less than 12 mths.
Cost me $30,000 last year when I closed a portfolio while I went on holidays only to notice some open trades were 10 mths old and I got hit 25% more in tax than I would have if Id held!!---Dohh


----------



## CanOz (10 April 2007)

tech/a said:


> (4) You could also trade your equity curve "Stevo" does to the extent that if his equity curve is taking a dive he wont take a new open position until it turns up again.




This is what is referred to as the 'system stop' Tech, correct?


----------

