proprietary trader assist strategy.

Post anything related to mechanical systems and automated trading here.
cheo
Posts: 18
Joined: Thu Aug 16, 2018 8:30 am
Contact:

proprietary trader assist strategy.

Post by cheo » Fri Aug 17, 2018 1:43 pm

Is there a strategy that works with a proprietary trader e.g. something that can pickup ideal entry points into the market, where the trader has already biased long or short depending on his own judgement, usually on a higher timescale, then he just needs an automated strategy to place optimal trades while he sleeps and or until he decides to change direction? details: GBPUSD, 2-4 hour bars would be ideal.

Think delta or UTM then using a mechanical system to pickup optimal entry while your sleeping to build a position in the direction you are trading.
Your exit will be dealt with by the human, I am just after the low risk entry.

any ideas appreciated.

Cheo

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

Re: proprietary trader assist strategy.

Post by sbank » Sat Aug 18, 2018 9:42 pm

I was thinking along these lines at some point in my trading adventures.

I was doing something a little more regimented though. My idea (which is really quite common practice), was to determine trend by a higher timeframe (say a 2 hour chart), Have that write to a file. Maybe keeping it simple, first column time/date, and second column, 0, -1, or +1.

Then on a quicker timeframe, use whatever indicators one wants to use, but consult the aforementioned file to determine bias. Or perhaps not take a trade because it is against the trend.

I never really bothered looking into implementing this. My biggest obstacle I felt was in properly backtesting it. (I was devising a way, that both timeframes would write to independent files, and a third chart to use both of them for backtesting purposes. As mentioned, i ended up just moving on to other ideas.)

Hopefully this gave you some thoughts to ponder on.

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 Aug 21, 2018 6:28 pm

Hi Cheo,

I've done this from time to time when trading discretionary approaches. The most recent time I've done it, I'd figure out what I wanted to do, but wanted to let the market trigger me in based on simple bar patterns. For example, if I wanted to go long, I was looking for something like a close that broke above a trendline, and then put a buy stop a tick or two above the high of that bar. W59's trendline tool can actually do that, but originally, that showed up as a script. So you can write a script that places the order according to your pattern rules, then deletes itself from the chart after it's done to avoid double-placement. The toolbar on the lower left side is customizable, so you can link an icon to your script which makes it super easy to apply. I was trading 4 hour bars at the time, so this was meant to be done in the night when I wasn't around to do anything by hand. So it's very doable, it just depends on how complicated you want to get with the actual trigger part.

Hope that helps,

Earik

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

Re: proprietary trader assist strategy.

Post by cheo » Wed Aug 29, 2018 6:01 pm

sbank, thanks for the idea I will ponder that for a later.

Earik, yes I will have a think about how I want it to function first which is the biggest hurdle. In this scenario could I use a Hive that also optimized the stoploss setting with two or more trades (per trigger)? I can then walk the hive forward with both long and short trades with whatever trigger i decide on for the purpose of optimization but, the only difference is that I manually decide which trades go live (long or short) and I manually close the trades out to take profit?

Am I right in thinking that the Hive will optimize to lose the least amount of money in that scenario because, the report will look pretty diabolical because as far as the hive knows it only ever sees a trade close out when the stoploss is hit or if maybe I use one of the simultaneous trades to take profit automatically say 30-40pips into the trade for example, in fact it always sees the main body of the trade stop out when the market comes back the other way.
Optimizing to stay in the game as long as possible with the shallowest loss curve is what I think I am looking for, unless you can see something better?

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 » Thu Aug 30, 2018 6:57 pm

Hi Cheo,

Machine learning can be really smart in some ways, but really stupid in others. Trying to tell a computer to lose the least amount of money possible is most likely going to result in being flat at all times. That way, you never have a drawdown worse than $0. So you'll need to build your hives based on profitability, then figure out how to merge all the pieces together afterwards yourself. Think of Hives as just fancy indicators that happen to be profitable when run forward. You can use them as ingredients in a system you put together and tune yourself.

