Algorithmic and Mechanical Forex Strategies | OneStepRemoved

  • Articles
  • Sophisticated Web Sites
  • Automated Trading
  • Testimonials
  • Contact

The Big Switch

February 1, 2016 by Shaun Overton 60 Comments

I moved all of my trading funds into Dominari this month.

I’ve been talking about this system ever since I start live demo testing back in November. Needless to say, I’ve been extremely satisfied with the live results.

My initial live account started trading on January 4 with a starting balance of €1,000 at Pepperstone. Once I saw that the live trades matched my expectations, I quickly kicked that account balance up to a total of €10,000.

And because I want to test the effect of broker selection, I threw another $5,000 in an FXCM account. The Pepperstone account contains the bulk of the money and runs the MT4 version of the strategy. The FXCM version uses Seer, which has been more of a pain to get running smoothly, though I can say that it’s still my favorite platform for testing ideas.

The cost non-problem

backtested equity curve

The equity curve of the Dominari without trading costs from 2013-2015.

My biggest concern about launching the strategy live was trading costs. Some back of the envelope math suggested that everything would be ok. Live demo testing indicated that it would be ok. But you never really know until you start trading live.

Through the month of January, I’ve consistently monitored the commissions relative to the profit. I fluctuates up and down with the trading account, but I estimate that the spread commission costs are approximately 20-25% of the profit. That’s a relatively high percentage, although it’s nowhere near as bad as it could be given the extreme trading frequency.

Dominari is a high-frequency strategy that averages about 49 trades per day on 28 currency pairs. Everything happens so fast in the account that I’m hard pressed to remember any individual trades. Dominari executed more than 900 trades in the month of January alone. It’s dizzying watching the equity fluctuate up and down. The important thing is that the trend moves from the lower left to the upper right.

QB Pro?

It’s not dead. I still believe it’s a great strategy and totally worthy of your trading. In fact, both Dominari and QB Pro depend critically on one of my favorite indicators, the SB Score.

The reason I got into algorithmic trading is that it emotionally separates me from the responsibility for the outcome. If I have a losing month, it’s just the strategy. There’s not much to do about that.

When there’s an element of discretion, it’s difficult to separate the random component. Sometimes you win, sometimes you lose, but you generally expect to make money. When there’s discretion in an algorithmic strategy, it’s very difficult to know whether losses are my fault or simple bad luck.

QB Pro depends on the manual portfolio selection. Not surprisingly, I heavily favor Dominari because the portfolio selection is static. I can say with my hand over my heart that Dominari is a black box, fully algorithmic strategy.

I’m still updating the portfolio over at Seer Hub and will continue making the selections for clients. For clients that are in the managed account at Pepperstone, I switched the strategy in the middle of the month. I feel responsible as the manager to give clients the best possible performance. And since that’s where I’m placing ~$16,000 of my own money, I feel a fiduciary duty to do the same for my customers. Dominari is where I believe the best opportunity lies.

How you can get Dominari

I plan to offer Dominari as trading signals to anyone with a MetaTrader account within the next month or so. A lot of hard work has gone into developing the strategy. And while I’m confident to the tune of $16,000 of my own money, I want to be even more certain before I release Dominari to a wider audience.

What do you think of the results so far? Leave your thoughts in the comments area below.

Filed Under: Dominari Tagged With: algorithmic trading, commission, Dominari, portfolio allocation, proprietary trading, spread

Have Your Algo Running like a Swiss Watch

January 11, 2016 by Lior Alkalay 6 Comments

Setting up a trading algo that works smoothly, like a well-oiled machine, is not a trivial endeavor. There are many, many parameters that you have to take into account.  It begins with the signals your algo is generating to the margins in your account, volatility, gains and, of course, risk. Certainly you’ve used our previous tips to build your algo and to draft your strategy. So how do you incorporate all those elements and optimize your algo for the greatest precision?

How do all the quants make their algos run smoothly like a Swiss watch? You have to treat your algo like a machine, built up with numerous mechanisms. Because of course, that’s what an algo really is. I like to call those mechanisms boxes. Now don’t despair if you think it all sounds a bit too complicated. By the time you reach this article’s conclusion you’ll have realized that it’s all quite simple and logical.

An Algo Made of Boxes

So what is the approach quants use that I like to call boxes? You divide your algo into separate mechanisms, or boxes, if you will. Each box will become a stand-alone mechanism that receives input data and generates an output. There will be one box that we can consider the brain; that box decides if it is a go/no go for the specific trade. The brain box gets all the inputs from all the other boxes.

