Periodic Rebalance Fixed Percentage

A practical guide to ETF trading systems

Moderator: AFJ Garner

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

Periodic Rebalance Fixed Percentage

Post by AFJ Garner » Sun Mar 03, 2019 2:00 pm

This system is useful for testing the classic 60/40 Stocks Equities portfolio and for asset allocations like Harry Browne's "Permanent Portfolio" https://www.investopedia.com/terms/p/pe ... tfolio.asp

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.

I also attach a portfolio for Harry Browne's asset allocation mix consisting of Gold (GLD), Short Term Treasuries (SHY), Ten Year US Government Bonds (TLT) and equities (SPY).

The Permanent Portfolio is an investment portfolio designed to perform well in all economic conditions. It was devised by investment analyst Harry Browne in the 1980s. The permanent portfolio is composed of equal allocations of stocks, bonds, gold and cash or Treasury bills.
Again, it's simple basic stuff as is the underlying code. Once again, the re-allocation periods are rolling rather than month or week end.

Rolling Allocation Start. Experiment with the parameter "Rolling Allocation Start" - a setting of zero and a choice of “annual” as "Reallocation Timing" will provide a first re-allocation date of 365 days following the test start date. A setting of 15 would provide a first rebalance date of 365 + 15 days after the test start date. And so on.

Percentage Allocation Stocks. Portfolios take up to 4 stocks. The parameters “Percentage Allocation Stocks 1” through 4 enable you to set fixed allocations for the initial investment and for each rebalancing date. Stocks are sorted alphabetically and "called" in alphabetical order each day by the backtester. So in a portfolio consisting of GLD, SHY, SPY, TLT place the desired fixed percentage allocation for GLD in Percentage Allocation Stocks 1, SHY in the next box and so on.

Adjustment Threshold – a setting of 0 provides that each stock will be rebalanced regardless of how overweight or underweight it is on the rebalance date. A setting of 5% means that a stock will only be rebalanced if it is more that 5% overweight or underweight.

Rebalance. The parameter “Rebalance?” will rebalance the portfolio at the set periodic dates if set to “Yes” and will provide a buy and hold system if set to “none”.

Buffer is an attempt to prevent margin. If set to 5% for instance, then only 95% of the allocation will be bought. The difference between the prices at which the allocations or reallocations are calculated and then executed will differ. Hence you might want to include some sort of buffer to prevent possible over allocation.

Simple stuff, but in my experience, simplicity is not to be despised. Simple systems will outlast and outperform the most complex and profitable hedge funds over the long term.

Incidentally on bonds, my research using over 100 years of bond prices suggests that rising rates will be little problem provided the rise happens in a reasonably controlled and spread out fashion. Most of the return on bonds (90%) is from coupon not price and a loss on price in a rising rates environment is likely to be compensated by higher coupons as bonds are rolled over.
Attachments
Export Periodic Rebalance Fixed Percentage.zip
(6.06 KiB) Downloaded 24 times

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

Re: Periodic Rebalance Fixed Percentage

Post by Tomaso » Wed Apr 03, 2019 6:38 am

Thank you for your generous work. I have been coding TAA strategies for a while and your code has given me some very useful ideas on how to improve what I have done and make the code more elegant.
I am struggling with rebalancing on a suite level. If you were to combine some of the systems you have coded into a sigle suite, how would you periodically rebalance amongst the systems themselves rather than only amongst the assets within a system ?
I assume one would have to use a GSS ? Is there somewhere you could point me to ideas on how to code that ?
Regards

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

Re: Periodic Rebalance Fixed Percentage

Post by AFJ Garner » Wed Apr 03, 2019 3:08 pm

You are most welcome.

"I assume one would have to use a GSS ?"

Yes, I think you are right and no, I'm not sure I have looked at that in recent years but I imagine there will be other posts in the help section showing you how to do this.

If you get stuck, you could take the equity curve output from each system and make it into a "stock". Make it into OHLC format with volume, adjusted close and whatever is required by TB. Then make a portfolio of these equity curves simply treating them as ordinary stocks.

Then run any of these systems on that portfolio.

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

Re: Periodic Rebalance Fixed Percentage

Post by Tomaso » Thu Apr 04, 2019 6:03 am

thanks

Post Reply