Hey guys, I'm new to the community. This is my first piece of code that I've ever written. I'm currently taking intro to programming so I know a bit of Python.
I wrote this very basic algorithm to get a basic grasp of Datetime and how Quantopian works. A couple of questions though...
I'm currently only executing this trade in 2009. My plan with this algorithm is to buy on the last day of each month and sell at the end of the first day of each month.
How do I specify to sell at the end of the day?
I'm very confused as to if why if I sell in on the last day of each month and buy on the first day of each month, why are the returns positive when compared to buying on the last day of each month and buying on the first day, my returns are negative and seem to be negatively correlated to the benchmark.