Closed tatumakseli closed 3 years ago
I would expect --only_long option to do that, but it doesn't seem to have an effect.
From what I can tell:
only_long
parameter doesn't affect the weight calculation at all (negative weights are always allowed)only_long
enabled, assets with negative weights are treated as if their weight is zeroonly_long
parameter doesn't affect the monte carlo simulation at all (negative weights are always used)It seems a bit weird to optimize the portfolio with negative weights and then discard the negative positions during testing.
@tradytics am I correct here?
@henryrossiter - yes, so this is how I've seen others do it too. The simulation should be done after converting the weights to zero so that's an issue. Other than that, people usually don't constrain the weights to be positive during the optimization process but then just convert them to zero during testing or when they actually invest money in the portfolio.
The conversion to zero part during optimization is definitely doable but the optimization problem becomes a bit hard I believe. However, one can always add that constraint in the genetic algorithm as it's quite easy to do that.
Hopefully this answers the OP's question. Closing.
Hi, I'm building portfolios for my home country's stock market. However there is limited options for shorting stocks. Is it possible to run Eiten without allowing negative weight (shorting)?