R Language

Winsorization

June 30, 2011 | Pat

Winsorization replaces extreme data values with less extreme values. But why Extreme values sometimes have a big effect on statistical operations.  That effect is not necessarily a good effect.  One approach to the problem is to change the statistical operation — this is the field of robust statistics. An alternative solution ... [Read more...]

Talking The R Journal latest release

June 24, 2011 | Pat

Volume 3/1 of The R Journal has been released. It of course has articles about using R.  In addition it has a feature that I highly support.  In preparation for the UseR! Conference 2011 August 16-18 in Coventry there are two Help Desk articles on making a good technical presentation. Technical presentation ...
[Read more...]

Performance ratios, bootstrapping and infinite variances

June 18, 2011 | Pat

If returns had infinite variance, would there be a problem bootstrapping information ratios? Background There is a discussion on the Quant Finance group of LinkedIn with the title: “How do you measure the confidence intervals of performance ratios?” One suggestion was to use the statistical bootstrap. This resulted in a ... [Read more...]

Market arrows

June 16, 2011 | Pat

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 ... [Read more...]

Selections from the R/Finance conference

June 2, 2011 | Pat

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 ...
[Read more...]

Sweave and pgfSweave in LyX 2.0.x (experimental)

May 25, 2011 | Yihui Xie

bout half a year ago, I wrote a post on the configuration of (pgf)Sweave and LyX, which was intended to save us some efforts in going through all the details during the configuration. Now many things have changed: LyX 2.0 has internal support for Sweave, and fortunately I have been ... [Read more...]

Specific differences between Ledoit-Wolf and factor models

May 22, 2011 | Pat

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 ... [Read more...]

timezone issue in R

May 14, 2011 | Dzidorius Martinaitis

While investigating Intraday patterns in FX returns and order flow paper I have faced the problem with timezone. I had 3 data sources with different timezones (GMT, CET, CEST). Most confusing thing was, that I didn’t know, how to deal with summer time. But why did I have the data ... [Read more...]

Again with Ledoit-Wolf and factor models

May 4, 2011 | Pat

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 ... [Read more...]

The R Inferno revised

May 1, 2011 | Pat

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://...
[Read more...]

Produce Authentic Math Formulas in R Graphics

April 30, 2011 | Yihui Xie

I remember a few weeks ago, there was a challenge in the R-help list to make the prime symbol in R graphics. In LaTeX, we simply write $X'$ or $X^\prime$. R has a rough support for math expressions (see demo(plotmath)) and they are certainly unsatisfactory for LaTeX users. ... [Read more...]

A test of Ledoit-Wolf versus a factor model

April 27, 2011 | Pat

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 ... [Read more...]

Risk fraction constraints and volatility

April 21, 2011 | Pat

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 ... [Read more...]

Transaction cost analysis and pre-trade analysis

April 20, 2011 | Dzidorius Martinaitis

Transaction cost analysis (TCA) is the framework to achieve best execution in trading context. TCA can be split into three groups: pre-trade analysis, intraday analysis, and post-trade measurement. Pre-trade analysis allows us to get insight about the future volatility of the price, forecast intra-day and daily volumes, market impact. It ... [Read more...]

Weight compared to risk fraction

April 18, 2011 | Pat

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 ... [Read more...]

Book: ggplot2 by Hadley Wickham

April 4, 2011 | Dzidorius Martinaitis

All my recent plots are built using ggplot2 package. I don’t know if my dear readers have noticed the difference, but from my point of view, ggplot2 allows to create nice looking and aesthetics plots. I was using this package before, but the real boost came after reading this ... [Read more...]

The devil of overfitting

March 27, 2011 | Pat

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 ... [Read more...]

Correlation network

March 22, 2011 | Dzidorius Martinaitis

I came up with an idea to draw correlation network to get a grasp about relationship between a list of stocks. An alternative way to show correlation matrix would be head map, which can have limitations with big matrices (__100). Unfortunately,  ggplot2 package doesn’t have a easy way to draw ... [Read more...]

Factor models of variance in finance

March 7, 2011 | Pat

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 ...
[Read more...]
1 5 6 7 8 9 10

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)