Back to Posts
Listen to Thread

This is an idea that's been rattling about in my skull for the past couple days and I wanted to get a grip on it. The idea is to find out the expected volume traded for a stock in 15 minute periods throughout the day. I seem to recall some technical docs showing an expected daily volume shape for FX (e.g. EURUSD, USDGBP) and it would appear to be the same shape seen in a lot of stocks you look at (e.g. Apple, GDX). I believe this was supposedly due to some convention that a lot of businesses do large money transaction in the afternoon. (?)

I give mean and median because I'm concerned the mean will get distorted by infrequent events that will pull it up higher than it should be. In any case I'm hoping the expected volume can serve as an alert function that activates during a 15-minute period rather than looking at daily volumes. Or maybe it can be factored in to risk calculation or stop loss pips.

I'd be interested to know what people think of the validity of this idea.

2011-06-01 to 2012-07-20 

Apple  
2012-03-16PRINThr 09 15M 3 |__________+| avg 001,417,444 median 001,319,850  
2012-03-16PRINThr 09 15M 4 |_____+_____| avg 000,929,187 median 000,826,939  
2012-03-16PRINThr 10 15M 1 |____+______| avg 000,853,247 median 000,812,934  
2012-03-16PRINThr 10 15M 2 |___+_______| avg 000,722,859 median 000,619,149  
2012-03-16PRINThr 10 15M 3 |__+________| avg 000,652,738 median 000,551,053  
2012-03-16PRINThr 10 15M 4 |__+________| avg 000,609,862 median 000,512,860  
2012-03-16PRINThr 11 15M 1 |_+_________| avg 000,564,771 median 000,478,505  
2012-03-16PRINThr 11 15M 2 |_+_________| avg 000,539,959 median 000,463,664  
2012-03-16PRINThr 11 15M 3 |+__________| avg 000,508,562 median 000,415,784  
2012-03-16PRINThr 11 15M 4 |+__________| avg 000,479,606 median 000,395,295  
2012-03-16PRINThr 12 15M 1 |+__________| avg 000,486,563 median 000,399,899  
2012-03-16PRINThr 12 15M 2 |+__________| avg 000,460,922 median 000,396,765  
2012-03-16PRINThr 12 15M 3 |_+_________| avg 000,510,430 median 000,417,907  
2012-03-16PRINThr 12 15M 4 |__+________| avg 000,622,532 median 000,491,329  
2012-03-16PRINThr 13 15M 1 |______+____| avg 001,014,892 median 000,630,034  
2012-03-16PRINThr 13 15M 2 |__+________| avg 000,661,318 median 000,520,006  
2012-03-16PRINThr 13 15M 3 |__+________| avg 000,624,403 median 000,512,537  
2012-03-16PRINThr 13 15M 4 |_+_________| avg 000,566,288 median 000,456,620  
2012-03-16PRINThr 14 15M 1 |_+_________| avg 000,574,354 median 000,463,050  
2012-03-16PRINThr 14 15M 2 |_+_________| avg 000,584,645 median 000,457,780  
2012-03-16PRINThr 14 15M 3 |_+_________| avg 000,563,922 median 000,462,651  
2012-03-16PRINThr 14 15M 4 |_+_________| avg 000,558,784 median 000,428,737  
2012-03-16PRINThr 15 15M 1 |__+________| avg 000,609,071 median 000,485,752  
2012-03-16PRINThr 15 15M 2 |_+_________| avg 000,601,427 median 000,526,258  
2012-03-16PRINThr 15 15M 3 |__+________| avg 000,666,040 median 000,604,595  
2012-03-16PRINThr 15 15M 4 |_____+_____| avg 000,943,177 median 000,934,635

