Algorithmic and Mechanical Forex Strategies | OneStepRemoved

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

Monitoring my live trade execution

February 10, 2016 by Shaun Overton 29 Comments

Dominari’s biggest risk is its trading costs. In the midst of losing 6 days in a row, I found myself extremely concerned about Dominari’s performance. Did the signals go bad all of a sudden or is this a normal drawdown? Is Dominari losing because of trading costs?

I decided to start analyzing my FXCM account. Part of the nerves were driven by the fact that it took 2 weeks to setup the account. The compliance process took far longer than usual because I’m a former employee. Two weeks later, I turned on the account just in time to a) miss the biggest equity growth and b) to catch the biggest drawdown.

I felt more hostile to the FXCM account performance because I didn’t have any profits to pad the losses. This is all coming from my original risk capital. And I’m having my third child soon. Giving birth to kids in the US is incredibly expensive. I’ve got better uses for the money than to throw it away in the markets!

So, the real question is: am I losing because it’s just a rough patch or because FXCM is eating my lunch?

backtest-equity-fxcm

This image is a backtested equity curve over the same period of my live performance. I’ve traded live since January 28, but the trading didn’t begin until the afternoon. As you can see, I again missed another patch of strong performance.

The rest shows something of a fairy tale. The backtest shows a return of 19.13% over that period, whereas my live performance is down 10%. How much of that is due to commissions, spread, rollover and slippage?

The backtest shows a profit of $956.65 with no trading costs.

My real results, which 1) show a profit on the backtest but 2) are actually showing a loss in real life, can be used to estimate a floor for my trading costs. The formula for that is
( Total profit and loss + commissions + rollover) / total trades, which is currently $1.58 in costs per trade.

The commissions and rollover are easy to separate out using either Myfxbook or the FXCM account report. The grand total spent so far on commissions is -$239.80 and -$3.05 on rollover.

The hardest part to separate is the spread paid. I’m not recording the spread paid on every trade (maybe that’s a mistake and I need to add it). But I’m going to use the table below to estimate. I took a random sample of 30 trades from the 501 trades completed at the time of my analysis.

Spread PaidSlippage
0.0001985231.49E-05
0.000153951-5.13E-05
0.0004558230.000227912
9.98E-050
0.000161242-0.00313413
2.76E-05-9.19E-06
5.55E-056.94E-06
0.000110898-1.01E-05
9.24E-050
9.91E-05-1.57E-16
6.55E-051.31E-05
4.85E-052.08E-05
8.22E-05-1.67E-16
6.87E-050
6.95E-05-1.65E-16
0.00015173-2.17E-05
9.43E-05-2.36E-05
9.38E-05-0.00225922
7.61E-05-0.0024735
0.0001600381.00E-05
0.000135020
0.0035426254.52E-05
0.000222978-0.00376275
7.62E-050
0.0004327977.73E-06
2.61E-050

The average slippage (the right column) is a stunning -0.044%. I’m getting negative slippage on average with FXCM. That’s outstanding! FXCM is improving my fills even though my entries are requested at a worse price. Whatever misgivings I’ve had about FXCM in the past are alleviated. That’s impressive execution.

Estimating the spread paid is much more difficult. I’ve chosen to take my average trade profit on a $5,000 account as the starting point. The trouble is that the value of an average winner can depend on the account performance. If I use stagnant position sizing, then the drawdown doesn’t effect the value of the average winner. Under that assumption, the average winner is $3.48 per trade.

But if I use compound position sizing, the drawdown eats away most of the profits. That drops the average trade value down to $1.70.

I converted the spread paid from pips into percentages. Using EURUSD as an example, a 1 pip spread works out to 0.0001/1.12727 = 0.000089. The reason for doing this is so that I can compare the spread on EURUSD to something with a much wider spread like AUDNZD. The spread is wider on AUDNZD, but the value of a NZD pip isn’t the same as a USD pip. Percentages allow for an apples to apples comparison.

The average spread paid in my sample was 0.00026157605, which is 0.026%. Putting that back into terms relative to my account balance, I’m paying 0.026% * $5,000 = $1.31 per trade in spread. Across 420 trades, that’s -$550.20 in spreads.

Total costs are spread, commissions and rollover:
$550.20 + $239.80 + $3.05 = $793.05

On a per trade basis, that is $1.78 in costs per trade from my estimates.

The total profit on the backtest was $956.65, but I missed about $550 of it because trading didn’t start until 17:00 on the 28th of January. That leaves the backtest profit somewhere around $406.65.

That puts the re-estimated profit and loss at $406.65-$793.05 = -$386.40. The actual loss is -$469, which I feel is a reasonable discrepancy based on the fact that I’m estimating how much profit was contributed on January 28 instead of knowing for certain.

The conclusion is that I need to turn off this trading at FXCM. Even if I joined their active trader program and traded in the top tier, it would only save me half the commissions. Most of the trading costs are in the spread and not commissions. I’m seriously considering a move to a broker that will allow me to make a market by posting limit orders. But first, I’ll need to go over my Pepperstone account to review the trading costs for myself and clients.

Filed Under: Dominari, Test your concepts historically Tagged With: backtest, FXCM, Rollover, slippage, spread

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

No changes needed

January 4, 2016 by Shaun Overton 7 Comments

My strategy managed to overcome a rocky start to finish the month with a near breakeven result. QB Pro’s total return for December was a loss of 1.56%. That would have been a positive number had I not switched servers at an inopportune time. The system had its best day when I switched and, of course, I forgot to flip the “on” switch overnight. I missed the most profitable day of the month.

QB Pro equity curve Dec 2015

Equity curve of QB Pro from Dec. 1-31, 2015.

The portfolio on December 1 included a mix of both CAD and CHF. As you can see, the month started close to something of a nose dive. Everything through Dec. 9 was harrowing. Not coincidentally, that was also the day that I removed CHF from the portfolio.

Ever since Dec 10, you can see that the equity curve has more or less marched straight upward. I’m only trading CAD crosses at the moment and intend to keep it that way. While I’m tempted to up the leverage, I plan to wait for at least a week. The first few trading days of the month always seem to be the most volatile, which is rarely a good thing for me.

There’s not much else to write about. I feel like I’m dialed in right now. The only thing to do now is sit back and wait.

Filed Under: QB Pro

The Top 27 Forex & CFD Trades of 2015

December 7, 2015 by Shaun Overton 2 Comments

Here’s a list of all the trades you wish you made in 2015. What good is a list like this?

Because it helps you find the best trades next year!

Let’s dive in.

1-EUR/USD, April 13, Daily

1

On April 13th after a marathon of negotiations and concessions it seemed that Greece will eventually not leave the Eurozone after all and the abyss was averted. Sensing an opportunity to buy the Euro at its lows, hedge funds, big banks and other institutions began to buy billions of Euros. The EUR/USD jumped more than 900 pips in 3 weeks.

Weighted Digital Score: 5.0
SB Score: 0.46

2- XAU/USD, October 28, Daily

2

After some tentative signs of improvement in the US economy, on October 23rd the big movers on the Gold market reached the conclusion that the Fed would raise rates before 2015 ends. This leads to a massive selloff in XAU/USD contracts with Gold melting $100 off its price.

Weighted Digital Score: 73.5
SB Score: 0.11

3- USD/JPY, May 18, Daily

3

On May 18th, after soft data from Japan, traders concluded that the Bank of Japan was about to amp up its efforts to weaken the Yen further. Meanwhile the US Dollar was looking solid. Traders responded to this situation by massive bullish bets on the USD/JPY, pushing the pair 600 pips higher.

Weighted Digital Score: 11.0
SB Score: 0.93

4-USD/JPY, August 19, Daily

4

Shortly after traders were almost certain that the Bank of Japan would act to weaken the Yen, their hopes were dispelled. The BoJ decided not to act and USD/JPY bulls were caught off guard. On August 19th a panic selloff on the USD/JPY began and the pair plunged from 124 to 116 in the space of 4 days.

Weighted Digital Score: 48.0
SB Score: 0.13

5- AUD/USD, September 29, Daily

5

After being sold heavily for several weeks AUD/USD selling reaches an exhaustion point. The threat from a slowing China on the Aussie dollar now seems fully priced in the pair and appetite for selling diminishes gradually. On September 29th as sellers move to the fence bulls seize the opportunity and push the pair for a quick rebound above 0.73.

Weighted Digital Score: 38.0
SB Score: 0.50

6- Oil, August 24, H4

4H_1

On August 21st just before the end of summer investors concluded that Oil prices have moved too low too fast. Adding on top of that the tendency for Oil to gain during the winter months investors were expecting a rise in demand. Consequently the bulls pushed oil by $10 a barrel in a very short time span.

Weighted Digital Score: 28.6
SB Score: 0.31

7- EUR/GBP, October 9, H4

4H_2

With data from the Eurozone constantly deteriorating and data from the UK brightening, EUR/GBP traders have begun to bet on more stimulus i.e. easing from the ECB and on the contrary a possible rate hike from the Bank of England. Consequently traders began to short the EUR/GBP, heavily pushing the pair to the 0.7 low.

Weighted Digital Score: 70.0
SB Score: 0.80

8- GER30, September 29, H4

4H_3

As optimism grew over a possible ECB stimulus, appetite for the GER30 (DAX) jumped, pushing the index above 10,000.

Weighted Digital Score: 39.0
SB Score: 0.41

9-USD/CAD, January 2, H4

4H_4

As Oil prices began to slide, the Canadian Dollar, which tends to move in tandem with Oil, moved lower as well. That pushed the USD/CAD by roughly 1000 pips.

Weighted Digital Score: 42.2
SB Score: 0.70

 

10-UK100 (FTSE100), August 13, H4

4H_5

Selling pressure on miners alongside fears the FTSE100 was in bubbly territory ignited heavy selling in the UK100 contracts (FTSE100) 800 points lower.

Weighted Digital Score: 86.26
SB Score: 0.71

11-USD/CHF, October 20, H4

4H_6

After inflation in Switzerland fell below 0%, traders concluded the Swiss National Bank would be forced to keep its negative interest rates lower for longer. This, of course, makes the CHF a clear sell vs the Dollar which faces the opposite circumstances. The USD/CHF consequently rallied roughly 600 pips.

Weighted Digital Score: 5.0
SB Score: 0.02

12-XAU/USD, August 5, H4

4H_7

When Gold reached the 1080 support zone, Gold traders realized the next stop if the support breaks was 1000 and below. Fearing the possibility that the Fed will eventually fail to raise rates, traders quickly turned from bearish to bullish pushing Gold contracts to trade just shy of $1,172 per ounce.

Weighted Digital Score: 30.8
SB Score: 0.49

13-EUR/USD, October 22, H1

H1

On October 22nd, believing that the ECB was about to embark on more stimulus and with solid data coming out of the US strengthening the case for a Fed rate hike, the EUR/USD resumed selling, plunging roughly 500 pips.

Weighted Digital Score: 39.6
SB Score: 0.02

14-USD/TRY, August 12, H1

H2

On August 12th Turkish Lira bears were betting more uncertainty for Turkey which of course is highly negative for the Turkish Lira. As a result, the bullish trend on the USD/TRY quickly resumed.

Weighted Digital Score: 6.0
SB Score: 0.52

15- GBP/USD, November 5, H1

H3

After realizing a rate hike from the Bank of England was not coming soon and eyeing a Fed rate hike by year’s end, short sellers began to home in on the GBP/USD, with a 350 pips short in less than 24 hours.

Weighted Digital Score: 46.0
SB Score: 0.80

16- EUR/JPY, November 16, H1

H4

During mid-November data from Japan was surprisingly negative and ignited safe haven bets that ironically pushed the Yen higher, pushing the EUR/JPY lower.

Weighted Digital Score: 65.8
SB Score: 0.79

17- NZD/USD, October 29, H1

H5

On October 29th China announced it is abolishing its one child policy. Since New Zealand’s main export is milk to China, i.e. food for young children, traders immediately figured this was NZD positive and started piling on bullish bets for the NZD/USD.

Weighted Digital Score: 18.0
SB Score: 0.26

18-AUD/JPY, June 2, H1

H6

After a hefty selloff, the AUD/JPY became oversold. This generated a classic short squeeze, ignited a wave of buying for the pair pushing it to rise above the 96 level.

Weighted Digital Score: 24.6
SB Score: 0.45

19-XAGUSD, October 28, H1

H7

As appetite for precious metals evaporated once again and dollar bullishness resumed, Silver spot price (XAG) was pushed lower from $16 per ounce to just above $14 per ounce.

Weighted Digital Score: 99.5
SB Score: 0.44

20- Oil, November 4, H1

H8

With EIA stockpiles on the rise Oil traders returned to bearishness once more. Short selling resumed around the 48-49 area and pushed WTI Oil to trade as low as $ 42.37 per barrel.

Weighted Digital Score: 73.09
SB Score: 0.05

21- USD/NOK, September 21, H1

h9

After the USD/NOK bottomed out on September 17th  bearish momentum was exhausted, largely due to fading Oil demand. On September 21st with the dollar looking bullish, traders returned to the long term bullish trend for the pair, pushing it above the 8.5 level.

Weighted Digital Score: 6.5
SB Score: 0.36

22- EUR/GBP, August 5, H1

h10
After some mild data from the UK, EUR/GBP switched into bullish bias, believing the EUR/GBP was oversold. The pair moved from below the 0.7 threshold to above 0.71.

Weighted Digital Score: 15.7
SB Score: 0.45

23- USNASDAQ100, October 1, H1

h11
As the third quarter ended, traders were expecting a robust earnings season for tech companies. Consequently the USNASDAQ100 CFD contract that replicated the Nasdaq100 index embarked on a bullish run from 4,115 to 4,633.

Weighted Digital Score: 4.96
SB Score: 0.0

24- Japan225, May 8, H1