Algo Boxes

Signal Box- The signal box scans prices and parameters, such as the moving average or any other condition you have written into it. Basically, these inputs are the rules of engagement you had early written for your algo. One simple rule could be, let’s say, 14 days moving average < 30 days moving average = signal to sell. Typically, this box will be running prices in several pairs.

In other words, its input data and its output would normally be three parameters; an entry signal, a recommended stop loss and a limit. Of course, once again, these inputs are according to the parameters you have already defined.

Risk Box- The risk box, as its name implies, is the box in charge of risk monitoring. This one is a bit more complicated. The risk box gets input from several sources. It gets the risk, i.e. stop loss required, from the signal box. Moreover, the risk box constantly reads your available margin.

Its output is a go/no go on each trade that exists, based on the parameters you entered. For example, how much you want to risk in total or the minimal available margin to be left in the account.

Let’s say you have a free margin of 11% and you set up a minimal margin of 10% in the risk box. The signal box will send output of an upcoming trade.

The risk box can calculate that the executed trade would take 2% from your remaining margin. You started with 11% so that would leave your free margin at 9%. Therefore, the output from your risk box will be a no go for this trade.

If you had had 13% free margin rather than the 11%, the output would be a go. Of course, there are many more options to program into this box but this is the simplest one.

Volatility Box- The volatility box might be the most complicated to program. However, volatility charting is something we covered fairly thoroughly in these articles – Volatility & Your Trade, The World of the VIX, Using VIX Alternatives. The box’s task is to chart market volatility and provide an output if volatility is about to change dramatically. A major change to volatility could, of course, warrant a change in your strategy.

Execution Box (aka the Brain Box)- Easily can be considered the most important box of all. This box is in charge of making the finally decision. It gets input from all the other boxes and decides if the trade should be opened or not. It also decides if a strategy needs to be changed.

For example, if the volatility box signals an upcoming surge in volatility the execution box may decide to close some trades. Or it could instruct the signal box to change into a secondary signal model suited to high volatility. There are many other ideas that you can program into it.

Algo

How Boxes Help You Win

All of those boxes can help you make your algo run more smoothly and efficiently. How? Quite simply because it lets you optimize your algo to a much higher level. It provides you with flexibility to easily adjust each mechanism. More importantly, it lets you monitor the inputs and outputs of each box and assess which needs fixing.

Algo Box: The Bottom-line

Of course, the partitioning into various boxes is not a new algo concept. It’s also not rigid; there’s no need to do it exactly as I did. If you’re intrigued by the Algo mechanism box concept and want to delve into it a bit farther you’re in luck. I highly recommend the book Inside the Black Box by Rishi K. Narang. I’ve found that it sheds a great deal of light on what some might construe as a complicated strategy.

And for those of you that are short of time? You can use this as a basic guide on how to make your algo run smoothly, without reinventing the wheel.

Filed Under: Trading strategy ideas Tagged With: algorithmic trading, execution, risk, VIX, volatilty

Major Portfolio Update

November 1, 2015 by Shaun Overton 6 Comments

We ended the month in the black with a 0.74% return. I realize that nobody is jumping up and down with that kind of performance, but I’m honestly very excited to see the change.

At the beginning of October, I made a substantial change to the portfolio. Previously I attempted to pick pairs that were doing well. This approach was something of a mixed bag. While some periods of performance were quite nice, such as June of this year, the month of August was pretty harsh on the portfolio. I also didn’t like that the pair selection process was still very subjective.

The QB Pro strategy, like any strategy, makes its most important trading decisions when it selects its portfolio. The strategy is not one that can make money in any given environment. Instead, it requires careful selection of instruments in order to give itself the best possible opportunity to earn a profit.

QB Pro equity curve October 2015

The equity curve for the month of October 2015.

Based on about 100 hours of research with Jingwei back in September, I’ve been able to reduce the amount of discretion when selecting portfolio instruments. For example, the mega-monster performance from August 2014-March 2015 was driven exclusively by the strength of the US dollar.

As anyone who buys gasoline for their car knows, the trend shifted this year out of currencies and into commodities. Specifically, commodities have taken a real beating. China’s economy is sputtering, the US like it’s unable to raise interest rates and most industries suffer from serious gluts. Oil production in the US is widely rumored to possess a severe over-capacity, as evidenced by all the junk-debt ratings on US drillers. Gold mining stocks around the world have been the red-headed stepchild of financial markets, trading at PE ratios as low as 1.0.

