News & Analysis at your fingertips.

We use a range of cookies to give you the best possible browsing experience. By continuing to use this website, you agree to our use of cookies.
You can learn more about our cookie policy here, or by following the link at the bottom of any page on our site.

0

Notifications

Notifications below are based on filters which can be adjusted via Economic and Webinar Calendar pages.

Live Webinar

Live Webinar Events

0

Economic Calendar

Economic Calendar Events

0
Free Trading Guides
EUR/USD
Bearish
Oil - US Crude
Mixed
Low
High
of clients are net long.
of clients are net short.
Long Short

Note: Low and High figures are for the trading day.

Data provided by
Wall Street
Mixed
Gold
Bullish
GBP/USD
Mixed
USD/JPY
Bearish
Low
High
of clients are net long.
of clients are net short.
Long Short

Note: Low and High figures are for the trading day.

Data provided by
More View more
Real Time News
  • The $SPX carved out its second smallest daily trading range in two months this past session. I don't think that reassures anyone that the way ahead is going to be quiet... https://t.co/XSjmcj1lSx
  • AUD/USD price action attempts to advance but struggles to maintain a bid more broadly. Get your $AUDUSD market update from @RichDvorakFX here: https://t.co/6zZz0cP2os https://t.co/WU5Hc2Jos2
  • 🇰🇷 Consumer Confidence (OCT) Actual: 91.6 Previous: 79.4 https://www.dailyfx.com/economic-calendar#2020-10-27
  • Forex Update: As of 20:00, these are your best and worst performers based on the London trading schedule: 🇳🇿NZD: 0.44% 🇯🇵JPY: 0.40% 🇨🇦CAD: 0.20% 🇦🇺AUD: 0.08% 🇨🇭CHF: -0.10% 🇪🇺EUR: -0.12% View the performance of all markets via https://www.dailyfx.com/forex-rates#currencies https://t.co/GTC0ZxZF92
  • Heads Up:🇰🇷 Consumer Confidence (OCT) due at 21:00 GMT (15min) Previous: 79.4 https://www.dailyfx.com/economic-calendar#2020-10-27
  • Commodities Update: As of 20:00, these are your best and worst performers based on the London trading schedule: Silver: 0.59% Gold: 0.26% Oil - US Crude: -1.13% View the performance of all markets via https://www.dailyfx.com/forex-rates#commodities https://t.co/XIGKv3ba3L
  • We've gotten here: as of today, it is one week until the #PresidentialElection2020. BUT the situation is incredibly fluid with Covid-19. With this in mind, do you think the election process itself - distribution, counting, etc - will be prolonged?
  • IG Client Sentiment Update: Our data shows the vast majority of traders in Ripple are long at 96.81%, while traders in EUR/USD are at opposite extremes with 70.08%. See the summary chart below and full details and charts on DailyFX: https://www.dailyfx.com/sentiment https://t.co/rFFh3X4MVR
  • Are #stocks readying for a major turn? It’s still too early to say, and the S&P 500 is grasping on to a bullish continuation pattern that remains. Get your S&P500 technical analysis from @JStanleyFX here:https://t.co/Ipm3PAzX1B https://t.co/RW6rnseGTf
  • Microsoft Earnings: Revenue: $37.15B vs $35.75B exp EPS: $1.82 vs $1.55 est $MSFT shares creep just 0.3% higher in after-hours trading
Backtesting 103 – Automated Strategy Optimization

Backtesting 103 – Automated Strategy Optimization

2014-06-24 19:00:00
Rob Pasche, Forex Trading Instructor
Share:

Talking Points:

  • Automated backtesting is fairly efficient, but takes time to test multiple settings.
  • Trading Station Desktop’s optimization tool allows multiple backtests simultaneously.
  • This saves us time and helps us find strategies that have historically performed better.

Over the past week, we have discussed how to manually backtest strategies using free historical data, and then we explained how to automate the backtesting process to save time. Today’s article takes backtesting one step further when we explain the benefits of automated strategy optimization.

Automated Backtesting Weakness

