Ranking investment options for my self-directed RRSP

If the idea of handing your RRSP contributions over to a sales person (a.k.a. financial advisor) at a bank isn’t appealing to you, then it is time to consider your investment choices. I am about to contribute for the first time ever into my RRSP this year. So I performed my due diligence by researching and evaluating my choices. This post is a ranking of my findings.

I evaluate each investment strategy according to three criterias, in descending order of importance.

  • Risk. Will I lose sleep at night if I put all my money in it?
  • Reward. How much can I potentially gain?
  • Effort. How much time and energy do I need to spend on it?

My overall portfolio is exposed to enough risk already from my other trading activities. So my risk appetite is leaning towards a conservative approach. Also note that I factor in costs as a part of my risk assessment. I place a 40% emphasis on this criteria.

Next, I consider the return of each investment vehicle using a 40% weight. For obvious reasons.

Lastly, I prefer something that requires as little time and effort as possible. I weight this criteria at 20%. As I’ve said numerous times, I don’t like the limitations in a registered account. It is like trying to invest with one hand tied behind my back. I do not want to put much effort to manage this account because I can do better in my regular trading.

The resulting ranking of the six types of markets that I am considering for my RRSP (and TFSA) is as follows.

  1. Guaranteed savings
  2. Indices or sectors (through passive mutual funds or ETF’s)
  3. Fixed income (using a mutual fund or ETF bond index)
  4. Gold
  5. Stocks
  6. Actively managed mutual funds

One thing of note about investing in physical gold within a registered account is that it can only be done at Questrade as far as I know. Although I doubt they are the only one.

Here is the table I used to estimate this ranking. I give each category a score from 1 (bad) to 5 (good) based on my own experience and my sentiment of future market condition. So yes, it is a very crude guess at best.

Nevertheless, the table shows that my best choice is to either put my RRSP money in a savings account or invest in indices using passive mutual funds (like the TD e-Series) or ETF’s.

However, I plan to do both. I will trade indices in my RRSP and put my TFSA money in a high yield savings account.

RRSP investment choices ranking

read more

My first analysis of the S&P/TSX 60 Index

Seeing that I will be trading (not investing) the Canadian market in my RRSP, I am starting to follow the S&P/TSX 60 Index. I will adapt a method that I have been using for the S&P 500. Namely technical analysis (price), internal sentiments (depth), and intermarket analysis (breath). Nothing fancy, really. I will discuss my method and analysis in this post. The goal is not to find a holy grail trading method, but to get a feel of the ebbs and flows of the market.

Let’s review the TSX from three angles.

First is a standard price chart. As I was saying in the beginning of the month, my long term view of the TSX is still bearish. The one and only condition to invalidate my bearish outlook is that the TSX stay clear of the 12,000 resistance price level on the weekly chart. As you can see in Figure 1 below, that hasn’t happened yet despite a continuing intermediate term (in weeks) bullishness.

On the other hand, the intermediate term up move in the market is undeniable. The market has been making higher highs and higher lows for months now. So the fight continues as we wait to see which side will win. The 12,000 resistance or the relentless rally.

TSX 60 weekly

Figure 2 shows a reason for my bearishness. As the price of TSX 60 moves up in the past few months, the percentage of companies on the TSX Composite (representing over 70% market capitalization on the Toronto Stock Exchange) that are over their 200 day moving average has been forming a toppy pattern (top of Figure 2). Similarly, the 50 day moving average percentage confirms this price divergence from a shorter term perspective.

TSX internal sentiment

Lastly, I consider the dynamics between the financial and energy sectors, two of the biggest components on the TSX. Here is why I picked those two sectors.

Seeing that the financial sector is the bane of global economy in recent months, price moves in this sector represent public risk appetite. Conversely, the energy sector is the foundation of the Canadian economy. As such, I use it as a crude measure of risk aversion. So a ratio between the TSX financial index versus the TSX energy index is my way of estimating risk appetite versus risk aversion. I call this ratio my risk meter. Basically, a high value is good and a low value is bad.

Figure 3 shows that the up trend in recent months is actually confirmed by an increasing risk meter. So as much as I’ve been ringing the bear bell, this rally is legitimate so far. As such, the market is decidedly bullish in the intermediate term (as if anyone doesn’t know by now).

TSX Financial vs. Energy

In summary, my long term view is bearish but my intermediate term view is bullish. Even though a month has passed since my last peak of the TSX, things remain the same. The line in the sand at 12,000 is still being fought for.

I will not short or long the market until a clearer scenario presents itself.

read more

