Musings – 20120106

In the last few weeks I’ve been trying to think about how to make a system that has a way to finding out robust trade parameters. I recently just got a paper and pen and started thinking about it freely and noting everything down. Perhaps its time I break out the ‘Thinkertoys’ book again. This post will not be organized well or flow or anything like that. Its just me and my thinking. I’ve tried to put in some order, but it doesn’t make a lot of sense. I’m mostly doing this so that it doesn’t come off as one run-on paragraph.

As if that is not bad enough, I also began writing down ideas and notes while creating this post. And I’ve not bothered to put any of this in thought-chronological order. Enjoy reading; I hope you don’t get a headache.

What is the basic system like?

A basic system could look like the following.

  1. Enter under ‘x’ conditions.
  2. Exit under ‘y’ conditions.
  3. Else maintain current status.

Its all about changing the status of the trade or maintaining the status. This is a very basic system. There is nothing more to it.

How do we go about it?

Set stop-loss to some function of present values of indicators.

Can’t do that since we don’t know what the correct values are. We have the ‘x’, but don’t have the ‘y’. This means that we certainly can’t use a supervised NN for this.

Can we find out what ‘y’ should be by running a GA on the training data? To prevent curve-fitting, we apply the results to a validation-set and use the results as a fitness score.

There is a problem with that. Doesn’t feel right. Feels off. How do we know that this is any good? We aren’t taking anything from each iteration (training – validation pair). All we can do is just run a new curve-fit on new (Live) data. Nothing is learned.

Got carried away. Started thinking of just using GAs throughout. Wrong. Original idea was to run GAs on some data to find out what ‘y’ should be. Then train a NN using the ‘y’ and known information (Indicators) as ‘x’. And then what? This doesn’t make sense.

New idea. Example. Take a 5-month period (Hypothetical). Take a time-period. Find out what the SL (Stop-loss) should have been at the end of every time period (I’m using daily data). This can be the ‘y’. Don’t use GA to find out ‘y’. The analysis should take into account (At each point in time) the true range of prices (Highest high and lowest low) for the next ‘n’ periods. And then it should spit out a number that tells us what the SL should be. This might get complicated to create. Thinking of how to do that right now in different markets. Can’t think of how to do that. It would involve a system that looks at the big picture. Doesn’t make sense. Too difficult. Perhaps I should just focus on something that closes in the next 30 periods (30 days)? How about that. Would make things simpler. Would have to cap the time limit at some point, right?

Other ideas.

How would this be any different from a system that looks at the data for any day and then tries to predict the range the data is going to have over the next ‘n’ periods? It isn’t any different from that. That would be a small change in the current Pleasance system. And this does not help me with the problem that I’m trying to solve right now.

Another prediction system that I could make is to predict when a big move in the markets is going to happen. This shouldn’t be difficult. Just flag the ‘n’ time periods before a ‘big move’. The ‘big move’ could be defined as a change in price of some percentage of the ATR or something. Not complicated. Could be a basic binary output NN.

What is the objective?

To learn from the past. To learn what the stoploss and take-profit should be set at. To learn a function that tells us what the SL&TP values should be.

Learn how to apply that function in active trading. Then take that & apply a NN to it to learn what the function itself should be.

Things to do? Perhaps?

Look into the other AI techniques out there to see if there is a better NN-form for this or a better system than NNs.

Leave a Reply