That weakness spread to commodity currencies, even major currencies like AUD, CAD and NZD. As I ran backtests using a portfolios of those currencies and their crosses, I noticed that the equity curve more less marched straight up through the summer. More importantly, that basket of pairs benefited from the Chinese devaluation, whereas my custom basket took a step drawdown.

I’m expecting more problems of out both China and the US through the rest of the year. Although China managed to settle down after the summer, the problems plaguing it are anything but fixed. Recent bankruptcies and bailout of state owned firms point to more cockroaches. And, you know the rule about cockroaches. Where there’s one, there’s 10 more. I expect more Chinese devaluation to follow.

QB Pro lifetime Oct. 2015

Lifetime equity curve of QB Pro’s high-risk version.

The commodity currency exposure is an indirect, systematic play on this expectation. The portfolio has done well in the current environment and, given that I don’t expect any improvement at all in China, should continue to do well.

The other variable is the Fed. I had the rather unfortunate luck of launching the portfolio just in time for a Fed governor to cast doubt on any US interest rate hikes this year. The change got off on the wrong foot. But QB Pro didn’t just stem the losses. It bounced off the equity low and marched upward in nearly a straight line for the rest of the month.

The Fed meeting in October forced the governors to pretend as though a 2015 rate hike is on the table. There’s always the chance that the Fed might hike rates just to prove a point. They’ve been talking about this for 9 months now. The futures market at one point put the odds somewhere near 67% for a 2015 rate hike. Prior to the meeting, those expectations fell under 25%, then jumped back to around 50%.

Even if the Fed did raise rates, I see an impossibly low probability of a sustained program of rate hikes. The data looks like a car sputtering on fumes. There’s deflation everywhere expect for the financial markets and beef, where “investors” have been encouraged to park their money in junk debt in exchange for a pitiful 4-5% yield. The economy is sick. The idea of consumers breaking out their wallets and spending like the drunken sailors of 2007 is laughable.

My expectation for the next 6-24 months is that the Fed slowly retreats from talk of hiking rates and into another round of QE. That will mark the final admission that the Keynesian policies aren’t working and where the markets lose all confidence in central banks.

A confidence collapse would slam currency markets, but it should exercise the most severe impact on the commodity currencies that my traders and I focus on with QB Pro. The deflation would press prices even further to the downside, which provides ideal conditions for this type of strategy.

Open slots for new traders

I’m hosting a webinar on November 12 to teach you as much as I can about algorithmic trading. The webinar is going to cover in detail the QB Pro strategy, especially the SB score. I’m also planning to discuss the Fed and Chinese situation in more detail, as these are the two most important factors for us to consider when applying strategies. Make sure to sign up to the newsletter to be notified when I start accepting registrations. This is also open to traders in the United States, which is a big change from previous options!

If you’re interested in trading the QB Pro strategy in your own account, attending the webinar will be mandatory. And as a thank you for spending 45 minutes of your day learning from me, you’ll be given a strong financial incentive to trade QB Pro. More details to come soon, so make sure that you subscribe to the newsletter now before you forget.

Filed Under: QB Pro Tagged With: algorithmic trading, AUD, CAD, China, commodities, Federal Reserve, gold, NZD, oil, QE

Advantages of Algorithmic Traders at the Retail Level

October 15, 2013 by Andrew Selby Leave a Comment

Beginning the transition to mechanical system trading can be a daunting task. Many beginners feel as if there is no possible way they can match the tremendous results of seasoned hedge fund that have been doing this for decades. Those funds have so much size moving in their favor…….or do they?

algorithmic traders

There are a number of advantages that retail algorithmic traders have over larger funds.

Mike at QuantStart takes the exact opposite opinion in his post on this topic:

The capital and regulatory constraints imposed on funds lead to certain predictable behaviours, which are able to be exploited by a retail trader. “Big money” moves the markets, and as such one can dream up many strategies to take advantage of such movements. We will discuss some of these strategies in future articles. At this stage I would like to highlight the comparative advantages enjoyed by the algorithmic trader over many larger funds.

One of the biggest advantages Mike says that retail traders possess is capacity:

  • Capacity – A retail trader has greater freedom to play in smaller markets. They can generate significant returns in these spaces, even while institutional funds can’t.

Market impact goes hand-in-hand with capacity:

  • Market impact – When playing in highly liquid, non-OTC markets, the low capital base of retail accounts reduces market impact substantially.

Another advantage of retail traders is their risk management:

