AlgoTrader UML Model
AlgoTrader UML Model
AlgoTrader UML Model
<<Entity>> <<Entity>>
WatchListItem <<AlgoTraderEntity>>
Order
+persistent : boolean
+number : int
+@findByStrategyAndSecurity()
* +side : Side
* +quantity : long
1 +tif : TIF 1 <<Entity>>
+tifDate : Date [0..1] Strategy
<<Entity>> +ocoType : OCOType
Security +name : String
+underlaying *
1 +autoActivate : boolean
0..1 +isin : String +parentOrder +allocation : double
+symbol : String [0..1] +modules : String
<<Entity>>
+getCurrentValue() <<AlgoTraderEntity>> +isBase()
+getLastTrade() +getCashBalanceDouble()
Fill
+getLastBid() +getSecuritiesCurrentValueDouble()
+getLastAsk() +dateTime : Date +getMaintenanceMarginDouble()
+getLastTick() +side : Side +getInitialMarginDouble()
<<Entity>> * +underlaying +getLastBar() +quantity : long +getNetLiqValueDouble()
+getMargin() +price : Money +getAvailableFundsDouble()
SecurityFamily 0..1
+isOnWatchlist() +commission : Money +getPortfolioCashBalanceDouble()
+name : String * +@findByIdFetched() +getPortfolioSecuritiesCurrentValueDouble()
*
+market : Market +@findByIsin() +getPortfolioMaintenanceMarginDouble()
1
+currency : Currency +@findByIsinFetched() 0..1 * +getPortfolioInitialMarginDouble()
+contractSize : int +@findBySymbol() <<Entity>> +getPortfolioNetLiqValueDouble()
+tickSize : double +@findSecuritiesInPortfolio() +getPortfolioAvailableFundsDouble()
Transaction
+commission : Money [0..1] +@findSecuritiesOnWatchlist() +@findByName()
+marketOpen : Time +@findSecuritiesOnActiveWatchlist() +dateTime : Date +@findByNameFetched()
+marketClose : Time * +quantity : long +@findAutoActivateStrategies()
1
+tradeable : boolean +price : Money 0..1 1
+expirable : boolean <<Entity>> 0..1 * +commission : Money [0..1]
+currency : Currency *
+@findByIsin() Position
+type : TransactionType
+quantity : long
+getValue()
+exitValue : Double [0..1]
+getValueDouble()
+maintenanceMargin : Money [0..1]
+@findAllTrades()
+isOpen() +@findAllCashflows()
+isLong()
+isShort()
+isFlat()
+getMarketPriceDouble() *
+getMarketValueDouble()
+getMaintenanceMarginDouble()
+getExitValueDouble()
+@findOpenPositions()
+@findOpenPositionsByStrategy()
+@findByIdFetched()
+@findBySecurityAndStrategy()
<<Entity>> * 1
MarketDataEvent
<<Entity>>
+dateTime : Date
Security
<<Entity>> <<Entity>>
<<AlgoTraderEntity>> <<AlgoTraderEntity>>
Bid Ask
<<Entity>>
Strategy
1
0..1
+parentOrder *
<<Entity>>
<<AlgoTraderEntity>> <<Entity>>
+childOrders * 1
<<Entity>> <<AlgoTraderEntity>>
Order
<<AlgoTraderEntity>> 0..* <<Entity>> Fill
OrderStatus +number : int Security
+side : Side +dateTime : Date * 1
+status : Status 1 +quantity : long 1 +side : Side
+quantity : long <<Entity>>
+filledQuantity : long +parentOrder +tif : TIF +parentOrder +price : Money Transaction
+remainingQuantity : long +tifDate : Date [0..1]
+ocoType : OCOType +commission : Money
StopOrderInterface
+stop : Money
LimitOrderInterface
+limit : Money
<<Service>> <<Service>>
MarketDataService RuleService
<<Service>>
LookupService
<<Service>>
<<Service>> <<Service>>
StrategyService
RuleService SimulationService
<<Entity>>
<<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>> <<Entity>>
Strategy
Position Strategy Tick Security Transaction SecurityFamily Security Transaction Position WatchListItem Strategy
<<Service>>
<<Service>> <<Service>> <<Service>> <<Service>> <<Service>>
<<Service>> RuleService
OrderService PositionService RuleService RuleService TransactionService
OrderService
BaseEntity
+toString() : String
+AMEX : String +CHF : String +BUY : String +CALL : String +DISCONNECTED : String
+AUTO : String +EUR : String +SELL : String +PUT : String +CONNECTED : String
+CBOE : String +USD : String +READY : String
+CBOT : String +GBP : String +SUBSCRIBED : String
+CFE : String
<<Enumeration>> <<Enumeration>>
+CME : String <<Enumeration>>
+DTB : String TIF MarketDataType
Status
+GLOBEX : String +DAY : String +TICK : String
+ECBOT : String +OPEN : String +GTC : String +BAR : String
+IDEALPRO : String +SUBMITTED : String +GTD : String
+NYBOT : String +PARTIALLY_EXECUTED : String
+NYMEX : String +EXECUTED : String
+NASDAQ : String +CANCELED : String
+NYSE : String +AUTOMATIC : String
+OTCBB : String +PREARRANGED : String
+PINK : String
+SMART : String <<Enumeration>>
+SOFFEX : String TransactionType <<Enumeration>>
+LMAX : String OCOType
+BUY : String
+SELL : String +NONE : String
+EXPIRATION : String +CANCEL_OTHERS : String
+CREDIT : String +REDUCE_OTHERS : String
+DEBIT : String
+INTREST : String
+FEES : String
+REBALANCE : String
<<Entity>> <<Entity>>
Tick Bar
+sendOrder() +completeRawTick()
+sendExternalOrder() +completeBar()
+cancelOrder() +propagateMarketDataEvent()
+cancelExternalOrder() +initWatchlist()
+modifyOrder() +reinitWatchlist()
+modifyExternalOrder() +putOnWatchlist()
+propagateOrder() +putOnWatchlist()
+propagateOrderStatus() +removeFromWatchlist()
+removeFromWatchlist()
+putOnExternalWatchlist()
+removeFromExternalWatchlist()
<<Service>> <<Service>>
IBOrderService IBMarketDataService
0..1
+underlaying
<<Entity>>
*
Security
<<Entity>>
+isin : String
SecurityFamily
+symbol : String [0..1] +underlaying *
0..1 +name : String
+getCurrentValue()
+market : Market
+getLastTrade()
+currency : Currency
+getLastBid()
+contractSize : int
+getLastAsk() *
+tickSize : double
+getLastTick()
+commission : Money [0..1]
+getLastBar()
+marketOpen : Time
+getMargin()
+marketClose : Time
+isOnWatchlist()
+tradeable : boolean
+@findByIdFetched()
+expirable : boolean
+@findByIsin()
+@findByIsinFetched() +@findByIsin()
+@findBySymbol()
+@findSecuritiesInPortfolio()
+@findSecuritiesOnWatchlist()
+@findSecuritiesOnActiveWatchlist()
<<ValueObject>> <<ValueObject>>
Contract ContractDetailsCommon ContractDetailsEnd
Details
+reqId : int +reqId : int
+contractDetails : ContractDetails
<<ValueObject>> <<ValueObject>>
Executions ExecDetails ExecDetailsEnd
+reqId : int +reqId : int
+contract : Contract
+execution : Execution
<<ValueObject>> <<ValueObject>>
Market Depth UpdateMktDepth UpdateMktDepthL2
+tickerId : int +tickerId : int
+position : int +position : int
+operation : int +marketMaker : String
+side : int +operation : int
+price : double +side : int
+size : int +price : double
+size : int
<<ValueObject>>
News UpdateNewsBulletin
Bulletins
+msgId : int
+msgType : int
+message : String
+origExchange : String
<<ValueObject>> <<ValueObject>>
Financial
Advisors ManagedAccounts ReceiveFA
+accountsList : String +faDataType : long
+xml : String
<<ValueObject>>
HistoricalData
+reqId : int
Historical +date : String
Data +open : double
+high : double
+low : double
+close : double
+volume : int
+count : int
+WAP : double
+hasGaps : boolean
<<ValueObject>>
Real Time RealtimeBar
Bars
+reqId : int
+time : long
+open : double
+high : double
+low : double
+close : double
+volume : long
+WAP : double
+count : int
<<ValueObject>>
Fundamental
Bars FundamentalData
+reqId : int
+data : String
<<ValueObject>>
DeltaNeutralValidation
+i : int
+underComp : UnderComp