proprietary trader assist strategy.

Post anything related to mechanical systems and automated trading here.
sbank
Posts: 174
Joined: Tue Jul 21, 2015 9:35 pm
Contact:

Re: proprietary trader assist strategy.

Post by sbank » Fri Sep 07, 2018 7:46 pm

I think was Earik's earlier response. The hive as it exists today does not have that capability that you are looking for.

Maybe you can try some items to add to your RSI and AMA example. Perhaps add an ATR range around the close. Just a thought.

cheo
Posts: 18
Joined: Thu Aug 16, 2018 8:30 am
Contact:

Re: proprietary trader assist strategy.

Post by cheo » Sat Sep 08, 2018 7:43 am

Sbank,

Thank you for clarifying.
Can the Genetic Programming module in Wave59 optimize for stop and limits y/n?

Also can a simple indicator be created in wave59 that says something logical like:
declare x
declare y
If x = 1 then set stop to y
.

Then in a hive we could include this indicator/function-machine as part of the optimization process in a basket of indicators as one of the mandatory indicators, where it can play with a range of values between 1-999 for example?

Cheo

sbank
Posts: 174
Joined: Tue Jul 21, 2015 9:35 pm
Contact:

Re: proprietary trader assist strategy.

Post by sbank » Sun Sep 09, 2018 7:08 pm

Can the Genetic Programming module in Wave59 optimize for stop and limits y/n?
Do you mean Hive or the Genetic modules? (Both are different. But I believe anyway that the answer is the same which is "no." Unless someone can get creative here on how to implement them. The Genetic module has the ability to maximize the input functions based on simple criteria like total profit. And the Hive is just some crazy thing Earik dreamt up about having bees trade for him. :) (j/k)

Also can a simple indicator be created in wave59 that says something logical like:
declare x
declare y
If x = 1 then set stop to y
This one is easily done. I have a bunch of rules that I developed based on setting stops and targets based on some stddev/atr stuff. But it can be simple as just setting a stop at a delta number of points/ticks. What it can't really do is setting a stop at a type of pattern. (Unless you can code the pattern mathematically of course.)

Putting this all together, you can have your trained Hive do what you want your trained hive to do, but if the price is going in the wrong direction, you can easily have a stop (or some other condition) to exit you out. So you can just say, "if I entered the trade at bar 1, and by bar 7 you are not profitable yet, exit trade." Then if yo uwant to know if you should use bar 7 or bar 8 (in my simple example), you can run that through the optimizer to see if bar 7 or 8 is better. (and you can see the robustness of your strategy as well... i.e. if bar7 makes you $1000, bar8 makes you $1, and bar9 loses you $500, then I know i would just throw that out as a strategy.) The good thing about Wave59 that I lot is that doing these sorts of tests are very quick.

In the programming world, there is much talk about "failing fast." Qscript allows me to iterate through lots of things very quickly. I'll stop now, 'cause it sounds like I am a cheerleader. :)

Good luck and have a great rest of your weekend.

cheo
Posts: 18
Joined: Thu Aug 16, 2018 8:30 am
Contact:

Re: proprietary trader assist strategy.

Post by cheo » Mon Sep 10, 2018 2:55 am

sbank wrote:
Sun Sep 09, 2018 7:08 pm

So you can just say, "if I entered the trade at bar 1, and by bar 7 you are not profitable yet, exit trade." Then if yo uwant to know if you should use bar 7 or bar 8 (in my simple example), you can run that through the optimizer to see if bar 7 or 8 is better.
ok so, we have established that there is no out of the box optimization for stops & limits in either the hive or genetic module. However by virtue of what you said "not profitable yet, exit trade" that tells me that from the point wave59 entered the trade it kept track of the entry price, at least from the previous bar close.
so why not set a condition like "If price 20 pips > for short OR 20 < for long Then close trade"
This condition could get lumped in with all the other indicators in the hive.

We will call this condition-indicator STOPC for example:
You could then say give the hive two versions like you give a 20 AMA and a 3 AMA you could also include a 1 pip STOPC and a 300 pip STOPC along with all your other indicators to optimize.

It wont take long for the hive to realize that the that the 1 pip STOPC is garbage and gets killed off.
You mentioned that you have developed a bunch of rules for stop and limits so can what I suggest be done within the confines of an indicator?

Cheo

User avatar
earik
Site Admin
Posts: 474
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: proprietary trader assist strategy.

Post by earik » Tue Sep 11, 2018 6:54 pm

Hi Cheo,

Hives take inputs, then built their own signal line, and optimize that. You wouldn't be able to tell it when to exit. It gets to figure all that out itself. But there's nothing stopping you from building an adaptive system after you already have your hive signal. From within a script, you grab X bars of data, then iterate back over them applying stop/target values, sort the results, and pick the "best" solution. That will give you a system that steps forward through time, dynamically adjusting its stop/target values every single bar. I've done a ton of that stuff over the years. I *guarantee* that doing this is going to result in a crap system once it's all said and done. ;) But seriously, don't take my word for it - prove it to yourself by building it. You can learn a lot about markets by programming stuff like that. The reason I'm so down on this type of thing is because I spent years and years trying to get it to work.

