Beating Benchmarks with No Skill*

(* How full scale optimization can outperform an established index)
Another deployment of Full Scale Optimization, this time to a bond portfolio of 4 ETFs:
  • AGG iShares Barclays Agg with between 20-60% bounds.
  • TIP iShares TIP bonds 10-50%
  • TLT iShares 20 year treasuries 0-30%
  • LQD iShares Investment Grade Corporates 0-30%
The portfolio is constrained to have the AGG +TIP allocation to be between 40-95%.
The portfolio is rebalanced quarterly. The FSO should be able to handle the large tails in the 20 year Treasury and the Corporates. For this exercise, we do not constrain the duration – we are interested in seeing if the use of the full distribution of returns and an asymmetric utility function suffices for limiting downside risk.
As in Lochoff 1998, the benchmark is the Barclay (Lehman) Aggregate bond index.   Where Lochoff used the historical means and returns to construct a duration matched portfolio that shorts the risk free and goes long (with leverage) on short duration assets – say from three months to 3 years.   I also use historical data but in contrast employ an S-shaped utility function to state my relative preference for a return distribution.  We use Utility =I(x>0)* x^m- L*I(x<0)*(-x)^m with (L,m) = (2,.95), (2,.8) and (3,.95) and feed it to our FSO.  That is we have an asymmetric preference, we dislike a negative outcome 2-3 times the magnitude of a positive outcome.   Distributions with negative tails then need considerable mass on the positive side to compensate for the tails.  See Cremers, Kritzman and Page 2004, Adler and Kritzman 2005 and Hagströmer 2007 for details of FSO and the S-shaped utility function.  We then equal weight each of the 3 allocations.
                           Downside  Return/    Return/
         Mean      Stdev    Stdev     Stdev     Downside Stdev
AGG     0.0600    0.0657    0.0580    0.9131    1.0337
Port    0.0829    0.0747    0.0513    1.1089    1.6167

Portfolio Beta: .871
  Results Table: For out of sample period March 2007 to May 13,2012
The results  are encouraging, as the Risk/Return is improved over the benchmark, the slightly higher risk is actually a lower downside risk, with strong Sortino ratios.  We did not remove the daily risk free rate – this is a quick blog post after all.   For most of this period it was quite small.

 

 

Returns to the assets

 

Tails of the asset returns

 

Rolling Allocations

 

Strategy and Benchmark returns

 

 

Referenced Papers:
Adler, Timothy and Kritzman, Mark, Mean-Variance versus Full-Scale Optimization: In and Out of Sample .  MIT Sloan Research Paper No. 4589-05.  Available at SSRN: http://ssrn.com/abstract=881813
Athayde, Gustavo M. de, and Renato G. Flôres, Jr. (2003). Incorporating skewness and kurtosis in portfolio optimization: a multideminsional efficient set. In Stephen Satchell and Alan Scowcroft, eds., Advances in Portfolio Construction and Implementation. Oxford: Butterworth-Heinemann.
Chopra Vijay. K., and William T. Ziemba. (1993). The effect of errors in means, variances, and covariances on optimal portfolio choice. Journal of Portfolio Management, Winter, 6-11.
Cremers, Jan-Hein, Kritzman, Mark and Page, Sebastien, Optimal Hedge Fund Allocations: Do Higher Moments Matter? (September 3, 2004). Revere Street Working Paper No. 272-13. Available at SSRN: http://ssrn.com/abstract=587384
DeMiguel, Victor and Nogales, Francisco J., (2007). Portfolio Selection With Robust Estimation. Available at SSRN: http://ssrn.com/abstract=911596
Hagströmer, Björn, Anderson, Richard G., Binner, Jane M., Elger, Thomas and Nilsson, Birger, Mean-Variance vs. Full-Scale Optimization: Broad Evidence for the UK (May 2008). FRB of St. Louis Working Paper No. 2007-016D. Available at SSRN: http://ssrn.com/abstract=979811
Lochoff, Roland, Beating the Bond Market with No Skill, JPM, FAll 1998. Available at: http://www.northinfo.com/documents/130.pdf
Maringer, Dietmar, Parpas, Panos, Global Optimization of Higher Order Moments in Portfolio Selection, Journal of Global Optimization, 2009, 23:2-3, p. 219-230.
Posted in Behavioral Finance, matlab, Uncategorized | Tagged , | Leave a comment

Risk Appetite Indicator

The Risk Appetite Indicator (RAI) is constructed by aggregating several measures of risk across a universe of global large cap stocks traded in on the NYSE, and NASDAQ. As well as a set of hedging assets including:
  • Equity markets Indexes
  • Bonds Indexes, the Barclay AGG, ten year and Short term treasury and a few others
  • FX: JPY, CHF, GBP, EUR against the USD.
  • Others like the VIX, OIL, Emerging markets, REITs
