Skip to content

Generating entry and exit signals #196

Answered by polakowo
m4rc3l-h3 asked this question in Q&A
Discussion options

You must be logged in to vote

@m4rc3l-h3

Okay, you need to keep in mind that each column in vectorbt is a separate backtesting instance. Providing multiple columns means vectorbt will execute the same logic on each of those columns separately. This way you can construct thousands of columns and backtest them all at once. In your example, you have only one column that is created by combining a, b, and c, so your shape should be df.shape[0] or (df.shape[0], 1). But I advise you to not put a, b, and c into one data frame but keep them separately since they represent different features of the same backtesting instance. Later, if you want to run multiple backtests (e.g., to test multiple parameters), you can expand columns…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@m4rc3l-h3
Comment options

Answer selected by m4rc3l-h3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants