Hi
I am very new to Quantopian, but not new at all at trading simulation.
I have created my own research and simulation system in Perl years ago and tested it few times over the years.
I have a lots of algos that I have tested with it. So I decided to finally check out Quantopian. But I couldn't implement the very first algo I tried.
Why? Because Quantopian doesn't provide a way to specify particular price for the order method.
Yes, I did find about the “slippage model” mechanism. Basically, it can be used to "overrides" the“order” method to change the execution price with one different from the default (close price), with, for example, the “open price”. But only one slippage model is allowed per execution. And it is specified in initialize(context) section. As such, it cannot be “called” with dynamic parameters from handle_data method.
Thus, changing default order execution price with slippage model will change it for every order execution in the alog.
That would prevent creating such a basic algo as "buy at close price” (e.g. a few days before) and "sell at open price” (on current day).
I'd be happy to be corrected.