8000 cash_sharing and init_cash · polakowo vectorbt · Discussion #168 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cash_sharing and init_cash #168

Answered by polakowo
Sanjan611 asked this question in Q&A
Jun 13, 2021 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

@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 in group_by indicates a separate group). When you do cash_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…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Sanjan611
Comment options

@polakowo
Comment options

@Sanjan611
Comment options

Answer selected by Sanjan611
Comment options

You must be logged in to vote
1 reply
@eromoe
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
0