How to use an independant pandas.DataFrame as Strategy input #354
Answered
by
kernc
beyond2002
asked this question in
Q&A
-
May I use another Strategy tools to generate a pandas.DataFrame which has signals of "buy/sell" for every single date, and use it directly as backtesting.py strategy class input? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
kernc
May 10, 2021
Replies: 1 comment 7 replies
-
Yes, see for instance |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
beyond2002
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, see for instance
backtesting.lib.SignalStrategy
. In your case, the signal would beself.data.df['signal_column']
, which you would prepare in advance in the input OHLC data frame.