You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please feel free to comment on this proposal if you have any questions/changes/ideas. If you'd like to help on anything, feel free to comment on this thread and tag me.
Goal
Create an interface that allows users to potentially live trade using Prophet. This interface should be modular to allow users to use a variety of different trading API connectors.
Implementation
The initial implementation should consist of two parts. The first part should be changes to the core library to allow Prophet to accept live data from multiple data sources and output orders in different formats as a stream. The second part will be an initial reference implementation of a FIX connector to allow Prophet to accept input data over FIX and output orders to a FIX API.
Accepting Data
The proposed implementation for accepting live data from multiple DataGenerators is to use the multiprocessing library and distribute the generators to multiple processes. The Prophet library will use a thread safe queue to accept input data from these processes and ask the OrderGenerator if an order should be generated from the new data. DataGenerators will now provide a run_live method for generating live data which will be appended to the end of the dataset generated by run. The DataGenerator class itself will have a noop run_live function (basically assumes there is no live data).
Generating Orders
Currently, orders are generated and processed by a backtest and only the backtest result is outputted. For live trading, we will need a daemonizable Prophet function (live_trade?) which will accept live data from DataGenerators and yield lists of Orders to a connector. This will equate to something along the lines of connector.receive([Order(), Order()]). It will be up to the connector to decide what to do with it. The connector should be able to optionally return what price the orders were filled at or whether the orders were filled at all. Connectors could also be used for debugging or other purposes (eg. just print the orders it receives).
FIX Connectors
An order connector and data generator should be written to provide examples of how to write Prophet connectors. Currently the most promising library seems to be quickfix. The data generator should be a simple python generator that outputs formatted data received the FIX API. The order generator should submit orders via the FIX API and return metadata about orders as they are filled.
The text was updated successfully, but these errors were encountered:
Please feel free to comment on this proposal if you have any questions/changes/ideas. If you'd like to help on anything, feel free to comment on this thread and tag me.
Goal
Create an interface that allows users to potentially live trade using Prophet. This interface should be modular to allow users to use a variety of different trading API connectors.
Implementation
The initial implementation should consist of two parts. The first part should be changes to the core library to allow Prophet to accept live data from multiple data sources and output orders in different formats as a stream. The second part will be an initial reference implementation of a FIX connector to allow Prophet to accept input data over FIX and output orders to a FIX API.
Accepting Data
The proposed implementation for accepting live data from multiple DataGenerators is to use the multiprocessing library and distribute the generators to multiple processes. The Prophet library will use a thread safe queue to accept input data from these processes and ask the OrderGenerator if an order should be generated from the new data. DataGenerators will now provide a run_live method for generating live data which will be appended to the end of the dataset generated by run. The DataGenerator class itself will have a noop run_live function (basically assumes there is no live data).
Generating Orders
Currently, orders are generated and processed by a backtest and only the backtest result is outputted. For live trading, we will need a daemonizable Prophet function (live_trade?) which will accept live data from DataGenerators and yield lists of Orders to a connector. This will equate to something along the lines of
connector.receive([Order(), Order()])
. It will be up to the connector to decide what to do with it. The connector should be able to optionally return what price the orders were filled at or whether the orders were filled at all. Connectors could also be used for debugging or other purposes (eg. just print the orders it receives).FIX Connectors
An order connector and data generator should be written to provide examples of how to write Prophet connectors. Currently the most promising library seems to be quickfix. The data generator should be a simple python generator that outputs formatted data received the FIX API. The order generator should submit orders via the FIX API and return metadata about orders as they are filled.
The text was updated successfully, but these errors were encountered: