R&D Blog
Volume Filters: Part 2 | Trading Strategy (Entry & Exit)
I. Trading Strategy
Developer: Joseph Granville (On-Balance Volume); R. D. Donchian (Breakout Channels). Concept: Trading strategy based on price breakouts confirmed by OBV (On-Balance Volume) filters. Research Question: Can volume filters improve price breakouts? Specification: Table 1. Results: Figure 1-2. Trade Setup: Long Entry Setup: High[i] > EntryUpPriceChannel[i − 1]. Short Entry Setup: Low[i] < EntryDnPriceChannel[i − 1]. Index: i ~ Current Bar. Trade Filter: Volume Filter (Table 1). Trade Entry: Long Trade Entry: A buy at the open is placed after Long Entry Setup and Long Entry Filter. Short Trade Entry: A sell at the open is placed after Short Entry Setup and Short Entry Filter. Trade Exit: Table 1. Portfolio: 42 futures markets from four major market sectors (commodities, currencies, interest rates, and equity indexes). Data: 37 years since 1980. Testing Platform: MATLAB®.
II. Sensitivity Test
All 3-D charts are followed by 2-D contour charts for Profit Factor, Sharpe Ratio, Ulcer Performance Index, CAGR, Maximum Drawdown, Percent Profitable Trades, and Avg. Win / Avg. Loss Ratio. The final picture shows sensitivity of Equity Curve.
Tested Variables: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 1 | Portfolio Performance (Inputs: Table 1; Commission & Slippage: $0).
STRATEGY | SPECIFICATION | PARAMETERS |
Auxiliary Variables: | Price Channels: EntryUpPriceChannel(Entry_Look_Back) is the highest high over a period of Entry_Look_Back. EntryDnPriceChannel(Entry_Look_Back) is the lowest low over a period of Entry_Look_Back. ExitUpPriceChannel(Exit_Look_Back) is the highest high over a period of Exit_Look_Back. ExitDnPriceChannel(Exit_Look_Back) is the lowest low over a period of Exit_Look_Back. On-Balance Volume (OBV): If Close[i] > Close[i − 1] then OBV[i] = OBV[i − 1] + Volume[i]; If Close[i] < Close[i − 1] then OBV[i] = OBV[i − 1] − Volume[i]; If Close[i] = Close[i − 1] then OBV[i] = OBV[i − 1]; Index: i ~ Current Bar. Volume Channels: EntryUpOBVChannel(Entry_Look_Back) is the highest OBV over a period of Entry_Look_Back. EntryDnOBVChannel(Entry_Look_Back) is the lowest OBV over a period of Entry_Look_Back. ExitUpOBVChannel(Exit_Look_Back) is the highest OBV over a period of Exit_Look_Back. ExitDnOBVChannel(Exit_Look_Back) is the lowest OBV over a period of Exit_Look_Back. | Entry_Look_Back = [5, 200], Step = 5 (bars); Exit_Index= [5, 100], Step = 5 (% of Entry_Look_Back); Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100; |
Setup: | Long Entry Setup: If High[i] > EntryUpPriceChannel[i − 1]; Short Entry Setup: If Low[i] < EntryDnPriceChannel[i − 1]; Long Exit Setup: If Low[i] < ExitDnPriceChannel[i − 1]; Short Exit Setup: If High[i] > ExitUpPriceChannel[i − 1]; Index: i ~ Current Bar. | |
Filter: | Long Entry Filter: If OBV[i] > EntryUpOBVChannel[i − 1]; Short Entry Filter: If OBV[i] < EntryDnOBVChannel[i − 1]; Long Exit Filter: If OBV[i] < ExitDnOBVChannel[i − 1]; Short Exit Filter: If OBV[i] > ExitUpOBVChannel[i − 1]; Index: i ~ Current Bar. | |
Entry: | Long Trades: A buy at the open is placed after Long Entry Setup (i.e. Long Price Breakout) and Long Entry Filter (i.e. Long OBV Breakout). Short Trades: A sell at the open is placed after Short Entry Setup (i.e. Short Price Breakout) and Short Entry Filter (i.e. Short OBV Breakout). | |
Exit: | Channel Exit: Long Trades: A sell at the open is placed after Long Exit Setup and Long Exit Filter. Short Trades: A sell at the open is placed after Short Exit Setup and Short Exit Filter. Stop Loss Exit: ATR(ATR_Length) is the Average True Range over a period of ATR_Length. ATR_Stop is a multiple of ATR(ATR_Length). Long Trades: A sell stop is placed at [Entry − ATR(ATR_Length) * ATR_Stop]. Short Trades: A buy stop is placed at [Entry + ATR(ATR_Length) * ATR_Stop]. Stop Loss Exit is used to normalize risk via position sizing. | ATR_Length = 20; ATR_Stop = 6; |
Sensitivity Test: | Entry_Look_Back = [5, 200], Step = 5 (bars) Exit_Index = [5, 100], Step = 5 (% of Entry_Look_Back) Exit_Look_Back = Entry_Look_Back * Exit_Index ÷ 100 | |
Position Sizing: | Initial_Capital = $1,000,000 Fixed_Fractional = 1% Portfolio = 42 US Futures ATR_Stop = 6 (ATR ~ Average True Range) ATR_Length = 20 | |
Data: | 42 futures markets; 37 years (1980/01/01−2017/07/31) |
Table 1 | Specification of Trading Strategy.
III. Sensitivity Test with Commission & Slippage
Tested Variables: Entry_Look_Back & Exit_Index (Definitions: Table 1):
Figure 2 | Portfolio Performance (Inputs: Table 1; Commission & Slippage: $100 Round Turn).
IV. Benchmarking
We benchmark the base case strategy (i.e. OBV filters turned off; Table 2) against the same strategy using volume filters (i.e. OBV filters turned on; Table 3):
Case #1a: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); OBV Filters: Off.
Case #2a: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); OBV Filters: Off.
Case #3a: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); OBV Filters: Off.
Case #4a: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); OBV Filters: Off.
OBV Filers: Off | Case #1a | Case #2a | Case #3a | Case #4a |
Net Profit ($) | 440,110,888 | 152,729,764 | 177,143,846 | 19,227,786 |
Sharpe Ratio | 0.95 | 0.78 | 0.78 | 0.49 |
Ulcer Performance Index (UPI) | 1.22 | 0.83 | 0.93 | 0.34 |
Profit Factor | 1.45 | 1.25 | 1.22 | 1.05 |
CAGR (%) | 17.77 | 14.40 | 14.79 | 8.33 |
Max. Drawdown (%) | (46.35) | (53.84) | (44.92) | (57.34) |
Percent Profitable Trades (%) | 42.80 | 40.98 | 40.59 | 37.35 |
Avg. Win / Avg. Loss Ratio | 1.93 | 1.80 | 1.79 | 1.76 |
Table 2 | Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
Case #1b: Entry_Look_Back = 200 (bars); Exit_Index = 50 (%); OBV Filters: On.
Case #2b: Entry_Look_Back = 150 (bars); Exit_Index = 50 (%); OBV Filters: On.
Case #3b: Entry_Look_Back = 100 (bars); Exit_Index = 50 (%); OBV Filters: On.
Case #4b: Entry_Look_Back = 50 (bars); Exit_Index = 50 (%); OBV Filters: On.
OBV Filters: On | Case #1b | Case #2b | Case #3b | Case #4b |
Net Profit ($) | 191,322,557 | 144,027,221 | 235,971,666 | 54,128,730 |
Sharpe Ratio | 0.86 | 0.81 | 0.85 | 0.64 |
Ulcer Performance Index (UPI) | 1.09 | 1.02 | 1.04 | 0.69 |
Profit Factor | 1.42 | 1.30 | 1.25 | 1.12 |
CAGR (%) | 15.18 | 14.23 | 15.66 | 11.26 |
Max. Drawdown (%) | (43.89) | (43.89) | (42.60) | (42.64) |
Percent Profitable Trades (%) | 38.47 | 38.99 | 40.81 | 39.30 |
Avg. Win / Avg. Loss Ratio | 2.27 | 2.03 | 1.81 | 1.73 |
Table 3 | Inputs: Table 1; Fixed Fractional Sizing: 1%; Commission & Slippage: $100 Round Turn.
V. Rating: Volume Filters (Part 2) | Trading Strategy
A/B/C/D
VI. Summary
(a) The volume filters improve risk adjusted returns for shorter look backs; (b) The volume filters do not add value for longer look backs (Table 2 vs. Table 3).
Related Entries: Volume Filters: Part 1 (Entry & Exit) | Volume Filters: Part 3 (Entry & Exit) | Donchian’s 20 Guides To Trading Commodities
Related Topics: (Public) Trading Strategies
CFTC RULE 4.41: HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
RISK DISCLOSURE: U.S. GOVERNMENT REQUIRED DISCLAIMER | CFTC RULE 4.41
Codes: matlab/VolOI/2/channels