Code Monkey home page Code Monkey logo

Comments (2)

Marigold avatar Marigold commented on September 25, 2024

It appears that when setting all of the initial weights to zero (we haven't invested anything yet), the weights last_b at the first time step are always set to 1/N, with N the number of stocks in the portfolio. Then, at the next step, all the weights are set to 0 except one which is set to 1. From there, things look normal and realistic weights are assigned to particular stocks.

Good catch, that's most likely a bug. I haven't used olmar for quite some time. In case you have a fix, could you create a PR?

I also noticed that when setting them already to 1/N, the first step is skipped (logically). One could say that this assumption is valid (we already own said stocks before the start), but the 2nd step remains anyway where everything is sold except one. Is there a way to change this behavior?

Sure, you can subclass method OLMAR.init_weights and set all weights to zero. You might also have to subclass update to avoid weight change penalization when starting with zero weights.

from universal-portfolios.

DrPaprikaa avatar DrPaprikaa commented on September 25, 2024

I checked but couldn't find the issue : maybe some transformation due to the simplex projection ? I don't know.
Closing this issue for now, feel free to re-open it if you have an idea :)

from universal-portfolios.

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.