Dual Momentum

A practical guide to ETF trading systems

Moderator: AFJ Garner

Post Reply
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2075
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Dual Momentum

Post by AFJ Garner » Fri Mar 08, 2019 4:10 pm

Attached you will find a simple version of Gary Antonacci's Dual Momentum System.

Those who do not own Trading Blox can test this system using a free on-line demonstration. Go to https://virtual.tradingblox.net/ and enter “ETFDemo” as the license name and key.

The look-back for the calculation is 240 trading days and the rolling re-allocation date occurs every 30 calendar days.

Buffer is the only parameter - set to 5% the system invests 95% rather than 100% in an attempt to avoid margin.

Try it out with a risk ETF such as SPY and a non risk ETF such as SHY in the same portfolio. The latter being 1 to 3 year US Governments. At each reallocation date the system invests in the stock with the highest momentum. Provided that the system will go to cash if the top ranked stock fails to achieve the then current 3 month T Bill rate over the look back period.

I'm not sure whether dividend data is included in the ETF Demo (Trading Blox Online) but the results fail to match Antonaccis for a number of possible reasons. GA uses end month re-allocations, this system uses rolling monthly periods. GA does not account for slippage or commissions.

Anyway, try it out.

As usual please point out mistakes I may have made.
Attachments
Export Dual Momentum.zip
(5.48 KiB) Downloaded 26 times

Tomaso
Roundtable Knight
Roundtable Knight
Posts: 165
Joined: Wed May 19, 2010 7:00 am
Location: Madrid, Spain

Re: Dual Momentum

Post by Tomaso » Tue Apr 16, 2019 6:31 am

Anthony,
Why do you use unadjustedclose rather than close ?

AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2075
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Re: Dual Momentum

Post by AFJ Garner » Wed Apr 17, 2019 2:59 pm

I hope I remember correctly that if one uses the unadjusted close TB does all the math for you. It compares unadjusted with adjusted as you go along.

If I have remembered incorrectly and used the wrong series perhaps Tim will be kind enough to correct me. Easy enough to rectify. Take a look at the daily P&L printout. I seem to recall from long long ago that this was the only way to fathom out what TB was up to behind the scenes.

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1997
Joined: Wed Oct 06, 2004 10:52 am
Location: San Marcos, CA

Re: Dual Momentum

Post by Roger Rines » Wed Apr 17, 2019 5:03 pm

The difference between a Future's instrument’s current Close price and its UnAdjusted Close price is the accumulation of the difference between the current contract’s close price and the forward, or next contract a back-adjusted series that is needed to create a continuous data series.

The stitching calculations of contracts for Futures and Stocks are similar, but the reason to create adjustments is different.

In Futures, each contract’s information only exists for a limited period. Futures contracts are more effective for trading when the most liquid portion of a contract is available at the beginning of when it is used for trading and stays active until it reaches a level where the next contract become more liquid. Different Futures contracts have values that are close in price, but not the same.

When Stock instruments have a split, or a consolidations shares increase or reduce. Dividends and distributions that add value to a series and the value of the change is not paid to stock’s owner, that change needs a price adjustment to show how the value is changed.

If a data series that changes expiration or changes valuation isn’t adjusted, the data series will display moves in its prices that are not driven by market actions, but instead because a control roll didn’t adjust for a change in contracts, if the instrument is a stock, the change in shares has not been adjusted properly.

Futures contracts are adjusted to prevent the computer-based system from generating entries and exits for a price value that is most often a wrong price. When an indicator is displayed, the plotted display will show a strange price-spike up or down that is not a market-driven action.

By having the unadjusted close price available, the actual value of something on a date is always. Unadjusted values are needed when a percent calculation is needed to understand the actual rate change.

When the Unadjusted-Close is part of the data file that CSI creates after a download, and the TB Preference settings show to load the data series, Trading Blox uses the difference between the Close and the Unadjusted-Close to determine the split ratio.

There is a lot more information about how Trading Blox User’s guide Help file that the descriptions explain how data is handled.

Trading Blox User’s Guide Web Based Help Information:
https://www.tradingblox.com/Manuals/Use ... elcome.htm


Click the above link to get browser access to the User’s Guide where you can enter the word UnadjustedClose to see the many areas where information about Trading Blox data-related items are covered.

Tomaso
Roundtable Knight
Roundtable Knight
Posts: 165
Joined: Wed May 19, 2010 7:00 am
Location: Madrid, Spain

Re: Dual Momentum

Post by Tomaso » Thu Apr 18, 2019 8:13 am

Thank you both Anthony and Roger.
Regarding stocks I am not sure if the appropriate price to use it adjusted or unadjusted. I assume it makes sense to always adjust for stock splits otherwise results would be affected. Also if the system is a low turnover system the results would need to consider the adjusted close as dividends would be received during the long hold periods and they have an effect on the total return. On the other hand to calculate signals then including dividends in the adjustment would not give an accurate signal which is only based on price action.
What are your thoughts ?

