-
Hello! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
@Sanjan611 that's correct. Generally, each column in vectorbt is a separate backtesting instance, so having multiple columns shouldn't be considered a single portfolio, but a set of separate portfolios, each with its own initial capital. To specify which columns belong together, vectorbt introduces the idea of grouping using |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Realized that
|
Beta Was this translation helpful? Give feedback.
@Sanjan611 that's correct.
Generally, each column in vectorbt is a separate backtesting instance, so having multiple columns shouldn't be considered a single portfolio, but a set of separate portfolios, each with its own initial capital. To specify which columns belong together, vectorbt introduces the idea of grouping using
group_by
. For example,group_by=[0, 0, 1]
for three columns will build one group with two columns and one with one column (a separate number ingroup_by
indicates a separate group). When you docash_sharing=True
, cash is shared among the columns of each group (in the above example, the first two columns would share $100 and the last column also $100). For cash sharing…