Category Quantitative Analysis

Risk Parity using various risk measures (volatility, expected shortfall, semi deviation, maximum draw down)

A lot of people talk about equal risk contribution or balancing risk. This post aim’s to explore how a risk parity portfolio performs depending on the risk metric used in it’s calculation. I explore using Expected Shortfall. Volatility, Semi deviation and maximum drawdown as risk factors. The strategy is rebalanced monthly. Mathematically. Choose W such […]

Random Walk Test (Does the price of security X follow a random walk?)

Whipped up something quick to test if stock X follows a random walk… GOOG apparently does not. #load libraries library(quantmod) library(vrtest) # get Data replace goog with your stock of choice symbol = “GOOG” currency(“USD”) stock(symbol, currency=”USD”, multiplier = 1) getSymbols(symbol,src=”yahoo”) #make returns rets<-ROC(Cl(GOOG)) #get rid of the NA for the first term rets2<-rets[2:length(rets)] #Variance […]