Algorithmic and Mechanical Forex Strategies | OneStepRemoved

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

Trailing Stops That Adjust for Sideways Trades

February 16, 2014 by Andrew Selby 2 Comments

One of the most frustrating situations for quantitative traders is a trade that moves sideways for an extended period of time. This type of movement never makes much profit and never triggers a stop, but it can tie up a trader’s capital for extended periods of time.

Trailing stops are designed to lock in profits as a position moves higher. They also offer insurance against a position moving lower. However, they don’t have a built in mechanism to handle positions that continue trading sideways.

trailing stops

Introducing a time element to your trailing stops can help to make sure that your strategy isn’t wasting capital with positions that trade sideways for extended periods of time.

Daniel Fernandez recently wrote a post about a different type of trailing stop. While this new stop is built on a basic ATR multiple stop, Daniel adds a timing function that tightens the floor of the stop over time. This requires a position to perform or force an exit.

How Trailing Stops Are Supposed To Work

Setting an initial stop when a position is taken is first and foremost an insurance policy. If the new position is a loser right from the start, the stop represents the theoretical maximum loss. If the position hits the stop, an exit is signaled and the strategy takes a small loss rather than letting it grow into a large one.

On the other hand, if a position is a winner right out of the gate, the trailing stop will follow the position higher and theoretically lock in profits. This helps to make sure that profitable positions are not allowed to slide back into unprofitable territory.

When Trailing Stops Don’t Work

The only type of position that trailing stops aren’t equipped to handle is a position that moves sideways. This would describe a position that trades in a range right around the entry price for a period of time.

While the position is trading in a sideways range, the trader’s capital is tied up in an unproductive trade. The longer the trade continues in a sideways fashion, the less likely the trade is to become profitable. If a position didn’t act like your strategy expected it to immediately, it is less likely that it will behave that way after a period of time has passed.

The Dynamic Stop Loss

One way to be sure that trades aren’t allowed to continue moving sideways indefinitely is to introduce a time function to your trailing stop. Daniel suggests using a linear function that gradually raises the initial stop to the breakeven point over time. An even simpler option could be to require your strategy to move the initial stop up to the breakeven point after a period of time.

Either way, tightening the initial stop over time will force your positions to produce profits or signal exits. This will help your strategy avoid wasting time holding positions that never actually go anywhere.

Filed Under: Stop losing money Tagged With: sideways trading, trade timing, trailing stops

Using Machine Learning to Understand Quantitative Trading

January 20, 2014 by Andrew Selby 2 Comments

Whether or not their strategy has overfit the data it has been tested on should be one of the biggest concerns of any quantitative trader. Overfit strategies will appear to be extremely profitable on the backtesting data, only to fall apart when traded on out-of-sample data. This can lead the the implosion of many young trading accounts.

Andrea from Math Trading wrote an outside-the-box post where he discussed applying techniques from the Machine Learning field in order to explore how the features of a trading strategy related to how overfit the strategy was.

machine learning

Andrea explains that quantitative trading has many similarities to the Machine Learning field.

In her post, Andrea suggests that trading algorithms are simple a form of artificial intelligence applied to price action. He also explains that the more features that are added to a strategy, the more likely it is to overfit the data it is being tested on.

Building on that idea, he suggests that the features used in a strategy affect different strategies differently. This means that there is a dynamics issue involved as well, so we can’t assume that any system feature will always have the same impact on overfitting. He explains that Machine Learning techniques can be applied to help out with these judgements.

Andrea’s Real World Example

The real world example that Andrea uses to explain this idea is a sporting goods store in Australia. He suggests that because Australian consumers are big fans of watersports, spring and summer would be their best seasons for sales. That basic idea makes sense.

He explains that this seasonal approach would have less predictive power on a sporting good store located in the United States, where there are a number of popular sports in every season of the year. Therefore, the same predictive feature would have dramatically different results based on environment.

Trading System Example

To apply this idea to trading strategies, Andrea uses the rather obvious example of trailing stops. He explains that trailing stops generally work well when they are used in trend following strategies. Those same trailing stops have a much different effect when they are applied to mean reversion strategies.

Because trailing stops work differently in these different situations, we cannot determine that they are either good or bad for overfitting data. They have to be considered with respect to the strategy that they are being used in.

Further Study

After explaining how different features can impact different strategies in different ways, Andrea suggests that there are a few papers in the Machine Learning field that could help to guide our thinking on this topic.

He recommends a paper that gives a basic overview on variable and feature selection. He also recommends Stanford’s Machine Learning Class.

 

Filed Under: Test your concepts historically Tagged With: artificial intelligence, machine learning, trailing stops

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.