Cookbook - Momentum Strategy - Comments
Teddy Koker asked for comments on the usage of backtrader in the very fine post about a Momentum Strategy
A link to the original is included.
Eduardo De La Garza last edited by
Is it possible that there are some errors in the code? For example, in:
self.inds[d]['mom'] = self.p.momentum(d, period=self.momentum_period)
shouldn't it be
self.inds[d]['mom'] = self.p.momentum(d, period=self.p.momentum_period)
I just want to make sure I'm not making a mistake. Thanks!
run-out last edited by
self.inds[d]['mom'] = self.
Looks like a typo. I think you have it right.