New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Question) Disable negative weights/shorting #4
Comments
I would expect --only_long option to do that, but it doesn't seem to have an effect. |
From what I can tell:
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)?
The text was updated successfully, but these errors were encountered: