Saturday, October 24, 2009

Quarterly Portolio Update

There were no trades closed this quarter. The system is fully invested in the market and has been for several months now.

Just thought I'd put in an equity curve - probably not the best you've seen!

Start up date was the 9th October 2007 with $66,000 in capital.
Since then 51 trades have been closed.

We are still in the middle of a drawdown - max.DD stands at 40.56%.

Thursday, October 22, 2009

System flaw

The gap fading system that I was hoping to trade on US stocks has run into a bit of trouble. Actually alot of trouble. The problem is that it can't be traded, and here's why.

I believe the opening auction system works differently in the US compared to the ASX. In the local market, the most liquidity for the large cap stocks especially, always occurs at the open and at the close (usually higher at the close).

BHP or CBA, for example, each of which routinely turnover hundreds of millions of dollars per day , would do about $2-10million right on the open.

But over in the US, even some of the high turnover NYSE tickers like WYE and JNJ, you only get 100 shares going through on the open! And these guys turnover the same or more than BHP or CBA. What i noticed in the course of sales is, about 5-10 seconds after the open, the party finally gets started and you see the 10,000 share and 20,000 share parcels start going through. Which is useless for a system that is supposed to buy "the open" as you wouldn't be able to catch this liquidity using "limit-on-open" type orders.

The NASDAQ opening auction system must work differently to the NYSE because they seem to have much higher opening liquidity across the board (in the hundreds of thousands range, so still not the millions I was hoping for).

So its back to the drawing board for the short term system. It looks like I may need to turn to intraday timeframes if I want to maintain my 100% overnight cash position and still generate a super smooth equity curve.

Saturday, October 3, 2009

The leveraged model




Considering the maxDD stats were acceptable, even during the 2008 Black Swan, the system will be leveraged up. Here are the charts of CAR and maximum drawdown over a 10-year test (01-01-1999 until 31-12-2008), using 30% margin as per I.B.


Wednesday, September 30, 2009

The beauty of trading short term







You just can't beat that super smooth equity curve.

This system uses a different entry to the one in the system posted below (US stocks) but was tested over the same universe of stocks.

Seems to have more of an edge. High Pfactor, lower maxDD, higher win%, higher payoff, less trades. And did I mention the equity curve?

The performance report shows the system in its inherent form, to provide a fair comparison with the system below. The equity curve and monthly profit chart show the system traded on 30% margin, which is what it would be traded on, if it gets to that stage.

Tuesday, September 22, 2009

US Stocks


I've recently been looking at US stocks and the potential to trade short term systems there is amazing due to the wide range of stocks and their liquidity.

The system that I've come up with is similar to the system described here a few months ago that traded ASX stocks through CFDs. Both systems are based on mean reversion and never hold overnight. But while the ASX system shorted overbought stocks and bought oversold stocks, with several days lookback and magnitude moves considered in the entry criteria, this US system just fades opening gaps and trades long only.

I have found gap fading (particularly going long gap downs) to be a robust edge that has worked well over many different universes of stocks. The idea came from James Altucher's book and also from this trader describing fading extremes as one of his favourite setups.

There are no CFDs in the US but my broker does allow 4:1 leverage intraday if required. The universe of stocks consists of 50 tickers from either the Nasdaq 100 or S&P 100, so I'm looking for liquidity and scalability in the system.

The system makes about 30-100 trades a month and performance is consistent with profitability on average 10 months of the year. 2008 was a tough year, but out of 10,000 portfolios, monte carlo testing shows that 98.59% were profitable last year, with the median portfolio gaining about 10%.

So the previous STMR system will not be traded; and this new one will take its place. I intend to use IB's PaperTrader to simulate it for about a year before committing real dollars to it.

Performance stats below are from 01-01-2003 until 31-12-2008. Position sizing is 10% of equity. Commissions are included (however, slippage, is not accounted for).

Sunday, July 26, 2009

FY2009 Performance







"Don't love open equity. It won't love you back"

The above quote is what a great trader once said to me. Watching open equity get whittled away is something that nobody tells you about when you design long term trend following systems. All you tend to focus on is the bottom lines of profit and maximum drawdown. But the journey to get to that destination is what we all must go through. And that journey can be much harder than you expect.

I was looking at where the system was at the end of FY2008 and PRC I saw was up 82% and the pyramid up about 37%. When they were closed, profit was just 38% and 10% respectively.

You will notice all of a sudden I'm only down just 10% for the year - how come? It's because I've decided to try and focus less on open equity and more on closed equity. Sure I won't have those weeks when i "make" $2,000+ but I won't be "losing" that amount either. For interest's sake, the system was down 21.00% for the year on an open equity basis.

