Comparison of ETFs and CEFs: Dollars Traded Per Day vs Total Assets

This picture should be pretty straightforward.  The numbers are the natural log of the average dollars traded per day YTD and the natural log of total assets held.  Note the distinct clustering of the two asset types.

Using Matlab's Database Toolbox with MySQL Connector/J

I normally don't delve too much into the programmatic details of my work, but I've seen enough interest in this topic that I figured I'd lend a helping hand to those fellow frustrated souls.

There are a few awkward, non-native MEX implementations of various database interfaces.  However, Matlab has its own database toolbox built around ODBC/JDBC, and when developing distributable software, one always hopes to minimize third-party library usage.  As a result, I've put a good deal of effort into integrating Matlab with both MySQL and SQLite.  In fact, the data for every post on this site is stored in a 2GB MySQL database server running on my laptop.

As you can see, this requires only that you distribute the platform-independent JAR.  No DLLs, no MEX compilation.

% Database Server
host = 'localhost';

% Database Username/Password

user = 'user';
password = 'password';

% Database Name
dbName = 'assets'; 

% JDBC Parameters
jdbcString = sprintf('jdbc:mysql://%s/%s', host, dbName);
jdbcDriver = 'com.mysql.jdbc.Driver';


% Set this to the path to your MySQL Connector/J JAR
javaaddpath('mysql-connector-java-5.1.6-bin.jar')

% Create the database connection object
dbConn = database(dbName, user , password, jdbcDriver, jdbcString);

% Check to make sure that we successfully connected
if isconnection(dbConn)
    % Fetch the symbol, market cap, and last close for the 10 largest
% market cap ETFs
    result = get(fetch(exec(dbConn, 'SELECT info.symbol,info.marketcap,series.close FROM info, series WHERE info.type=''ETF'' AND info.id = series.symbolid AND series.date = ''2008-04-11'' ORDER BY marketcap DESC LIMIT 10')), 'Data');
    disp(result);

% If the connection failed, print the error message
else
    disp(sprintf('Connection failed: %s', dbConn.Message));
end

% Close the connection so we don't run out of MySQL threads
close(dbConn); 
 

Output:
    'SPY'     [8.2300e+010]    [133.3800]
    'EFA'     [4.5420e+010]    [ 72.6400]
    'EEM'     [2.3850e+010]    [139.3400]
    'GLD'     [1.9260e+010]    [ 91.3000]
    'QQQQ'    [1.7040e+010]    [ 44.2800]
    'IVV'     [1.6410e+010]    [133.5200]
    'IWF'     [1.2860e+010]    [ 55.2500]
    'DIA'     [1.0830e+010]    [123.3400]
    'IWM'     [1.0470e+010]    [ 68.7200]
    'VTI'     [9.7800e+009]    [132.2900]


Marketocracy ETF Portfolio: April 12, 2008

Marketocracy, in their own words, is:

"""Marketocracy Data Services is a research company whose mission is to find the best investors in the world and then track, analyze, and evaluate their trading activity. The company's affiliate, Marketocracy Capital Management, is the investment advisor for the Marketocracy family of mutual funds and uses the research generated by Marketocracy Data Services."""

This isn't an endorsement for Marketocracy, but last October, I started a portfolio there as part of the activities for a club here at the University of Michigan.  While I'd originally intended it to be allocated strictly from the Select Sector SPDR ETFs, Marketocracy rules led me to increase the scope of the fund to include commodities, currencies, and geography-based ETFs.

You can view the portfolio performance at this link: www.marketocracy.com/cgi-bin/WebObjects/Portfolio.woa/ps/FundPublicPage/source=DeDoDkLbEhAdLcIhMaKiAbDd

Mine m100 S&P 500 DJIA Nasdaq
  RETURNS S&P500 RETURNS RETURNS VS S&P500
Last Week  -1.80% -2.69% 0.88%
Last Month  3.36% 1.98% 1.39%
Last 3 Months  0.42% -4.36% 4.78%
Last 6 Months  -2.34% -13.76% 11.42%
Last 12 Months  N/A N/A N/A
Last 2 Years  N/A N/A N/A
Last 3 Years  N/A N/A N/A
Last 5 Years  N/A N/A N/A
Since Inception  -1.63% -12.48% 10.85%
(Annualized)  -3.08% -22.38% 19.31%

 

 

 

 

 

 

 

 

 

 

My largest positions at the moment are DUG @ 14%, SHV @ 11%, UPW @ 7%, and EWA @ 5%.  I doubled my exposure in DUG, the double short Oil & Gas fund, this week as it hit a new 52-week low, despite downgrades in both the funds' constitutents and projected consumption.  I'll be looking to lighten the position in the short-term treasuries SHV in the coming month for bottom plays, possibly in the double long financials ETF UYG or some mixture of country ETFs.

Capitalization Coupling: The Dow, S&P, and Russell At Correlation Highs

Last summer, I often covered the difference in short-term performance between the Russell 2000 and S&P 500.  I suggested that the VIX, as a measure of implied volatility, was a good predictor for this capitalization premium, and that claim often held up.  I even went so far as to analyze the high-amplitude periods of this relationship.  However, as the actual volatility of volatility has increased dramatically since last fall, my suggestions have been more and more difficult to implement. 

