Comments (6)
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.
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.
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.
yes but weights will vary each time you rebalance (e.g. every month)
from vectorbt.
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.
Thanks for your answers!
from vectorbt.
Related Issues (20)
- tp_stop with accumulate gives wrong result
- Data mismatch
- Incorrect Position Size Allocation Across Multiple Assets HOT 3
- For the same precision data, there is an accuracy error in the results.
- Issues with combining multiple plots into subplots in 1 figure HOT 1
- Plotting Error: Subplot 'trade_pnl' raised an exception HOT 1
- Getting Daily PNL Portfolio Change
- What is the difference in the documentation of vectorbt PRO vs the open source vectorbt?
- What is the benchmark plotted in pf.plot().show()?
- How to use run_combs in combination with other signals?
- Questions about backtesting
- StopLoss group_by
- Plots missing "close" curve
- Import Errors HOT 5
- Plotting with custom benchmark_rets got error (VectorBT used undefined attribute 'obj')
- Datetime support with from_order_func HOT 2
- Dockerfile changes to run /apps/candlestick-patterns app
- Multiprocessing Error When Creating Portofiolio
- Pandas MultiIndex on axis 0 HOT 1
- Closing all positions at the end of the day HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vectorbt.