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
Logic for
OrderEvent
quantity allocation.Barter portfolio module specific errors.
Core Portfolio logic containing an implementation of
MarketUpdater
,
OrderGenerator
and FillUpdater
. Utilises the risk and allocator logic to optimise
OrderEvent
generation.Data structures encapsulating the state of a trading
Position
, as
well as the logic for entering, updating and exiting them.Repositories for persisting Portfolio state.
Logic for evaluating the risk associated with a proposed
OrderEvent
.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
Updates the Portfolio from an input
FillEvent
.Updates the Portfolio from an input
MarketEvent
.May generate an
OrderEvent
from an input advisory Signal
.