Considering investment options for my first RRSP

I have been fortunate enough to not have to think about taxes for the longest time. Unfortunately though, that is because of my long stay in academia plus a couple of years of a low salary research position. I didn’t have to pay much income taxes, if at all. Things are different now that I am working in a full time job with a decent pay. I am reminded of the impact of our high Canadian taxes from the missing chunk on every paycheck. That is why I am looking into what to do with my RRSP contribution lately.

Last month, I analyzed the cost-benefit of a Tax Free Trading Account. I concluded that a TFSA trading account is not worth my while for the moment. So I will probably just stash my TFSA contribution in a good old savings account for now.

That is not the case with a RRSP. One big difference that change the whole argument around with RRSP is that any contribution that I make into it is tax deductible! I won’t go into details here because I hate taxes. Refer to the Wikipedia entry on RRSP if you are unfamiliar with it.

Essentially, I am guaranteed about 30% (or your marginal tax rate) of “profit” by way of tax refund for the amount of money which I put into my RRSP account. I don’t know about you, but 30% is a massive return for me! And it’s risk free! (Technically it’s just a refund of my own money, but still)

The benefit of having a RRSP is obvious.

What I have been pondering about is where should I put my money in my RRSP? As I discussed in Benefits of trading in a TFSA account, there are many limitations to a self-directed registered account. Although there are certainly other options than just trading stocks in a registered account.

Here are the options that I have considered.

  1. Savings account
  2. Fixed income
  3. Mutual funds
  4. Exchange traded funds
  5. Individual stocks

In my next post, I will rank my preferences for each retirement investment option.

read more

How Greece bailout is affecting the Canadian markets

Parity, parity, parity. That’s all I hear about in Canada these days. The media is saying (Businessweek) that the strength in loonie is due to a higher than expected inflation data and so a possible rise in our interest rate by the Bank of Canada this year is in the cards. But that’s just part of the story.

As I was saying in my previous post, markets don’t operate in a vacuum. The biggest news so far this year on the global economy is the Greece bailout. Or more specifically, is there a bailout (WSJ) and by whom?

Greece is the 27th biggest economy according to Wikipedia. Their GDP is 24% of Canada’s. They are by no means a small country. A default of this magnitude would have a domino effect on the weak PIGS (Portugal, Ireland/Italy, Greece and Spain) countries and beyond. Traders will lose confidence if Greece is not saved. Then everyone will unload their holdings in those PIGS countries and massive selling will drive their markets even further down. A vicious cycle of downward spiral is thus formed in the short term.

Given that even a small time trader such as myself is aware of the grim consequence, it is likely that Greece will be saved. So the next question is, by whom? That is the big question which is still up in the air and fiercely debated this month.

The two candidates are the European Central Bank (ECB) and the International Monetary Fund (IMF). As far as we know, the ECB doesn’t seem to want to take the burden upon itself. The European Union isn’t doing exactly well lately, in case you haven’t noticed. Its best performing country, Germany, doesn’t want to penalize their hardworking taxpayers for the mistakes of Greece (CIA World Factbook).

So that leaves the IMF, the last line of defense for troubled economies. If the IMF bails out Greece, that means the United States is on the hook too as they are the biggest economy and backer of the IMF. Europe’s problem will become an American problem too.

More bailouts for the U.S. means more spending. Having spent trillions already pumping up the financial markets (U.S. debt clock) in the past couple of years, this would tank the U.S. dollar into the abyss.

Likewise, if the ECB confirms that they will contain the problem and that IMF isn’t involved. The Euros will tank and the dollar will rise.

But that’s just guess work for now. The one thing that’s for sure is that a massive amount of money will be spent to save Greece. Excessive money means inflation and higher cost of commodities in the long run.

Seeing that the Canadian market is heavily commodity-related and that our loonie is even known as a commodity currency, that is the reason behind why inflation is rising fast and our economy is being propped up.

Not necessarily because we are doing terrific, but because we are sitting on a pile of gold and oil. Real, tangible wealth in any kind of economy.

read more

Data Scraping the Toronto Stock Exchange: Extracting 3,660 companies’ data

One of the tasks that I’ve always wanted to make more efficient in my stock trading is the work of scanning for stocks to trade. One look at my trading strategy posts and you’ll see that I have devised many stock scanning systems in the past few years. The most recent system that I’ve used is one that uses options data to filter stocks. However, it is not automated. So it takes a lot of time to gather and analyze the data. Furthermore, the set of tools that I use is limited to U.S. stocks. Now that I have taken an interest in the Canadian stock market, I can’t seem to find any public tool that I like. Thus, I am biting the bullet now and taking my time to develop a custom system once and for all.

