Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Applying talib "all_all_ta_features" throws an error in Strategy #983

Answered by kernc
adamjbradley asked this question in Q&A
Discussion options

Or should I just apply to the df prior to passing it to the Backtest call?

class SprayAndPray(Strategy):
 def init(self):
 def ApplyAllIndicators(data):
 print(data.df)
 data.df = add_all_ta_features(data.df, open="Open", high="High", low="Low", close="Close", volume="Volume", fillna=True)
 return ApplyAllIndicators(data)
 
 self.I(ApplyAllIndicators, self.data)
 def next(self):
 ...
You must be logged in to vote

Or should I just apply to the df prior to passing it to the Backtest call?

That would be better. Since it's generated on-the-fly, Strategy.data.df cannot be assigned to in the way you expect.

Replies: 1 comment 2 replies

Comment options

Or should I just apply to the df prior to passing it to the Backtest call?

That would be better. Since it's generated on-the-fly, Strategy.data.df cannot be assigned to in the way you expect.

You must be logged in to vote
2 replies
Comment options

Thank you!

Comment options

@adamjbradley as a note from the future, does this include "candle sticks" (medium frequency) or just only momentum (slow trades)?

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

AltStyle によって変換されたページ (->オリジナル) /