I wanted to explore why this relationship had changed, and so I've taken a look at the Dow 30 (DIA), S&P 500 (SPY), and Russell 2000 (IWM) since 2002.  The figure below shows the cumulative return of each index ETF in the top pane.  The bottom pane shows  the trailing 100-session percentage-correlation between each pair of indexes.

One of the most striking features of these plots is that all three indexes are trading at or above their highest historical correlations on this range.  The only timespan of comparable length was during late 2002 and early 2003 as a short bear market held sway. 

The other relationship that caught my eye was that the trend in correlation between the indexes was inversely related to the overall market performance.  In other words, as the correlation between indexes fell, the markets rose on average.  Furthermore, during these falling correlation periods, the Russell often outperformed its counterparts, and vice versa in rising correlation periods.  This relationship likely reflects the fact that the capitalization premium and discount on small caps and large caps is very much a function of the strength of the economy and credit market. 

In the future, I'll be watching closely for a decline in the correlation between these indexes as a confirmation of overall market uptrend.

ProShares Ultra & UltraShort: Does 2 = 2?

ProShares has offered a variety of "Ultra" and "UltraShort" sector ETFs for more than a year now.  These funds are designed to track twice the return of the underlying index, and each corresponding long fund is created to match its corresponding short. 

There is no doubt that these ProShares offerings have been the subject of a great deal of interest.  They promise the rewards of leveraged sector returns without the headache of margin or portfolio construction, allowing profitable bets with less capital and less risk.  This might not come for free, however, and many have investigated how closely these funds track their double-return target in terms of price.  For more on that topic, I suggest this article directly from ProShares.

Instead of asking whether these funds track twice their underlying index, however, I've decided to investigate whether each pair of funds behaves as expected.  That is, given two well-constructed  index portfolios, the sum of the long fund's return and the short fund's return should equal zero.  Though the behavior of the underlying derivatives might be expected to introduce some tracking error, we should  expect to see only relatively small differences relating to the difference between price and NAV.

The following chart demonstrates the cumulative return difference between the long and short funds.

The chart demonstrates that this is far from the case.  In fact, nearly half of the sectors have seen over 20% deficits in this balance since June of last year.

Looking for explanations outside of portfolio construction leads to a believable alternative.  Charting dollar volume differences shows that almost every single sector had greater dollar volumes on the short side.  In some sectors like Materials and Real Estate, the difference in dollar flow over the past year has hit tens of billions.  It seems likely that these funds are much more valuable as insurance for the down-side than as single-sector long bets.  In other words, if investor are much more likely to bid on and bid up an UltraShort Sector insurance contract, imbalances such as these might be expected.

ETF Central Update

Since my last few updates, I've been accepted into the Masters of Financial Engineering and Applied Mathematics  Programs at the University of Michigan.  I'll be earning my undergraduate diploma in just under one month from the Maize and Blue as well , and as the term winds to an end, I hope to have more time to devote here.

Also, although I'll be attending graduate school, I'm still available for contract and part-time work.  In my academic research, I've compiled an asset database of over 11,000 stocks, mutual funds, ETFs, CEFs, and global indexes.  If you're interested in obtaining customized datasets or any of the other research services I provide, feel free to phone or email me.  You can find my CV and contact information here.

Sector Performance: March 30, 2008

The following chart represents the total percent change for each of the S&P Select Sector ETFs for the past session, week, and month.

Financials and Energy have led the market decline over the past month, returning a respective negative 8% and 7%.  In contrast to Financials, Energy showed some support last week as a draw in reserves overcame a downward revision on Exxon Mobil's projected targets.

This last week's rebound in Energy and Materials, however, is a complex result.  Given that there was little positive data last week and that the consensus calls for more recessionary-supporting data next week, the Energy and Materials sectors must be reacting to expectations on inflation and the exchange rate. 

I'll be watching for unexpected data from Monday's Chicago PMI, Tuesday's ISM, and Wednesday's Employment, Factory, or Crude releases.  Here are some of the simplest ways to use ETFs to make bets on these moves:

UYM: Double Long Materials or SMN: Double Short Materials
DIG: Double Long Oil&Gas or DUG: Double Short Oil&Gas

Note that both of those long-side ETFs have suffered from low liquidity relative to their short-side counterparts lately.  Thus, buying calls or writing puts in the underlying Select Sector ETFs XLB or XLE are alternative ways to hedge larger positions that might suffer from liquidity costs.

Constructing a Long-Volatility ETF Portfolio

As I've discussed before, the nature of the VIX and its technical dangers provide a large disincentive to ETF issuers.  In the absence of a VIX ETF, however, there remain other options to effectively purchase volatility.  Transaction costs remain a large issue in any such endeavor, and so I have constructed what is most likely the simplest option. 

The most VIX-correlated ETFs on the market are, nearly without expection, ProShares Ultra or UltraShort ETFs.  It is likely that ProShares or their managing counterparty is using volatility contracts of some type in the management of these products.  As a result, one of the most efficient proxies to volatility is to purchase equal amounts of SDS, the UltraShort S&P500 and SSO, the Ultra S&P 500.  This portfolio yields the following returns against the VIX:

VIX ETF

The daily log-return correlation squared here is 74%, and the weekly log-return correlation squared is 73%.  As I've noted in previous analysis, however, cumulative return series diverge temporarily without failure.  The daily cumulative log-return correlation squared is 64%, dropping to 58% when moving to weekly cumulative log-returns.