ONNN (ON Semiconductor)  
2012-03-20PRINThr 09 15M 3 |_+_________| avg 000,237,576 median 000,186,468  
2012-03-20PRINThr 09 15M 4 |+__________| avg 000,223,283 median 000,173,341  
2012-03-20PRINThr 10 15M 1 |___+_______| avg 000,259,366 median 000,189,085  
2012-03-20PRINThr 10 15M 2 |_____+_____| avg 000,281,018 median 000,198,247  
2012-03-20PRINThr 10 15M 3 |_____+_____| avg 000,287,848 median 000,201,619  
2012-03-20PRINThr 10 15M 4 |__________+| avg 000,350,042 median 000,207,198  
2012-03-20PRINThr 11 15M 1 |_________+_| avg 000,340,653 median 000,211,236  
2012-03-20PRINThr 11 15M 2 |________+__| avg 000,324,139 median 000,202,714  
2012-03-20PRINThr 11 15M 3 |_____+_____| avg 000,286,178 median 000,205,761  
2012-03-20PRINThr 11 15M 4 |_________+_| avg 000,332,328 median 000,259,333  
2012-03-20PRINThr 12 15M 1 |________+__| avg 000,321,328 median 000,245,583  
2012-03-20PRINThr 12 15M 2 |________+__| avg 000,320,378 median 000,240,944  
2012-03-20PRINThr 12 15M 3 |_______+___| avg 000,316,508 median 000,249,354  
2012-03-20PRINThr 12 15M 4 |______+____| avg 000,300,224 median 000,245,325  
2012-03-20PRINThr 13 15M 1 |________+__| avg 000,320,301 median 000,242,133  
2012-03-20PRINThr 13 15M 2 |________+__| avg 000,326,379 median 000,274,737  
2012-03-20PRINThr 13 15M 3 |________+__| avg 000,324,037 median 000,248,464  
2012-03-20PRINThr 13 15M 4 |_______+___| avg 000,306,500 median 000,220,496  
2012-03-20PRINThr 14 15M 1 |_____+_____| avg 000,285,140 median 000,193,687  
2012-03-20PRINThr 14 15M 2 |__+________| avg 000,248,875 median 000,199,446  
2012-03-20PRINThr 14 15M 3 |___+_______| avg 000,257,385 median 000,191,004  
2012-03-20PRINThr 14 15M 4 |____+______| avg 000,275,044 median 000,190,443  
2012-03-20PRINThr 15 15M 1 |_+_________| avg 000,238,376 median 000,176,720  
2012-03-20PRINThr 15 15M 2 |___+_______| avg 000,257,596 median 000,219,895  
2012-03-20PRINThr 15 15M 3 |__+________| avg 000,250,348 median 000,200,369  
2012-03-20PRINThr 15 15M 4 |__+________| avg 000,248,569 median 000,176,774

GDX (Gold ETF)  
2012-03-16PRINThr 09 15M 3 |______+____| avg 000,711,057 median 000,666,623  
2012-03-16PRINThr 09 15M 4 |____+______| avg 000,599,519 median 000,538,703  
2012-03-16PRINThr 10 15M 1 |____+______| avg 000,592,639 median 000,519,764  
2012-03-16PRINThr 10 15M 2 |___+_______| avg 000,527,237 median 000,463,687  
2012-03-16PRINThr 10 15M 3 |__+________| avg 000,489,911 median 000,417,336  
2012-03-16PRINThr 10 15M 4 |__+________| avg 000,447,815 median 000,357,440  
2012-03-16PRINThr 11 15M 1 |_+_________| avg 000,407,810 median 000,356,955  
2012-03-16PRINThr 11 15M 2 |_+_________| avg 000,387,370 median 000,332,677  
2012-03-16PRINThr 11 15M 3 |+__________| avg 000,361,327 median 000,310,327  
2012-03-16PRINThr 11 15M 4 |+__________| avg 000,355,739 median 000,298,136  
2012-03-16PRINThr 12 15M 1 |+__________| avg 000,342,020 median 000,298,440  
2012-03-16PRINThr 12 15M 2 |+__________| avg 000,344,947 median 000,293,096  
2012-03-16PRINThr 12 15M 3 |_+_________| avg 000,424,699 median 000,345,259  
2012-03-16PRINThr 12 15M 4 |______+____| avg 000,720,441 median 000,429,333  
2012-03-16PRINThr 13 15M 1 |___+_______| avg 000,501,190 median 000,389,802  
2012-03-16PRINThr 13 15M 2 |__+________| avg 000,466,778 median 000,390,625  
2012-03-16PRINThr 13 15M 3 |__+________| avg 000,457,901 median 000,372,447  
2012-03-16PRINThr 13 15M 4 |__+________| avg 000,437,321 median 000,375,267  
2012-03-16PRINThr 14 15M 1 |__+________| avg 000,435,395 median 000,371,273  
2012-03-16PRINThr 14 15M 2 |_+_________| avg 000,428,614 median 000,349,773  
2012-03-16PRINThr 14 15M 3 |_+_________| avg 000,394,675 median 000,333,577  
2012-03-16PRINThr 14 15M 4 |_+_________| avg 000,384,808 median 000,325,763  
2012-03-16PRINThr 15 15M 1 |_+_________| avg 000,379,693 median 000,321,267  
2012-03-16PRINThr 15 15M 2 |_+_________| avg 000,400,275 median 000,312,125  
2012-03-16PRINThr 15 15M 3 |___+_______| avg 000,537,801 median 000,475,631  
2012-03-16PRINThr 15 15M 4 |__________+| avg 000,949,103 median 000,915,943