h12
As the Japanese Yen weakened i.e. the USD/JPY moved higher, traders realized that this would be positive for Japanese companies and consequently turned bullish. The Japan225 CFD, which replicated the Nikkei 225, gained roughly 1200 points.

Weighted Digital Score: 25.9
SB Score: 0.32

25-AUD/NZD, September 24, H1

h13
Between the Aussie and the Kiwi, the Aussie is the most sensitive to bad news coming from China. So when traders began to be pessimistic on China, they followed by shorting the Aussie vs the Kiwi, pushing the pair lower.

Weighted Digital Score: 12.12
SB Score: 1.0

26- USD/CHF, July 31, H1

h14
On July 31st, after forming a double bottom, traders resumed their bullish bias on the USD/CHF in tandem with the bearish EUR/USD bets, as both pairs tend to move in reverse.

Weighted Digital Score: 2.5
SB Score: 0.35

27-EUR/USD, August 24, H1

h15
Towards the end of August, the EUR/USD topped out for the year. Markets once again turned risk averse; traders began piling in on safe haven currencies such as the Dollar and the Yen and sold risk currencies such as the Euro or the Aussie. Consequently, the bearish trend for the pair resumed, pushing it lower by roughly 600 pips.

Weighted Digital Score: 100
SB Score: 0.73

Filed Under: What's happening in the current markets?

Resetting my demo testing

December 1, 2015 by Shaun Overton 6 Comments

I mentioned in my new strategy post that live demo testing would last for two weeks unless bugs popped up. Bugs did pop up… but only in my rush to get ready for Thanksgiving!

I sat in my office frantically trying to wrap up code before business hours ran out on the day before Thanksgiving. The plan was to unplug for the long weekend. And, I did. Emails went on autoresponder and, aside from one night binging on Netflix, I didn’t see a screen for 4 days.

Rushing while problem solving, and especially programming, almost never ends well. I would never push untested code changes onto on a live account. But since I figured the change was simple and it’s only a demo account, it’s not a big deal if I mess it up. There went 4 days of live market testing down the drain.

The bug

I’m testing my live demo on FXCM US. As most US traders are aware, the FIFO rules imposed on FX brokers can get pretty annoying. I noticed that a small handful of my orders were being rejected in a special circumstance.

Say that I’m in a long trade and place my take profit at 1.0550. Now say that the signal is so strong that not only should I exit long, but I should also go short at 1.0550.

Anyone in a normal market would place a limit order to sell double the open position at 1.0550. That would cause the long trade to exit and a new trade to open in the opposite direction.

FIFO rules prohibit this because I’m already long. My intended bug fix was to place a take profit order to exit. The order to go short would then remain hidden in the code until the long trade exits. Doing the order logic this way follows my original intent, but also complies with FIFO.

The buggy bug fix

Using my long and then going short example, my long sets a take profit and then the code was intended to send 1 limit order to go short. I forgot to tell the code that it had already sent that one order. Instead, the code sent duplicate orders on every single tick.

Position sizes of 1 microlot mushroomed into several standard lots. Needless to say, the profit and loss began to swing wildly. The massive jump in size also swamped the statistics that I was hoping to measure with the data gathered so far.

It’s easier to start a new demo account, which is what I’ve done as of 5 minutes ago. One upside to using a new demo account is that I can run the code on an account size that matches my intended live testing balance. I plan to test with $2,000 instead of the $50,000 in the first demo.

The first few days of trading

equity curve

This was the first 3 days of trading

The first few days continued much in the same vein as in my original post. I’m looking forward to collecting data from the new demo account. You can expect to stay up to date on my progress if you’re a subscriber to my free newsletter.

How I picked my brokers

Using limit orders is extremely price sensitive. If you place a limit order to buy EURUSD at 1.0550, the price must exactly hit 1.0550 in order for that trade to execute.

One danger of trading on marked up spreads is that you don’t know whether the broker is widening the bid or the ask. If the interbank market quotes a 0.3 pip spread on EURUSD at 1.05480 x 1.05483 and the broker usually charges a 1.3 pip spread, then the broker can mark up the spread in several different ways.

  • Add the 1 pip markup entirely to the ask. The price on your screen appears as 1.05480 x 1.05493
  • Add the 1 pip markup entirely to the bid. The price on your screen appears as 1.05470 x 1.05483
  • Split the 1 pip markup across the bid and the ask. The price on your screen might be as 1.05475 x 1.05488

I of course have no idea which way the broker marks up the spread. If they’re smart, they will price shade in order to earn extra income from the easy order flow. There’s always the risk that the markup could cause one of my orders to not get filled, even though the real interbank market actually touched that price.

