TAA

A practical guide to ETF trading systems

Moderator: AFJ Garner

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

TAA

Post by AFJ Garner »

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.

Back in 2008 I wrote a book called "A Practical Guide to ETF Trading Systems" https://www.harriman-house.com/press/full/498 and I have spent a great deal of time since that date thinking about and coding simple systems to allocate assets using Exchange Traded Funds.

I have not been very consistent since that date in my own trading and investment. Having tinkered with futures and trend following for some years before my account was blown up in the Corzine inspired MF Global meltdown, I was always by nature more of a passive investor than a trader. I therefore looked more towards systems which required little maintenance.

For many years I also pondered the nature of markets in relation to physics. In particular I ventured far down the rabbit hole of randomness and determinism. I looked at chaos theory where, rightly or wrongly, it seems to have been decided that chaotic systems are unpredictable even if they are ultimately deterministic.

I decided that in my view it is impossible to predict stock prices and therefor gave up the attempt.

In trading I have always aimed to shoot the lights out - and for many years I managed this rather well. Not through any sort of skill or genius but by taking advantage of an anomaly - the market for Initial Public Offerings. Buying stock from the underwriters before issue and selling when trading commenced.

It dawned on me slowly that this sort of anomaly is necessary for successful trading and that particular anomaly did not last for a number of reasons. Trend Following in the futures markets likewise suited many and made them handsome fortunes for some years - then for a different clutch of reasons it ceased to work so well and a number of the best known CTAs went bust - or rather their funds did.

Other market anomalies continue to work but remain outside the reach of the mere mortal. Steve Cohen made staggering returns for many years but he was eventually closed down by the SEC for well documented reasons. High Frequency Trading relies on the bid offer spread and legal (?) front running but is too costly and complex for most of us.

And so on throughout the years. Traders and hedge fund managers have found a niche, they have lived and prospered from huge fees. And then their niche has disappeared and so have they. Often the managers will have acquired riches beyond dreams. Usually their investors will not have been so lucky.

If you can find such a niche, go for it.

But there is a less glamorous approach to markets for those who can not. Simple asset allocation, particularly in the stock markets. Over time, since the beginning of the industrial revolution and continuing through our current technological revolution, stock markets have shown an upward drift. Over the long term it has thus far been possible to invest and prosper by simply holding stock market assets. But this is only possible if some sort of quantitative approach is adopted since the great majority of stocks end without value.

The stock market index is such a strategy - it buys winners and sells losers.

It may be possible to better index returns using simple asset allocation strategies, tactical or otherwise. And that, these days, it what I spend my time designing.

I am not an investment adviser and I offer no financial advice. I merely express my ideas and provide computer code in support of those ideas. So if you have interest, treat my ideas and code as some sort of "education" to enrich your own thoughts and ideas. Fiddle with my code, play with the parameters.

I attach Blox for what I have rather unoriginally called TAA1. There are many unused variables in the code which I will clean up at some stage and there may be errors or absurdities in my thinking. Point them out to me. I will replace these Blox in time with cleaner versions.

In a further post over the next few days I will give some explanation of what this code is supposed to do. It was originally designed to suit the needs of a UK based fund manager who used it for his clients’ investments.

(Blox updated March 2, 2019)
Attachments
TAA Portfolio Manager .tbx
(48.26 KiB) Downloaded 426 times
TAA Entry Exit .tbx
(29.9 KiB) Downloaded 431 times
TAA_1.tbs
(664 Bytes) Downloaded 416 times
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

System Rules

Post by AFJ Garner »

TAA1

Tactical asset allocation is a dynamic investment strategy that actively adjusts portfolio allocations to different asset classes and investments within those asset classes. The momentum strategy is at the heart of this version of TAA. Momentum tends to persist both on the upside and the downside. Investments which have risen in recent times tend to carry on increasing in value as more investors follow the rising price. Those which have recently exhibited negative momentum tend to continue downwards for a further period.

