General Topics
Markets
Technical Topics
Brokerage Firms
Community Lounge
Site Support

# NNs for optimizing 4 variables

Discussion in 'Strategy Development' started by Runningbear, Dec 12, 2010.

1. ### Runningbear

This question goes out to all the programmers out there.

Lets say I have four calculations that each return a figure.

The high range and the low range of each figure represents a relative extreme of a particular market. But each figure will not return an extreme at exactly the same time.

I'm looking for a way to construct a system that can monitor all four figures and generate buy and sell signals based on the relative extremes occuring at the same time or within a small window period, ie the last 15 minutes.

For example, if two of the four figures return high extreme levels, a trade signal would be generated, but if all four were at a mild extreme a trade signal may also be generated.

in other words, I need something that can learn about the interaction of the four figures and make decisions based on that interaction.

I believe NNs are a way to do this. What would be the most cost effective way to build a real time trading system like this.

Matlab has a NN module. Would this work? Or could you build something from scratch?

Runningbear

No.

You must.

3. ### rosy2

not sure why you are thinking neural nets. you can do this in a couple lines of code with esper

http://esper.codehaus.org

4. ### Runningbear

Thanks Rosy2, that's exactly the kind of thing I'm looking for. There is no mention of pricing on the site. Do you have any idea how expensive this product is for a single license?

Runningbear

6. ### dcraig

Open source - free.

You have 4 variables that can take 2 extreme values. This results in 4^2 = 16 extreme cases.

Start with the 16 cases explicitely defined and see if this problem worths further study.

Studying the interactions in-between min and max values requires getting the joint distribution of 4 variables.

NNs won't help you. This is a math/probability problem. NNs cannot figure out what you want to do.

8. ### jack hershey

This post is RIGHT ON THE MARK; you have established a finite math based problem and have eliminated any aspect of dealing with probabilities.

Congrats.

The "usual" way to do this is use X to figure out the strategy and use Y to implement the execution of trades. Since I know Java I'd use the JOONE to determine what ranges trigger each of the 4 signals. You could use MatLab or any implementation of the NN algorithm (C++, C#, Python, etc). Then separately implement the trading in whatever (NinjaTrader, etc). The reason for this separation is that NN can be time-consuming, whereas trades typically need to be quick.

http://sourceforge.net/projects/joone/

If you already know what range of each of the 4 signals qualifies it as "buy", you don't need a neural network because you've already figured out the numbers. And, know the perils of NN, for example they can result in overfitting.

10. ### Runningbear

Yeah that's the problem. I know the relative extremes of each of the four variables in isolation, but not the optimal values in combination for best trade performance. It's pretty easy when dealing with two variable to use set logic, but once you add the third and fourth variable, it gets tricky. For example, three variables at 80% of their extreme, may give better trade signals than two variables at 100% of their extreme. This is what I need in a system to do - identify and weight the value of each variable in combination. Such a system may reveal that one of the four variables doesn't add anything at all, and allow it to be eliminated. In other words, I need something that can find hidden patterns in the darkness.

Runningbear

#10     Dec 13, 2010
ET IS FREE BECAUSE OF THE FINANCIAL SUPPORT FROM THESE COMPANIES: