Friday, August 8, 2008

Using Multiple Trading Systems

Some info I found while surfing. I don't use neaural nets but I can relate to using multiple systems to increase trading frequency. The system should be non-correlated. It's a good read.

First find out what is going on in the market you want to trade in the timeframe you plan on holding a position. If you want to day trade with one trade per-day then find out all the different ways the day has played out in the past. Ex. trend day, two-way day, reversal day, etc.

Once you've done this you should have an idea of which type of day is most common and which is most profitable. Then define something which could be of value to trade one of the market types. An example might be in a reversal day to find out how often the market makes a low of the day in the first 15 min. of the session. If it happens often enough to be of interest then you go on to the next step.

Take every period for which the target is found and create a table of outputs with 1 for the target and 0 for non-targets. Then pre-process all the inputs into the target and convert them to binary inputs. (A common mistake is to take open, high, low, and close data -- analog and assume you can find relationships with the target). For ex. yesterday close > day before yesterday close. If found mark the input as a 1 if not present mark it as a 0. Do this for as many identifies as you can. This may present a hundred or more binary inputs leading to the target for each day of the data.

Then you'd pass the data into a backprop neural net and have it train on the data. (You’ll need to set aside some data for out of sample testing). Once it's trained to hit at least 90% correctly test the NN on the out-of-sample data. If you hit at least 85% correctly then you can do one of two things. If you're a discretionary trader, setup the NN and pre-process the inputs every day and use the net to predict whether tomorrow has the target (in this example the low of the day is within 15 min. of the start of the session). If so use it to trade to the upside as long the net remains 85% correct. If you're a systems trader then go back to the net and look at the weights of the net to see which of the binary inputs were most important in hitting the target. Use the inputs to create a back testable system based on the patterns. A system might be when xyz pattern exists then buy next bar above the lowest bar as long as the time is within the first 15 min. of the day. Set the stop to one tick below the low.
If the system tests profitable enough to be of interest then move on to the next step.

Next, take the trades and test them against random trades pulled from the same year (the edge test). Rank the trades versus random for each year of the back test. If the trades score consistently above the 70th percentile then you can guess you've found an edge-based system. If not, then you have to assume you've found a temporal characteristic in the data that can be exploited for some period of time.

If its edge based then all you need to do is adjust the trades for market volatility and apply a money management strategy. Check the trades on a periodic basis to ensure the edge continues and plan what to do with your next million. If it's not edge based you can still trade it but you need to setup an objective bailout method such as running a monte carlo sim and determining the bailout point to be say the 95% level of the predicted max drawdown point. Your trading would be more defensive using a non-edge based method as well. Maybe you'd split the trade size in half and have a 15 min. or 10% of daily range as a filter to adding the second position (letting the position prove itself) as long as the volatility was large enough to justify the scaled entry.

Every model I've worked on has gone through the same process. Look at the behaviour’s present in a market; characterize them by creating a rule and checking the fit until all behaviour’s are noted. Then start looking to see if there is a component to the behaviour that is non-random. If so, develop a system to mine it and create a way to monitor the behaviour to ensure it's persistent over time. For example, one of the behaviour’s widely known is the trend day in the SP market. It can be identified just by visually inspecting a chart. I characterized it as a low/high within 10% of the low/high of the day and the close within 20% of the high/low of the day. With the definition I can see how many of these days have persisted over the years (averages about 25 day’s per-year). Then I can see if there is a way to identify these days in advance (realizing I'm going to also be capturing some false days as well).

The algorithm used to adjust the number of contracts traded to volatility is calculated by the range (high - low), then average it for the past ten days. I use ten because I want my model to cut back on size pretty quickly if the volatility jumps. Then I divide the highest historical 10 day volatility (approx. 48 pts.) by the current volatility (ex. 8 pts) to come up with a multiplier (ex. 6). The model would then apply 6 contracts for the next trade. This is not the final size used to trade. It's just used to adjust the model for volatility levels so I measure one period against another without volatility being a consideration.
By doing so, I can see if the same level of opportunities persist from period to period. I can also use these normalized trades to feed into money management models as well as Monte Carlo tests to estimate future performance and drawdowns. If you were to use trades from say 2000 and 2004 for the SP market in a Monte Carlo test without normalizing volatility you'd get a much distorted estimate of future performance.



Comment from reader:
Just to make sure I understand the big picture, this is all being done to increase frequency in the desired profitable time period, correct? So if I understand, sub-par models tested individually with low frequency can be morphed into an above-par model when combined with other non-correlated sub-par models (assuming they're not too sub-par), thus increasing frequency, consistency, and lowering the need for a higher profit factor? Thank you for presenting the information the way you did, I would not have made that connection otherwise (assuming I’m on the right track). Fascinating.

Disclaimer

The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.