PVOL
The Percent of Volume (PVOL) algorithm is designed to execute large orders with minimal market impact. Like the Time Weighted Average Price (TWAP) algorithm, PVOL aims to spread the execution of a large order over a specified period. Unlike TWAP, which divides orders into equal chunks over time, PVOL dynamically adjusts order sizes based on the market volume during each interval.
Order Management: PVOL orders use parameters similar to TWAP and VWAP orders, such as entry/stop times, duration, and participation percentage.
Calculation: At the end of each interval:
- Total market volume for the interval,
VOL(Ti)
, is calculated. - Child order quantity is determined using the formula:
Quantity(Child) = VOL(Ti) * ParticipationVolume
- Total market volume for the interval,
Cancellation: The PVOL order is cancelled if the specified order end time is reached.
Modifiable Parameters
- Price: The desired price for the order.
- Quantity: The total quantity of the order.
- ParticipationVolume: The percentage of market volume to target for each child order.
- IntervalVariance: Allows for variation in the length of order intervals.
Example
We send an order: BUY 100 BTC/USD @ 11000.
- Duration: 10 minutes
- Percent: 5%
- Participation Volume: 75%
PVOL splits 10 minutes into 5% parts (30 seconds). At each interval, PVOL sends a child order for 75% of trading volume observed during the elapsed interval. Depending on market conditions, PVOL may fill immediately, over several intervals, partially fill, or not fill at all. For example, if the trading volume is low, the participation volume parameter is set to a small number, and the minimum order size is large, the order will not fill. At the end of the order duration, PVOL is cancelled.
Example Usage
import { PVOLOrder } from '@botmain/execution';
// Create a new PVOL order with an inline object
const pvolOrder = new PVOLOrder({
instrument: 'BTCUSD',
size: 100,
side: 'buy',
price: 11000,
startTime: new Date(),
endTime: new Date(Date.now() + 10 * 60 * 1000), // 10 minutes from now
participationVolume: 0.75,
intervalVariance: 0.05 // Allow for 5% variance in interval lengths
});
await tradingApi.sendOrder(pvolOrder);