TAA1 aims to rotate on a periodic basis into the best performing investments in the total potential portfolio. The object is to provide an equivalent or superior return to your chosen benchmarks with equivalent or lower volatility and drawdown
This is potentially achieved by investing in risk assets such as stocks and commodities while their momentum (return) is positive and retreating to the reserve asset (cash/bonds) during periods of market crisis.

Momentum Ranking
The system chooses the top X ranking ETFs by performance each period and invests in those X for the following period. Any existing holdings which have fallen outside the top X are sold and any new entrants to the top X category are purchased. Existing holdings which remain within the top X performers are retained. Performance is the average of the performances over 12 months, 6 months, 3 months and 1 month. Or some subset if you prefer.
By way of example if the total potential portfolio is 20 and Max Long instruments is set to 5, the top 5 performers will represent the portfolio for the next re-allocation period.
Reallocations occur on a rolling basis and not on fixed calendar dates.

Money Management
The basis of the money management strategy is equal weighting at the time the position is taken. Weighting will change with time as the value of the position increases and decreases. At each reallocation date winning positions are cut back to equal weighting while losing positions (which nonetheless have remained in the top X rank) are not increased if the parameter “Rebalance Winners Only?” is set to 2winners Only”. No rebalancing is undertaken unless an instrument is overweight by more than 5% so as to avoid undue turnover. The optional “buffer” parameter is an attempt to ensure that no leverage is used.

Profit Taking
A profit taking mechanism can be employed (as an option) to reduce volatility. On position entry we calculate the average true range of the stock over the past EG 20 days (choose your own period) in and multiply that by EG 10 (or choose your own parameter): this figure is then added to the entry price to give a profit target.
If the profit target is reached, we sell EG 75%(choose your own percentage) of the holding in that instrument and recalculate the profit target using the then latest closing price. We repeat until an exit signal is given by the normal “top X” exit rule.
Profit taking trades are permitted on any business day and are NOT restricted to reallocation days.

Trade Filters
  • Reject any trade where the momentum (performance) over the lookback period is negative. (Optional parameter – “Long Momentum Positive?”)
    Reject any trade where efficiency is below the “Efficiency Limit”. (Optional parameters Use Efficiency, Efficiency (Days), Efficiency Limit)
In other words, even if an ETF is ranked in the top X, we need not invest if its momentum is negative (I.E. it has lost value during the measurement period) or if the stock’s behaviour has been “inefficient”.
We use the “Efficiency Ratio” described by Perry Kaufman on page 134 and of his book “Smarter Trading”. Kaufman’s Efficiency Ratio has values ranging from 0 when markets are very noisy and a theoretical +1 when markets are perfectly directional.

Reserve Asset
The combined effect of profit-taking and filters is that there is usually an element of the portfolio invested in the reserve asset which is cash. During periods of market crisis, the allocation to the reserve asset can be expected to climb, while during bull markets the allocation to risk assets (stocks and commodities) will increase.

Caveat
Experiment with the parameters and different portfolios. This is not investment advice. We merely provide educational software. Back tests have severe limitations and may well not be predictive of future results. Above all inspect the code and alter it if necessary to suit your own particular requirements.
marriot
Roundtable Knight
Roundtable Knight
Posts: 365
Joined: Thu Nov 20, 2008 3:02 am

Re: TAA1

Post by marriot »

Hi Anthony,
what TradingBlox Version are you using ?
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Re: TAA1

Post by AFJ Garner »

Hi there the problem you are having is caused by a single variable. BPV Signals. It is avery small problem and Tim has fixed it for the online demonstration version of Trading Blox.

Go to https://virtual.tradingblox.net/ and enter “ETFDemo” as the license name and key.

You will be able to download amended versions of the Blox. And also test the Blox directly using the online system. Actually I would be grateful if you would do that anyway - play with the online demo version. It is something I'm working on with Tim.

Unfortunately I can not load files or I would change the Blox attached above. I don't know what the problems is and I have tried two different laptops from two different locations using two different ISPs. I get an unexplained HTTP Error.

regards
A
Post Reply