The Indicator is makes use of the construction methodology in Stock and Watson 2004,  Combination forecasts of output growth in a seven country data set, as well as the more recent paper by Rapach, Strauss, and Zhou, Out-of-sample equity premium prediction: Combination forecasts and links to the real economy and a working paper Ibisevic, Snijder, Lai, and Zhang, Combining forecasts: Improved approach and analysis of various frameworks

The distribution of QRAI exhibits a tri-modality.
Peaks corresponding to a normal regime, a quiet regime and a bull run regime.

 

RAI distribution

Distribution of Risk Appetite Index is multi-modal

 

 

mixture of three gaussians

The Index plotted against S&P500 returns and estimates of the three states

 

 

Risk Appetite Index Results

 

The Index is used to enter and exit the S&P500 when the level of the index is low. The Anatolyev & Gerko test of Expected Profitability is employed as well as a related regression that shows the profitability of both the long and short legs of the strategy.

RAI index and long short returns to conditioning on RAI

 

Anatolyev Gerko EP Statistic

Ordinary Least-squares Estimates
Dependent Variable =           SP500  
R-squared      =    0.0106
Rbar-squared   =    0.0101
sigma^2        =    0.0002
Durbin-Watson  =    2.1638
Nobs, Nvars    =   2103,     2
***************************************************************
Variable      Coefficient      t-statistic    t-probability
const            0.002848         4.599309         0.000005
qri EP           0.002938         4.743630         0.000002
Posted in Econometrics | Tagged | Leave a comment

Full Scale Optimization with REITs

As an exercise to demonstrate he usefulness of Full Scale optimization, (FSO), I examine a three asset problem combining REITs, the S&P 500 and the ten year treasury. The example demonstrates the differences between the use of FSO and mean variance (MV). As the name implies, the approach examines the full distribution of returns and assigns a utility to a set of returns. In contrasts, MV parametrizes the returns and then constructs a utility on that assumed normal set of returns. Kritzman, Adler find that FSO can be quite useful when asset returns are non-normal, and in particular in the construction of hedge fund portfolios. Hagstromer finds that the usefulness extends to stock selection, where the distributional assumptions are less of a concern. The REITs are the NARIET US Index weekly going back to January 13, 1995 to October 29, 2010. The returns are total returns. Our interest is to examine how the two approaches differ when REITs falter in 2007.

The returns to the NAREIT, S&P500 and 10 year treasury.

The three assets have quite different tails.

The distributions of the three assets show the large tails in the REITs and the relative safety of the Ten year. We use the S-shaped utility function as our canonical utility function. It is asymmetric and defined as follows. For returns less than a threshold – zero in our case – the utility is 1.5*Loss^.95 for gains it is Gains^.95. Here is an image of the S-shaped utility for each allocation of (REITs, 10 year, SP500) when the exponent is .5. Quite difficult to do gradient descent.

The S-shaped Utility for our problem when exponent is .5 presents an issue to traditional gradient descent.

The MV optimization use a RAP of .5 on annualized returns. We allow the covariance to be based on an expanding window, and an exponentially weighted moving average with lambda = 99.5. The portfolio construction limits the maximum weight to 85% of the portfolio, and the weights sum to one.

The time series of allocations for all four portfolios differs dramatically across MV and FSO

The optimization RAP and the S-shaped asymmetry were chosen so that the two approaches yielded similar realized portfolio returns. Here we show the portfolio performance for our four cases, FSO and MV with expanding (F for full) and ewma weighted (V for varying) windows. The annualized returns are comparable, the downside variance is slightly better for the FSO’s and consequently the Sortinos are better. We also show the 1/N portfolio.

Portfolio returns for each way of constructing portfolios gives the advantage to FSO

The time series of portfolio weights is quite different between the FSO and MV runs. The weights in the FSO portfolio can be quite different than 1/N and the change in portfolio weights around July of 2007 were dramatic – away from REITs and into the 10 year in a classic flight to quality.
While the performance differences are small the tails are different. Here I show the realized average shortfall below -1%. The FSO distributions have smaller left tails and this is significant at the 2% level for the Kolomogorov- Smirnov distance test.

The fatter tails in the MV optimizations are significantly different from their FSO counterpart using a KS test. Never mind the 1/N which isn't in the same ballpark.

References:
Adler, Timothy and Kritzman, Mark, Mean-Variance versus Full-Scale Optimization: In and Out of Sample . MIT Sloan Research Paper No. 4589-05. Available at SSRN: http://ssrn.com/abstract=881813
Cremers, Jan-Hein, Kritzman, Mark and Page, Sebastien, Optimal Hedge Fund Allocations: Do Higher Moments Matter? (September 3, 2004). Revere Street Working Paper No. 272-13. Available at SSRN: http://ssrn.com/abstract=587384

