Hello everybody,
i'm implementing my first algo and trying to include bigger commission fees. With a capital of 3000usd and fees of 50usd, my capital should be destroyed within 60 rebalancings. However, whatever comission I set, the return stays the same. Any idea?
# Called once at the start of the simulation.
def initialize(context):
set_commission(commission.PerTrade(cost=50.00))
# Reference to the AAPL security.
context.aapl = sid(24)
# Rebalance every day, one hour and a half after market open.
schedule_function(my_rebalance,
date_rules.every_day(),
time_rules.market_open(hours=1, minutes=30))
# This function was scheduled to run once per day at 11AM ET.
def my_rebalance(context, data):
# Take a 100% long position in AAPL. Readjusts each day to
# account for price fluctuations.
if data.can_trade(context.aapl):
order_target_percent(context.aapl, 1.00)
Best regards