So from now on, no more reports on open equity, and I will only be reporting closed equity on this blog. And since I only close trades every few months, even monthly blogging will not be needed. Perhaps quarterly.

My other system (short-term mean reversion) will be started up on a small scale sometime in the next few weeks/months and its progress will be monitored here.

Thanks to those who have followed and commented on this blog for the past 12 months. Good luck for FY2010.

Tuesday, June 16, 2009

-0.15



-0.15. That's the correlation between the above two systems after analysing monthly returns over the past 8 years. One is my longterm trend following system (LTTF) that I have traded for about 20 months, and the other is the low exposure system described in this blog recently. Lets call that a short term mean reversion system (STMR). Due to the low correlation, the combined performance of both systems in a portfolio will perform better than either system on their own, as the table shows.


The graph shows the monthly returns of both systems. As you can see, the STMR system performs better in the past year or so and also near the beginning of the test. It seems to like the volatility that often comes with market crashes. The LTTF system outperforms in between.

Tuesday, June 9, 2009

Further testing Part 2




Further testing Part 1








Since the system has been designed to trade only the most liquid ASX20 stocks, that's only about 10 symbols. And thus it can be argued that 175 trades over 10 years over only a few tickers is not enough to indicate whether or the results are statistically significant or whether or not the system has an edge.

So what I've done here is test the system "as-is" over a broader market, the ASX100. And then I also tested it on the S&P500 stocks and the NASDAQ 100. Note that the 10 year return for the S&P500 is actually negative.
Monte carlo analysis wasn't done on the NASDAQ as there was only the one possible pathway of trades. I know this because I was about a quarter way through the test when I noticed that every single value for each column was the same in each run.

The system is not intended to trade US markets (at least not at this stage) as CFDs are not available there.

Interestingly, 2008 was a great year for the system both locally and overseas. On the ASX100 +2.9%, on my culled universe +6.9%, on the NASDAQ100 +6.4% and on the S&P500 +23%.

Sunday, June 7, 2009

Low exposure systems


What I'm working on now is a low exposure system that can be used to trade CFDs at 10% margin. Exposure is a measure of time in the market and thus a measure of risk, and I think this is the ideal way to trade using margin because it can minimise drawdowns to a great extent.

The aim of the system from the beginning was to restrict all trades to a holding time of just one day. This is what allows for the low exposure and low drawdowns, since you are not holding overnight. So I'm in at the open and out at the close. Initially I looked at intraday stops but they cannot be tested (properly) without intraday data, are more prone to slippage, and require more precise execution and possibly even screenwatching!

Because I want to trade at 10% margin, the maximum acceptable level of system drawdown was 2%. This is sort of already swinging for the fences as it is. One of the things I have learnt over the last 18-24 months is that systems are always traded outside the parameters they are tested in. Always. And the maximum of drawdown of any system is yet to come. But I must admit, having been through a time where there was unprecedented volatility in the markets does give me an increased level of confidence.

The system I'm describing in this post actually begun initially as two separate systems, one long only and the other short only. They traded over different universes and the long system did actually outperform the short system in almost every measure of performance and risk, but when combined, the result was better than the long one alone in terms of CAR/maxDD (my preferred measure of risk-adjusted return), mostly due to the increase in trade frequency.

Another thing I wanted in this system is to have it designed in a way to avoid situations where I have to "choose" between candidates. And because they both trade small universes from the ASX50, and for obvious reasons long and short entries tend to not trigger on the same day, I was able to allocate capital in such a way to make this possible.

The system (both long and short components) methodology is mean reversion and based on work by James Altucher published in his book "How to trade like a hedge fund: 20 uncorrelated strategies", albeit with a few variations.

I'm well aware of the pitfalls of mean reversion, and I heed Jerry Parker's words with caution:

"Mean reversion works almost all of the time. Then it stops and you're kind of out of business. The market is always reverting to the mean except when it doesn't. Who wants a system like we have, "40% winners, losing money almost all the time, always in a drawdown, making money on about 10% of your trades, the rest of them are sort of break even to losers, infrequent profits? I much prefer the mean reversion where I have 55% winners, 1% or 2% returns per month. "I'm always right!" I'm always getting positive feedback. Then, maybe in 8 years, you're kind of out of business, because when it doesn't revert to the mean, your philosophy loses."

The main problem with mean reversion is how long it takes to revert back to the mean and how much pain will you have to endure. With this low exposure system, win, lose or draw, I'm out by the close.

Above is system statistics as given by AmiBroker, with the testing done over 10 years from 01-01-1999 until 31-10-2008. As you can see from the exposure, it spends most of its time, OUT of the market.