SPY  
2012-03-16PRINThr 09 15M 3 |______+____| avg 010,816,723 median 010,800,819  
2012-03-16PRINThr 09 15M 4 |____+______| avg 008,913,886 median 008,523,452  
2012-03-16PRINThr 10 15M 1 |_____+_____| avg 009,854,374 median 008,692,415  
2012-03-16PRINThr 10 15M 2 |___+_______| avg 007,737,873 median 006,621,353  
2012-03-16PRINThr 10 15M 3 |__+________| avg 007,066,672 median 006,139,161  
2012-03-16PRINThr 10 15M 4 |__+________| avg 006,785,590 median 005,885,742  
2012-03-16PRINThr 11 15M 1 |_+_________| avg 006,296,436 median 005,674,478  
2012-03-16PRINThr 11 15M 2 |+__________| avg 005,631,402 median 005,004,667  
2012-03-16PRINThr 11 15M 3 |_+_________| avg 005,644,208 median 005,161,715  
2012-03-16PRINThr 11 15M 4 |+__________| avg 005,321,792 median 004,762,634  
2012-03-16PRINThr 12 15M 1 |+__________| avg 005,373,665 median 004,487,740  
2012-03-16PRINThr 12 15M 2 |+__________| avg 005,131,689 median 004,304,978  
2012-03-16PRINThr 12 15M 3 |+__________| avg 005,474,237 median 004,639,656  
2012-03-16PRINThr 12 15M 4 |__+________| avg 007,055,652 median 006,000,617  
2012-03-16PRINThr 13 15M 1 |___+_______| avg 008,475,983 median 007,541,209  
2012-03-16PRINThr 13 15M 2 |_+_________| avg 006,205,333 median 005,735,625  
2012-03-16PRINThr 13 15M 3 |__+________| avg 006,813,658 median 005,850,969  
2012-03-16PRINThr 13 15M 4 |_+_________| avg 006,051,840 median 005,378,849  
2012-03-16PRINThr 14 15M 1 |_+_________| avg 006,451,752 median 005,498,595  
2012-03-16PRINThr 14 15M 2 |_+_________| avg 006,445,270 median 005,159,042  
2012-03-16PRINThr 14 15M 3 |_+_________| avg 006,395,686 median 005,465,874  
2012-03-16PRINThr 14 15M 4 |_+_________| avg 005,974,819 median 004,944,123  
2012-03-16PRINThr 15 15M 1 |__+________| avg 006,926,707 median 005,652,126  
2012-03-16PRINThr 15 15M 2 |__+________| avg 007,422,549 median 005,882,195  
2012-03-16PRINThr 15 15M 3 |____+______| avg 008,877,035 median 007,986,374  
2012-03-16PRINThr 15 15M 4 |__________+| avg 015,372,120 median 015,120,789

