Algorithmic and Mechanical Forex Strategies | OneStepRemoved

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

How To Combine Components of Different Quantitative Strategies

November 22, 2013 by Andrew Selby Leave a Comment

One of the most intriguing aspects of quantitative strategies is that we can build and combine those strategies any way we choose.

It can be very easy to get stuck in the rut of using someone else’s trading strategy or expert advisor. However, as traders, we are free to combine different aspects of various strategies in order to build a system that is tailor fit to our trading personalities.

There are a number of different types of seasonal trading systems, and I have looked at a few already in recent weeks. One of the most popular systems is Sy Harding’s Seasonal Timing Strategy. The UK Stock Almanac Blog recently published a section of their book which covers their attempt to adapt Harding’s strategy to the UK markets.

When the authors attempted to replicate Harding’s results on the UK market, the system struggled a bit. Instead of completely abandoning it, they pivoted their approach and changed one aspect. The result was an even more profitable strategy.

seasonal trading

The UK Stock Almanac provide an interesting case study in combining different versions of similar strategies to make a more profitable hybrid system.

They started the discussion by agreeing with Harding that they believed that they could improve on a seasonal approach that traded based on calendar dates:

By tweaking the beginning and end dates it may be possible to enhance the (already impressive) returns of the six-month strategy.

An obvious rationale for this is that if investors are queuing up to buy at the end of October and sell at the end of April, it can be advantageous to get a jump on them and buy/sell a little earlier.

They initially struggled to produce significant results using Harding’s strategy on the UK markets:

We found it difficult to replicate similar results for the UK market using Harding’s STS system.

One problem was that 1 November is such a good date for entering the market – it was difficult to consistently improve on it with any technical indicator.

So they switched gears a bit:

However, we did come up with one simple system that improved on the standard six-month strategy. Briefly, its rules are:

  1. The system enters the market at close on 31 October.
  2. The system exits the market on the first MACD sell signal after 1 April.
  3. The parameters of the MACD indicator were increased from the usual default values to 24, 52, 18.

What they have done here is combined two different seasonal strategies. The fixed November 1 entry was difficult to beat using indicators, so they just stopped trying and kept it. Then, they used a MACD exit similar to Harding’s strategy. This combination produced a better system than either seasonal style could do independently.

Filed Under: Trading strategy ideas Tagged With: MACD, quantitative strategies, seasonal strategy

Retail trader disadvantage

October 28, 2013 by Shaun Overton Leave a Comment

Michael Halls-Moore invited a reply to one of my tweets last week, “Retail traders have an advantage over the pros? Me thinks not.” He wrote a great overview of why the institutional traders look longingly at the retail crowd and all the hoops that they don’t have to jump through.

His points are all valid, but he overlooked the big picture. Pricing is everything to a trader. Retail traders get the short end of the stick when it comes to the cost of doing business.

The cost of trading is massively disproportionate

Let’s say that you’re a would be quantitative trader and that you’re looking for opportunities. Let’s say you trade mini lots in the forex market with 60% accuracy and 1:1 risk reward ratios. If you’re not familiar with what a typical trading system looks like, those numbers means that you have an enormous edge.

Some of the less reputable forex brokers out there charge 3 pip fixed spreads. If you’re trading with a broker offering fixed spreads, I urge you to start price shopping. Fixed spreads are wildly overrated. You pay a huge premium for the certainty of a fixed spread. I can’t think of anything remotely plausible to justify them.

The larger forex brokers charge typical spreads in the neighborhood of 2 pips on the largest majors. Although most seem to find this reasonable, the comparison between a 2 pip average spread and institutional spreads is night and day.

Do you know what the average EURUSD spread looks like on the interbank market? It’s often 0.2-0.5 pips. Retail traders pay an average markup of over 300% on their trades.

retail trader pricing

Retail traders facing the institutions is a bit like David and Goliath.

Retail forex prices have declined in recent years. A few brokers like MB Trading and Pepperstone offer raw spreads with commissions tied to the dollar volume traded. These are, in my opinion, are about the fairest prices available to low balance traders running an expert advisor.

The best deal available to semi-institutional forex traders (CTAs, large balance retail traders, etc) is Interactive Brokers. The customer support is famously poor; they’re cheap for a reason. IB also offers raw spreads with a commission.

My experience with IB has been excellent, but you need to trade size for the economics to work. A 0.5 pip typical spread is great, but the 2 mini-lot minimum trade size and $2.50 minimum commission really adds up. Trading with IB doesn’t approach institutional type pricing until your average trade size approaches 1 standard lot.

So, how does pricing affect the final outcome with our 1:1 risk reward strategy that wins 60%?

  • Free trading: After 100 trades, you’ve earned $600 and lost $400. The hypothetical net profit is $200.
  • Fixed spread: You’ve spent $300 in spread costs to enter 100 trades. The total net profit is -$100 ($200-$300).
  • Average retail: You’ve spent $200. There is no profit because you breakeven ($200 hypothetical profit – $200 in costs). However, your broker loves you for doing that many trades.
  • Good retail pricing: Let’s say the average cost of a trade is 1.3 pips after commissions. You’ve spent ~$130 placing 100 trades. The total profit is $70.

Even with good strategies, the profitability of your algorithm is as simple as choosing the cheapest broker.

Equities pricing

Trading stocks is even more expensive than forex. I remember back in the day when I thought Scottrade was cheap for offering $7 commissions. It gets worse and worse when you go through the list of stock brokers. Most of them try to get away with charging $7-10 per trade. If customer service is important to you, then those are the shops to look at.

If your top priority is trading profitably, then again, broker selection is critical. The only way that a small guy can make it is by chipping away at the costs. Interactive brokers is again a great option, charging fractions of a penny per share traded. If you decide to trade 2 shares of Google (GOOG: $1,017 per share) or 1,000 shares of Fannie Mae (FNMA: $2.35 per share), the transaction costs are tiny. Two ticks in your favor is all it takes to cover the trade.

You might be thinking that I said two ticks in forex is expensive. How can I say that two ticks in equities is reasonable?

Volatility. Two ticks in the stock market is a little hiccup. It’s not at all uncommon to see highly liquid stocks move 2-3% in a single day. Forex is only interesting because of the leverage. The currency pairs themselves rarely move more than 1%, and that’s usually on major news.

Risk Management

Every employee knows that they’re only one mistake away from getting fired. That’s the reason that everyone hates having a boss. There’s a single person with unilateral authority to financially murder you. Who’s going to look upon that as a good thing?

Well, the truth is that bosses exist for a reason. It’s someone that calls you out when you do something stupid. More importantly, the boss has the power and influence to ensure that you stop doing stupid things.

The dream of entrepreneurship is not having a boss. You go on vacation when you can, you don’t have to play office politics, you don’t have to waste time selling good ideas. You just go out and do them.

Even with good strategies, the profitability of your algorithm is as simple as choosing the cheapest broker

I can tell you as a small business owner that the negatives stand out strongly in my mind. When you don’t have someone to hold you accountable, even if it’s a mentor, you make many more dumb mistakes than you should. It takes incredible discipline to hold the line consistently. Knowing that I’m not going to look stupid or have to explain myself to anyone probably gives me a lot more false confidence than I really need.

Self-employed traders working at home experience the same thing. Who calls you out when you’re trading just because you’re bored?

The decline in the trading account points out the obvious, but that’s not enough to necessarily stop the bad behavior. We’re social creatures. Most people need to speak with other people to maintain their sanity. When you’re trading at home alone, it takes a lot of effort to ensure that you’re getting enough social contact. A good boss prevents you from indulging in bad behaviors.

Conclusion