Hagströmer, Björn, Anderson, Richard G., Binner, Jane M., Elger, Thomas and Nilsson, Birger, Mean-Variance vs. Full-Scale Optimization: Broad Evidence for the UK (May 2008). FRB of St. Louis Working Paper No. 2007-016D. Available at SSRN: http://ssrn.com/abstract=979811

Maringer, Dietmar, Parpas, Panos, Global Optimization of Higher Order Moments in Portfolio Selection, Journal of Global Optimization, 2009, 23:2-3, p. 219-230.

Posted in Behavioral Finance, Code, matlab | Leave a comment

Toeplitz matrices as families of shrinkage covariance estimators

Structure of the eigenvalues for the Toeplitz matrix

My current project requires that I examine the risk of a large number of portfolios so I need to create some sensible estimates of risk.  Which in part, means looking for robust shrinkage estimators of covariance matrices.  A requirement is that the resulting matrices are stable to random perturbations.  Specifically if I add a little random noise, I should still get nearly the same answer. So I turn to Toeplitz matrices, with some cool results.

To see which matrices and transformations of matrices are stable, it helps to start with some very structured matrices that look like risk covariances, and therefore allow us to examine if all that structure is preserved when we kick them with some random data. We use Toeplitz matrices – like risk model covariance matrices, they are symmetric can be shown to have real eigenvalues and in some special cases, their eigenvectors have closed form solutions.

It is also known that certain Toeplitz matrices can be proven to have eigenvectors that are periodic.

So I start with a very simple diagonal Toeplitz matrix

Nth=2^9;
bx=[2*Nth:-2:1]/(2*Nth);
vcv=toeplitz(bx.^4);
image(vcv)

The eigenvectors have a lot of structure, this is the first image in this post above. The eigenvalues are unremarkable and not the story here. For the record, the eigenvalues are real and well behaved in our examples.

[ev,ed] = eig(vcv);
image(ev);

Even if we preturb the matrix with random data

vcvDr= vcv + 1e-8*rand(Nth,Nth); [evDr,edDr] = eig(vcvDr); vcvDr2= vcv + 1e-3*rand(Nth,Nth); [evDr2,edDr2] = eig(vcvDr2);

Symmetric Toeplitz matrix


The first five eigenvectors are well behaved under perturbation

The first of four plot shows the first 5 eigenvectors of the original matrix, then to the right are the eigenvectors of a disturbed matrix vcvDr where we add a random perturbation on the order of 10^-8. The bottom left is another larger random perturbation of size 10^-3. Finally we show the difference in absolute value for the entries in the first five eigenvectors. We use absolute value as the eigenvectors are unique up to sign differences. No problem with stability here. What is notable is that this is similar to Ledoit-Wolf where the diagonal is also constant – they use a market weighted average variance.  The off-diagonals in Ledoit-Wolf are average covariance. Here the off-diagonals are not constant but allow for the linkages between assets to fall off as matrix polynomial – here we just show the 4th power. So the matrix allows for some assets to be tightly coupled and others to be decoupled.  In fact the design lends itself to be decomposed into blocks where the blocks could be asset class covariances.

Those of you who have dealt with fixed income risk models know that this tightly coupled group is difficult to work with. One answer is to only use a few say three principal components.  All good and fine, what I am addressing allows for that but more to the point, the stability issue can hit the largest eignevalues and vectors. Another reason to consider the stability question is that the use of a toeplitz matrix with noise allows you to explore the structure that is preserved as you add random noise.

When we allow for the Toeplitz design to be relaxed and allow for the main diagonal to vary exponentially – that is allowing for a parametrized variance where some assets are substantially more volatile than others, then we need to ask about stability. First with an exponent of .995:
for ith= 2:Nth
for jth= ith:Nth
vcvD(ith,jth) = xpwt*vcvD(ith-1,jth-1);
vcvD(jth,ith) = vcvD(ith,jth);
end
end
figure; imagesc(vcvD)

The eigenvalues are structured, but now their is an exponential decay together with the periodicity.  We also see that the addition of noise leaves the eigenvalues stable.

The symmetric weighted exponential matrix (.995)

Structure of the eigenvectors for the symmetric weighted exponential matrix (.995)

The eigenvalue structure for the first five ev's. (lambda=.995)

When we allow for an exponent of .985, the decay is large and the matrix looks quite different.

The eigenvalues however are still quite similar.  So are the perturbed eigenvectors, but the noise is apparent and of the same scale as the vector coefficients. If you are thinking of using shrinkage estimates that vary along the diagonal you should be mindful of this result.

Symmetric weighted exponential matrix (lambda=.985)

Structure of the eigenvalues (lamda=.985)

The random noise affects the largest eigenvectors

The matlab code for this:
Nth=2^9;
bx=[2*Nth:-2:1]/(2*Nth);
for xpwt = [1.0 .995 .985]
vcv=toeplitz(bx.^4); [ev,ed] = eig(vcv);
vcvD = vcv;
for ith= 2:Nth
for jth= ith:Nth
vcvD(ith,jth) = xpwt*vcvD(ith-1,jth-1);
vcvD(jth,ith) = vcvD(ith,jth);
end
end
figure; imagesc(vcvD)

%
[evD,edD] = eig(vcvD);
vcvDr = vcvD + 1e-8*rand(Nth,Nth); [evDr,edDr] = eig(vcvDr);
vcvDr2= vcvD + 1e-3*rand(Nth,Nth); [evDr2,edDr2] = eig(vcvDr2);
[ntoss,ndx]=sort(diag(edD),'descend');
[ntoss,ndxr]=sort(diag(edDr),'descend');
[ntoss,ndxr2]=sort(diag(edDr2),'descend');
figure; imagesc(min(max(evD(:,ndx),-.07),.07))

figure
subplot(221); plot(evD(:,ndx(1:5))); axis([1 Nth -.07 .07])
subplot(222); plot(evDr(:,ndxr(1:5))); axis([1 Nth -.07 .07])
subplot(223); plot(evDr2(:,ndxr2(1:5))); axis([1 Nth -.07 .07])
subplot(224); plot([abs(evD(:,ndx(1:5))) - abs(evDr2(:,ndxr2(1:5)))]); axis([1 Nth -.07 .07])
end

References
A. Bottcher and S.M. Grudsky, Toeplitz Matrices, Asymptotic Linear Algebra, and Functional Analysis, Birkhauser, 2000.
A. Bottcher and B. Silbermann, Introduction to Large Truncated Toeplitz Matrices, Springer, New York, 1999.
W. Cheney, Introduction to Approximation theory, McGraw-Hill, 1966.
T. A. Cover and J. A. Thomas, Elements of Information Theory, Wiley, New York, 1991.
P. J. Davis, Circulant Matrices, Wiley-Interscience, NY, 1979.
D. Fasino and P. Tilli, “Spectral clustering properties of block multilevel Hankel matrices, Linear Algebra and its Applications, Vol. 306, pp. 155–163, 2000.
F.R. Gantmacher, The Theory of Matrices, Chelsea Publishing Co., NY 1960.
R.M. Gray Toeplitz and Circulant Matrices: A review. 206, Now Publishers
R. M. Gray, “On the asymptotic eigenvalue distribution of Toeplitz matrices,” IEEE Transactions on Information Theory, Vol. 18, November 1972, pp. 725–730.
Ulf Grenander and Gabor Szego, Toeplitz forms and their application, American Mathematical Soc., 1984
Lloyd Nick Trefethen and David Bau, Numerical Linear Algebra, SIAM 1997
W. F. Trench, “Asymptotic distribution of the even and odd spectra of real symmetric Toeplitz matrices,” Linear Algebra Appl., Vol. 302-303, pp. 155–162, 1999.
W. F. Trench, “Absolute equal distribution of the spectra of Hermitian matrices,” Lin. Alg. Appl., 366 (2003), 417–431.
Posted in Code, matlab, Matrix Algebra | Tagged , , | 1 Comment

DEMOBEP a differential evolution, multi-objective optimizer with bootstraped parameter estimates

DEMOPEGDEMOBEP explores portfolio construction with Monte Carlo methods.
The first random aspect of the design is differential evolution of a Full Scale Optimization.

Unlike earlier DE literature[1], our approach combines a Pareto preference approach present in the Multiple Objective Optimization literature.  The darker red in the graph represents the most preferred portfolios.

The DE algorithm uses the information in candidate solutions that lie outside of the constrained solution space by breaking the objective into multiple objectives with a Pareto preference relation. Finally, shortcomings of using historical data to estimate parameters like the expectation and uncertainty of the Utility terms is addressed by employing the block bootstrap and Bayesian aggregation (bagging) the statistics of interest.

[1] Krink and Paterlini have also combined the two. My contribution extends the approach by incorporating parameter uncertainty adding dramatically to the computational burden.

