# Posts Tagged ‘ R Language ’

## Highlights of R in Finance 2012

August 13, 2012
By

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 sure to win my heart.  … Continue reading...

## Returns with negative net asset values

July 30, 2012
By

How are returns calculated when net asset value goes negative? Previously In “A tale of two returns” we highlighted the similarities and differences of log returns versus simple returns. Positive valuation We create — in R — an example of net asset value at four times: > nav1 <- c(1000, 900, 950, 1010) > nav1 … Continue reading...

## R Inferno-ism: order is not rank

July 26, 2012
By

Do not use order when you want rank. Background The update of “A comparison of some heuristic optimization methods” is due to the bug that Luca Scrucca spotted. Actually, it is two bugs: I used order when I meant rank This somehow escaped being in The R Inferno   Problem What I said in my … Continue reading...

## A comparison of some heuristic optimization methods

July 23, 2012
By

A simple portfolio optimization problem is used to look at several R functions that use randomness in various ways to do optimization. Orientation Some optimization problems are really hard. In these cases sometimes the best approach is to use randomness to get an approximate answer. Once you decide to go down this route, you need … Continue reading...

## 2 dimensions of portfolio diversity

July 16, 2012
By

Portfolio diversity is a balancing act. Previously The post “Portfolio diversity” talked about the role of the correlation between assets and the portfolio.  The current post fills a hole in that post. The 2 dimensions asset-portfolio correlation Each asset in the universe has a correlation with the portfolio.  If there are any assets that have … Continue reading...

## A practical introduction to garch modeling

July 6, 2012
By

We look at volatility clustering, and some aspects of modeling it with a univariate GARCH(1,1) model. Volatility clustering Volatility clustering — the phenomenon of there being periods of relative calm and periods of high volatility — is a seemingly universal attribute of market data.  There is no universally accepted explanation of it. GARCH (Generalized AutoRegressive … Continue reading...

## Random portfolios versus Monte Carlo

July 2, 2012
By

What is the difference between Monte Carlo — as it is usually defined in finance — and random portfolios? The meaning of “Monte Carlo” The idea of “Monte Carlo” is very simple.  It is a fancy word for “simulation”. As usual, it is all too possible to find incredibly muddied explanations of such a simple … Continue reading...

## Two new, important books on R

June 22, 2012
By

Two books were recently published that are sure to help R grow even faster. R has a reputation, partially deserved, for being hard to learn.  These books will help.  The first makes learning easier, the second can make learning less necessary for initiates. I have not yet touched either book. R for Dummies The authors … Continue reading...

## To R or not to R, and other events

June 21, 2012
By

New events To R, or not to R, that is the question The Statistical Computing Section of the Royal Statistical Society presents a one-day event on 2012 June 29. The details of the day.  See in particular the abstract for “Teaching statistics: a pain in the R?” by Andy Field — it involves a sheepdog … Continue reading...

## Cross sectional spread of stock returns

June 18, 2012
By

A look at a simplistic measure of stock-picking opportunity. Motivation The interquartile range (the spread of the middle half of the data) has recently been added to the market portrait plots.  Putting those numbers into historical context was the original impulse. However, this led to thinking about change in stock-picking opportunity over time. Data Daily … Continue reading...