GithubHelp home page GithubHelp logo

Comments (3)

regnull avatar regnull commented on May 22, 2024 1

I would expect --only_long option to do that, but it doesn't seem to have an effect.

from eiten.

henryrossiter avatar henryrossiter commented on May 22, 2024 1

From what I can tell:

  • The only_long parameter doesn't affect the weight calculation at all (negative weights are always allowed)
  • When running back tests and future tests with only_long enabled, assets with negative weights are treated as if their weight is zero
  • The only_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?

from eiten.

tradytics avatar tradytics commented on May 22, 2024

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

from eiten.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.