References
Abbass, H.A., and Ruhul Sarker, (2002). Pareto Differential Evolution Algorithm, International Journal on Artificial Intelligence Tools, 11, 4, 531-552.
Abbass, H.A., Ruhul Sarker, and Charles Newton, (2001) PDE: A Pareto-frontier Differential Evolution Approach for Multi-objective Optimization Problems, Congress on Evolutionary Computation (CEC’2001), Seoul, Korea, 971-978.
Athayde, Gustavo M. de, and Renato G. Flôres, Jr. (2003). Incorporating skewness and kurtosis in portfolio optimization: a multideminsional efficient set. In Stephen Satchell and Alan Scowcroft, eds., Advances in Portfolio Construction and Implementation. Oxford: Butterworth-Heinemann.
Athayde, Gustavo M. de, and Renato G. Flôres, Jr. (2004). Finding a maximum skewness portfolio–a genesolution to three moments portfoliochoice.” Journal of Economic Dynamics and Control, vol. 28, issue 7, 1335–1352.
Best, Michael J., and Robert R. Grauer. (1991). On the Sensitivity of Mean-Variance-Efficient Portfolios to Changes in Asset Means: Some Analytical and Computational Results. The Review of Financial Studies, January, 315-342.
Black, Fischer, and Robert Litterman. (1992). Global Portfolio Optimization.” Financial Analysts Journal, September/October, 28-43.
Breiman, Leo. (1996). Bagging Predictors. Machine Learning, 24.
Brinson, Gary P., L. Randolph Hood, and Gilbert L. Beebower. (1986). Determinants of Portfolio Performance Financial Analysts Journal, July/August, 39-44.
Ceria, Sebastian, and Robert Stubbs (2005). Incorporating Estimation Error into Portfolio Selection: Robust Efficient Frontiers. Axioma, Working Paper.
Chopra Vijay. K., and William T. Ziemba. (1993). The effect of errors in means, variances, and covariances on optimal portfolio choice. Journal of Portfolio Management, Winter, 6-11.
DeMiguel, Victor and Nogales, Francisco J., (2007). Portfolio Selection With Robust Estimation. Available at SSRN: http://ssrn.com/abstract=911596
Davidson, Russell and Emmanuel Flachaire, (2000). The Wild Bootstrap, Tamed at Last, Econometric Society World Congress 2000 Contributed Papers 1413, Econometric Society.
DiBartolomeo, Dan. (1991). Estimation Error in Asset Allocation. Available at http://www.northinfo.com/documents/42.pdf
DiBartolomeo, Dan. (1993). Portfolio Optimization: The Robust Solution. Prudential Securities Quantitative Conference. Available at http://www.northinfo.com/documents/45.pdf
Ferrari, Davide and Paterlini, Sandra, (2010) Efficient and Robust Estimation for Financial Returns: An Approach Based on q-Entropy. Available at SSRN: http://ssrn.com/abstract=1906819
Giacomini, Rafaella, Dimitri Politis and Hal White: A Warp-Speed Method for Conducting Monte Carlo Experiments Involving Bootstrap Estimators. submitted to Econometric Theory
Grinold, Richard. (1999). Mean-variance and scenario-based approaches to portfolio selection, Journal of Portfolio Management 25(2), 10-22.
Guidolin, Massimo and Allan Timmermann (2005). International asset allocation under regime switching, skew and kurtosis preferences, Federal Reserve Bank of St. Louis Working Paper
Herold, Ulf, and Raimond Maurer. (2003). Bayesian Asset Allocation Analysts Journal, November/December, 54-65.
Jobson, David J., and Bob Korkie. (1980). Estimation for Markowitz Efficient Portfolios. Journal of the American Statistical Association, Vol. 75, September, 544-554.
Jobson, David J., and Bob Korkie. (1981). Putting Markowitz Theory to Work. Journal of Portfolio Management. Summer, 70-74.
Jorion, Phillipe. (1992). Portfolio Optimization in Practice. Financial Analysts Journal, January-February, 68-74
Kahnemann, Daniel and Amos Tversky. (1979). Prospect theory: An analysis of decision under risk, Econometrica 47(2), 263-291.
Krink, Thiemo and Sandra Paterlini, (2008). Differential Evolution for Multiobjective Portfolio Optimization. CEFIN Working Paper No. 7, Available at http://www.cefin.unimore.it/sites/default/files/krink_paterlini.pdf
Idzorek, Thomas M. (2005). Monte Carlo Simulation in EnCorr, Ibbotson Research Paper, Ibbotson Associates Fall.
Markowitz, Harry M. (1952). Portfolio Selection. The Journal of Finance, March, 77-91.
Markowitz, Harry M. (1959). Portfolio Selection: Efficient Diversification of Investments. New York: Wiley.
Politis, Dimitri and Joseph Romano, (1994). The Stationary Bootstrap. Journal of the American Statistical Association, Vol. 89, December, 1303-1313.
Politis, Dimitri and Hal White, (2004) Automatic block-length selection for the dependent bootstrap, Econometric Reviews, vol. 23, no. 1, pp. 53-70
Politis, Dimitri, Andrew Patton, and Hal White, (2009) CORRECTION TO “Automatic Block-Length Selection for the Dependent Bootstrap” by D. Politis and H. White’, Econometric Reviews, Vol. 28, Issue 4, pp. 372-375
Scherer, Bernd, (2010) A New Look at Minimum Variance Investing. Available at SSRN: http://ssrn.com/abstract=1681306
Stein, C. (1955) Inadmissability of the Unsual Estimator for the Mean of a Multivariate Normal. Distribution, Proceedings of the 3rd Berkeley Symposium on Probability and Statistics. Berkeley, CA., University of California Press
Posted in Behavioral Finance, Econometrics, matlab | Tagged , , | Leave a comment