Regards,

Earik

cheo
Posts: 18
Joined: Thu Aug 16, 2018 8:30 am
Contact:

Re: proprietary trader assist strategy.

Post by cheo » Wed Sep 12, 2018 1:45 am

earik,

>You wouldn't be able to tell it when to exit. It gets to figure all that out itself.
Yeh that's what I always hoped it would do anyway - and take into consideration stop losses as part of the metric.

I am very much with you on proving something is crap or not. You do feel satisfied when you covered every angle when building a system or refining even a manual trading plan so I get it however, I won't actually be able to prove anything unless I can get the hive to play around with stops and limits much like other AI packages previously mentioned.

OK even if the hive module cannot optimize stops and limits as its designed at the moment, its still a good idea for some peoples usage. Wave59 from what I understand is quite an open minded community. If you can take on some metric related to astrology as being of possible benefit then an every day stop or limit condition seems obvious... I have seen it working myself with an optimizer using a genetic algorithm.
Also reading through the other threads on this board its clear plenty of wave59 users make use of stops in their system's.
Even if you prefer not to use stops in your own implementations it's and essential element for most if not the vast majority of traders. As we know practically every trade educator (good or bad) hammers home the importance of stops - so I am far from alone on this one.

Would you consider adding stop and limits to the Hive or Genetic programming modules in future releases of wave59? At least the Genetic programming modules, even if the Hive cannot because of its fundamental design?

As mentioned earlier I am however very open as to what size any stoploss should be. I am not sure what you mean by an adaptive system after you get the hive signal. Fundamentally the hive itself would need to be bound by the range of stoploss inputs to optimize with.

>That will give you a system that steps forward through time, dynamically adjusting its stop/target values every single bar.
Ok I will take your word for it for now even though I cannot visualize quite how get an "ouch! that stop just cut my profit potential I had better look for a better solution with the given stop range" or "That stop allowed me the breathing room necessary to make this profitable trade so I will weight it slightly better moving forward".

Cheo.

User avatar
earik
Site Admin
Posts: 474
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: proprietary trader assist strategy.

Post by earik » Fri Sep 14, 2018 6:34 pm

Hi Cheo,

Don't get me wrong - you CAN use stops/limits with hives. You just can't include them as part of the algorithm itself. So you'd build your hive, then would bolt on the stops/targets afterward. You can run the whole thing through W59's brute force optimizer, and find the most profitable combinations over a set lookback period.

The difficulties come when you want to let those stops/targets be dynamic and self-adjust to market conditions. That can be done too, it's just a lot more difficult to accomplish. In that case, you'd write a script that had a built-in backtester, and every bar (or every X bars), you'd run the routine, gather all the profit/loss metrics for a range of stops, and then would pick the best one moving forward in time. That's called an "adaptive" system, since all the variables dynamically adapt to market conditions. The classic example is a channel breakout system, when you adjust the length of the channel lookback to conform to whatever the dominant cycle is at the time. It was all the rage 15-20 years ago in currency futures.

Coming back to a more theoretical level... The stops/targets that get hammered into everyone's head is meant to get traders to focus on risk management. That is ABSOLUTELY essential, and anyone who doesn't do that eventually blows up. So I'm not challenging that by any means. It's more important than almost everything else. The part where I disagree is the best way to do that. I think it should be done through position sizing, rather than stops. If you trade a position too large for your account, and try to use a tight stop to limit that risk, those stops won't save the account from blowing up - you'll just blow up over a sequence of losing trades rather than all at once. Similarly, using limits to take quick profits only results in the system leaving lots of money on the table. All of this flies in the face of what those educators like to teach, but all of this is easily tested using systems and an optimizer, so I'm not saying anything that I can't back up with hard data. Again, don't take my word for it. It's better to prove it to yourself. I just tend to be opinionated on some of these things, so I take the opportunity to lecture people when I get the chance. :lol:

The most amazing system I ever built was a genetic algorithm that evolved fuzzy logic enabled neural nets. In other words, a neural network, that used fuzzy logic to determine whether inputs were high/medium/low/etc, and then a GA to tweak every possible parameter in the entire model. The results were unbelievable. Unfortunately, they were only unbelievable on the training data, and those models all immediately crashed and burned on unseen data because they were insanely overfit. It's easy to see ideas work in the past if you allow the optimizer to make a million passes over the data and tweak everything. It's much harder to see ideas work when you don't get to make any passes over the data set, and have to accept the results as-is in your account. There's an appropriate use for genetic algorithms, and there's an inappropriate use of them. They aren't magic - they're just fancy search algorithms. They won't be able to turn bad ideas into good ones, at least not on the unseen data set. I could hook one up to count the time of day my dog scratches at the door to go out, and a GA is going to be able to map that data over to the EUR/USD exchange rate and make me think I've solved the currency markets. But since my dog actually has no connection to currency markets, those systems are all going to fail miserably when run on future data sets. ;)

Regards,

Earik

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests