Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help with slippage / commission on trade performance

Hi all -

Still very new to all of this but I am having trouble incorporating hypothetical trading commissions into my returns model. When I add the line below it makes no impact to my model. I've looked through several models that have been posted but I'm not exactly sure how to use the syntax. Model snippet attached.

def initialize(context):
set_commission(commission.PerTrade(cost=0.02))

Appreciate any help here and apologies for the seemingly basic question.

Thanks!
Chris