FCS (Fairchild)  
2012-03-23PRINThr 09 15M 3 |+__________| avg 000,074,294 median 000,052,131  
2012-03-23PRINThr 09 15M 4 |_+_________| avg 000,076,166 median 000,055,497  
2012-03-23PRINThr 10 15M 1 |+__________| avg 000,073,090 median 000,053,030  
2012-03-23PRINThr 10 15M 2 |_+_________| avg 000,076,560 median 000,056,204  
2012-03-23PRINThr 10 15M 3 |+__________| avg 000,073,904 median 000,061,932  
2012-03-23PRINThr 10 15M 4 |_____+_____| avg 000,085,043 median 000,058,920  
2012-03-23PRINThr 11 15M 1 |_________+_| avg 000,095,649 median 000,056,034  
2012-03-23PRINThr 11 15M 2 |____+______| avg 000,084,031 median 000,057,308  
2012-03-23PRINThr 11 15M 3 |__+________| avg 000,077,618 median 000,056,158  
2012-03-23PRINThr 11 15M 4 |____+______| avg 000,083,649 median 000,059,234  
2012-03-23PRINThr 12 15M 1 |____+______| avg 000,084,593 median 000,060,148  
2012-03-23PRINThr 12 15M 2 |________+__| avg 000,095,010 median 000,070,348  
2012-03-23PRINThr 12 15M 3 |_________+_| avg 000,097,689 median 000,067,337  
2012-03-23PRINThr 12 15M 4 |____+______| avg 000,084,371 median 000,060,589  
2012-03-23PRINThr 13 15M 1 |________+__| avg 000,094,247 median 000,069,852  
2012-03-23PRINThr 13 15M 2 |________+__| avg 000,093,311 median 000,072,481  
2012-03-23PRINThr 13 15M 3 |__________+| avg 000,099,117 median 000,067,627  
2012-03-23PRINThr 13 15M 4 |______+____| avg 000,087,505 median 000,061,915  
2012-03-23PRINThr 14 15M 1 |_____+_____| avg 000,086,597 median 000,061,758  
2012-03-23PRINThr 14 15M 2 |_______+___| avg 000,091,209 median 000,054,665  
2012-03-23PRINThr 14 15M 3 |______+____| avg 000,088,997 median 000,059,388  
2012-03-23PRINThr 14 15M 4 |____+______| avg 000,083,557 median 000,055,581  
2012-03-23PRINThr 15 15M 1 |____+______| avg 000,082,675 median 000,060,272  
2012-03-23PRINThr 15 15M 2 |__+________| avg 000,077,509 median 000,056,330  
2012-03-23PRINThr 15 15M 3 |____+______| avg 000,082,909 median 000,054,318  
2012-03-23PRINThr 15 15M 4 |+__________| avg 000,074,374 median 000,057,244

ADI  
2012-03-16PRINThr 09 15M 3 |___+_______| avg 000,157,131 median 000,119,771  
2012-03-16PRINThr 09 15M 4 |___+_______| avg 000,142,452 median 000,116,636  
2012-03-16PRINThr 10 15M 1 |__+________| avg 000,141,661 median 000,119,205  
2012-03-16PRINThr 10 15M 2 |__+________| avg 000,141,752 median 000,114,394  
2012-03-16PRINThr 10 15M 3 |__+________| avg 000,131,459 median 000,105,712  
2012-03-16PRINThr 10 15M 4 |__+________| avg 000,125,219 median 000,103,020  
2012-03-16PRINThr 11 15M 1 |__+________| avg 000,132,247 median 000,104,010  
2012-03-16PRINThr 11 15M 2 |__+________| avg 000,131,928 median 000,100,130  
2012-03-16PRINThr 11 15M 3 |_+_________| avg 000,120,514 median 000,099,078  
2012-03-16PRINThr 11 15M 4 |_+_________| avg 000,120,559 median 000,090,018  
2012-03-16PRINThr 12 15M 1 |__+________| avg 000,125,242 median 000,091,855  
2012-03-16PRINThr 12 15M 2 |+__________| avg 000,106,182 median 000,079,723  
2012-03-16PRINThr 12 15M 3 |+__________| avg 000,097,519 median 000,081,081  
2012-03-16PRINThr 12 15M 4 |+__________| avg 000,102,500 median 000,083,730  
2012-03-16PRINThr 13 15M 1 |+__________| avg 000,097,776 median 000,083,051  
2012-03-16PRINThr 13 15M 2 |_+_________| avg 000,108,144 median 000,083,857  
2012-03-16PRINThr 13 15M 3 |_+_________| avg 000,109,571 median 000,084,394  
2012-03-16PRINThr 13 15M 4 |_+_________| avg 000,115,072 median 000,085,748  
2012-03-16PRINThr 14 15M 1 |_+_________| avg 000,115,730 median 000,086,777  
2012-03-16PRINThr 14 15M 2 |_+_________| avg 000,122,450 median 000,096,041  
2012-03-16PRINThr 14 15M 3 |__+________| avg 000,136,221 median 000,104,120  
2012-03-16PRINThr 14 15M 4 |___+_______| avg 000,158,995 median 000,122,469  
2012-03-16PRINThr 15 15M 1 |______+____| avg 000,207,033 median 000,152,691  
2012-03-16PRINThr 15 15M 2 |__________+| avg 000,275,316 median 000,222,625  
2012-03-16PRINThr 15 15M 3 |_____+_____| avg 000,194,803 median 000,159,642  
2012-03-16PRINThr 15 15M 4 |____+______| avg 000,169,711 median 000,137,864