For those that read the previous two articles in this series, you might be confused on how automated backtesting can be improved upon. After all, it only takes a few moments to run through 1000’s of candles worth of data and see what the results of the strategy are. But, normally we want to try to improve our strategy and refine it, and this can take a surprising amount of time.

Every minor tweak we make to our strategy’s settings requires another run through the backtester and another page of results we need to record and compare. The whole process quickly becomes tedious and is not as efficient as it first appeared.

Learn Forex: Backtesting Strategies, Quick But Tedious

Backtesting 103 – Automated Strategy Optimization

(Screenshot from Backtesting 102 – Free Strategies & Automated Backtesting)

So how can we speed up this process of testing multiple iterations of our strategy? Check out the Trading Station Desktop’s Strategy Optimizer.

Optimizing Strategies Automatically

The Trading Station Strategy Optimizer was designed for us to take a strategy, setup multiple variables for the strategy’s components, and then run one test on the selected price data. All the results for every combination of settings are displayed on a single page to make comparisons simple. Best of all, it saves us a lot of time too.

So how do we start the strategy optimizer and set everything up? We first want to click the strategy optimization button in the top right corner of the Trading Station window. We then can select our strategy. In this example, I will be using the same MACD with Trend Filter strategy we used in Backtesting 102.

Learn Forex: FX Code Base: Custom Strategies

Backtesting 103 – Automated Strategy Optimization

(Created using Trading Station Desktop)

As we progress through the different options, We will notice that it asks the same questions as the Strategy Backtester does (learned in the Backtesting 102). But when we get to the Strategy Parameters window, this window will be the main difference.

Rather than setting the Moving Average Periods and the Stop and Limit in Pips, we can now select a range for each parameter. So rather than just testing a Short MA of 100 and a Long MA of 200, we can select a Short MA between 50 and 150 and a Long MA between 200 and 300. The “Step” allows us to select which increment we want to test between the min. and max. values. I set the step to 50 for the Moving Averages in the image below so the Short MAs tested will be 50, 100, and 150, and the Long MAs tested will be 200, 250, and 300.

Learn Forex: Strategy Optimizer’s Parameters Page

Backtesting 103 – Automated Strategy Optimization

The Stop and Limit are set up to be ranges as well; Limits between 40 and 80 at a 10 pip step (40, 50, 60, 70, and 80) and Stops between 20 and 60 at a 10 pip step (20, 30, 40, 50, and 60).

So the strategy optimizer will test this MACD with Trend Filter strategy using all combinations of Short MAs (50, 100, 150), Long MAs (200, 250, 300), Limits (40, 50, 60, 70, 80), and Stops (20, 30, 40, 50, 60). This comes out to 225 different combinations of the same strategy that will be backtested.

Once we click Start, the Optimization tool will begin to test all of these different settings and will be able to tell us which settings had the best results. It could take several minutes up to several hours depending on how many combinations we have selected and how fast our computer’s processor is.

Learn Forex: Strategy Optimizer Results Window

Backtesting 103 – Automated Strategy Optimization

There are two ways the resulting data is displayed once the optimizer has finished. At the bottom is a traditional Excel style spreadsheet with rows and columns, and at the top is a visual display or “heat map” of the different settings with profitable settings in green and unprofitable settings in red. We can see that the best settings for this strategy for the selected data was a Short MA of 150, a Long MA of 300, a Limit set to 80 pips, and a Stop set to 30 pips. These settings provided a gain of $89.55 or 895.5 pips (since the strategy was trading 1 microlot or $0.10/pip)

Opportune Optimizations

Trading Station’s Automated Optimization software is a powerful tool that is completely free to use, but the information it gives us is invaluable. It can quickly tell us the best settings that have worked out historically to help steer us towards a strategy that shows promise for the future. It is definitely worth learning to take your automated trading to the next level. Remember, you can register for a Trading Station demo account for free and have access to this built in software.

Good trading!

---Written by Rob Pasche

Ever wanted a platform that will automatically place trades on your account 24 hours a day? Check out FXCM’s Mirror Trader Platform!

DailyFX provides forex news and technical analysis on the trends that influence the global currency markets.

DISCLOSURES