Has anyone used the RobinHood package for order management? For example, dynamic stop level setting (in other words, not use standard trailing stop) and filled order tracking?
[[alternative HTML version deleted]]
I have never worked with RobinHood, but I have analyzed the code of
this package. Maybe my insights will be useful for you.
RobinHood, as well as Alpaca Markets, operate in the PFOF model
(payment for order flow). Your order does not go public, but is sold
to market makers. Is it good or bad? Currently, the PFOF model is
regulated by Regulation NMS - your order must be filled at a price
equal to or better than the NBBO (National Best Bid and Offer) or best
price rule in short. In fact, most brokers work in the PFOF model too
- you pay a commission, but they sell your orders anyway. So RH and
Alpaca are fair here - if we make money from selling your order, you
do not pay commissions anymore. I explain this because I have noticed
that many people don't understand the RH and Alpaca's business model.
on_order <- function()
# accepted, rejected etc.
on_exec <- function()
on_system_event <- function()
# main event loop
run_strategy(host = 'api_server', port = 123, daemon = TRUE)
place_order() means submit and subscribe orders events.
From what I see, RobinHood R package wasn't designed to work in such
an event-driven model.
I hope that will be helpful for you.
czw., 4 kwi 2019 o 19:28 Steve Hun via R-SIG-Finance
<[hidden email]> napisał(a):
> Has anyone used the RobinHood package for order management? For example, dynamic stop level setting (in other words, not use standard trailing stop) and filled order tracking?
> [[alternative HTML version deleted]]
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance > -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.