Share Ordering Demo using Market, Limit, and Midpoint Peg Orders
The CloudQuantAI github repository holds the share_ordering_demo tutorial/code that demonstrates ways to buy and sell stocks in the CloudQuant backtesting engine using Market, Limit, and Midpoint Peg Order types.
There is no single “right way” to do any of these. You will have to think carefully about your algorithm, how it determines when to buy and sell, how large a trade you want to implement, and how quickly you need your orders filled.
To give an example, let’s imagine a hypothetical stock XYZ, at time t0 with bid prices at 29.95 and ask prices at 30.05.
Leave a Reply
Want to join the discussion?Feel free to contribute!