Crucially, there is no risk management budget imposed on the trader beyond that which they impose themselves, nor is there a compliance or risk management department enforcing oversight. This allows the retail trader to deploy custom or preferred risk modelling methodologies, without the need to follow “industry standards” (an implicit investor requirement).

Mike goes on to list a number of other advantages:

  • Compensation structure – In the retail environment the trader is concerned only with absolute return. There are no high-water marks to be met and no capital deployment rules to follow. Retail traders are also able to suffer more volatile equity curves since nobody is watching their performance who might be capable of redeeming capital from their fund.
  • Regulations and reporting – Beyond taxation there is little in the way of regulatory reporting constraints for the retail trader. Further, there is no need to provide monthly performance reports or “dress up” a portfolio prior to a client newsletter being sent. This is a big time-saver.
  • Benchmark comparison – Funds are not only compared with their peers, but also “industry benchmarks”. For a long-only US equities fund, investors will want to see returns in excess of the S&P500, for example. Retail traders are not enforced in the same way to compare their strategies to a benchmark.
  • Performance fees – The downside to running your own portfolio as a retail trader are the lack of management and performance fees enjoyed by the successful quant funds. There is no “2 and 20” to be had at the retail level!

The conclusion that Mike eventually arrives at is probably what  you expected. There are tremendous advantages that retail algorithmic traders hold over their larger fund counterparts. It is important that we keep this in mind when we are actually in the trenches building and trading our systems. 

Filed Under: Trading strategy ideas Tagged With: algorithmic trading, retail trading, trading advantages

Keeping up with the humans

October 10, 2013 by Shaun Overton 2 Comments

Daniel Fernandez posts a nice summary of some of the problems algorithmic traders have experienced over the past few years. If you’ve been wondering why your expert advisor isn’t making money, well, you’re not alone.

Daniel points out the terrible performance of the Barclays systematic trading index and its nearly three years of continuous losses. Even the pros are losing money consistently.

Tough Times with Algorithmic Trading

Barclays system traders return

The performance of professional systems traders has fallen over the past two years

Key sections:

It is no secret that algorithmic trading had some “golden years” between 2008-2011. Through this period – most notably due to the high directional volatility of the financial crisis – systems based on a wide variety of market characteristics were able to obtain high amounts of profit, with an almost completely negative correlation with equity markets. Among the high-performers found during this period, trend followers were perhaps the most impressive, with some systems achieving returns of more than 100% of capital within this period, with little drawdown whatsoever. During these years everyone trading algorithms was making a killing. Then, change happened.

 

The answer seems to be simple and at the same time incredibly complex: fundamental influence and uncertainty. Algorithmic trading systems are all designed with the idea that some historical assumption will continue to be true in the future. This assumption can be that price tends to break at a certain hour, that momentum created in one direction leads to continuations, that two instruments are co-integrated, etc. When these assumptions break, the algorithms fail because they have no way to know that under current market conditions their assumptions are no longer valid. This “breaking up” of algorithms means that we usually need to take loses to realize that something has changed – to remove or modify our strategy – and this makes us invariably less reactive than human traders. The strength of algorithmic trading, it’s high capacity to exploit structural characteristics, becomes its weakness when the underlying structure changes.

Filed Under: What's happening in the current markets? Tagged With: algorithmic trading, Barclay's, Daniel Fernandez, drawdown, expert advisor

Automated Trading

December 28, 2012 by Shaun Overton 2 Comments

Nathan Orange contacted me in early 2012 looking for advice about automating a grey box strategy. Through the course of our conversation, it turned out that he was a profitable trader with a multiyear track record. Nathan has gone on to found his own forex signal service at Global Trend Capital.

Nathan conducted this interview with the intention of informing his readers about automated trading. You’ll have to pardon the vanity of publishing his interview of me, but I believe it’s useful for my own readers.

Nathan Orange

 

(Nathan):
Shaun, good to talk to you again and I appreciate you taking the time to discuss what I consider a very important topic. Before we jump into the specific questions, let’s fill everyone in on your background.

 

Shaun Overton(Shaun):
I led the sales effort for the Sentiment Fund at FXCM, which was a fully automated strategy based on the market positioning of retail clients. I needed to understand how it worked in order to answer client questions. That interaction with the systems desk gave me access to one of the tiny handful of people in the forex industry that really knew anything about systems trading and analysis.

