Communities

Join My Community at MyBloglog!
Blog Directory for Stittsville, Ontario
Environmental Activism Blogs - Blog Catalog Blog Directory

thenikkei225investor



Collective2 features

Entries in backtest (3)

Tuesday
16Mar2010

Tools of the Trade

Before going any further with my system development I decided that I need to find an internet-based tool to assist in analysis instead of attempting to do everything using EXCEL.  I believe that StockScreen123 will do the job.  It is *** FREE *** for now while it is in beta.  It is a sister site to Portfolio123, which is very excellent for stock investment portfolios.

StockScreen123 is slightly less complicated to use than Portfolio123 and has the ETF backtest features that I need.  Here is a small demonstration of this web-site's capability.  Lets say I wish to short both the long and short leveraged SP500 ETFs.  Well I can't actually short the ETFs using StockScreen123 but I can demonstrate what happens over time as they are held long.  Here is how it is done.

By entering one simple rule Ticker("SDS,SSO") it tells the screener that I wish to hold equal $ value of the ticker symbols SDS (Ultrashort SP500) and SSO (Ultralong SP500).  Now by hitting the backtest button the backtest page comes up, looking something like this.

 

It takes a maximum of five steps to setup and run the backtest.  Some of these parameters may be suitable in their default state and do not need changing.

  1. When I am in development mode I always set the slippage to zero.  Once I have a serious system I will set the slippage to something realistic.
  2. I set the price to Next Open.   This means that the backtest will use the next opening price in it's calculations.  An alternative is to use Next Close.  This means the backtest will use the closing price for the next day as opposed to opening price.  This can be a better choice as there is likely less slippage than opening price.
  3. Set the date range.  In this example I am doing a 2 year backtest.
  4. Set the rebalance frequency to 4 weeks.  This means that every 4 weeks the holdings will be adjusted so that each ETF has equal $ value.
  5. Click on the Backtest button.

The backtester then returns with a graph of performance over time and month-by-month summary in table form.

 

Note that there is a steady decline in return over time (except for the fall of 2008).  This is about as I would expect as leveraged ETFs tend to lose value over time.

As shown above the table summary gives a month-by-month accounting of the screen performance and an overall summary.

 Next post I am going to try backtesting 5 3x leveraged ETFs (long and inverse) to see if I can smooth out the decay.

All for now,

Steve

Monday
08Dec2008

Ranking System Magic

StockMarketStudent

Sphere: Related Content                                        Stumble It!

Portfolio123 ranking system magic image
Today I am going to use some Portfolio123 ranking system magic and turn a 300% backtest into a 5000%+ backtest.  
                                                                                  

Last post I ended up with a screener backtest of short term industry strength defined by


Fmedian("RSI(7)",#Industry)>60. 

The results were as shown below holding all stocks meeting the screen criteria with weekly rebalance:

Optimized results of relative strength indicator trading system

After playing around with different ranking systems I ended up settling on one called "Fourth Generation with Unfollowed Smallcaps".  The ranking system is shown below:

Details of stock ranking system

For those people that have not been reading past posts, My universe is defined as follows:

Stock universe definition for current stock screen

The ranking system consists of fundamental and technical formulae combined with user-assigned weightings.  The system applies a ranking from 0 to 100 for each stock in the universe with 100 being the best stock choice and  0 being the worst.  Using the screen backtest I can now select how many stocks I want to hold based on the ranking system.  Below is a consolidation of the backtest results for different numbers of stocks plotted in EXCEL.

Summary of stock screen backtest using various number of stocks

This is the magic of Portfolio123 ranking systems.  300% return was turned into several thousand percent returns, not including commissions or slippage, but does include a full dose of 20-20 hindsight.  So you can't expect similar results going forward.  But it does give a nice positive bias to one's trading.  This screen may be useful for short term traders wanting to identify a small number of stocks for further analysis on a weekly basis.

The following can be found on Portfolio123:

Screen:  http://www.portfolio123.com/screen_summary.jsp?mt=1&screenid=20956

Stock Universe:  http://www.portfolio123.com/screen_summary.jsp?mt=7&screenid=20173

Ranking System:  http://www.portfolio123.com/app/ranking-system/59261

Unfortunately this doesn't help me on my quest for a long term trading system... but it was a fun exercise anyways.

Now back to the grind.