I can save you a lot of trouble with stop losses and profit targets though. What you'll find is that the tighter the stop you use, the less money you'll make, and the worse your numbers will be. You'll sort of tune your system to take lots of losses quickly, rather than letting trades develop, which means you'll miss a lot of really big ones. What you'll find with profit targets is the same. You'll train your system to get out of all the best trades, and stay in all the worst ones. In other words, your best systems will always be those with NO targets and NO stops. Kind of strange how it works. So, if you want to stay in the game the longest with the shallowest drawdowns, it means scaling your trade size to be a very small percentage of your account. That's where you need to be focused with your tuning.

Earik

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

Re: proprietary trader assist strategy.

Post by cheo » Fri Aug 31, 2018 2:38 am

earik,

thank for the insight and I take into account what you said about needing to build the hives based on profitability, the best systems will always be those with NO targets and NO stops.

As far as training the hive for profitability perhaps I could use half the average distance to the next delta point which by definition should nearly always be obtainable?
Also being that the system would be manually directional, is there a way to tell the hive "ok from this date you go long then do your hivey thing and learn stuff then at this date you switch and go short then learn some more stuff"
In effect I am shepherding the hive forward over historic data into the live market where it retained the knowledge and knows what to do as i flip the long/short switch manually?

In the preparatory trader scenario that I originally used of a trader working hard on his delta point analysis and doing a good job of it but still it takes up most of his time for the markets he trades it with. This guy may want to risk considerably more per trade, still well within portfolio management conventional wisdom but considerably more than you would let loose in a dozen or so completely automated systems happily running along each day, especially if he is a position trader working on the ITD or MTD
I am thinking along the lines of damage control, rather than profit, as if the preparatory trader is doing his job properly then he has picked the top or the bottom correctly or near enough. so we should already be in a trend or at least going the right way in a range bound market for the next week or so, using the ITD example.
The damage control needs to be effective in the situations where the trader is a day or two early where the Hive (using whatever as yet undefined input) did indeed find an excellent chance to go long but there was a sudden thrust down 100 or so pips before turning and going long 400 etc. So running close stops are desirable in some scenarios. But the actual size of the stop could be left for the hive to determine. Can the hive determine stop sizes as part of its criteria trading forward?

As the system is directional I want it to be very nimble until the trend kicks in, within the delta criteria.

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 » Wed Sep 05, 2018 5:26 pm

Hi Cheo,

Hives aren't going to let you use your own profitability metric. You sort of have to go with the one built in. It's not a limitation of the algorithm, but of the way we implemented it in the software, so this could be changed in the future. Hives train as they move forward, so the system will be different depending on what has happened in the recent past. You won't see that from your end, but underneath, the rules change all around. That adaptation is one of the reasons they're as robust as they are. If you implement a manual on/off switch, you might make things better, or you might make them worse, because you could be working at odds to the nature of the hive that is already doing that sort of thing. You won't really know until you try though....

Regarding using this in conjunction with Delta... You have to be careful of trying to mix two approaches that might not suit each other. If your hives are mean reversion systems, that means they'll want to buy when the market is going down, and sell when the market is going up. Most hives that I've used tend to end up working that way. Nothing wrong with that approach, but if you try to combine a mean reversion system with a top/bottom picker like Delta, you are going to end up with two systems that do opposite things. Delta wants to go long and stay long until the next point, and the hive is going to want to go long but then flip to short as the market goes up. Like the manual approach, this might work out, or the two approaches might sabotage each other. Again, it's hard to say until you try to test it, but I could easily see that happening with what you are talking about.

I've spent some time trading turning points in a discretionary way, using something similar to Delta (Bertha, which is better ;) ) and one of the things I ended up doing is scaling in when I was sure there was a turn, but wasn't sure if I was early. In other words, if you're trying to get long 100 units, rather than just getting in for the full amount, you can spread the whole thing around. I used to do it both in price and in time, so I'd set limit orders up in a sort of net, 10 or so units at a time. So as price drops, I'm adding positions the whole way down. I'm also adding them just after the bounce. The result is that when looked at in terms of average entry price on the entire position, you get a pretty good fill. Not the bottom tick, but not a crappy entry from being too early either. This works way better than using tight stops and trying to catch a falling dagger. That tight stop approach just gets you stopped out a whole bunch of times, and even though you end up with a good fill for the final trade, you have so many losses to make up that the trade as a whole tends to only be average.

Hope that helps,

Earik

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

Re: proprietary trader assist strategy.

Post by cheo » Thu Sep 06, 2018 7:21 am

A few question about your reply Earik. Sorry my original and followups were quite long:

1. Can the Hive determine stop sizes as part of its criteria trading forward?
I.E as well as throwing a bunch of indicators and the kitchen sink at a hive and seeing what it comes up with, can you also currently, or in the future will you be able to ask it to determine your stop sizes?
I had noticed even as long ago as 4 years that some of the brokers out there that provide a genetic algorithm optimizer as part of their packages. One of the criteria was stops and limits.

2.
Regarding your no stops comment. I fully respect these ideas with system trading where you have one or two positions in at a very small amount of your account then you turn and go the other way. But if you are a discretionary trader building up a position in USD/CHF over few days around say a delta point that you are going to stay in for say two weeks, you drop in say ten trades at would what usually be 0.5% of account with a 50pip stoploss each.
You do this progressively as the position moves in your favor. All positions are at least 80pips in your favor some in the many hundreds, then suddenly a central bank changes something and the market moves 2000 pips the other way and I am wiped out even though I have traded in a conservative manner (less the missing stops)

Building a position like this is a sensible and well trodden path. I can never calculate my risk without a stop at some place. If I am shorting a stock or index for example my risk is theoretically infinity, no matter how small my ten positions are. As in my original given example there will be no system going long as its currently manually biased short.
Forgetting the system element, points taken, I can't see a way out of not using stops when building a position in this manner? Did I miss something.

Cheo

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

Re: proprietary trader assist strategy.

Post by sbank » Fri Sep 07, 2018 12:23 pm

Hi Cheo,

(I'll respond to your hive stop/target question, but I am sure Earik will also respond as I know he has some strong thoughts about this topic that were expressed in his mechanical trading book. :-)

But when you create your hive. You generate two scripts (in Wave59's QScript language. Since you mentioned Java in a separate thread, you should have no problems understanding this language.) The two scripts are an indicator script, and a function script. The indicator script is quite simple. It calls the function script, gets the value, then plots it. The function script is autogenerated as well, but it a bit more complex. No need to change this function script.

So if we keep to the indicator script, it will create somethign like this:

Code: Select all

# This script has been machine generated using the Hive Designer
# It is a wrapper for the core hive function 'hive_cmo'

input:signal_color(red),threshold_color(blue),thickness(1);

# run the hive function
signal = hive_cmo();

# plot signals on chart
plot1 = signal;
color1 = signal_color;
plot2 = 0;
color2 = threshold_color;
style2 = ps_dot;
thickness1, thickness2 = thickness;

# implement trading system
if ((signal>0) and (marketposition<=0))
   buy(1,close,"market","onebar");
if ((signal<0) and (marketposition>=0))
   sell(1,close,"market","onebar");   
If you look carefully at this, you can easily modify the "implement trading system" section to add stops/targets, scaling algorithms, etc. It is probably self explanatory. You can also use this as a template to include your delta strategy. Then like Earik alluded to, backtest and see if it is profitable.


good luck!

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

Re: proprietary trader assist strategy.

Post by cheo » Fri Sep 07, 2018 3:39 pm

sbank,


I had a look at your example and I get the concept of a wrapper in that the dynamically optimizing Hive module can have other static elements such as color, styles, stakes and stoplosses bolted on to it without changing the hive itself.
However I am asking can the Hive determine stop sizes as part of its criteria trading forward?
So this would mean that any stoploss is thrown into the hive along with the 12,13,20 period AMA or RSI
So as the hive is trading forward and it does its usual "hmm the 14 period RSI seems to be working well at the moment I am going to take a trade here" it will also say "hmm a 35 pip stoploss seems to be doing better than a 55 pip, next trade I will change that"
The stoploss just becomes another metric in the bucket along with all the other indicators to be optimized whether it be a neural net or hive. Checkout the optimizer in the FXCM platform that uses a genetic algorithm apparently, which can find the optimal stop and limit for your strategy.
So can Hives currently include stops and limits as part of their optimization criteria trading forward and changing dynamically with all the other indicators in any given Hive?

As an interesting side note:
If very large stops or no stops at all are the optimum in mechanical trading with Hives then if we throw a stop range of 1-999 into a Hive and it consistently chooses the upper end of that range (given enough data) then, we have an objective answer to the question of using stops for any given combination of indicators in a particular Hive.

Cheo

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest