# What global variables would be included for creating the ultimate automatic trading algorithm?

(Last Updated On: August 11, 2011)

What global variables would be included for creating the ultimate automatic trading algorithm?

If you were creating the ultimate trading algorithm based around one core idea which determined when to trade (either direction) and when to close, what global variables would you include also increasing the probability of when that particular idea decides to trade or close?

For example please review the below (I’m not a programmer):

Trading algorithm = run core idea, and if X, Y, and Z look good increase probability of Trade and close execution by 15%. If X, Y, and Z look bad decrease probability of trade and close by 15%.

X = Market Volatility
Y = Dollar index
Z = moving average

Forgive me if this formula is very rough and only slightly makes sense. I think the experts who I’m targeting this to will understand my noob ignorance 🙂

Thanks,

—–

If you were fortunate enough to pick the correct three statistically sig variables, why would you fix their contribution to the trades accuracy rate (i.e. 15%?) I think most here would agree that you can not definitively pin-down their model’s accuracy rate. It varies, but the model’s accuracy rate will be bounded. If you want to maximize model accuracy on any variable, the ideal solution would involve algorithm’s code to look-back (not-to-distant past) to evaluate any similar signal/event having occurred, and test whether there was a significant price-volatility exhibited during those instances. If yes, then you have a likely outcome, if not your price may be entering a new wave/phase.

—–

I have played around with the idea of position sizing based on the quality of the setup. The trick is to base the quality value on statistically valid data.

If I read your question correctly, you are asking what that data is or at least what it is comprised of. If that is correct, you are going to have a difficult time getting good answers.

As the saying goes, Those who know aren’t telling and those who tell don’t know.

—-

I guess I wasn’t looking for a full algo but I wanted to know “trading style (big idea) + global variables 1-5 = auto trading algo, whereas I already have the “big idea”, I’m just wondering what other variables (ingredients) I can throw in to sweeten the pot (add higher probability of successful trade.

3 months ago

—-

I understand. Just about any global variable (or combination) that gives you an idea of the overall direction of the market you are trading will do.

I use a blended time frame trend indicator that looks for trend direction on a number of time frames to line up. That gives me at least an idea of the direction (or lack thereof) of the instrument I am trading. I include this in every momentum/trend following algo (as opposed to mean reversion) I develop.

I have also seen a sort of synthetic instrument built based on a basket of instruments to give an overall direction.

I was mostly kidding in my earlier comment. I have found it very difficult to get complete answers to almost any question. Partly for the reason I mentioned above but also because often the person answering unintentionally leaves out part of the equation.

—-
Thanks so much for the info. I totally agree on what your saying and would understand why people would want to keep this info secret. People are selling their own EA’s and Robots as a business.

You are quite welcome. In my experience there are only two reasons to ever sell an algo:

a) if you can make more money selling it than you can trading it, which wouldn’t seem to bode well for those buying it

b) if you need the capital gained by selling the algo to trade other, more profitable algos you are not selling.

In my opinion, it is always better to do your own research and develop your own (as you appear to be doing) or simply invest your money with a professional money manager.

Personally, I have never heard of anyone having a positive experience buying an algo although I would imagine it happens.

we plan to create use for ourselves, and sell to everyone. If you have a good thing, why not share it with everyone?

I came across this EA. It looks pretty promising and gets some good reviews. Have you heard of it?

thanks,

Chris

—-
I have heard about it but don’t know really know anything about it.

As to your other question, here are some of the reasons we don’t openly (as opposed to on a case by case basis) share/sell our work.

If sell it, we have to support it; not to sound caustic but I don’t want to take grandma’s call at 3 am (of course in her time zone it is 9 am so it must be 9 am in our time zone)

Unless you are trading the S & P emini or treasuries (and maybe even then), more users equates to more slippage given the same parameter set.

If I have a strategy that earns \$1200 per month per contract with a solid Sharpe and low drawdown, the only reason I can see to sell it would be one of the original ones I mentioned earlier.

Aside from the time it takes to develop a profitable strategy, we have spent countless hours developing in-house software that allows us to relatively quickly determine how a strategy is likely to trade live relative to its back tests.

We can only get a return on that investment trading our strategies. Would you pay us 100K or more for a profitable strategy? If we know we can make that on a strategy trading N contracts, it seems to me, we would have to sell it for an amount that at least equals what we would make trading it (on a risk adjusted basis).

Additionally, there is nothing like selling a few copies and then discover it on a forum a couple of weeks later.

And last but not least, revisit my comment about grandma. I have had some amazing conversations with people that should know better trying to explain a draw down that was completely within the risk parameters defined for the strategy.

Maybe I am looking at this incorrectly or at least not considering all the possibilities, if you want, feel free to pm me and we can discuss this more offline.

—–

I totally get what your saying. Why sell copies of a cash machine knowing that with every sale your personal unit will produce less and less? Or that other people can make a copy of the machine and not have to pay you for it? Grams is a factor but that’s what tutorial videos, and forums are for 🙂

I wonder if there would be a way to avoid the issue of he more people using the strategy at once he more or breaks down? Maybe each copy was a slightly modified in it’s algo? So copy 1 = x+y=z and copy 2 = x+z=r and so fourth?