Falling into the Japanese Well.

(The only durable goods in demand are safes.)

Brad DeLong wrote on what a liquidity trap looks like last week. Simply put, hoarding cash is where we are. Firms are doing it, and individuals are placing assets into near zero rate deposits.  No one it seems is willing to drink the investment cool-aid. That’s the well the Japanese fell into.

Brad points to an article published by the LA times that notes that money has flooded into cash accounts, and the banks no longer want your money.  They do not have productive uses for it – it only adds to the expense of deposit insurance premiums. The cash they do have is being parked as well into Fed rates of 25 basis points.

The LA Times article cites Fed data that these deposits rose to 1.6 trillion at the end of August from about 1 trillion a year earlier.  Bank of America just announced a $5 a month fee on ATM use for accounts that do not make use of higher margin services. BNY Mellon is charging institutional clients fees on new deposits over 50 million.

Orthodox thinking would argue that near zero rates would push investors into higher risk assets in search of yield. What the present state of the world is suggesting is that forecasts of risky assets are overwhelmed by forecast uncertainty.

At least cash is a store of value, so invest in a safe. Where can one turn to help understand the current macro environment?

Sentiment and flights to safety.

Behavioral Finance. The concepts of sentiment  and  ambiguity aversion (a preference for known rather than unknown risks), are two that come to mind.  Broadly defined, sentiment is the belief that future cash flows and investment risks can deviate dramatically from rational expectations – see DeLong , Shliefer, Summers and Waldmann (1990). It is related to the idea that you can also go broke faster than the market can turn rational – what is know as the Limits to Arbitrage argument stated by Shliefer and Vishny (1995)

Lily Qui and Ivo Welch (2006) found that changes in consumer confidence can explain changes in returns to small cap stocks.  Baker and Wurgler (2003) define broader measures of sentiment and find that small volatile growth firms and distressed firms are sensitive to their measures.

Karakatsani and Salmon (2007) measure institutional sentiment and find that sentiment risk at the market level is compensated.

Hwang and Salmon 2009 find that investors herd to the market portfolio when they are confident about the future direction of the market.

Bekaert, Hoerova, Scheicher, (2009) tie sentiment to risk and create a time varying risk aversion measure.  They find that when risk aversion is high, a flight to safety occurs in their data.

If this vein of work is to be taken in the current macro environment, sentiment points to an overly pessimistic view of future expectations. Investors are in a flight to safety [1].

Flight to safety in practice. Performance across a spectrum of cash flow uncertainty.

One can look at a short list of ETFs along a spectrum of future cash flow uncertainties in light of the above mentioned papers.

On a year to date basis, the S&P500 has declined 15.08% with most of the declines since the EU crises fears reemerged and sovereign credit spreads widened in late July.

The hardest to arbitrage and hence the most sensitive to sentiment would be emerging markets and small caps. They have fallen dramatically, with Vanguards emerging ETF (VWO) down -27.98 in absolute terms or -12.9 relative to the S&P 500 and small cap (VB) down -22.64 absolute and -7.56.

Two very liquid instruments with relative cash flow certainty (recall as in Karakatsani and Salmon, investors focus on valuations in times of stress) would be the Consumer Staple ETF (VDC) and intermediate Government Bonds (VGIT). The Consumer Staples returned 0.18 absolute or 15.36 relative to the S&P, and the intermediate bonds rose 7.71 absolute and 22.79 relative.

A naked play on the flight to safety would have been to leverage the yield rally in the long bond. Using the Vanguard extended duration fund with an average maturity of 25 years returned 55.38 absolute and 70.46 relative.

How long can this risk aversion environment last and what are some implications? If the Japanese regime is an indication, it can last a while as it is structural. Martin Wolf comments in the FT that it may be time to revisit Milton Friedman’s call and bring out the helicopters and drop bags of money.

An immediate implication is that valuation models that do not incorporate sentiment, or some sensible measure of the macro environment are at a disadvantage.

References and footnotes