I’m doing my demo test at FXCM for three reasons.

  1. Commission only trading. It’s a pure interbank feed, so I don’t have to worry about how spread markups affect my execution.
  2. The commissions are very fair for a retail trader. It works out to $60 per side per million, which is only double the commission that a small institutional trader would pay. Retail rading costs have fallen dramatically in the past few years.
  3. Seer is already plugged into FXCM

When it comes to trade live, I’m planning to trade a personal account at FXCM US and a second account denominated in euros for my Irish company, Dominari (the same one that owns QB Pro). Dominari’s trading will go through Pepperstone, which offers the same commission only setup but 1) charges even lower commissions in euros and 2) offers much higher leverage.

Filed Under: Trading strategy ideas Tagged With: FXCM, limit order, Pepperstone, price shading, programming

November Performance Review

December 1, 2015 by Shaun Overton 4 Comments

QB Pro return -6.59% for November. My goal of hopping on board the commodity trends was late to the party. Starting October 1, QB Pro traded a mix of AUD, CAD and NZD. That portfolio mix resulted in losses because those currencies have remained range bound from October until today.

AUD equity curve November

Performance of AUD crosses

CAD equity curve

Performance of CAD crosses

NZD equity curve

Performance of NZD crosses

Although QB Pro is a mean reversion strategy on the H1 charts, its performance depends massively on long term trends. My biggest challenge on the first of every month is to make sure that my portfolio allocation makes sense for the current environment.

CAD is still near the upper end of where the current trend peaked. I see no fundamental or technical reason why the CAD trend is topped out. Yes, I may need to sit through some minor up and down months; the price might consolidate around 1.30 to 1.33. Then again, it might start zooming upward again. Whenever the trend resumes, I fully expect CAD to continue its trend in the same direction.

USDCAD

CAD is still in a major, long term uptrend. This chart is USDCAD daily

The strongest trend in the market right now is CHF weakness. There are plenty of fundamental reasons to dislike CHF. An interest rate of -0.75% is chief among them. But… that’s also old news. Nothing on CHF fundamental front has changed. I feel like I’m rationalizing, so I’m just going to skip the analysis and go with what the chart says. The USDCHF is trending up and, as of a few days ago, broke through the previous high before the collapse of the EURCHF peg.

CHF is breaking out again

CHF is breaking out again

Recent backtests of the QB Pro system on a CHF portfolio look excellent. The backtest below only covers the most recent 3 months.

CHF equity curve

QB Pro equity curve for CHF since September 1, 2015.

I feel like we’re in a good position portfolio-wise. This is not an empirical observation. It’s more of a feeling. It feels like my likely downside is limited, that if I do lose, it’ll be small. And if I do win, that it’ll look a lot like my earlier winning streak.

If you signed up for the QB Pro system on SeerHub, your portfolio will be automatically updated.

Filed Under: QB Pro, What's happening in the current markets? Tagged With: AUD, CAD, CHF, commodities, NZD, trend

Live demo testing a new strategy with limit orders

November 24, 2015 by Shaun Overton 17 Comments

I come up with amazing looking backtests all the time. This is the latest example using the SB score.

backtested equity curve

The equity curve of the new strategy without trading costs.

The free and hypothetical version of the strategy yielded $79,618.82 for an uncompounded return of 796.19% over a period of 3 years. The strategy trades all major FX crosses. As you can tell, the signal quality remains nearly constant across multiple market conditions. It looks great.

The problem is trading costs. It’s always trading costs that make life difficult.

Trading costs drop the profits by 98.22%

Trading costs drop the profits by 98.22%

I always take a heavily pessimistic view when it comes to assuming trading costs and slippage. It requires a lot of intellectual honesty, but making an effort to avoid rosy assumptions saves a lot of pain and disappointment down the road. The assumptions are really severe on cross currencies where we assume spreads and slippage north of 5 pips.

Performance with pessimistic trading cost assumptions drops to only making $1,000 in profit. The strategy doesn’t need to go in the rubbish bin, but it’s far from ready for prime time. There’s no scenario where it makes sense to trade with market orders.

General characteristics

Average trades per day: 39
Currency pairs traded: 27
Percent accuracy: 66.52%
Style: Mean reversion
Charts: Hourly

How to trade on the cheap

I’m notoriously frugal. One of my fraternity brothers in college still tells stories about me counting loose change and tracking it in MS Money.

That kind of mentality drives my wife crazy… but it’s a real asset for a trader! Traders make their money on the margins like every other business person.

I spent yesterday afternoon coding this new strategy with a slight twist. Instead of paying the spread on every single trade, what if I use limit orders to try and earn the spread?

The current raw spread on EURUSD is 0.3 pips, which is worth $0.03 per microlot. The trading commissions are $0.03 per microlot. If I earn an extra $0.03 per microlot, that at least covers the trading costs. On pairs like NZDCHF where the raw spread is 1 pip, that adds an extra $0.04 ($0.10 – $0.03) per side. I.e., the entry signal makes an extra $0.04 and the exit also makes an extra $0.04 on every single trade.