I tried trading manually during work hours, but as a broker, it was really difficult to manage trading accounts and to squeeze in 100+ attempted phone calls per day. I also suffered from the usual sob story that every trader endures. Account #1 blew up in 3 months. Account #2 blew up in 6 months. That was the first $5,000 thrown down the pit.

Technical analysis with its trend lines and other tools are hocus pocus pseudo-science. I traded like that for nearly a year, but I never felt confident or comfortable with the idea that subjectively drawing lines on the chart leads to any useful information.

The idea of quantitatively defining a strategy allows for testing and analyzing an idea to determine whether or not it really held any merit. The first non-technical analysis idea I had was to look at unusually big bars with the idea of fading those moves. Access with the FXCM Systems desk helped shape my idea from a subjective idea like “big bar” into a mathematical parameter like “standard deviation”. They also explained trading platforms to consider and recommended a few programmers to help develop the idea.

My experience working with programmers was uniformly terrible. I tend to dive into projects, so rather than depending on the clown-car brigade to half-develop my ideas, I wanted ultimate control over the development process. That eventually led to 20+ hours per week programming and analyzing strategies at home after working all day. The system design bug bit hard and never let go.

Nathan Orange(Nathan):
One of the most common concerns when discussing back-testing is over-optimization. From your perspective, what are some of the common mistakes that most system developers make? I have my own list, but we can discuss those further when we turn the tables.

Shaun Overton(Shaun):
The basic kernel of the idea either has merit or it does not. There is no secret set of magical inputs that turns a bad strategy into a good one. Bad inputs, however, can turn a good strategy into a bad one.

Optimization fails to differentiate between “profitable” and “good”. I flog this dead horse constantly, but the most confusing thing about trading is that you can trade by flipping a coin and setting a 50 pip stop, 50 pip take profit and actually come out a winner – sometimes. Most of the winners will show small profits. A tiny handful of them would show gigantic profits purely as the result of luck. What’s worse is that most of the profitable traders will actually believe that they are the reason for their success when it’s really just dumb luck.

Optimization is usually the process of finding the luckiest accidental winner. It’s no wonder that optimized strategies almost universally fail going forward. The real task is to distinguish between ideas that are inherently non-random versus strategies or expert advisors that coincidentally make money from a random process.

Nathan Orange(Nathan)
Based on your experience and knowledge, if someone sends you a system to code can you quickly determine potential issues with their logic, or even over-optimization red flags? For example, you might a get a system a trader or hedge fund wants coded that has so many specific variables that you know immediately it won’t be robust. I can usually spot these issues from my own system development experience, but from your perspective as a coder is it fairly easy to recognize?

What do you do in those cases? Are most clients bull headed, avoiding any feedback or are they more open minded to listen?

Shaun Overton(Shaun):
We see our primary role as that of a construction worker. If you want to build an ugly house, that’s your affair. On the flip side, if you solicit my opinion, I won’t hold back telling you it’s the ugliest house I’ve ever seen.

People frequently ask, “Do you think this will work?” I almost always answer no, and then they hire us to build it anyway.

Interestingly, strategy development is very similar to trading in that people get emotionally attached to ideas. Even in the face of strong warnings, they charge ahead. A dear friend of mine opined on the subject, saying, “A handful of people don’t try. An even smaller handful listen to good advice. The rest of us learn the hard way.” Most people require the experience of falling flat on their face before they learn the lesson behind the advice.

If you’re motivated enough to ask a programmer to build a strategy for you, it’s because you already know that it is something that you really want to try. I could bluntly say, “This is going to wind up in tears.” 95% of people go ahead with the project, anyway.

Despite my knowledge of markets and systems, I’m not an oracle, either. I’ve told people that I thought their ideas were bad, only to have them come back a year later and tell me they’re making money.


…….Stay tuned for Part II when we discuss HFT, more back-testing issues (including those unique to Metatrader) and if there are common themes to successful systems.

Filed Under: Trading strategy ideas Tagged With: algorithmic trading, automated trading, FXCM, optimize

FREE trading strategies by email

Trending

Sorry. No data so far.

Archives

  • Dominari
  • How does the forex market work?
  • Indicators
  • MetaTrader Tips
  • MQL (for nerds)
  • NinjaTrader Tips
  • Pilum
  • QB Pro
  • Stop losing money
  • Test your concepts historically
  • Trading strategy ideas
  • Uncategorized
  • What's happening in the current markets?

Translation


Free Trading Strategies

Privacy PolicyRisk Disclosure

Copyright © 2023 OneStepRemoved.com, Inc. All Rights Reserved.