[1] The Fed in an attempt to continue to ease has introduced Operation Twist whereby it will purchase long tenor bonds with cash raised from sales on the short end. Twist can be viewed as an attempt to remove balance sheet risk from private entities who will sell their long duration treasuries thus freeing it up to engage in other risks. But are they in any mood to follow this course?
Baker, Malcolm P. and Wurgler, Jeffrey A., Investor Sentiment and the Cross-Section of Stock Returns (November 2003). Available at SSRN: http://ssrn.com/abstract=464843
Bekaert, Geert, Hoerova, Marie and Scheicher, Martin, What Do Asset Prices Have to Say about Risk Appetite and Uncertainty? (March 31, 2009). ECB Working Paper No. 1037. Available at SSRN: http://ssrn.com/abstract=1358848
J. Bradford DeLong, Andrei Shleifer, Lawrence H. Summers, and Robert J. Waldmann (1990), “Noise Trader Risk in Financial Markets,” Journal of Political Economy 98: 4 (August 1990), pp. 703-738.
Karakatsani, Nektaria and Salmon, Mark Howard, Sentiment and Price Formation: The Impact of Non-Linearity (February 2007). Available at SSRN: http://ssrn.com/abstract=968263
Qiu, Lily Xiaoli and Welch, Ivo, Investor Sentiment Measures (July 28, 2006). Available at SSRN: http://ssrn.com/abstract=589641
Shleifer, Andrei and Vishny, Robert W., The Limits of Arbitrage (July 1995). NBER Working Paper Series, Vol. w5167, pp. -, 1995. Available at SSRN: http://ssrn.com/abstract=225230
Posted in Behavioral Finance, Dismal Science | Tagged , | Leave a comment

Boo, Cython and Chapel

In my quest for a language, I know both what I want and what I cannot do well.
C
Perfect in terms of speed, available libraries and tools.  I also cannot keep track of pointers and allocated memory never mind threads in any parallel work. I need a language that is close to C in virtues but takes care of these things for me.
Also it should be fun to work in and easy to read.

The short list is Boo, Cython, and Chapel.

Lets take a look at doing a simple easy to parallelize task a 2D Laplace equation using Jacobi iteration in Matlab.  It takes about 205 seconds to run on my i7 using one core.

 

 

 

 

 

Boo is a static (are you a double or an integer?) extensible (you can write more Boo in Boo) inspired by C# but meant to look like Python. It gets translated to Microsofts Common Language Interface, so you can make it cooperate with C#, VB.NET.  Don’t like to compile? try booish for an interpreter for small bits of code.
Boo’s support for parallel constructs is the Microsoft Task Parallel Library in .Net, still not much in the way of existing code.

Cython is also static, but with dynamic roots as one can write in Numpy (Numerical Python) or PyPy (Python implementation with a fast JIT compiler)
before modifying the code by declaring types everywhere.  It gets translated to C and then compiled.  A reasonably close implementation of our example shows just how fast Cython can be – Numpy is about as fast as Matlab, Cython 10 times faster and on par with C.  Also easy to read.  Looks like a winner as the C code is abstracted away by the translator. Sayonara malloc.  I should mention that a self tuning GPU toolkit PyCUDA is available from Andreas Klockner, a former student of Chi-Wang Shu of Brown’s Division of Applied Math.

Chapel is remarkably easy to read and hides most of the details so for instance message passing is a hidden detail.  Generally you can write pretty high level code, and then write details as the need arises.  Here is the full implementation in  Chapel for the GPU multiple core CPU is quite similar.  In terms of speed, 10 to 30 times faster than Matlab, and quite honestly not much to do from a coding perspective. Secondly, the GPU capability is still quite new, this report being a year old will get better.

 

 

 

 

 

 

 

 

X10 gets honorable mention – think I prefer python like to Java like, but perhaps you think otherwise.

 

 

I think I will go with Cython, but play with Chapel.

Alternatively, one could recite 99 bottles of beer on the wall in each language: (have a good weekend)
Boo
C
Python
Chapel
Matlab

Posted in Code | Tagged , | Leave a comment

Ouch

Harry Markopolos, remarked before a congressional committee that:

As currently staffed, the SEC would have trouble finding first base at Fenway Park if seated in the Red Sox dugout and given an afternoon to find it.

Ouch.

It seems that a derivatives lawyer with intimate knowledge of the workings at S&P takes more words to eviscerate their work.

Naturally, before meeting with a rating agency, we would plan out our arguments — you want to make sure you’re making your strongest arguments, that everyone is on the same page about the deal’s positive attributes, etc. With S&P, it got to the point where we were constantly saying, “that’s a good point, but is S&P smart enough to understand that argument?” I kid you not, that was a hard-constraint in our game-plan. With Moody’s and Fitch, we at least were able to assume that the analysts on our deals would have a minimum level of financial competence.

Posted in Dismal Science | Tagged , | Leave a comment

After the fall