I’d love to chat offline.

——
Do you know of any good Free FOREX Candlestick Web Based Charts that can be used in Web Based Trading Applications?

—–A

I do not but if you find one, how would you get the actual OHLC from the web application? I do know a guy who is considering a sort of indicator server web application but he hasn’t finished it yet.

If you find something, I would love to hear about it.

—–

I dint know what that means but we looked at these: http://www.anychart.com/home/ and they work good but there is a license fee.

Someone told me about these that are free but I haven’t looked into them yet:http://www.netdania.com/

—-

Hey, I’m three months late here but:

a) I sense a mix up between algorithm and inputs to algorithm, that is signals and what to do with signals. Both are important questions, but it’s also important to keep them separated. You can have great signals and lose money because you don’t trade them right, or have a great algorithm and not make much money because you aren’t feeding it with the right signals.

b) there are many good reasons to sell an algorithm instead of trading it – and I speak as one who never intended to sell but have now been converted. If it’s a good system, then others have access to more markets with less costs and more assets under management than I could ever reach. If three good reasons wasn’t enough, then I believe that every algorithm has a shelf life, even if measured in decades, so you have to make money from it whilst it works, that is before all the other big players start using it and you lose the edge.

—-

Good things can’t be shared. Most people understand that instantaneous stock volume is limited. Institutional traders spend a lot of money and time getting in and out of large positions. So why would they share, it would only create competition for themselves.

In forex the same problem exists. Sure there may be trillions traded, but that’s spread out over hundreds of thousands of trades all day for 24 hours. But try to get into a large position “now” and you are going to get slippage.

Sure getting into a large number of lots on the euro during London or New York prime times is possible, maybe on good days depending on your liquidity source.

But try to get out of that position during non-prime-time hours, or any other pair, and you are looking at statistically impactful slippage. Sure 1-3 pips might not mean something for a single trade, but over 50 trades, it hurts and will dig deep into any return rate.

So the price of sharing is that you can’t trade it anymore. On any given 4 hour bar, there are a whole bunch of people adjusting positions. Watch it dance.

—-

“Good things can’t be shared” – I’m not disputing that, the question was whether algorithms can be sold. I maintain that it’s possible for others to value an algorithm at more than I can make out of it. If you sell to just one other person/company the competition problem doesn’t exist.

—–

Have you considered a hedge of several relatively liquid instruments, even FX crosses (which I know have very limited liquidity)?

As I am sure you know, there are algorithms that do nothing but attempt to get you in and out of large positions with as little market impact (or footprint) as possible. Those are a necessary component of any strategy arsenal.

As I wrote on another thread (or maybe this one); you sell an algorithm if you can get more from the sale (or rent) than you can make trading it yourself.

I have an algorithm (HFT) I can sell you today that is currently making tens of thousands per day but requires \$0.30 round trip commissions (less is better), very low latency network (co-located) and a couple million to trade it; none of which I have.

I don’t have 1 strategy, I have a dozen. When I develop one that has a higher profit factor or simply fits better into my strategy mix, that doesn’t mean the one I replace isn’t profitable and doesn’t generate alpha, it just isn’t as profitable.

—-

I see we think alike : – )

I too generate lots of strategies. We programmed our system from scratch, and basically our machine is designed to generate new strategies for us. We have effectively begun to run out of “bandwidth” in the sense that there are few new strategies that do not correlate to the strategies we already have.

So we constantly hope to find new holes in the market we can put an uncorrelated strategy into.

To that end, we have saturated the liquidity of the strategies we already have. So they can’t be shared since we are already using up all the bandwidth.

I assumed that anyone in the same circumstance would also be at maximum bandwidth, but as you pointed out, HFT strategies may not since they buy you so many entries.

As you too may have discovered as much as we tried the HFT route, our margins were so slim (barely above transaction costs) that any anomalous behavior could push them into a loss. So we decided to go the Medium Frequency Trading route.

Its worked well for us. Margins are great (higher average trades), we can afford a little more slippage, infrastructure needs are not as severe, and stress is less.

So consider going to the MFT route, or add it to your search mix.

Our last shot at HFT was multi-liquidity triangular arbitrage. It works, but our liquidity got angry at us, the infrastructure was so fragile, we finally just gave up on the HFT route.

So you are CORRECT. If you do have some HFT strategies, they CAN BE SOLD to the right person who can trade them. There are lots of people out there who spent money on the infrastructure, and now are looking for strategies to fill it.

So I would put a post out there:

HFT Strategy For Sale. Requires 0.30 RT, Low Latency and Volume.

You will probably end up with a job!

Good Luck! It sounds like you are already on the way!

—–
I actually write mostly what you term Medium Frequency; I don’t want to tie up my resources chasing HFT on my own, especially when medium frequency strategies are so much easier and the space is not nearly as crowded.

Although I do like your idea. Maybe I can get a sign that says Will Code/Sell HFT for health insurance and a small royalty.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
Don't miss out!
Get my TRADE LIKE A BOSS 2 PDF Books