Sunday, October 03, 2010

Computers

I have changed desktop computers 3 times this year! I find myself drawn to AMD based systems. I tend to go for the underdog. I like the idea of having strong competitors to massive companies like Intel and Microsoft. AMD systems tend to be cheaper and work just as well. AMD offer more bang for my dollar and my old penny pinching habits die hard.

AMD is not really a struggling minnow and has been fighting Intel for quite some time, as shown by the $1.25 bn settlement last year. Dell has also been under the spotlight for their "symbiotic" relationship with Intel. I think that it would be true to say that the concept of fair competition has been stretched to the limits when examining the computer giants.

Many of the worlds supercomputers run AMD and Linux so I am not in bad company.

Microsoft lost the plot with Vista and triggered my interest in Linux. There is a massive amount of software for Linux based machines and most of it is free. In Ubuntu I just go to the Software Centre and search for what I am after, including very good photo software (Digikam and Gimp), excellent browsers (Chrome, Opera and Firefox), a number of Office packages (Open Office or Libre Office, Gnumeric, Abiword) Evolution for emails, not to forget such gems as Virtualbox, GnomeDo, Tomboy Notes and Lucky Backup. I even have a virus scanner, although I don't use it much. Some of the anti-virus software really bogs down Windows based machines.

The Ubuntu Software Centre is a little like Apps on an iPhone or marketplace on an Android phone.

I have Windows 7 running on a virtual machine for downloading share prices. Windows 7 is also essential for running Tradesim.

Running a Linux based operating system is a bit like being a member of an outlaw bikie gang. A one percenter, Outlaw nerd, that's what I am. More than 90% of computers run Microsoft Windows. It's amazing that Linux exists at all given the huge user base Windows has.

So why change computers 3 times in one year. One reason is because it was very easy to do. I just pulled the small (32gb) SSD drive that holds my operating system out of the old computer, along with my data drive, and plugged them into the new setup, booted up and away it went! Try that with Windows 7.

stevo

Spreadsheets & Amibroker

 The chart above shows system performance without a profit target versus the chart below that has a profit target.
I haven't posted for a while. I find myself becoming quite secretive about trading methods and system performance!

But I have decided that I am happy to share some stuff about what can be achieved with Amibroker and some spreadsheets. The series of charts above were generated using a dummy variable in Amibroker to produce a range of outcomes from the Explorer. I have mentioned this elsewhere in this blog.

I use a template spreadsheet and just copy the data from Amibroker straight into the spreadsheet and up pop the charts above. These charts were produced using Open Office, not the best spreadsheet software on the market but certainly the cheapest - free. It is quite capable for basic tasks like the one above.

These charts are created using frequency distributions. The intervals for the distributions are automatically generated.

A profit target between 200% and 400% for the long term system (ave hold time of 290 days) shown above works quite well. Not a lot is gained by setting a higher target, and drawdown is slightly worse.

Friday, January 22, 2010

Update


Whilst the market does what the market does I have been working on a few things of late.

Firstly I have turned comments off on the blog from (except for registered users) for the moment because of the spam that started to fly around.

I have also started implementing Praemium to see how it goes keeping track of trades and bank accounts. So far the trade recording has been great, with trades showing up in my online portfolio without me touching a keyboard. If the banklink side goes to plan I will should have very little paperwork to contend with.

I have also been dabbling in computers. I built an AMD based machine (Athlon X4 620, 8gb ram, 64gb ramdrive, 500gb hard drive) for around $800.

The most fun has been running Windows XP in a VirtualBox, with the physical computer loaded up with Ubuntu 9.1 (karmic koala). So I can run Amibroker or TradeSim on a virtual machine but have access to the free software that comes with the Linux distribution.

The screen-shot shows Tradesim and Amibroker running. I captured the screen whilst rotating it in Ubuntu. I will also be trialling Windows 7 on a virtual machine, although I am pondering as to whether I should get 64 bit Amibroker.

With trading systems I am still starting up my monthly time frame system for my super fund - it takes a while to get change over from one system to another. 2009 was a good trading year and many traders would have profited from the strength of the market.

stevo

Monday, December 21, 2009

Customers trade


Exited this one last week - I was hoping to make a year with it. Just over 120% up.

Tuesday, November 24, 2009

Walk Forward testing – some thoughts

The numbers below are from a weekly system I have been playing with. It’s not really a complex system, although it does use ranking of stocks potentially to boost results – something I am still contemplating as a strategy.

The buy signal initially only used one indicator – the one optimised in this test. I then added in extra criteria, but only when the index was bearish as determined by a moving average. I then added a ranking criteria based on momentum – the system takes the strongest stocks in terms of momentum. So the breakout criteria optimised in these tests is a major component since when the market is bullish it is the only buy criteria used.

The table below shows out of sample only results for 3 walk forward simulations. The walk forward used optimisation of a parameter used in an indicator, a dummy parameter with the real parameter fixed throughout the test and, in the final test the indicator that used the real parameter was deleted from the buy signal altogether. The optimisation metric used was profit factor in all tests, although it’s sort of irrelevant if the test is optimising a dummy value.



Working on the hypothesis that the in-sample tests are irrelevant, and to save words, I have left the in-sample results out of the above table.

The orange colored rows are using a dummy walk forward optimisation variable with the parameter / indicator removed altogether from the buy signal, instead of being a fixed value as in the white rows, or the optimised parameter in the yellow rows.

I also graphed CAR% below to get a better picture of the results.


So - the questions are;
1. Does the buy parameter / indicator being tested make any difference?
2. Is the system robust?
3. How valuable has the walk forward process been?

Q1 Whilst at first glance it doesn't make much difference look at the Maximum System Drawdown column, especially the last row when drawdown hit 57%. Whilst the parameter often doesn’t do a lot it was certainly worth having in the buy signal during the Global Financial Crisis. Exposure to the market was also often higher than the other tests when the indicator was removed, as was the number of trades taken.

Q2 The system's robustness is something that I would test using Monte Carlo analysis for further verification, although the system performed well over a range of different market conditions. I would like to understand what path the ranking is leading me on through the range of possible paths through the market.

Q3 I get a lot out of walk forward, but not in the sense that some people might. I am not keen on changing indicator parameters on a regular basis, but I have no real proof that my lack of keenness is warranted. But as a method of testing a strategy over a range of different market conditions and portfolio start-up dates it certainly is useful.

Without going into a lot of statistics I would be happy to say that there is no significant difference HHV optimised and changed every walk forward period and HHV "intelligently" fixed, however taking the parameter out altogether….no.

stevo

Saturday, November 14, 2009

Rubber glove bagpipe

Wonderful stuff - you should see what he does with a condom.



Linsey has a website as well.

stevo

Thursday, November 12, 2009

TradeSim Parametric Testing - good stuff!

I always thought it would be nice to optimise on position size criteria. It can be done in Amibroker, however TradeSim has really excelled with the recent upgrades to their software as shown by the following charts. It is clear that, with the system below, there is not a lot to be gained from increasing risk much beyond 1% in terms of net profit. Drawdown will increase, with some decent size outliers to spoil the party. I am sure I would manage to become an outlier (in the wrong direction) in actual trading!





These tests were run using TradeSim Enterprise Edition. I used Amibroker to generate the trades without having made any changes to the setup I had in AB for the previous version of TradeSim. The charts above do not do justice to the quality of the output - although the TradeSim site has better examples.

The charts above are from a monthly system I am using, as mentioned below.

regards

stevo

Wednesday, November 11, 2009

Monte Carlo and spreadsheets



I couldn't find any posts I had put up on this technique. I run Monte Carlo simulations (as many as you have the patience for - I did 200 runs) in Amibroker and then export the data to a spreadsheet.

The graphs shown above were done using Open Office, but any decent spreadsheet software will do (although OpenOffice is free for those that are frugal with their dollars :) ). I have done the same thing using Excel as well. I didn't generate the data for these graphs but the technique is quite easy once you master how to work out how to auto generate the "Bins" for the frequency distribution.

I put this up on ASF in response to a question - I haven't visited ASF for nearly a year.

regards

stevo

BTA & CTX - A couple of trades

I closed a couple of system trades over the last couple of weeks. CTX didn't do much, except to lose some dollars for me.


BTA was a more interesting ride. I remember taking the entry on this stock because it had closed at $0.87 on the Friday and jumped to $1.405 on the opening the following Monday when I was about to take the trade. I usually struggle to remember an individual trade after a couple of weeks. It peaked at at $1.79 for the week whilst I entered at $1.61! The volatility forced me to scale back the position substantially to reduce risk. I got out at $2.72.

I am wondering if I could consider recalculating risk on this sort of trade a couple of weeks in and add to the position size - something to ponder (but not lose sleep over).



The dog is looking at me like I should feed him so I better go - I sometimes wonder who is wearing the leash! According to accepted wisdom my dog is 90 human years old, although I haven't seen too many 90 year old men chasing possums (younger women maybe, but not possums)

regards
stevo

Tuesday, October 13, 2009

System design & testing

This post refers to a monthly time-frame system I mentioned a couple of posts ago.

To design this system I used ASX data for around 500 stocks from January 1999 up to the end of 2004. The initial ideas were coded and then optimised. The buy signal is made up of 2 variables and the exit is a simple ATR trailing stop plus a simple, rarely triggered, profit exit.

I optimised the variables, fixed them and forward tested up to September 2009. The whole exercise was completed over a weekend. It's not a question of what time-frame to use, trading is about what works for the trader.

The security profit distribution shown below has the top 50 winning trades excluded to see if there are any big winners impacting on the results. I excluded the top 50 since there were over 1000 possible trades over the 10 year period.


Yearly profit is shown below ($500,000 capital kept constant) again with the top 50 trades excluded.


Yearly profit without trades excluded.


I am ranking the trades, not so much to improve the performance of the system, then to stop me wondering which stock to pick out of the handful presented.

I also did some runs where I started the system up at the beginning of every year from 2000 through to 2009. There are some difficult startups based on these runs, but nothing that a trader that understands the system could not ride out. I am not starting from scratch anyway since the portfolio is already close to fully in the market.

regards

stevo