Hi, new to Quantopian so I apologise if this may seem a stupid question
I am trying to implement a simple Momentum day trading strategy.
Basically, each day I narrow down to about 4 securities through the screening process and I open up the positions every day. I also just want to try out closing each position at the end of the day i.e. I don't want to hold any positions overnight.
However, there seems to be a problem with my code and I can't seem to fix the issue - I am not clearing my positions at the end of the day when I check through the transactions and I actually start off the backtest with shorting securities which is very peculiar and I seem to be stacking on huge leverage.
Please help! Thank you.