Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
What happened for the data "ev_to_ebitda" during 2017-04-28 to 2017-05-12

when I tried to draw the median of -"ev_to_ebitda" for universe Q1500US, I got some abnormal data during 2017-04-28 and 2017-05-12. It is not possible for the median value as volatile as this. Is there anything wrong in the data?

2017-04-17 00:00:00+00:00 -12.54960
2017-04-18 00:00:00+00:00 -12.66940
2017-04-19 00:00:00+00:00 -12.65480
2017-04-20 00:00:00+00:00 -12.67225
2017-04-21 00:00:00+00:00 -12.67225
2017-04-24 00:00:00+00:00 -12.68590
2017-04-25 00:00:00+00:00 -12.68590
2017-04-26 00:00:00+00:00 -12.68520
2017-04-27 00:00:00+00:00 -12.69250
2017-04-28 00:00:00+00:00 -17.65510
2017-05-01 00:00:00+00:00 -17.55180
2017-05-02 00:00:00+00:00 -17.53650
2017-05-03 00:00:00+00:00 -17.53650
2017-05-04 00:00:00+00:00 -17.46980
2017-05-05 00:00:00+00:00 -17.53910
2017-05-08 00:00:00+00:00 -17.53910
2017-05-09 00:00:00+00:00 -17.56250
2017-05-10 00:00:00+00:00 -17.49600
2017-05-11 00:00:00+00:00 -17.53235
2017-05-12 00:00:00+00:00 -12.70820
2017-05-15 00:00:00+00:00 -12.63850
2017-05-16 00:00:00+00:00 -12.67820
2017-05-17 00:00:00+00:00 -12.68520
2017-05-18 00:00:00+00:00 -12.52060
2017-05-19 00:00:00+00:00 -12.58210
2017-05-22 00:00:00+00:00 -12.66360
2017-05-23 00:00:00+00:00 -12.68280
2017-05-24 00:00:00+00:00 -12.68520
2017-05-25 00:00:00+00:00 -12.73770
2017-05-26 00:00:00+00:00 -12.73860
2017-05-30 00:00:00+00:00 -12.79700
2017-05-31 00:00:00+00:00 -12.72140

Same problem happens for 'total_yield', the median value fluctuates drastically during 2017-04-24 to 2017-05-11

2017-04-17 00:00:00+00:00 0.02970
2017-04-18 00:00:00+00:00 0.02930
2017-04-19 00:00:00+00:00 0.02920
2017-04-20 00:00:00+00:00 0.02925
2017-04-21 00:00:00+00:00 0.02930
2017-04-24 00:00:00+00:00 0.01740
2017-04-25 00:00:00+00:00 0.01730
2017-04-26 00:00:00+00:00 0.01730
2017-04-27 00:00:00+00:00 0.01740
2017-04-28 00:00:00+00:00 0.04645
2017-05-01 00:00:00+00:00 0.04420
2017-05-02 00:00:00+00:00 0.04625
2017-05-03 00:00:00+00:00 0.04625
2017-05-04 00:00:00+00:00 0.04605
2017-05-05 00:00:00+00:00 0.04570
2017-05-08 00:00:00+00:00 0.04570
2017-05-09 00:00:00+00:00 0.04600
2017-05-10 00:00:00+00:00 0.04610
2017-05-11 00:00:00+00:00 0.04580
2017-05-12 00:00:00+00:00 0.02595
2017-05-15 00:00:00+00:00 0.02595
2017-05-16 00:00:00+00:00 0.02585
2017-05-17 00:00:00+00:00 0.02575
2017-05-18 00:00:00+00:00 0.02625
2017-05-19 00:00:00+00:00 0.02620

6 responses

If the question is "why is there so much change in ev_to_ebitda between 2017-04-28 and 2017-05-12" there is probably a rather simple answer. Publicly traded companies are required to file their quarterly 10Q statements 40-45 days after the end of each quarter. Since the first quarter ends on 3-31, 45 days after that is 5-15.

The calculation for ev_to_ebitda is the enterprise value calculated as follows: (market capitalization) + (value of debt) + (minority interest) + (preferred shares) - (cash and cash equivalents). Then, the enterprise value number is divided by earnings before interest, taxes, depreciation and amortization (EBITDA). (thank you Investopedia).

Anyway, notice that the numerator is mostly 10Q related items except for the 'market capitalization' part. The denominator is all 10Q related data. What this implies is, unless there is a new or updated 10Q, one would just see volatility associated with price volatility. However, four times a year one will see potentially higher volatility as new 10Q data is incorporated. I'd expect similar high volatility the first 2 weeks of May, August, November, and February.

One 'gotcha' to be aware of... During a backtest or in live trading this volatility occurs 'real time' about 40 days after each quarter as the 10Qs are filed . However, if one is looking back to previous quarters, this volatility occurs precisely at the end of each quarter. This is because historical data uses the 'as_of' date while current data uses the 'file_date'.

That's my two cents...

See blip in custom chart ...

@Blue... Interesting. Need to look into this a bit more. Run your algo with Q500US, Q1500US, and Q1500US-Q500US, and there is the same 'blip'. Not the same average but still the same anomaly.