Selecting the right broker is enough to determine whether or not a good strategy will wind up making money or not. It’s expensive to trade. The bigger you are, the better your pricing.

Retail trading prices have reached a point where it’s at least possible to trade profitably. Nonetheless, the number of strategy types out there is limited because the lower, shorter term strategies are prohibitively expensive to trade.

The quantitative traders and hedge funds get the more active strategy space to themselves. Their trading costs are so low that they’re really the only people that can afford to trade actively.

Filed Under: What's happening in the current markets? Tagged With: commission, CTA, equities, expert advisor, forex, hedge fund, insitutional, Interactive Brokers, MB Trading, Michael Halls-Moore, Pepperstone, pip, quantitative strategies, retail, risk management, risk reward ratio, spread, stocks, volatility

Reproducing Quantitative Strategies

October 28, 2013 by Andrew Selby Leave a Comment

Scientific research is becoming increasingly dependent on sophisticated software, custom written for individual research projects. These complex computer programs are rarely published together with the research they produce, which makes it cumbersome for other researchers to validate results.

This is how Thomas Wiecki opened his recent piece about the challenges of reproducing academic paper results at the quantitative blog, Quantopian. In this post, Thomas takes a look at how this growing trend in the scientific research community is affecting theoretical testing in the quantitative trading community.

quantitative strategies

It is difficult to reproduce quantitative strategies without an original copy.

The basic point that Thomas makes is that without all of the exact data and algorithms behind the theoretical results of a trading system, the system itself has little value. This is because it is so difficult to repeat these results without knowing for certain exactly how they were obtained. Not having all of the original data can make it very difficult to reproduce quantitative strategies.

He describes the problem very concisely:

There are many articles describing strategies that seem to work very well on paper, but without access to the code and data used to produce those strategies, it is very difficult to confirm their validity.

He then goes on to describe a recent example where his community encountered this exact problem:

I came across a paper claiming that Google Search trends for certain queries (e.g. the word “debt”) are predictive of market movements. According to the paper, this ability to anticipate market movements lead to a trading strategy that yielded a whopping 326% over the course of 7 years.

Not surprisingly, his community of researchers had a hard time reproducing those theoretical testing results:

Unfortunately, although the algorithm was easy to program we were getting nowhere close to the original 326% returns achieved in the paper. Was there an error in our programming somewhere? Or did the original paper contain a bug?

Since this is the Internet, and I was not aware who the original author was, I was ready to discredit the results and move on at this point. Interestingly, Thomas and his community kept trying to match the original results. They actually reached out to the original author, Tobias Preis:

He responded to our outreach and provided the data that was used in the publication along with a script to reproduce the results. Over the next couple of weeks our community worked tirelessly to iron out any bugs we found compared with the reference implementation.

However, even after making sure the algorithm was working identically, we still were not able to exactly reproduce the results from the paper.

Once again, at this point I was ready to discredit the author and move on. However, Thomas and his community pushed forward. They eventually found that the different results were a product of using different data:

As it turns out, in 2011 Google changed the data format in a way that degrades the signal. The paper was based on the higher quality data downloaded prior to this change. Once we plugged in the original data to our algorithm, we were finally able to reproduce the results from the paper.

Thomas points out that if the original author was not so willing to have his work completely dissected, they never would have been able to figure out why they were getting such different results. He concludes by addressing the key point of reproducibility:

Reproducibility is not only what “keeps us honest” as scientists – it is also a key step in the iterative process of developing ideas and building on the work of peers. If journals required the publication of all software and raw data used in research papers, reproducing results would be far simpler and the process of innovation would only accelerate.

Having all of the source data and code is the easiest way to reproduce quantitative strategies. If we can reproduce these strategies faster, we can spend more time improving them.

 

Filed Under: Test your concepts historically Tagged With: backtesting, quantitative strategies, reproducing strategies

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 © 2022 OneStepRemoved.com, Inc. All Rights Reserved.