[R] The best solver for non-smooth functions?

Cren oscar.soppelsa at bancaakros.it
Wed Jul 18 22:09:24 CEST 2012


# Whoops! I have just seen there's a little mistake
# in the 'sharpe' function, because I had to use
# 'w' array instead of 'ead' in the cm.CVaR function!
# This does not change the main features of my,
# but you should be aware of it

---

# The function to be minimized

sharpe <- function(w) {
  - (t(w) %*% y) / cm.CVaR(M, lgd, ead, N, n, r, rho, alpha, rating)
} 

# This becomes...

sharpe <- function(w) {
  - (t(w) %*% y) / cm.CVaR(M, lgd, w, N, n, r, rho, alpha, rating)
} 

# ...substituting 'ead' with 'w'.

--
View this message in context: http://r.789695.n4.nabble.com/The-best-solver-for-non-smooth-functions-tp4636934p4636936.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list