Before we can analyze stock data, we need to extract them first. Where better else for that than go straight to the source at TMX.com, the parent company of Toronto Stock Exchange (TSX) and TSX Venture Exchange (TSXV). TMX.com provide a list of publicly traded companies in ten Excel files. The files are divided by sectors. Each contain a number of fundamental company data, such as market capitalization and outstanding shares. So step 1 is to extract those data.

This is where I am at now. I attached the source code for an alpha/developmental release below for anyone interested. It is a working program to scrape the data from TMX.com’s files. But it’s still a work-in-progress. That’s why I am calling it a version 0.1.

The next milestone is to program a Stocks class to hold, organize, and manage all three thousand, six hundred, and sixty companies’ data. This is an easy task to do by extending the built-in dictionary class in Python. However, I haven’t gotten to that chapter yet in my scientific programming with Python learning book. I stopped at chapter 8 to work on this project. Chapter 9 is the inheritence and hierarchical material.

The goal of this project is to build an automated data scraping program for TSX and TSXV data from various sources into my computer. Once I have my data, that’s when the real fun starts.

Regarding the code below, I know that source code is useless for most people. Once the project is complete, I will compile the code into a standalone application and post it on this site. Subscribe to my RSS feed so that you can keep up-to-date with the progress of this project and my other ramblings on trading.

# extractTMX.py
# version: 0.1 alpha release
# revision date: March, 2010
# by Paul, Quantisan.com

"""A data scraping module to extract company listing excel files from TMX.COM"""

import xlrd									# to read Excel file
#import sys
from finClasses import Stock				# custom Stock class

def _verify():
	"""Verification function for a rundown of the module"""
	pass									# copy test block here when finished

def findCol(sheet, key):
	"""Find the column corresponding to header string 'key'"""
	firstRow = sheet.row_values(0)
	for col in range(len(firstRow)):
		if key in firstRow[col]: return col		# return first sighting
	else:										# not found
		raise ValueError("%s is not found!" % key)

def scrapeXLS(book):
	"""Data scraping function for TMX Excel file"""

	listingDict = {}						# dict of ('ticker': market cap)

	for index in range(book.nsheets):
		sh = book.sheet_by_index(index)

		mcCol = findCol(sh, "Market Value")
		assert type(mcCol) is int, "mcCol is a %s" % type(mcCol)
		osCol = findCol(sh, "O/S Shares")
		assert type(osCol) is int, "osCol is a %s" % type(osCol)
		secCol = findCol(sh, "Sector")		# multiple matches but taking first
		assert type(secCol) is int, "secCol is a %s" % type(secCol)
		hqCol = findCol(sh, "HQ\nRegion")
		assert type(hqCol) is int, "hqCol is a %s" % type(hqCol)

		for rx in range(1, sh.nrows):
			sym = str(sh.cell_value(rowx=rx, colx=4))		# symbol

			s = sh.cell_value(rowx=rx, colx=2)	# exchange col.
			if s == "TSX": exch = "T"
			elif s == "TSXV": exch = "V"
			else: raise TypeError("Unknown exchange value")

			mc = sh.cell_value(rowx=rx, colx=mcCol)		# market cap
			# check for empty market cap cell
			mc = int(mc) if type(mc) is float else 0

			os = int(sh.cell_value(rowx=rx, colx=osCol))	# O/S shares
			sec = str(sh.cell_value(rowx=rx, colx=secCol))	# sector
			hq = str(sh.cell_value(rowx=rx, colx=hqCol))	# HQ region

			listingDict[sym] = Stock(symbol=sym,exchange=exch,
				mktCap=mc,osShares=os, sector=sec,hqRegion=hq)
	return listingDict

def fetchFiles(fname):
	infile = open(fname, 'r')				# text file of XLS file names
	listing = {}
	for line in infile:						# 1 file name per line
		if line[0] == '#': continue			# skip commented lines

		line = line.strip()					# strip trailing \n
		print "Reading '%s' ..." % line

		xlsFile = "TMX/" + line				# in TMX directory
		book = xlrd.open_workbook(xlsFile)	# import Excel file
		listing.update(scrapeXLS(book))		# append scraped the data to dict
	return listing

#if __name__ == '__main__':					# verify block
#	if len(sys.argv) == 2 and sys.argv[1] == 'verify':
#		_verify()

if __name__ == '__main__':					# test block
	listing = fetchFiles('TMX/TMXfiles.txt')
read more