I'm still deciding which stocks to include in the universe when considering trading practicality. Obviously If I buy a stock of which 20% of the opening volume is my order, I will influence the opening price. This has cut my trading universe down and thus my returns significantly, but that's okay. The main thing is that I design something that can actually be traded.

Wednesday, June 3, 2009

Thursday, May 28, 2009

Short Systems









Last week I designed a short-only system to trade the ASX300 and it worked great when tested over 2008. But that's it. Didn't do well in the 2000-2002 bearmarket and even with a filter, I found it hard to isolate market conditions in which the system would thrive.

This is mostly due to the upward bullish bias in the stockmarket. So I'm not going any further with it. The system though i will keep, it may show promise in other markets that don't have a directional bias.

Impressive stats though.


Simulation Summary
Simulation Date: 5/19/2009
Simulation Time: 2:41:34 PM
Simulation Duration: 0.67 seconds

Trade Summary
Earliest Entry Date in the Trade Database: 1/2/2008
Latest Entry Date in the Trade Database: 12/17/2008
Earliest Exit Date in the Trade Database: 1/4/2008
Latest Exit Date in the Trade Database: 12/22/2008

Start Trade Entry Date: 1/2/2008
Stop Trade Entry Date: 12/17/2008
First Entry Date: 1/2/2008
Last Entry Date: 12/17/2008
First Exit Date: 1/7/2008
Last Exit Date: 12/19/2008

Total Trading duration: 352 days

Profit Summary
Profit Status: PROFITABLE
Starting Capital: $100,000.00
Finishing Capital: $163,529.44
Maximum Equity/(Date-Time): $63,529.44 (12/19/2008)
Minimum Equity/(Date-Time): ($3,634.90) (1/25/2008)
Gross Trade Profit: $111,239.87 (111.24%)
Gross Trade Loss: ($47,710.42) (-47.71%)
Total Net Profit: $63,529.44 (63.53%)
Average Profit per Trade: $432.17
Profit Factor: 2.3316
Profit Index: 57.11%
Total Transaction Cost: $2,076.41
Total Slippage: $1,970.61
Total Trade Interest: $0.00
Daily Compound Interest Rate: 0.1398%
Annualized Compound Interest Rate: 66.5269%

Trade Statistics
Trades Processed: 2830
Trades Taken: 147
Partial Trades Taken: 147
Trades Rejected: 2683
Winning Trades: 66 (44.90%)
Losing Trades: 81 (55.10%)
Breakeven Trades: 0 (0.00%)

Largest Winning Trade/(Date-Time): $9,217.47 (12/19/2008)
Largest Losing Trade/(Date-Time): ($3,806.15) (5/15/2008)
Average Winning Trade: $1,685.45
Average Losing Trade: ($589.02)
Average Win/Average Loss: 2.8615

Trade Breakdown Long and Short Trades Long Trades Short Trades
Normal Exit: 147 (100.00%) 0 (0.00%) 147 (100.00%)

Total Trades: 147 (100.00%) 0 (0.00%) 147 (100.00%)

Trade Duration Statistics Winning and Losing Trades Winning Trades Losing Trades
Maximum Trade Duration: 191 (days) 191 (days) 55 (days)
Minimum Trade Duration: 1 (days) 1 (days) 1 (days)
Average Trade Duration: 30.46 (days) 48.77 (days) 15.53 (days)

Consecutive Trade Statistics
Maximum consecutive winning trades: 7
Maximum consecutive losing trades: 20
Average consecutive winning trades: 2.64
Average consecutive losing trades: 3.24

Relative Drawdown
Maximum Dollar Drawdown/(Date-Time): $13,942.15 (5/28/2008)
Maximum Percentage Drawdown/(Date-Time): 12.5000% (5/28/2008)

Absolute (Peak-to-Valley) Dollar Drawdown
Maximum Dollar Drawdown: $16,623.15 (14.5900%)
Capital Peak/(Date-Time): $113,907.06 (4/7/2008)
Capital Valley/(Date-Time): $97,283.90 (6/2/2008)

Absolute (Peak-to-Valley) Percent Drawdown
Maximum Percentage Drawdown: 14.5900% ($16,623.15)
Capital Peak/(Date-Time): $113,907.06 (4/7/2008)
Capital Valley/(Date-Time): $97,283.90 (6/2/2008)

Monday, February 2, 2009

Tuesday, January 27, 2009

December Performance





Closed equity is unchanged as no trades were closed during December. I'm mostly cash at the moment, and only holding 2 stocks, GOLD and NVT, which has been the case for the past few months.