def to_cmd(self):
        if self.nargs == 0:
            if len(self.value) == 0:
                return ""
            return "" if not self.value[0] else self.get_opt()
        if self.nargs == '?' and self.raw():
            value = self.raw()[0]
            if value:
                if isinstance(value, bool):
                    return self.get_opt()
                else:
                    return "%s %s" % (self.get_opt(), value)

        value = self.get()
        if not value:
            return ""
        return "%s %s" % (self.get_opt(), value)
@summary Returns the Markowitz optimum portfolio for a specific return.
dataset/ETHPy150Open thasso/pyjip/jip/options.py/Option.to_cmd--crossover with--dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/QSTK/qstkutil/tsutil.py/getOptPort