Even quiet pairs on NZDCHF still exhibit a degree of noise on every bar. I haven’t done any research to back it up, but my subjective experience says that the wicks of 90% or more of bars will be at least as long as the spread is wide.

Traders make their money on the margins like every other business person.

Said another way, if the spread on EURUSD is 0.3 pips, then the difference between the open and low price on 90% of bars should be at least 0.3 pips, too. That’s my assumption, anyway.

An example of twisting the strategy to use limit orders

Say that my signal to enter the market just popped up. The current price for EURUSD is 1.06457 x 1.06462, which is 0.5 pips. The backtests assume that I’ll hit the 1.06462 asking price and pay the spread.

The idea for my test is to set my limit order at 1.06457. Since I’m a retail trader, that means I’m asking the market to move down half a pip before I’ll get to have a position. Requiring a small move in my favor theoretically earns more than jumping into the market with both feet.

Live demo testing begins

I could theoretically model the idea in a backtest, but there are critical assumptions that make it pointless.

1) The average spreads available in my 2009-2011 backtest period were far wider than they are today
2) The spread varies significantly throughout the day. EURUSD is routinely as low as 0.2 pips in the European sesssion, but can easily hit over 1.0 pips in the dullest portions of Asian trading.

The second item could be completely detrimental in a backtest. It’s better to test the idea on a live demo and get something closer to real trading data.

Demo testing

The first 15 hours of live demo testing.

I’m only 15 hours into the test, but at least everything is off to a good start.

The goal for the test is simple: place at least 300 trades in the account. That should only take about 2 weeks since the strategy is so hyperactive.

The criterion for success is equally simple: does the real-time demo trading performance meet or exceed the backtesting performance over the same time period?

I started trading in the evening of November 23, which means that I should hit my 300 trade threshold around the 10th day of trading. The trading frequency does fluctuate, but that should occur sometime around December 4th.

Even though I have live demo data, I’m going to run a market entry backtest from November 23 to December 4. If the demo trading, which uses limit orders, exceeds the market entry backtest, then I have a reasonable basis for assuming that the strategy is ready to trade on a small live account.

comparison scale

I’m also ironing out bugs that appear during the live simulation. More than likely, these dates will be pushed back. I already found 2 issues that require investigation after only 22 trades. There’s no point in judging a strategy if it’s not performing exactly as specified.

Code the same strategy twice?

You probably noticed that the forward test equity curve is from MetaTrader. Why would I test in one platform but execute in another? All of my backtests were done in Seer.

If you have two people work on a problem and they both arrive at the same answer, then they probably answered the problem correctly. The same logic applies to programming. If I program a version of the strategy and Jingwei programs a version of the strategy, they’re supposed to place the exact same trades. Any discrepancies mean that someone’s programming is wrong.

I routinely use this method because the slightest errors in logic can lead to dramatically different trading outcomes. It’s the difference between making a lot of money and losing a lot of money. Yes, I’m sacrificing efficiency. The stakes for a strategy are so high that it’s better to make 2 people do the same work in exchange for the confidence of knowing that it was done properly.

MetaTrader is inferior to Seer by every measure. The only reason that I wrote my code in MetaTrader was that I’m anxious to test the idea. MQL4 is easy for me to code – programming for MetaTrader is one of our main services.

After Jingwei finishes programming the Seer version next week (she’s off for Thanksgiving), I’ll have the basis for comparing my MT4 version against hers. It’s terribly inefficient, but I also know how likely I am to waste weeks on analyzing trades placed according to rules that don’t exactly match my strategy. Better safe than sorry!!!

How to fatten the margins

One thing I hate about retail trading is that very few venues offer a true ECN. Trading on a traditional retail forex broker means that I have to wait for the spread come down to touch my order. In the example I gave using EURUSD, it requires that the market move 0.5 pips in my favor before I get a fill.

Trading on an ECN would significantly increase the probability of receiving a fill on the limit order. Using the EURUSD example where the current prices are 1.06457 x 1.06462, I would place a buy limit order on the bid at 1.06457. If anyone in the market sells at that time, it means that at least a portion of the order would be filled almost immediately.

In effect, trading on the retail spreads contains the worst case scenario for execution. The price has to adjust 0.5 pips in your favor in order to get filled. If you trade on an ECN and the price fell 0.5 pips, you would get filled every single time. But you also get the chance to get filled earlier and faster because if anyone comes in and goes short at market, the order sits on the book waiting for someone to hit it.

fat margin

Smart traders do everything in their power to fatten up the margins

