Intro to rules based Investing – Why follow an investment strategy?

1. Basics

What is rule-based Investing?

In rules-based-investing we define a clear set of rules. These rules comprise a strategy. Here is an example strategy:

“At the first day of the month, look at the performance of bonds versus stocks by calulating the 3-month performances of two exchange traded funds, SPY (the SPDR S&P 500 ETF) and TLT (the iShares 20+ Year Treasury Bond ETF).
If SPY outperforms, then re-balance the portfolio to 60% SPY, 40% TLT. If not, rebalance to 40% SPY, 60% TLT.”

636221758037389150

 Why rules?

 It eliminates our main weakness, emotion.

Developed through years of evolution, our basic human instincts are necessary for our survival. Keeping with the laws of the jungle, these instincts push us to run when in danger and charge when we see opportunity. The stock market, much like a casino, is built to take advantage of these instincts. Investors, if left to their primitive fear/greed instincts, tend to buy high and sell low.

Continue reading Intro to rules based Investing – Why follow an investment strategy?

QUANTtrader -The Logical-Invest tool for building and backtesting Investment Strategies

Easily create and backtest a rules-based Investment strategy

QUANTtrader is a swiss-made software tool used to develop, backtest and implement rules-based investment strategies. It was initially developed by Frank Grossmann for his own personal use. After having sold two companies, Frank trades for a living and his software reflects this. QuantTrader is available from Logical-Invest.com for a monthly license.

636067738148740604

Since it is built by a trader and long-time  investor rather than by a  developer. QuantTrader’s main strength is in building medium to long term investment portfolios that are diverse, adaptive and can control risk. All this without writing a single line of code.

Continue reading QUANTtrader -The Logical-Invest tool for building and backtesting Investment Strategies

Day of month effect on Bond Equity portfolio

In this post we will:

  1. Take a look at a simple, momentum based, monthly rebalanced Equity/Bond portfolio.
  2. Search for what has been the optimal dates in the month to rebalance such a portfolio.

Each month we allocate to two ETFs: SPY and TLT.

If SPY has outperformed  TLT we rebalance to 60% SPY – 40% TLT.

If TLT has outperformed  SPY we rebalance to 20% SPY – 80% TLT.

For the first run we will re-balance on the first of the month and close at the last day of the month.

60_20_MormalRebalance_1stDay

Now will try different combinations of entry and exit days.

Continue reading Day of month effect on Bond Equity portfolio

The end of EOM? – Strategy and Rebalancing

Historically and up to 2013, equities have exhibited a positive bias during the end of the month.
Here is an example of buying the SPY etf on the first down-day after the 23rd and selling on the first up-day of the next month. Trading is at the same day close.

EOM_All

This has been well documented in academic papers as well as blogs. The main reason quoted for this persistent bias has been end-of-month window dressing.

As one of my favorite author/blogger/trader, Mr. Grøtte, has also recently blogged the EOM bias is no more.

EOM_13-15

Why is this important to know?

A lot of investors re-balance monthly. The day of the re-balance used to be somewhat important as there was an EOM bias. So it was better to ‘buy’ at the end of the month rather than at the beginning of the month. As of late (2013) this is less true.

What this means in practice is that the specific timing for re-balancing monthly strategies may be less important than it used to be.

       
//Amibroker code:
Buy=Day()>=23 AND C<Ref(C,-1) ;//AND C>MA(C,100);
Sell= (Day()<11 AND C>Ref(C,-1));
SetTradeDelays(0,0,0,0);
slip=0.00;
BuyPrice=c+slip;
SellPrice=c-slip;
posqty=Param("nUMBER OF pOSITIONS",1,1,30,1);
SetOption("MaxOpenPositions",posqty);
PositionSize=- 98/posqty;
bars = 10; // exit after 10 bars
ApplyStop( stopTypeNBar, stopModeBars, bars, True );

Do-it-yourself Investing, Quant tools and thoughts on the market