Code Monkey home page Code Monkey logo

Comments (6)

polakowo avatar polakowo commented on September 15, 2024

Hi, if by a multi-asset strategy you mean assigning weights to each asset, I will add the feature today where you can perform operations on entire portfolios, such as multiplying by a weight, or add two portfolios together (that internally just adds two rolling equities). It will look something like this:

portfolio = 0.3 * portfolio1 + 0.7 * portfolio2

Or you mean something more complex such as assigning different weights to each trade?

from vectorbt.

HedgeShot avatar HedgeShot commented on September 15, 2024

Thx for your answer. I mean something more complicated. At the moment I'm using this package: bt. It is great but slow (and not really active anymore).
I am looking at building strategies with algos like Risk Parity, ERC (or even equal weight) etc to assign weights to each asset.

from vectorbt.

polakowo avatar polakowo commented on September 15, 2024

To my understanding risk parity just allocates weights to each asset based on some optimization problem, so you end up simply calculating the weights and multiplying the weights by each asset, which is equivalent of allocating different investment to each asset?

from vectorbt.

HedgeShot avatar HedgeShot commented on September 15, 2024

yes but weights will vary each time you rebalance (e.g. every month)

from vectorbt.

polakowo avatar polakowo commented on September 15, 2024

So you will end up with a weights vector for each time step, and based on this vector you make decisions what to buy more and what to sell. This isn't possible in current form since the Positions class takes only values either -1 or 1 which means either you go all in or all out, but this is doable I guess.

Thanks for this awesome idea, I will think of how to implement it efficiently.

from vectorbt.

HedgeShot avatar HedgeShot commented on September 15, 2024

Thanks for your answers!

from vectorbt.

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.