Crate barter[][src]

Modules

data

Defines a MarketEvent, and provides the useful traits of Continuer and MarketGenerator for handling the generation of them. Contains implementations such as the HistoricDataHandler that simulates a live market feed and acts as the systems heartbeat.

event

Defines an Event enum that could be a MarketEvent, SignalEvent, OrderEvent or FillEvent.

execution

Defines a FillEvent, and provides a useful trait FillGenerator for handling the generation of them. Contains a SimulatedExecution implementation that simulates a live broker execution for the system.

portfolio

Defines useful data structures such as an OrderEvent and Position. The Portfolio must interact with MarketEvents, SignalEvents, OrderEvents, and FillEvents. The useful traits MarketUpdater, OrderGenerator, & FillUpdater are provided that define the interactions with these events. Contains a PersistedMetaPortfolio implementation that persists state in a RedisRepository. This also contains example implementations of a OrderAllocator & OrderEvaluator, and help the Portfolio make decisions on whether to generate OrderEvents and of what size.

strategy

Defines a SignalEvent, and provides the SignalGenerator trait for handling the generation of them. Contains an example RSIStrategy implementation that analyses a MarketEvent and may generate a new SignalEvent, an advisory signal for a Portfolio OrderGenerator to analyse.