I’m proceeding with the demo test now. If it meets or exceeds the backtest results, I’ll then know with the highest degree of confidence possible that the method is ready for live trading. I’ll probably start with a few thousand dollars for the first month. Then, if it succeeds, I’ll really start to scale it.

There’s no reason that all trades must occur on H1 charts. I can always shift the trading intervals by one minute, two minutes… fifty-nine minutes. And even there, it’s possible

My ideal scenario is to trade the strategy on an ECN venue, which requires a minimum balance of $250,000. That amount of money is far higher than I’m comfortable risking. The old rule of trading is that you never risk more than you’re comfortable losing.

That means I’ll likely be looking for a partner to make sure the strategy runs in the best environment possible (an ECN). Are you possibly that partner? If so, send an email to info@onestepremoved.com and introduce yourself. Nothing will happen for several months, but it always takes awhile to build relationships and feel comfortable with a project.

Filed Under: Dominari, Test your concepts historically, Trading strategy ideas Tagged With: backtest, limit, spread

How to be 99.999% accurate when your system is only 49% accurate

November 16, 2015 by Shaun Overton 9 Comments

Virtu Financial, the high frequency trading firm whose initial public offering of stock was caught in the unexpected firestorm that was the book “Flash Boys” by Michael Lewis, is reviving the IPO plan they shelved last year amid controversy, is seeking $100 million.

Virtu Financial board

99.999 win percentage is an odd statistic

As a recent Securities and Exchange filing reveals, the company, operated by a litany of some of the exchange world’s top executives, boasts that out of 1,485 trading days it has only one losing day.  This is the key statistics that left those familiar with algorithmic trading scratching their heads.

On the surface this 99.999 win percentage is a rather unworldly performance statistic in the world of algorithmic trading.

Virtu Financial notional

Virtu Financial is not a trend follower

The most popular managed futures strategy, trend following, has an average win percentage near 55 percent. Trend following might not be the best algorithmic strategy to compare to Virtu, however, as the firm claims in its S-1 that their trading “is  designed to be non-directional, non-speculative and market neutral.” Micro-trend following and benefiting from market moves in one direction is a popular high frequency trading strategy, but based on their S-1 this is not the primary strategy.

This doesn’t explain the win percentage.

The highest win percentage of all managed futures strategies, near 75 percent, is short volatility, which is also the least popular strategy. While the strategy is known to win most of the time, the key statistic is to understand its small win size and large loss size. In managed futures the size of a trader’s wins can often be more important than how often they win. In the case of short volatility, while they win most of the time, when they lose they lose big – with an average loss size that is close to double that of a discretionary trading category, for example.

While risk in Virtu may exhibit strong downside volatility during crisis, much in the same way market crashes bankrupt many individual market makers in the golden days of the trading floor, comparing Virtu’s strategy to a short volatility strategy is inaccurate.

Perhaps the most applicable managed futures strategy to benchmark might be the relative value / spread arbitrage category. The spread-arb strategy has a high win percentage, near 60 percent, and it also has the best win size / loss size differential. The strategy works by buying one product and then selling a related product. The directional strategy works when a market environment of price relationship dislocation occurs.

While the fit isn’t perfect, nonetheless the most relevant managed futures strategy for which to compare Virtu is its direction-less, market neutral approach taken by certain spread-arb CTAs. The primary difference being Virtu doesn’t hold positions for directional profit. What they do, much like a short term trend follower, is take a position and then immediately lay off risk in a hedge. For instance, they may buy oil and then immediately hedge that position in another market and perhaps even using a derivatives product with different product specifications. In the olden days one could simply describe this as a “market making” strategy, but in the new school world of high frequency trading, separating two-sided liquidity providers from directional trend followers has oddly become more difficult.

99.999 percent daily win percentage overshadows 49 percent intra-day win percentage, highlighting the importance of win size

When comparing Virtu to known managed futures strategies, the 99.999 win percentage sticks out like a sore thumb – until you read the next punch line in the most recent S-1. That is when the firm reveals that its win percentage on an intra-day basis is 49 percent.

This puts the pieces of the puzzle together. The 99.999 percent win percentage needs to be considered in light of the 49 percent intra-day win percentage. This highlights the fact that Virtu, by logical default, is benefiting from size of win. Just like a trend follower, it isn’t always win percentage that matters most but size of win and controlling loss. This is likely the secret sauce inside Virtu’s success.

This article originally appeared on Virtual Walk and was authored by Mark Melin.

Filed Under: What's happening in the current markets? Tagged With: accuracy, CTA, high frequency, managed futures, Mathematical Expectation, percent accuracy, Virtu, volatility, winning percentage

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

Trading Platform Limitations

October 18, 2015 by Shaun Overton 6 Comments

This post was authored by Ben Fulloon, a respected trader and subscriber to OneStepRemoved.

