Back to Community
QTradableStocksUS volume

There will be a reduction in the number of partial fills with QTradableStocksUS() and to take a look at that a bit I wound up with this code. It seeks to compare overall daily average volume in relation to the lower half of sorted volume values. The theory: There could possibly be spikes that might cause a security to be included while its volume could possibly be often very low. I would also like help with a factor to be able to control that difficult challenge more flexibly at any time, maybe removing highs before averaging?

Logging is the point in this backtest and output is included in the source. It's an effort to compare share volumes in Q1500US() vs QTradableStocksUS(). If someone has another way to go about it they might find this tracking of maximums and code useful.

Would like to ask a favor from someone comfortable in research, if you can chart maybe the sorted low-to-high mean of each day's volume for WMS and PG for 200 days from around 2017-06-22 since they are on opposite ends of the spectrum. (PG determined by also logging minimums).

WMS is an outlier with overall volume for a day divided by lower half volumes at 6641, such a high number that I would not be surprised if there is an error.
2017-06-22 12:59 track_values:216 INFO now 6641.1 avg 13.6 lo 1 hi 6641 new or near max WMS

Notice in the Source Code tab that the pasted logging output shows an average for QTradableStocksUS / Q1500US at 13.6 / 9.3 or 146%, I'm not sure what to make of that, maybe it could mean that QTradableStocksUS has higher highs in tandem with lower lows or it could just be a flaw in my logic.

Clone Algorithm
10
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
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
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5a05248ba8e7db3fb9419240
There was a runtime error.