Hi, I'm new to the Qantopian platform and trying to do some research on its capabilities.
I need to evaluate trades that some other people did at some point of time. I have a csv spreadsheet of their decisions.
So I can see you have a method to upload my csv to the system, which is neat.
1) Traders I need to evaluate were putting order to buy something when price goes higher than some threshold. Is there any way to do this in your system? Because I think these Order Methods you have in API are bound to the time I'm placing them (am I right?), while I'd rather buy in case of event. I don't want to simulate order at the point of time I've placed it, I need it to start filling only on certain trigger.
2) Traders were creating this trigger at exact point of time. So, let's say at 1:00pm Alice created a trigger to buy AAPL if its price goes as high as $105 at its current price of $100. I can see advices to use
schedule_function but I don't know how good of idea it is. It has time intervals in it, but I'd rater use exact time instead.
So I don't know what should I do exactly to make this simulation happen. Basically for each order our traders ever placed I need to fast-forward to a given time, check if trigger price ever happened this day. If it did happened, find out what happened first: stop price or a limit price, or an end of the day. I don't know what's the best way to approach this, other than maybe brute force every minute using handle_data, which is possible, but I don't know if I want to use brute force approach right away. I will be grateful if anyone can tell me of a better approach. Maybe I can get day worth of data into list and do queries on it, maybe there's some SQL-like query language on Qantopian?
Thanks in advance.