Tomaso
Roundtable Knight
Roundtable Knight
Posts: 165
Joined: Wed May 19, 2010 7:00 am
Location: Madrid, Spain

Re: Dual Momentum

Post by Tomaso » Thu Apr 18, 2019 8:25 am

AFJ Garner wrote:
Wed Apr 17, 2019 2:59 pm
I hope I remember correctly that if one uses the unadjusted close TB does all the math for you. It compares unadjusted with adjusted as you go along.

If I have remembered incorrectly and used the wrong series perhaps Tim will be kind enough to correct me. Easy enough to rectify. Take a look at the daily P&L printout. I seem to recall from long long ago that this was the only way to fathom out what TB was up to behind the scenes.
Antony, I see that in your virtual blox you use only unadjusted prices as in OHLC are all unadjusted. Do you use data from CSI ? Is this what you usually use with ETF alwasys unadjusted data ?
The choice of adjusted or unadjusted seems to me like a huge impact on the functioning of the system and results.

Tomaso
Roundtable Knight
Roundtable Knight
Posts: 165
Joined: Wed May 19, 2010 7:00 am
Location: Madrid, Spain

Re: Dual Momentum

Post by Tomaso » Thu Apr 18, 2019 10:29 am

Anthony,
I am running your code on my TB and I get a lot of small exit trades every day, quantity less than 1 associated with rule "Split Remainder", has this happened to you ? I had not come across it before and don't know the reason.
Attachments
Capture.JPG

AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2075
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Re: Dual Momentum

Post by AFJ Garner » Thu Apr 18, 2019 10:44 am

If I'm using python I simply use adjusted prices including reinvested dividends from Yahoo or another such provider. For these tests I simply used the test data which comes with the installation of TB.

The data is split adjusted but has a final "unadjusted close" column used by TB. Has to be or there would be noticeable gaps. It will not be dividend adjusted since TB adds dividends in cash if you have dividend files.

Just to re-iterate you can not use ONLY unadjusted prices alone to back test with. It would make no sense - you would have great big disconnects and false profits and losses around the time a before split or consolidation occurred.

You need to read Tim's explanation on the help thread he has posted and look through the list of trades and daily P&L to see how this all works.

Back adjusting is not a simple topic - either in the futures market, or in stocks.

Tomaso
Roundtable Knight
Roundtable Knight
Posts: 165
Joined: Wed May 19, 2010 7:00 am
Location: Madrid, Spain

Re: Dual Momentum

Post by Tomaso » Thu Apr 18, 2019 1:13 pm

Thanks

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1997
Joined: Wed Oct 06, 2004 10:52 am
Location: San Marcos, CA

Re: Dual Momentum

Post by Roger Rines » Thu Apr 18, 2019 2:59 pm

Tomaso wrote:
Thu Apr 18, 2019 10:29 am
Anthony,
I am running your code on my TB and I get a lot of small exit trades every day, quantity less than 1 associated with rule "Split Remainder", has this happened to you ? I had not come across it before and don't know the reason.
Read the Split Remainder option in the Stock Parameters section:
https://www.tradingblox.com/Manuals/Use ... meters.htm

Those small transactions are likely being caused by the Sell Stock Remainder setting being set to TRUE. Mine is set to FALSE so the value of the dividend is added to the current position.

Tomaso
Roundtable Knight
Roundtable Knight
Posts: 165
Joined: Wed May 19, 2010 7:00 am
Location: Madrid, Spain

Re: Dual Momentum

Post by Tomaso » Fri Apr 19, 2019 4:06 am

Roger,
It is better with split remainder set to FALSE although
1. I have the same suite, system, blox and scripts as Anthony as well as using unadjusted data and he has his setting on true in the virtual TB and he doesn't get the small transactions.
Capture 3.JPG
Capture 4.PNG
2. I still get not rounded quantities of stock. That should not happen as you cannot buy partial share , see image. What could be happening ? Is there a setting to round up or down shares that I have not seen ?
Capture 2.PNG

Roger Rines
Roundtable Knight
Roundtable Knight
Posts: 1997
Joined: Wed Oct 06, 2004 10:52 am
Location: San Marcos, CA

Re: Dual Momentum

Post by Roger Rines » Fri Apr 19, 2019 4:37 pm

I agree with using False for Split Remainder; It is how I've set that parameter for my stock systems.

As for the fractional quantities, you are right about we are not able to order a fractional share. However, when a dividend is applied to a stock share without the ability to change its market price, the fractional quantity has to change in order for the dividends added value to influence the net trade results.

Post Reply