CRM (salesforce)  
2012-03-19PRINThr 09 15M 3 |____+______| avg 000,102,184 median 000,087,688  
2012-03-19PRINThr 09 15M 4 |____+______| avg 000,103,499 median 000,086,302  
2012-03-19PRINThr 10 15M 1 |____+______| avg 000,103,172 median 000,080,961  
2012-03-19PRINThr 10 15M 2 |____+______| avg 000,104,416 median 000,081,675  
2012-03-19PRINThr 10 15M 3 |______+____| avg 000,116,168 median 000,072,970  
2012-03-19PRINThr 10 15M 4 |_____+_____| avg 000,112,701 median 000,065,736  
2012-03-19PRINThr 11 15M 1 |___+_______| avg 000,094,826 median 000,064,704  
2012-03-19PRINThr 11 15M 2 |__+________| avg 000,089,734 median 000,065,180  
2012-03-19PRINThr 11 15M 3 |_+_________| avg 000,083,267 median 000,065,239  
2012-03-19PRINThr 11 15M 4 |_+_________| avg 000,081,585 median 000,060,300  
2012-03-19PRINThr 12 15M 1 |_+_________| avg 000,080,043 median 000,058,701  
2012-03-19PRINThr 12 15M 2 |+__________| avg 000,073,789 median 000,061,532  
2012-03-19PRINThr 12 15M 3 |+__________| avg 000,076,481 median 000,061,783  
2012-03-19PRINThr 12 15M 4 |_+_________| avg 000,081,647 median 000,070,192  
2012-03-19PRINThr 13 15M 1 |_+_________| avg 000,080,761 median 000,066,618  
2012-03-19PRINThr 13 15M 2 |_+_________| avg 000,084,003 median 000,069,204  
2012-03-19PRINThr 13 15M 3 |___+_______| avg 000,093,288 median 000,075,425  
2012-03-19PRINThr 13 15M 4 |_______+___| avg 000,124,216 median 000,091,253  
2012-03-19PRINThr 14 15M 1 |________+__| avg 000,127,479 median 000,092,448  
2012-03-19PRINThr 14 15M 2 |__________+| avg 000,144,946 median 000,092,702  
2012-03-19PRINThr 14 15M 3 |________+__| avg 000,128,170 median 000,097,578  
2012-03-19PRINThr 14 15M 4 |_______+___| avg 000,123,994 median 000,100,176  
2012-03-19PRINThr 15 15M 1 |_________+_| avg 000,135,939 median 000,106,186  
2012-03-19PRINThr 15 15M 2 |_______+___| avg 000,124,408 median 000,095,803  
2012-03-19PRINThr 15 15M 3 |______+____| avg 000,116,695 median 000,094,669  
2012-03-19PRINThr 15 15M 4 |______+____| avg 000,119,043 median 000,095,106  
Clone Algorithm
3
Loading...
Backtest from to with initial capital ( data)
Cumulative performance:
Algorithm Benchmark
Custom data:
Week
Month
All
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Information Ratio
--
Benchmark Returns
--
Volatility
--
Max Drawdown
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Information Ratio 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
This backtest was created using an older version of the backtester. Please re-run this backtest to see results using the latest backtester. Learn more about the recent changes.
There was a runtime error.

Hello James,

Clever workaround for the lack of general plotting capability in Quantopian!

If you do a Google (or Google Scholar) search on "liquidity premium" you might find some relevant information on the impact of trading volume on price.

Apple, GDX, and SPY all have the same characteristic volume versus time curve. Any idea why?

Hi Grant,

Interesting. Well I suppose the more liquid a stock is the more likely people will come in and out of positions exactly when they want to. The volume-time curve will then just illustrate what people want to do. That peak on Apple (and other stocks with a similar curve) is around 12.45-1.15pm which is when people go to lunch -- so maybe its people closing off their positions before eating? ;) Also the west coast will wake up about 3hrs after NYSE starts, which places it at about 12.30pm. I don't buy this theory completely, since Apple (550$) is no doubt traded all around the world....

If ONNN (6$) is relatively illiquid then I suppose the interaction between volume and price is more significant. Those trying to get rid of a large position will have to do so over longer periods of time to mask their intention. If its 3pm and you need shot of 10M$ then its already too late?

What do you think?

Very interesting.

I think you should re-slice the data, and rather than look at all 200 days, look at the dates as they relate to options expiration. Apple, for instance, has a lot of options market, and you'll see lots of volume on expiration day.

This is fascinating stuff.

Dan

Log in to reply to this thread.
Not a member? Sign up!