The current focus on GDP growth rates and unemployment is placed into historical perspective by Carman and Vincent Reinhart’s paper, After the Fall. They explore the period of recovery after the boom bust cycle bursts – including the Great Depression, the Oil crisis of the 70′s and the Japanese downturn. After the fall, GDP growth and housing prices are significantly lower and unemployment higher in the ten-year window following the crisis when compared to the decade that preceded it. They find broad commonality in the dynamics of these cycles, specifically the decade of relative prosperity is fueled by an expansion in credit and rising leverage that spans about 10 years; it is followed by a lengthy period of retrenchment that most often only begins after the crisis and lasts almost as long as the credit surge.

By way of contrasting opinion, Robert Shiller’s op-ed piece of last week Debt and Delusion discusses the attention focused on Debt to GDP and critizes Reinhart and Rogoff’s Growth in the Time of Debt. They find that when government debt exceeds 90% of GDP, countries suffer slower growth, losing about one percentage point on the annual rate. Shiller responds that there is nothing special about the 90% threshold. In fact GDP growth declines as Debt to GDP rises for every group (Debt to GDP under 30%, 30-60%, 60-90%, and over 90% ).

Shiller notes:

“There is also the issue of reverse causality. Debt-to-GDP ratios tend to increase for countries that are in economic trouble. If this is part of the reason that higher debt-to-GDP ratios correspond to lower economic growth, there is less reason to think that countries should avoid a higher ratio, as Keynesian theory implies that fiscal austerity would undermine, rather than boost, economic performance.”

Finally, CNBC is carrying a story on a possible QE3 mechanism of purchasing longer dated treasuries. The idea, which they attribute to RGE’s analysis of Bernanke’s July 13 report to congress, is based on the following excerpt from Bernanke’s report:

“One option would be to provide more explicit guidance about the period over which the federal funds rate and the balance sheet would remain at their current levels. Another approach would be to initiate more securities purchases or to increase the average maturity of our holdings.”

Operation Twist: purchasing longer maturities by the Fed here.

Posted in Uncategorized | Tagged , | Leave a comment

Chicago delenda est*

The news this week brings to mind an indecorous exchange between Paul Krugman and John Cochrane during the aftermath of the 2008 GFC. First Mr. Krugman:

The field was dominated by the “efficient-market hypothesis,” promulgated by Eugene Fama of the University of Chicago, which claims that financial markets price assets precisely at their intrinsic worth given all publicly available information. (The price of a company’s stock, for example, always accurately reflects the company’s value given the information available on the company’s earnings, its business prospects and so on.) And by the 1980s, finance economists, notably Michael Jensen of the Harvard Business School, were arguing that because financial markets always get prices right, the best thing corporate chieftains can do, not just for themselves but for the sake of the economy, is to maximize their stock prices. In other words, finance economists believed that we should put the capital development of the nation in the hands of what Keynes had called a “casino.” -Krugman

Here an exerpt from John Cochrane’s response:

…Krugman’s Luddite attack on mathematics; “economists as a group, mistook beauty, clad in impressive‐looking mathematics, for truth.” Models are “gussied up with fancy equations.”

Again, what is the alternative? Does Krugman really think we can make progress on his – and my – agenda for economic and financial research ‐‐ understanding frictions, imperfect markets, complex human behavior, institutional rigidities – by reverting to a literary style of exposition, and abandoning the attempt to compare theories quantitatively against data? Against the worldwide tide of quantification in all fields of human endeavor (read “Moneyball”) is there any real hope that this will work in economics?

No, the problem is that we don’t have enough math. Math in economics serves to keep the logic straight, to make sure that the “then” really does follow the “if,” which it so frequently does not if you just write prose. The challenge is how hard it is to write down explicit artificial economies with these ingredients, actually solve them, in order to see what makes them tick. Frictions are just bloody hard with the mathematical tools we have now. -Cochrane

Name calling aside, the dismal science deals with a complex system where what can be tractably modeled is far from reality. That I think is the sliver of common ground in the snipping between Messrs. Krugman and Cochrane – they then part ways and announce no math and more math.

Emanuel Derman, having been both a physicist and a financial practitioner, offers a more pragmatic view. Models are there to make predictions, but also to define their own limitations:

Our experience in the financial arena has taught us to be very humble in applying mathematics to markets, and to be extremely wary of ambitious theories, which are in the end trying to model human behavior. We like simplicity, but we like to remember that it is our models that are simple, not the world.

Without further ado, the Modelers Oath by Derman and Wilmott:

~ I will remember that I didn’t make the world, and it doesn’t satisfy my equations.

~ Though I will use models boldly to estimate value, I will not be overly impressed by mathematics.

~ I will never sacrifice reality for elegance without explaining why I have done so.

~ Nor will I give the people who use my model false comfort about its accuracy. Instead, I will make explicit its assumptions and oversights.

~ I understand that my work may have enormous effects on society and the economy, many of them beyond my comprehension.

___________________

* From Carthago delenda est, Carthage must be destroyed – an early political talking point.

Posted in Uncategorized | Tagged , | Leave a comment