applyFUN function

Apply a risk or return function to a set of weights