R Language

The guts of a statistical factor model

November 12, 2012 | Pat

Specifics of statistical factor models and of a particular implementation of them. Previously Posts that are background for this one include: Three things factor models do Factor models of variance in finance The BurStFin R package The quality of variance matrix estimation The problem Someone asked me some questions about ... [Read more...]

An easy mistake with returns

November 5, 2012 | Pat

When aggregating over both time and assets, the order of aggregation matters. Task We have the weights for a portfolio and we want to use those and a matrix of returns over time to compute the (long-term) portfolio return. “A tale of two returns” tells us that aggregation over time ...
[Read more...]

Volatility from daily or monthly: garch evidence

October 29, 2012 | Pat

Should you use daily or monthly returns to estimate volatility? Does garch explain why volatility estimated with daily data tends to be bigger than if it is estimated with monthly data? Previously There are a number of previous posts — with the variance compression tag — that discuss the phenomenon of volatility ... [Read more...]

The basics of Value at Risk and Expected Shortfall

October 23, 2012 | Pat

Value at Risk and Expected Shortfall are common risk measures.  Here is a quick explanation. Ingredients The first two ingredients are each a number: The time horizon — how many days do we look ahead? The probability level — how far in the tail are we looking? Ingredient number 3 is a prediction ... [Read more...]

Review of “R For Dummies”

October 15, 2012 | Pat

The authors are Andrie de Vries and Joris Meys. Executive summary Pretty much all I’d hoped for — and I had high hopes. Significance The “Dummies” series is popular for introducing specific topics in an inviting way. R For Dummies is a worthy addition to the pack. There is a ... [Read more...]

Annotations for “R For Dummies”

October 15, 2012 | Pat

Here are detailed comments on the book.  Elsewhere there is a review of the book. How to read R For Dummies In order to learn R you need to do something with it.  After you have read a little of the book, find something to do.  Mix reading and doing ...
[Read more...]

S&P 500 sector strengths

October 10, 2012 | Pat

Which sectors are coherent, and which aren’t? Previously The post “S&P 500 correlations up to date” looked at rolling mean correlations among stocks.  In particular it looked at rolling mean correlations of stocks within sectors. Of importance to this post is that the sectors used are taken from Wikipedia. ... [Read more...]

S&P 500 correlations up to date

October 8, 2012 | Pat

I haven’t heard much about correlation lately.  I was curious about what it’s been doing. Data The dataset is daily log returns on 464 large cap US stocks from the start of 2006 to 2012 October 5. The sector data were taken from Wikipedia. The correlation calculated here is the mean correlation ... [Read more...]

How to add a benchmark to a variance matrix

October 1, 2012 | Pat

There is a good way and a bad way to add a benchmark to a variance matrix that will be used for optimization and similar operations.  Our examination sheds a little light on the process of variance matrix estimation in this realm. Role of benchmarks Investing Benchmarks are common in ...
[Read more...]

Two particular courses and other upcoming events

September 25, 2012 | Pat

Featured I’ll be leading two courses in the near future: Value-at-Risk versus Expected Shortfall 2012 October 30-31, London. 30th: “Addressing the critical challenges and issues raised by the Basel proposal to replace VaR with Expected Shortfall” 31st: “Variability in Value-at-Risk and Expected Shortfall” led by Patrick Burns Details at CFP ...
[Read more...]

Variance targeting in garch estimation

September 24, 2012 | Pat

What is variance targeting in garch estimation?  And what is its effect? Previously Related posts are: A practical introduction to garch modeling Variability of garch estimates garch estimation on impossibly long series The last two of these show the variability of garch estimates on simulated series where we know the ... [Read more...]

garch estimation on impossibly long series

September 20, 2012 | Pat

The variability of garch estimates when the series has 100,000 returns. Experiment The post “Variability of garch estimates” showed estimates of 1000 series that were each 2000 observations long.  Here we do the same thing except that the series each have 100,000 observations. That would be four centuries of daily data.  It’s not ... [Read more...]

Variability of garch estimates

September 17, 2012 | Pat

Not exactly pin-point accuracy. Previously Two related posts are: A practical introduction to garch modeling garch and long tails Experiment 1000 simulated return series were generated.  The garch(1,1) parameters were alpha=.07, beta=.925, omega=.01.  The asymptotic variance for this model is 2.  The half-life is about 138 days. The simulated series used a Student’... [Read more...]

Not fooled by randomness

September 10, 2012 | Pat

The paper is “Not Fooled by Randomness: Using Random Portfolios to Analyze Investment Funds” by Roberto Stein.  Here is an explanation of the idea of random portfolios. Favorite sentence The real question here is whether we’re actually measuring skill, or these are still measures of performance, so influenced by ... [Read more...]

Thalesians, and other events

September 5, 2012 | Pat

Featured Thalesians, London 2012 September 12. Chia Tan on “Practical Financial Modeling”. Abstract: Financial modelling is not a competition in the mastery of complexity. Rather, the aim is to come up with the simplest models adequate to capture salient market features of traded products. There exists a wide gulf between material covered ...
[Read more...]

A look at Bayesian statistics

September 3, 2012 | Pat

An introduction to Bayesian analysis and why you might care. Fight club The subject of statistics is about how to learn.  Given that it is about the unknown, it shouldn’t be surprising that there are deep differences of opinion on how to go about doing it (in spite of ... [Read more...]

garch and long tails

August 27, 2012 | Pat

How much does garch shorten long tails? Previously Pertinent blog posts include: “A practical introduction to garch modeling” “The distribution of financial returns made simple” “Predictability of kurtosis and skewness in S&P constituents” Induced tails Part of the reason that the distributions of returns have long tails is because ... [Read more...]

Another comparison of heuristic optimizers

August 20, 2012 | Pat

A herd of heuristic algorithms is compared using a portfolio optimization. Previously “A comparison of some heuristic optimization methods” used two simple and tiny portfolio optimization problems to compare a number of optimization functions in the R language. This post expands upon that by using a portfolio optimization problem that ... [Read more...]

Highlights of R in Finance 2012

August 13, 2012 | Pat

I unfortunately was not there, but we can vicariously enjoy it via the presentations that are posted on the conference website. Below is my take on the highlights (in chronological order). Peter Carl and Brian Peterson “Constructing Strategic Hedge Fund Portfolios” is wonderful from my perspective.  Promoting random portfolios is ...
[Read more...]
1 2 3 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)