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)
- 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
- MetaTrader5 Integration for Data and Backtesting
- DeprecationError: `np.float_` is deprecated HOT 1
- Extreme return values (billions %) in alternating long/short position backtests
- tuple out of range error on IndicatorBase.run HOT 1
- Specific values for stop loss BUT DIFFERENT FOR LONG/SHORT STOP
- Consider Migrating from `alpaca-trade-api` to `alpaca-py` HOT 1
- Intraday Trades Not Closing Correctly with Autoclose Function and Stop Loss
- VectorBT vs TA-Lib | RSI discrepancies HOT 1
- Documentation on vectorbt.dev seems to be broken HOT 2
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.