I developed an awesome strategy with a drawdown ratio of 13.67. Sounds amazing, right? Too bad that my trading platform overstated the results by more than double!

It’s important to learn about both your brokers and platforms limitations. Sometimes these intricacies only become apparent through time and experience. It’s so frustrating when your trading platform doesn’t function or report results as expected.

In this article I’ll point out two limitations of NinjaTrader 7, one bad limitation and one which can actually turn out surprisingly better for the trader in certain situations. However, this is more to do with the broker I’m using and not the platform itself.

NinjaTrader is definitely not the only platform that has limitations: MetaTrader, TradeStation, X-Trader, Matlab, etc. all have limitations for quantitative finance.

I’ll just be writing about NinjaTrader in this article to keep it fairly short and easy to read. I am also not intending to make out NinjaTrader as being a bad platform either. But, there are definitely some improvements that could be made to make it a lot easier and more convenient for quantitative traders to develop and trade strategies.

The first quirk relates to the broker I’m using. Specifically, it’s the day trade margins that I care about. These day trade margins end 15 minutes before the close of the session. For instance the ES (Emini S&P500) has a day trade margin of $500, which ends at 4:00pm CT that then reverts back to the full trading margin of $5060 before the session closes at 4:15pm CT. (Times stated are correct at time of Writing, The ES now closes at 4:00pm CT and the Day Trade margin ends at 3:45pm CT)

I’ll show you a screenshot of the results of a day trading strategy that I developed. This strategy trades the ES, NQ (Emini Nasdaq 100) and the YM (Emini Dow) all at the same time. The easiest way to exit on close with NinjaTrader is setting “Exit on Close” to true which will then exit on the close of the session.

All trades together in the report

According to the results the strategy makes a total of $332,771.60 with a maximum drawdown of $25,912.27 since 2008 to now. This is a drawdown ratio of 12.84. That’s oustanding!

The issue is… and you knew there’d be a problem… is that the strategy exits at 4:15pm CT. Day trading margin ends at 4:00pm CT. The strategy is therefore highly likely to get a margin call with a small account size.

It makes sense to tweak the strategy to make best use of the day trading margin. Ninjatrader offers a custom session template, which in this case I made end at 4:00pm CT. The results of the custom session template is as follows.

Day trading with all instruments together

The exact same strategy applied to the same instruments to avoid a margin call makes $335,819.30 with a maximum drawdown of $24,560.51. This is a drawdown ratio of 13.67.

I didn’t change the strategy with the goal of improving the drawdown ratio AND the profit. But hey, I’ll take it. Finding a limitation in the platform can actually benefit you in some situations.

This strategy is based on trading 3 different instruments. The ES, the NQ and the YM. The problem is that I backtested it using an instrument list in NinjaTrader. What this means is they’re all tested separately. NinjaTrader then combines the test results for you as a total result like the results of the screenshots above.

Here’s what it looks like when you test them as an instrument list. This shows the different profits and drawdowns of the individual instruments.

Results by instrument

Now at first glance it reads that the trader would have made $335,819.30 with a maximum drawdown of $24,560.51 if they traded all three instruments together. Don’t you agree?

The problem is that this is incorrect. NinjaTrader doesn’t actually combine the results like you’d think. The trader still would have made roughly that money. However, all the statistics aren’t quite correct.

To show this I recreated the exact same strategy however it will trade the ES, NQ and YM all at the same time instead of trading them separately like it does by default. These are the results when you program it into a multi-instrument strategy

Combined trading

It makes $335,915.30 which is roughly the same amount, but it has a maximum drawdown of $59,937.60 instead of the $24,560.51 it originally looked like it would be. This makes it a drawdown ratio of 5.60, which is a lot worse than the original 13.67.

If the trader decided to trade based upon the maximum drawdown of $24,560.51, they may get a nasty shock when the drawdown turns out to be twice as bad as they were expecting.

Incorrect calculations on such an important metric could jeopardize an account. You might assume that you can get away with half of the equity that’s actually required to trade the strategy. Oops?!?

The misleading statistics in NinjaTrader makes this strategy look really nice. But when the drawdown is more than double what it appeared that it would have been originally, you might get a nasty shock.

This is why it’s important to learn both your platforms and brokers limitations as early as possible. You don’t want to learn these limitations the hard way.

In a few weeks time, I’ll reveal a simple way to create multi-instrument strategies which show more accurate metrics. Stay tuned for my next article in the series.

Filed Under: NinjaTrader Tips, Test your concepts historically Tagged With: drawdown, ES, futures, margin call, NQ, portfolio allocation, YM

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 22
  • Next Page »
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 © 2021 OneStepRemoved.com, Inc. All Rights Reserved.