Category Archives: R language

Market arrows

Graphs like Figure 1 are reasonably common.  But they are not reasonable. Figure 1: A (log) price series with an explicit guide line. Some have the prices on a logarithmic scale, which is an improvement on the raw prices. The problem with this sort of plot is that two particular data points are taken as … Continue reading

Posted in Fund management in general, R language | Leave a comment

Selections from the R/Finance conference

The R/Finance conference happened in Chicago at the end of April.  If, like me, you weren’t there, you can still benefit from it because slides from many of the talks are now online. Here is a quick synopsis (in chronological order) of some of the talks I found most interesting. Michael Kane Michael Kane and … Continue reading

Posted in Quant finance, R language | Tagged | Leave a comment

Specific differences between Ledoit-Wolf and factor models

What can we learn about the difference in structure between a Ledoit-Wolf variance matrix and a corresponding factor model variance? Previously We’ve generated a set of random portfolios with constraints on the risk fractions of a Ledoit-Wolf variance matrix, and a corresponding set of random portfolios with risk fraction constraints from a statistical factor model. … Continue reading

Posted in Quant finance, R language | Tagged , , , , | Leave a comment

Again with Ledoit-Wolf and factor models

We come closer to a definitive answer on the relative merit of Ledoit-Wolf shrinkage versus a statistical factor model for variance matrices. Previously This post builds on the post entitled: A test of Ledoit-Wolf versus a factor model That post depended on some posts previous to it. New information Previously we generated random portfolios with … Continue reading

Posted in Quant finance, R language | Tagged , , , , , | 2 Comments

The R Inferno revised

Hell is new and improved. The R Inferno has been revised.  If you don’t know of it, it is a short explanation of a few trouble spots when using the R language.  Somehow the short explanation grew to approach book-length. It can be found at the usual place: http://www.burns-stat.com/pages/Tutor/R_inferno.pdf Major improvements An index has been … Continue reading

Posted in R language | Tagged , , , , , , , | 7 Comments

A test of Ledoit-Wolf versus a factor model

Statistical factor models and Ledoit-Wolf shrinkage are competing methods for estimating variance matrices of returns.  So which is better?  This adds a data point for answering that question. Previously There are past blog posts on: the idea of variance matrices factor models of variance The data in this post are from the blog posts: “Weight … Continue reading

Posted in Quant finance, R language | Tagged , , , , , | 1 Comment

Risk fraction constraints and volatility

What is the effect on predicted and realized volatility of substituting risk fraction constraints for weight constraints? Previously This post depends on two previous blog posts: “Unproxying weight constraints” “Weight compared to risk fraction” The exact same sets of random portfolios are used in this post that were generated in the second of these. Payoff … Continue reading

Posted in Quant finance, R language, Random portfolios | Tagged , , | Leave a comment

Weight compared to risk fraction

How well do asset weight constraints constrain risk? The setup In “Unproxying weight constraints” I claimed that many constraints on asset weights are really a proxy for constraining risk. That is not a problem if weights are a good proxy for risk.  So the question is: how good of a proxy are they? To give … Continue reading

Posted in Quant finance, R language, Random portfolios | Tagged , , | Leave a comment

The devil of overfitting

Overfitting is a problem when trying to predict financial returns.  Perhaps you’ve heard that before.  Some simple examples should clarify what overfitting is — and may surprise you. Polynomials Let’s suppose that the true expected return over a period of time is described by a polynomial. We can easily do this in R.  The first … Continue reading

Posted in Quant finance, R language | Tagged , | 8 Comments

Factor models of variance in finance

In “What the hell is a variance matrix?” I talked about the basics of variance matrices and highlighted challenges for estimating them in finance.  Here we look more deeply at the most popular estimation technique. Models for variance matrices The types of variance estimates that are used in finance can be classified as: Sample estimate … Continue reading

Posted in R language, Risk | Tagged , , , | 10 Comments