Skip to content
Back to formatted view

Raw Message

Message-ID: <1342642164755-4636936.post@n4.nabble.com>
Date: 2012-07-18T20:09:24Z
From: Cren
Subject: The best solver for non-smooth functions?
In-Reply-To: <1342641619814-4636934.post@n4.nabble.com>

# 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.