Monthly Archives: July 2012

Returns with negative net asset values

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

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

US market portrait 2012 week 31

US large cap market returns. Fine print The data are from Yahoo Almost all of the S&P 500 stocks are used The initial post was “Replacing market indices” The R code is in marketportrait_funs.R

Posted in Market portrait | Tagged | 2 Comments

R Inferno-ism: order is not rank

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

Posted in R language | Tagged | 1 Comment

A comparison of some heuristic optimization methods

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

Posted in optimization, R language | Tagged , , , , , | 13 Comments

US market portrait 2012 week 30

US large cap market returns. Fine print The data are from Yahoo Almost all of the S&P 500 stocks are used The initial post was “Replacing market indices” The R code is in marketportrait_funs.R

Posted in Market portrait | Tagged | Leave a comment

2 dimensions of portfolio diversity

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

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

US Market Portrait 2012 week 29

US large cap market returns. (For reasons unknown, the data for 2012-07-09 did not appear so what is shown as returns for 2012-07-10 is actually returns for both those days.) Fine print The data are from Yahoo Almost all of the S&P 500 stocks are used The initial post was “Replacing market indices” The R … Continue reading

Posted in Market portrait | Tagged | Leave a comment

Alpha alignment

An explanation of alpha factor alignment in portfolio optimization, and a look at the spectrum of views on it. Venue FactSet recently hosted an event that included a panel of representatives from several risk model vendors.  The first question thrown at the panel was about alpha alignment.  The opinions varied widely.  There was positive correlation … Continue reading

Posted in optimization, Quant finance | Tagged , , | 3 Comments

US market portrait 2012 week 28

US large cap market returns. Fine print The data are from Yahoo Almost all of the S&P 500 stocks are used The initial post was “Replacing market indices” The R code is in marketportrait_funs.R

Posted in Market portrait | Tagged | Leave a comment

A practical introduction to garch modeling

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

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