Module barter::portfolio

source ·
Expand description

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 MetaPortfolio implementation that persists state in a generic Repository. This also contains example implementations of an OrderAllocator & OrderEvaluator, which help the Portfolio make decisions on whether to generate OrderEvents and of what size.

Modules

Structs

  • Total and available balance at a point in time.
  • Orders are generated by the portfolio and details work to be done by an Execution handler to open a trade.
  • Builder to construct OrderEvent instances.

Enums

  • Type of order the portfolio wants the execution::handler to place.

Traits

Type Definitions

  • Communicates a String represents a unique identifier for an Engine’s Portfolio Balance.