Code covered by the BSD License  

Highlights from
Upside covariance

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.63 KB File ID: #27368

Upside covariance

by Francesco Pozzi

 

26 Apr 2010

This function returns the upside covariance for the columns of variable Y

| Watch this File

File Information
Description

Y = UPSIDECOVARIANCE(Y) returns the upside covariance for columns of
variable Y.

Y = UPSIDECOVARIANCE(Y, m) returns the upside covariance using vector m
as expected value for columns of variable Y.

====================================================

Upside covariance is defined as
              E[max(yi - mi, 0) max(yj - mj, 0)]
If omitted, m is the sampe mean of Y.

====================================================

See also VAR, STD, COV.

MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
26 Apr 2010 Rob Campbell

The functions are very similar: Wouldn't it be better to have one function that returns all of these variances and covariances? Either return all of them in a structure or return a single output which is defined by the user via an input argument.

26 Apr 2010 Francesco Pozzi

You're right, Rob, I've considered that idea (and that was how I had written the code at first). The point is that Malab itself has VAR, COV and CORRCOEF, I thought maybe the user prefers to keep them separate.

Perhaps I could join the "upside" and "downside" functions into a single function ... actually two functions instead of one might be a bit redundant.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
variance Francesco Pozzi 26 Apr 2010 10:43:05
standard deviation Francesco Pozzi 26 Apr 2010 10:43:05
covariance Francesco Pozzi 26 Apr 2010 10:43:05

Contact us at files@mathworks.com