Description Usage Arguments Value Note Author(s) References Examples
An interesting Utility function characterized by upper to lower partial moments.
| 1 | 
| data | A data vector of differences or returns for which the utility is to be calculated. | 
| threshold | The threshold value for dividing upper to lower utility. | 
| urc | Upper Partial Moment Utility Risk Aversion Coefficient. | 
| lrc | Lower Partial Moment Utility Risk Aversion Coefficient. | 
| lmoment | Lower Moment (need not be integer, but must be positive). | 
| umoment | Upper Moment (need not be integer, but must be positive). | 
An object of class PMU
Has methods for show, plot and lines.
This is an interesting utility allowing for the representation of the well known S-shaped utilty discussed in Kahnemann and Tversky's
prospect theory. Alternatively, and depending on the coefficients chosen, an inverse S-shaped utility can be constructed.
Portfolio optimization with respect to this utility function is non-trivial as it is non-quasi concave, and genetic optimization methods
have been suggested.
Alexios Ghalanos
Farinelli, S. and Tibiletti, L. , Sharpe thinking in asset ranking with one-sided measures, European Journal of Operational Research
Volume 185, Issue 3, 16 March 2008, Pages 1542-1547.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | ## Not run: 
data(djiaret)
# Test18: Partial Moments Utility Test and Plots (S-Shaped)
putil1<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,
lmoment=0.2,umoment=0.2)
show(putil1)
plot(putil1,col=2)
putil2<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=0.3,
umoment=0.3)
lines(putil2,col=3,text.col=3)
putil3<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=0.4,
umoment=0.4)
lines(putil3,col=4)
putil4<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=1.2,
umoment=0.4)
lines(putil4,col=5,text.col=5)
abline(v=0,col="grey")
leg.text<-c(paste("LM=",putil1@lmoment,", UM=",putil1@umoment,", LC=",putil1@lrc,", UC=",putil1@urc,sep=""),
paste("LM=",putil2@lmoment,", UM=",putil2@umoment,", LC=",putil2@lrc,", UC=",putil2@urc,sep=""),
paste("LM=",putil3@lmoment,", UM=",putil3@umoment,", LC=",putil3@lrc,", UC=",putil3@urc,sep=""),
paste("LM=",putil4@lmoment,", UM=",putil4@umoment,", LC=",putil4@lrc,", UC=",putil4@urc,sep=""))
legend("topleft",legend=leg.text,col=2:5,fill=2:5,cex=0.8)
# Test19: Partial Moments Utility Test and Plots (Inverse S-Shaped)
putil1<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=2.2, 
umoment=2.2)
show(putil1)
plot(putil1,col=2)
putil2<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=2.3,
umoment=2.3)
lines(putil2,col=3,text.col=3)
putil3<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=2.4,
umoment=2.4)
lines(putil3,col=4)
putil4<-pmUtility(as.matrix(djiaret[,1]),threshold=0,urc=1,lrc=1,lmoment=2.5,
umoment=2.5)
lines(putil4,col=5,text.col=5)
abline(v=0,col="grey")
leg.text<-c(paste("LM=",putil1@lmoment,", UM=",putil1@umoment,", LC=",putil1@lrc,", UC=",putil1@urc,sep=""),
paste("LM=",putil2@lmoment,", UM=",putil2@umoment,", LC=",putil2@lrc,", UC=",putil2@urc,sep=""),
paste("LM=",putil3@lmoment,", UM=",putil3@umoment,", LC=",putil3@lrc,", UC=",putil3@urc,sep=""),
paste("LM=",putil4@lmoment,", UM=",putil4@umoment,", LC=",putil4@lrc,", UC=",putil4@urc,sep=""))
legend("topleft",legend=leg.text,col=2:5,fill=2:5,cex=0.8)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.