Quantcast
Channel: r software hub
Viewing all articles
Browse latest Browse all 1015

Using R to analyse MAN AHL Trend

$
0
0

By Thomas Huben

Let’s use the great PerformanceAnalytics package to get some insights on the risk profile of the MAN AHL Trend Fund. It’s a program with a long track record – I believe in the late 80′. The UCITS Fund NAV Data can be downloaded from the fund webpage as xls file- starting 2009.

First let’s import the data into R. I’m using a small function, to import .csv which returns an .xts object named ahl.

#Monthly NAV MAN AHL
loadahl a=read.table(“ahl_trend.csv”,sep = “,”,dec = “,”)
a$date = paste(substr(a$V1,1,2),substr(a$V1,4,5),substr(a$V1,7,10),sep=”-“)
ahl=a$date
ahl=cbind(ahl,substr(a$V2,1,5))
a=as.POSIXct(ahl[,1],format=”%d-%m-%Y”)
ahl=as.xts(as.numeric(ahl[,2]),order.by=a)
rm(a)
return(ahl)
}

next we would like to have the monthly returns

monthlyReturn(x, subset=NULL, type='arithmetic',
leading=TRUE, ...)
 
 

which we store in retahl.

retahl=monthlyReturn(ahl,type=”log”)

Next, I usually plot the chart.Drawdown to get a visual idea, if the product is designed for my risk appetite.

chart.Drawdown(retahl)
table.AnnualizedReturns(retahl)
 
                          monthly.returns
Annualized Return 0.0212
Annualized Std Dev 0.1246
Annualized Sharpe (Rf=0%) 0.1702
 
table.DownsideRisk(retahl)
monthly.returns
Semi Deviation 0.0254
Gain Deviation 0.0222
Loss Deviation ...read more

Source:: r-bloggers.com


Viewing all articles
Browse latest Browse all 1015

Trending Articles