Uses of Enum Class
com.quantfinlib.orderbook.Side
Packages that use Side
Package
Description
Bar-based backtesting.
Event-driven tick-level backtesting — the level below bars, where queue
position decides whether a passive order actually trades:
TickBacktester replays QFLT tick
files through a TickStrategy with
microstructure-aware fills (market orders pay half the spread; limit
orders fill on trade-through or earn fills print-by-print against a
simulated queue; optional tick-size grid for real-world prices; no fills
against the triggering print).Execution strategy support:
SmartOrderRouter (fee-adjusted
multi-venue splitting, dark-first option), its zero-allocation
hot-lane sibling HftSor, and the
full-checklist AdaptiveSor
(expected-cost routing over displayed + hidden liquidity, fees/rebates,
latency, fill probability and a reliability veto, with contingent dark
probes) learning from VenueScorecard
(streaming per-venue fill rate, measured latency, realized dark fills),
TwapScheduler /
VwapScheduler (schedule design with
anti-gaming jitter and exact largest-remainder allocation),
PovTracker (streaming
percentage-of-volume participation),
ImplementationShortfallScheduler
(Almgren-Chriss-optimal slicing),
WmrFixingScheduler (benchmark-window
TWAP replication),
BenchmarkExecutor (the DYNAMIC
benchmark algo: one stateful executor tracking VWAP / TWAP / Arrival /
Implementation Shortfall / Closing / Opening / Participation, re-deciding
each interval from live spread, depth, volatility, volume curve, alpha
and liquidity — cross-asset),
LiquiditySeekingAlgo (the
opportunistic archetype: burst when the spread is under its
time-of-day forecast in a calm regime, guaranteed by a completion
floor over the final stretch),
PortfolioExecutor (multi-symbol
portfolio-level scheduling over per-symbol BenchmarkExecutor children:
leg-balance band for two-sided transitions, per-interval notional budget
allocated risk-weighted — overlays only ever damp a child's own due, so
per-symbol benchmark integrity holds),
IcebergOrder (display/reload state
machine), DarkPoolSimulator
(midpoint cross with minimum-execution-quantity),
MidPegTracker (peg repricing with
thresholds) and VenueBenchmark
(fill rate, effective spread, markout per venue).Zero-dependency FIX 4.4 engine.
Market data transport, two lanes:
Market microstructure analytics:
MarketImpactModel (square-root law
+ Almgren-Chriss temporary/permanent decomposition),
AlmgrenChriss (closed-form optimal
execution trajectories on the cost/risk frontier),
QueueModel (fill probability from
queue position and latency advantage),
TransactionCostAnalyzer
(implementation shortfall, slippage vs VWAP, effective spread per fill),
TickSizeSchedule (banded price
grids) and Auction (call uncross).Limit order book modeling, in two deliberate lanes:
OrderBook is the research-grade model
(price-time-priority matching with cancels, partial fills, queue-position
queries and order-to-trade counters — readable TreeMap/object internals);
HftOrderBook is the venue-grade core
(dense integer-tick price ladder with occupancy bitmaps, pooled intrusive
order nodes, primitive open-addressing id map, zero allocation —
~204 ns/op, 10M+ fills/sec measured by HftBookBenchmark).Benchmark and regulatory metrics:
FixAnalyzer (WM/Reuters-style fix
calculation and "banging the close" screening),
BestExecutionAnalyzer (MiFID II-style
slippage, latency-to-fill and per-venue reporting) and
MarketQualityMetrics
(quoted/effective/realized spread, price impact, order-to-trade ratio).Risk: measurement, decomposition, credit/limits, and model validation.
SBE-style binary wire codecs and channel adapters — the professional-grade
alternative to the text edges (JSON WebSocket in, FIX tag-value out):
TradeFlyweight,
OrderFlyweight and
QuoteFlyweight encode/decode at fixed buffer
offsets with zero allocation, zero parsing and zero copying;
BinaryMarketDataClient feeds the
HftMarketDataBus from a binary stream and
BinaryOrderPublisher/BinaryOrderReceiver
carry gateway orders over a binary channel.Order entry, two lanes (mirroring
marketdata):-
Uses of Side in com.quantfinlib.backtest
Methods in com.quantfinlib.backtest that return SideModifier and TypeMethodDescriptionParentOrder.side()Returns the value of thesiderecord component.Methods in com.quantfinlib.backtest with parameters of type SideModifier and TypeMethodDescriptionExecutes up torequestedQtyon this bar.default voidExecutionModel.onParentOrder(Side side, long totalQuantity, int signalIndex) Notification that a new parent order has been created (entry or exit).voidIcebergExecution.onParentOrder(Side side, long totalQuantity, int signalIndex) voidLastLookExecution.onParentOrder(Side side, long totalQuantity, int signalIndex) ExecutionAlgoBacktester.run(BarSeries series, Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark) ExecutionAlgoBacktester.run(com.quantfinlib.core.BarSeries, com.quantfinlib.orderbook.Side, long, com.quantfinlib.execution.BenchmarkExecutor.Benchmark, double)for the time/volume benchmarks (no POV rate needed).ExecutionAlgoBacktester.run(BarSeries series, Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark, double povRate) WorksparentQtythrough the session underbenchmarkand grades it.Constructors in com.quantfinlib.backtest with parameters of type SideModifierConstructorDescriptionParentOrder(Side side, int signalIndex, double arrivalPrice, String reason, List<Execution> fills, int[] fillBarIndices) Creates an instance of aParentOrderrecord class. -
Uses of Side in com.quantfinlib.backtest.tick
Methods in com.quantfinlib.backtest.tick with parameters of type SideModifier and TypeMethodDescriptionlongTickBacktester.submitLimit(int symbolId, Side side, double price, long quantity) longTickTradingContext.submitLimit(int symbolId, Side side, double price, long quantity) Places a passive limit order.longTickBacktester.submitMarket(int symbolId, Side side, long quantity) longTickTradingContext.submitMarket(int symbolId, Side side, long quantity) Immediate execution at the last trade price plus half the configured spread (aggressor pays the spread). -
Uses of Side in com.quantfinlib.execution
Methods in com.quantfinlib.execution that return SideModifier and TypeMethodDescriptionBenchmarkExecutor.side()VenueBenchmark.Sample.side()Returns the value of thesiderecord component.Methods in com.quantfinlib.execution with parameters of type SideModifier and TypeMethodDescriptionstatic BenchmarkExecutorBenchmarkExecutor.of(Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark) Sensible defaults: alpha urgency 1 (a full-scale normalized alpha of ±1 doubles/halves the pace — smooth, never rail-pinned), child capped at 25% of displayed depth.static BenchmarkExecutorPOV convenience.longDarkPoolSimulator.restingQty(Side side) Total hidden resting quantity on a side (for simulation introspection only).AdaptiveSor.route(Side side, long quantity, List<VenueQuote> venues) Routes a marketable parent ofquantity.longRoutes a marketable order across venues by best all-in price (quote ± fee), splitting at displayed size.static SmartOrderRouter.RoutingPlanSmartOrderRouter.route(Side side, long quantity, List<VenueQuote> venues, boolean preferDark) Submits an order: crosses immediately against resting contra interest at the current mid (time priority), then rests the remainder.Constructors in com.quantfinlib.execution with parameters of type SideModifierConstructorDescriptionBenchmarkExecutor(Side side, long parentQty, BenchmarkExecutor.Benchmark benchmark, double participationRate, double alphaUrgency, double maxDepthFraction) MidPegTracker(Side side, double offset, double limitPrice, double repriceThreshold) Sample(String venue, Side side, double price, long quantity, double midAtExec, double midAfterHorizon, long latencyToFillNanos, boolean filled) Creates an instance of aSamplerecord class. -
Uses of Side in com.quantfinlib.fix
Methods in com.quantfinlib.fix that return SideModifier and TypeMethodDescriptionExecutionReport.side()Returns the value of thesiderecord component.NewOrderSingle.side()Returns the value of thesiderecord component.OrderCancelReplaceRequest.side()Returns the value of thesiderecord component.OrderCancelRequest.side()Returns the value of thesiderecord component.Methods in com.quantfinlib.fix with parameters of type SideModifier and TypeMethodDescriptionintFixOrderEncoder.encodeLimit(long msgSeqNum, long clOrdId, int symbolId, Side side, long quantity, long priceMantissa, int priceDecimals, long epochMillis) Encodes a limit NewOrderSingle into the reusable buffer.intFixOrderEncoder.encodeMarket(long msgSeqNum, long clOrdId, int symbolId, Side side, long quantity, long epochMillis) Market NewOrderSingle (40=1, no price tag).FixSession.sendNewOrderSingle(String clOrdId, String symbol, Side side, long quantity, double limitPrice, char timeInForce) Sends a NewOrderSingle.FixSession.sendOrderCancelReplace(String clOrdId, String origClOrdId, String symbol, Side side, long quantity, double limitPrice, char timeInForce) Sends an OrderCancelReplaceRequest (35=G);limitPrice = NaN= market.FixSession.sendOrderCancelRequest(String clOrdId, String origClOrdId, String symbol, Side side, long quantity) Sends an OrderCancelRequest (35=F) for a working order.Constructors in com.quantfinlib.fix with parameters of type SideModifierConstructorDescriptionExecutionReport(String orderId, String execId, char execType, char ordStatus, String clOrdId, String symbol, Side side, double lastQty, double lastPrice, double cumQty, double leavesQty, double avgPrice) Creates an instance of aExecutionReportrecord class.NewOrderSingle(String clOrdId, String symbol, Side side, long quantity, char ordType, double price, char timeInForce) Creates an instance of aNewOrderSinglerecord class.OrderCancelReplaceRequest(String clOrdId, String origClOrdId, String symbol, Side side, long quantity, char ordType, double price, char timeInForce) Creates an instance of aOrderCancelReplaceRequestrecord class.OrderCancelRequest(String clOrdId, String origClOrdId, String symbol, Side side, long quantity) Creates an instance of aOrderCancelRequestrecord class. -
Uses of Side in com.quantfinlib.marketdata
Methods in com.quantfinlib.marketdata with parameters of type SideModifier and TypeMethodDescriptionbooleanAdd order: appends to its level's FIFO.longResting quantity at an absolute tick (0 when off-band or empty).intDepth snapshot into caller arrays, best-first; returns levels written. -
Uses of Side in com.quantfinlib.microstructure
Methods in com.quantfinlib.microstructure that return SideModifier and TypeMethodDescriptionExecution.side()Returns the value of thesiderecord component.Constructors in com.quantfinlib.microstructure with parameters of type Side -
Uses of Side in com.quantfinlib.orderbook
Subclasses with type arguments of type Side in com.quantfinlib.orderbookMethods in com.quantfinlib.orderbook that return SideModifier and TypeMethodDescriptionSide.opposite()LimitOrder.side()static SideReturns the enum constant of this class with the specified name.static Side[]Side.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods in com.quantfinlib.orderbook with parameters of type SideModifier and TypeMethodDescriptionlongTotal resting quantity on a side across its bestmaxLevels.static longBookAnalytics.depthWithinBps(OrderBook book, Side side, double bps) Resting quantity on a side priced withinbpsof the mid.List<double[]> Price/quantity pairs for the given side's bestmaxLevels(side = the resting liquidity side: BUY returns bids).longResting quantity at an absolute tick (0 when off-band or empty).intDepth snapshot into caller-provided arrays (absolute ticks + level quantities, best-first): zero allocation.longFill-or-kill: executes the full quantity within the limit price or does nothing at all.longImmediate-or-cancel: a price-limited taker — matches while it crosses, and the remainder expires instead of resting.longHftOrderBook.submitLimit(Side side, int priceTick, long quantity, long timestampNanos) Limit order: matches against the opposite side while it crosses, rests any remainder atpriceTick.longOrderBook.submitLimit(Side side, double price, long quantity, long timestampNanos) Submits a limit order: matches any crossing liquidity, then rests the remainder.longHftOrderBook.submitMarket(Side side, long quantity, long timestampNanos) Market order: matches against the whole opposite book, never rests.longOrderBook.submitMarket(Side side, long quantity, long timestampNanos) Submits a market order; any unfilled remainder is discarded.longHftOrderBook.submitPostOnly(Side side, int priceTick, long quantity, long timestampNanos) Post-only (add-liquidity-only) limit order: rests atpriceTick, or is rejected withHftOrderBook.REJECT_WOULD_CROSSwhen it would trade on arrival — the maker-fee-preserving order type.static BookAnalytics.SweepResultSimulates (without mutating the book) sweepingquantitywith a marketable order ontakerSide: returns achievable fill, VWAP fill price, and impact versus the pre-sweep mid. -
Uses of Side in com.quantfinlib.regulatory
Methods in com.quantfinlib.regulatory that return SideModifier and TypeMethodDescriptionBestExecutionAnalyzer.OrderOutcome.side()Returns the value of thesiderecord component.Methods in com.quantfinlib.regulatory with parameters of type SideModifier and TypeMethodDescriptionstatic doubleMarketQualityMetrics.effectiveSpreadBps(Side takerSide, double price, double midAtExecution) Effective spread:2 * sign * (price - mid) / mid— what the taker actually paid.static doubleMarketQualityMetrics.priceImpactBps(Side takerSide, double midAtExecution, double midAfterHorizon) Price impact: how far the mid moved in the taker's direction after the trade (2 * sign * (midAfter - midAtExec) / midAtExec); effective spread ≈ realized spread + price impact.static doubleMarketQualityMetrics.realizedSpreadBps(Side takerSide, double price, double midAfterHorizon) Realized spread: effective spread measured against the mid some horizon after the trade — the part of the spread the liquidity provider kept after adverse selection.Constructors in com.quantfinlib.regulatory with parameters of type SideModifierConstructorDescriptionOrderOutcome(String orderId, String venue, Side side, long quantity, double arrivalMid, double executionPrice, long latencyToFillNanos, boolean filled) Creates an instance of aOrderOutcomerecord class. -
Uses of Side in com.quantfinlib.risk
Methods in com.quantfinlib.risk that return SideModifier and TypeMethodDescriptionPreTradeLimitChecker.OrderRequest.side()Returns the value of thesiderecord component.Constructors in com.quantfinlib.risk with parameters of type SideModifierConstructorDescriptionOrderRequest(String symbol, Side side, long quantity, double price, String counterparty) Creates an instance of aOrderRequestrecord class. -
Uses of Side in com.quantfinlib.sbe
Methods in com.quantfinlib.sbe that return SideMethods in com.quantfinlib.sbe with parameters of type SideModifier and TypeMethodDescriptionOrderFlyweight.encode(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos) Encodes a full order message at the wrap position (writes the type header).voidBinaryOrderPublisher.onOrder(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos) -
Uses of Side in com.quantfinlib.trading
Methods in com.quantfinlib.trading with parameters of type SideModifier and TypeMethodDescriptionintValidates one order.voidApplies a fill to the position book — callable from the venue-ack thread (atomic add: concurrent fill sources cannot lose updates).voidOrderGateway.ExecutionListener.onFill(long orderId, String symbol, Side side, double price, long quantity, long timestampNanos) voidOrderListener.onOrder(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos) booleanOrderRingBuffer.publish(long orderId, int symbolId, Side side, long quantity, double price, long timestampNanos) Producer side (trading thread).longRisk-checks and submits one order.longOrderGateway.submitLimit(String symbol, Side side, long quantity, double price) Submits a limit order; returns the order id (status may be REJECTED).longPaperTradingGateway.submitLimit(String symbol, Side side, long quantity, double price) longOrderGateway.submitMarket(String symbol, Side side, long quantity) Submits a market order for immediate execution at the touch.longPaperTradingGateway.submitMarket(String symbol, Side side, long quantity)