Skip to content
Permalink
Browse files

Handle null for target return.

It is important because from ConPA is passed as null, not as undefined.
  • Loading branch information...
albertosantini committed Jun 27, 2018
1 parent 82f82b0 commit e7816a9dc18a5832a491e46173c435471414efc6
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/portfolio.js
@@ -88,7 +88,7 @@ function portfolioOptim(xT, pm = stats.mean(xT), lows, highs, shorts) {
function nativeGetOptimalPortfolio(params, callback) {
const symbols = params.prods;
const referenceDate = params.referenceDate;
const targetReturn = params.targetReturn === "undefined"
const targetReturn = (params.targetReturn === "undefined" || !params.targetReturn)
? undefined : params.targetReturn;
const lows = params.lows;
const highs = params.highs;

0 comments on commit e7816a9

Please sign in to comment.
You can’t perform that action at this time.