Skip to main content

Layering and Spoofing Detection Test

Description

This test identifies manipulative trading behaviors where a trader uses non-bona fide orders to create a false perception of market supply or demand.

  • Spoofing: Placing visible orders at the top of the order book to influence the market, executing trades on the opposite side at a favorable price, followed by rapid order cancellation.
  • Layering: Extending spoofing by placing multiple non-bona fide orders across price tiers to manipulate the market midpoint.

This test analyzes order placement, cancellation patterns, and subsequent executions to flag significant deviations from normal trading behavior.

Use Cases

  • Market Manipulation Detection: Identifies traders employing layering or spoofing tactics to distort market supply or demand, influencing prices unfairly and misleading other participants.

  • Regulatory Oversight: Monitors behaviors that breach market manipulation regulations, enabling compliance teams to detect, investigate, and report non-compliant trading activity.

Required Data

Trades Data

VariableDescription
timestampTimestamp of the trade (YYYY-MM-DD hh:mm:ss).
user_idUser ID to identify the individual user.
currency_typeThe currency type of trade; fiat or crypto.
symbol_pairAsset symbol; e.g., BTCUSDT, SHIBETH.
sideWhether the trade is a BUY or SELL.
price_usdPrice of the symbol in USD.
priceExecution price of the symbol pair.
amountAmount of the symbol being traded.

Orders Data

VariableDescription
user_idUser ID to identify the individual user.
order_idUnique identifier for the order.
order_start_timestampOrder creation timestamp.
order_end_timestampLast update timestamp.
symbol_pairAsset symbol; e.g., BTCUSDT, SHIBETH.
statusCANCELLED, FILLED, or PARTIALLY FILLED.
price_usdPrice of the symbol in USD.
amountAmount of the symbol being traded.
sideWhether the trade is a BUY or SELL.
priceQuote currency value; e.g., ETH/BTC = 0.03781.

Parameters

ParameterDescriptionTypeDefault ValueConfigurable
historical_cancellation_period_windowDays to get orders for calculating avg cancellation period.Integer3Yes
analysis_rolling_window_secondsTime before a trade to analyze orders & cancellations.Integer60Yes
spoofing_execution_windowTime after rolling window to analyze executed trades.Integer300Yes
spoofing_cancellation_volume_multiplierMultiplier for avg historical cancellation volume.Float1Yes
spoofing_orders_to_trades_volume_ratioMin ratio of spoofing order volume to trade volume.Float1Yes
minimum_executed_dollar_thresholdMin executed trade volume to analyze activity.Float500Yes
mm_buy_sell_dollar_volume_thresholdThreshold for buy/sell balance to exclude market makers.Float0.2Yes

Methodology

  • Aggregate User Activity Analyze transaction and order data by aggregating total dollar volumes and trade counts for each user over a defined time period. This helps identify patterns of fund movement or concentrated activity.

  • Set Thresholds for Anomaly Detection Establish thresholds for normal activity based on historical averages and deviations. Transactions and cancellations that exceed these thresholds are flagged for further scrutiny.

  • Analyze Cancellation-to-Trade Ratios Compare the volume of canceled orders to executed trades for each user. Flag users with disproportionate ratios or excessively high cancellation volumes, especially when these ratios exceed pre-defined limits.

  • Segment and Detect Temporal Patterns Break down data into rolling time windows to examine short-term activity. Identify users engaging in rapid cancellations or trades indicative of manipulative behavior.

  • Generate Reports for Flagged Users Summarize flagged users’ activity, including key metrics like cancellation volumes, trade counts, and abnormal patterns. Store these results in detailed reports for compliance investigations.