Ramping Detection - Upward
Description
This test is designed to detect manipulative trading behaviors where an actor attempts to create an artificial upward trend in the price of a trading pair. This is typically achieved by placing a series of coordinated buy orders to systematically push the price beyond resistance levels, with the goal of attracting other traders and amplifying the price movement. Key characteristics of upward ramping include gradual, deliberate price movement through consistent buy orders, abnormal trading patterns such as a high ratio of ascending executions, and significant deviations from historical price and volume behavior.
Use Cases
-
Detection of Price Manipulation: Identify trading behaviors that artificially create upward price trends.
-
Market Integrity Protection: Prevent traders from exploiting manipulated trends to mislead other market participants.
Required Data
Trades Data
Variable | Description |
---|---|
timestamp | Timestamp of the trade made (YYYY-MM-DD hh:mm:ss). |
user_id | User ID to identify the individual user. |
symbol_pair | The asset symbol; e.g., BTCUSDT, SHIBETH, DOGEUSDT. |
side | Whether the trade is a BUY or SELL. |
price_usd | The price of the symbol in USD. |
price | The execution price of the symbol pair. |
amount | The amount of the symbol being traded. |
Parameters
Parameter | Description | Type | Default Value | Configurable |
---|---|---|---|---|
analysis_rolling_window_seconds | Duration of the rolling window for analysis and metrics computation, in seconds. | Integer | 30 | Yes |
resampling_period_seconds | Period for resampling historical data, in seconds. | Integer | 30 | Yes |
resampling_number_historical_windows | Number of historical resampling periods to calculate volume spikes. | Integer | 20 | Yes |
analysis_price_change_threshold | Threshold percentage for identifying significant price momentum. | Float | 0.03 (3%) | Yes |
historical_volume_spike_multiplier_total | Standard deviation multiplier for detecting total volume spikes relative to historical averages. | Float | 1.0 | Yes |
historical_volume_spike_multiplier_buy | Standard deviation multiplier for detecting buy volume spikes relative to historical averages. | Float | 1.0 | Yes |
historical_volume_spike_multiplier_sell | Standard deviation multiplier for detecting sell volume spikes relative to historical averages. | Float | 1.0 | Yes |
analysis_buy_direction_ratio_threshold | Minimum buy-to-total trade ratio for consistent buy direction. | Float | 0.5 (50%) | Yes |
analysis_sell_direction_ratio_threshold | Minimum sell-to-total trade ratio for consistent sell direction. | Float | 0.5 (50%) | Yes |
analysis_momentum_user_contribution_threshold | Minimum volume contribution percentage in the analysis window by a single user to flag Ramping activity. | Float | 0.3 (30%) | Yes |
post_trade_window | Time window (in seconds) after the analysis period to analyze subsequent trading activity for profitability. | Integer | 300 | Yes |
ramping_filter_pnl | Flag to filter Ramping events based on profitability (PnL). | Boolean | True | Yes |
ramping_pnl_percentage_threshold | Minimum PnL percentage threshold for filtering Ramping events. | Float | 0.03 (3%) | Yes |
analysis_minimum_buy_trade_count | Minimum required number of buy trades in analysis period to consider a user for Ramping analysis. | Integer | 3 | Yes |
analysis_minimum_sell_trade_count | Minimum required number of sell trades in analysis period to consider a user for Ramping analysis. | Integer | 3 | Yes |
analysis_minimum_positive_ascending_executions_threshold | Minimum ratio of positive ascending executions for buy trades to flag Ramping behavior. | Float | 0.6 (60%) | Yes |
analysis_minimum_negative_descending_executions_threshold | Minimum ratio of negative descending executions for sell trades to flag Ramping behavior. | Float | 0.6 (60%) | Yes |
analysis_minimum_aggregate_dollar_threshold | Minimum dollar volume threshold in the analysis window for trades to be considered. | Float | 100.0 | Yes |
create_ticket | Flag to determine if tickets should be created for alerts. | Boolean | True | Yes |
Methodology
- Calculate Rolling Metrics
Compute metrics over a rolling time window (
analysis_rolling_window_seconds
), including:
- Total volume, total dollar volume, average price, start price, and end price.
- Buy and sell counts, volumes, and dollar volumes.
- Detect Price Momentum Calculate the rolling price change percentage:
- Flag trades with significant positive price changes exceeding the
analysis_price_change_threshold
.
-
Analyze Volume Spikes Identify volume spikes for total, buy, and sell volumes by comparing rolling metrics to historical averages using multipliers (
historical_volume_spike_multiplier_total
,historical_volume_spike_multiplier_buy
,historical_volume_spike_multiplier_sell
). -
Check Trade Direction Consistency Calculate the ratio of buy-to-total and sell-to-total trades within the rolling window.
- Flag trades with consistent buy directions exceeding their respective thresholds (
analysis_buy_direction_ratio_threshold
andanalysis_sell_direction_ratio_threshold
).
- Identify Users Driving Ramping Group trades by user within the rolling window to compute:
- User-specific buy volumes, dollar volumes, trade counts, and volume-weighted average prices (VWAP).
- User contributions to total momentum based on their volume share compared to the rolling total.
- Check for a sufficient number of buy trades (
analysis_minimum_buy_trade_count
andanalysis_minimum_sell_trade_count
) and analyze ascending and descending executions.
-
Post-Trade Analysis Analyze trading activity in the
post_trade_window
to determine the impact of flagged trades on subsequent market movements. -
Final Flagging Trades are flagged as Positive Ramping if they meet all conditions:
- Significant price change.
- Volume spike in buy activity.
- Direction consistency.
- Significant user contribution to the Ramping event.
- Optional profitability filter, if enabled.
Test Meta Data
Test Meta Label | Description |
---|---|
ramping_upward | Detects users engaging in upward ramping where price has increased significantly, buy volume has spiked, there is consistency in buying activity, and where the user has contributed significantly to the buy volume spike with multiple trades and has made a profit. |