A few outliers showed up. Maybe winsorize could be useful to remove them? Two of the three on this date show a price jump in TradingView. Maybe it was people trading on that fundamental, a possible error. So if one sees a sudden outlier (and wouldn't it be great to have a function to collect them very intelligently), along with an associated change in price, betting that it was a fundamental error that will be corrected, can trade based on that for a possible healthy profit.

2017-04-27 05:45 log_pipe:155 INFO Rows: 1490  
                        min     median           max  
ev_to_ebitda     -5038.1306      12.69     2838.7531     NaNs 8/1490  
2017-04-27 05:45 log_pipe:170 INFO  
    ... ev_to_ebitda highs  
                      ev_to_ebitda  
Equity(49413 [PEN])      2838.7531  
Equity(33858 [PODD])     1728.7641  
Equity(13635 [DO])       1168.9814  
Equity(351 [AMD])        1136.3507  
Equity(1746 [COG])        646.1625  
Equity(216 [HES])         566.5692  
2017-05-09 05:45 log_pipe:155 INFO Rows: 1494  
                        min     median           max  
ev_to_ebitda     -5038.1306      17.56     5473.7679     NaNs 11/1494  
2017-05-09 05:45 log_pipe:170 INFO  
    ... ev_to_ebitda highs  
                      ev_to_ebitda  
Equity(50138 [PI])       5473.7679    <===  
Equity(32622 [CVLT])     4969.4953    <=== https://www.tradingview.com/chart/?symbol=NASDAQ:CVLT  
Equity(33856 [CLR])      4964.9329    <===  
Equity(49413 [PEN])      2838.7531  
Equity(33858 [PODD])     1728.7641  
Equity(16661 [TIVO])     1356.0256  

It is not because the outliers. A few outliers can influence mean but not possible to influence the median.

I opened another thread and attached my notebook at https://www.quantopian.com/posts/data-problem-for-some-fundamental-factors

Obviously there's more to it than the few very high to move median that much, I guess I thought that would go without saying, providing a tool to investigate further.

As one possible next step, this is looking at the percentages over previous values.
4-26 100% max, no increases
4-27 188% max but median is still 100%
4-28 median increase jumps to 131%, many are 10x and one is ~150x higher than previous. Some are lower.
5-12 Settling down

There are a lot of ways to garner more information limited only by one's imagination.
For example a notebook with all of the ev_to_ebitda values of 4-27 sorted and 4-28 sorted on the same chart?

This is QTradableStocksUS this time.

2017-04-26 05:45 log_pipe:168 INFO Rows: 2071  Columns: 2  
                        min     median           max  
ev_to_ebitda     -5038.1306      12.37     3708.2643  
 pct_vs_prev             99     100.00           100     <== 4-26

2017-04-27 05:45 log_pipe:168 INFO Rows: 2071  Columns: 2  
                        min     median           max  
ev_to_ebitda     -5038.1306      12.37     3708.2643  
 pct_vs_prev             81     100.00           188     <== 4-27  
2017-04-27 05:45 log_pipe:183 INFO _ _ _   pct_vs_prev   _ _ _  
    ... pct_vs_prev highs  
                        ev_to_ebitda  pct_vs_prev  
Equity(21462 [ACGL])         15.8007          188  
Equity(25712 [AHL])           9.1211          181  
Equity(13720 [RE])            8.2033          181  
Equity(3605 [HMN])           11.8379          158  
Equity(27676 [AMP])          12.5865          129  
Equity(8580 [CB])            13.3567          127  
Equity(916 [WRB])            10.2132          124  
Equity(11100 [BRK_B])        11.4702          123  
Equity(27819 [AMSF])         10.2775          105  
Equity(27557 [ROLL])         17.9590          100  
Equity(27674 [CMPR])         24.6284          100  
Equity(27703 [ISBC])         30.4859          100  
Equity(27669 [WBMD])         10.1228          100  
Equity(27666 [GHDX])        -24.3079          100  
Equity(27608 [LBTY_K])        8.0407          100  
    ... pct_vs_prev lows  
                      ev_to_ebitda  pct_vs_prev  
Equity(2614 [ESL])         10.9668           99  
Equity(20208 [FFIV])       12.8032           99  
Equity...  
2017-04-28 05:45 log_pipe:168 INFO Rows: 2071  Columns: 2  
                        min     median           max  
ev_to_ebitda     -5038.1306      17.41     5617.1139  
 pct_vs_prev           -266     131.00         14993     <== 4-28  
    ... pct_vs_prev highs  
                      ev_to_ebitda  pct_vs_prev  
Equity(38896 [CVE])      2760.1171        14993  
Equity(27674 [CMPR])      815.9936         3313  
Equity(27323 [NGD])       319.9301         3303  
Equity(50138 [PI])       5617.1139         2698  
Equity(46182 [RSPP])      705.0087         2246  
Equity(9909 [DECK])       615.8193         2075  
Equity(9189 [KGC])        125.5475         2028  
Equity(40547 [TRGP])      283.4231         1465  
Equity(15622 [ANF])        29.9137         1242  
Equity(10533 [SU])        150.0882         1224  
Equity(20526 [NTCT])      208.8069         1151  
Equity(239 [AIG])          64.4852         1127  
Equity(23745 [VRNT])      253.8610         1111  
Equity(23019 [OMCL])      267.9188         1026  
Equity(47958 [SNR])       147.9076         1026  
    ... pct_vs_prev lows  
                      ev_to_ebitda  pct_vs_prev  
Equity(15697 [OCN])         5.0691           47  
Equity(27908 [CPA])        12.7469           11  
Equity(45831 [NMIH])       28.0274    ...