Back to Community
Error in fundamental data?

I tried to get the EPS data a year ago and the current EPS data, then calculate the percent increase. However, the percent increase seems to be wrong for the first couple of symbols.

The result of the run is as follows:

                     eps  eps_change  
Equity(40531 [FXCM])  0.0500  277.200000  
Equity(4415 [LEG])    0.0034  197.058824  
Equity(12200 [LGND])  0.0600  174.333333  
Equity(23096 [UNTD])  0.0100  169.000000  
Equity(3766 [IBM])    0.0200  150.500000

For symbol FXCM, the increase is 277.2X. But from NYSE, it seems the value should really be 27.72X:
https://www.nyse.com/quote/XNYS:FXCM

A bit further digging of the data seems to show the EPS a year ago is wrong. It shows up as 0.05 from the algorithm, but from NYSE, it is actually 0.50.

For symbol LEG, the increase is 197X, but from NYSE, it seems the increase should be 1.97X:
https://www.nyse.com/quote/XNYS:LEG
Seems to be the same issue, the EPS a year ago shows up as 0.0034, but from NYSE, it should be 0.34.

I don't know whether other values are correct or not.

I'm not sure whether the incorrect data is from morning star or not. NYSE also use morning star data. Or is it just my algorithm gets the wrong data point?

Thanks.

Clone Algorithm
1
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: 566cdfca0644ee114a578ed6
There was a runtime error.
8 responses

it seems like the values are not split adjusted

Thanks. It seems that FXCM does have a 1:10 reverse split. However, I cannot find any splits for LEG. What is going on with this stock?

A second question. If quantopian doesn't adjust EPS for splits, how to adjust it in the algorithm? Where to get the split data? Thanks.

Hi Fei,

You are correct. We do not yet cover this use case well with our fundamental data. This is something that is in our backlog since it is much more likely that you will run into this problem when using the Pipeline API as compared to previously with get_fundamentals. One way around it would be to avoid EPS and other per share metrics over timeframe and use the raw earnings metrics from Morningstar.

Sorry for the inconvenience.

Thanks
Josh

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Also the ROA and the Asset Turnover seem to be wrong in the Pipeline API.

For example I get this values for AAPL on 2016-03-01
AssetsTurnover Latest: 0.25994
ROALatest: 0.06291

but according to the Morningstar web site (http://financials.morningstar.com/ratios/r.html?t=AAPL&region=USA&culture=en_US), the correct values are:
Asset Turnover (Average) 0.85
Return on Assets % 19.36

I implemented the factors as follows:

latest = -1

class ROALatest(CustomFactor):  
    window_length = 1  
    inputs = [morningstar.operation_ratios.roa]  
    def compute(self, today, assets, out, roa):  
        out[:] = roa[latest]

class AssetsTurnoverLatest(CustomFactor):  
    window_length = 1  
    inputs = [morningstar.operation_ratios.assets_turnover]  
    def compute(self, today, assets, out, assets_turnover):  
        out[:] = assets_turnover[latest]  

I did something wrong in the factors or there is a problem with these data?
Thanks

One potential reason for the difference is that Quantopian displays the most recent quarterly value for the metric. I'm not seeing the values you cite on the webpage, but those might be annual values or TTM (as compared to a quarterly value).

Hi Josh,

thanks for the reply. You can find the values on the Morningstar page, if you go to "Key Ratio" and then "Profitability".

You're right, the problem is the timing: ROA and Asset Turnover are computed using the quartely Net Income and Revenues.
To check it, I've used the data from the Morningstar page:
Asset Turnover: 75,872/293,284 = 0.25869
ROA: 18,361/293,284 = 0.06260

I was aware than the most fundamentals are quarterly but tought that the ratios were TTM, as you said in this post:
https://www.quantopian.com/posts/dont-trade-earnings-reports-a-simple-risk-avoidance-trading-strategy#56b75e9b00abaf131d00080c

I think, Quantopian should better document the timeframe of the data... or - much better - offer annual and TTM data! :-)
Actually it's quite confusing and I'm sure, I'm not the first to be a victim of this ambiguity. For example the algo in this post:
https://www.quantopian.com/posts/piotroski-score-plus-aroon-indicator#564f7f7e308ca9d46e0000ab
uses also a quarterly ROA and Assert Turnover to compute the Piotrosky score, while annual ratios would be required.

To overcome this limitation of the platform, I've implemented the workaround described in this post:
https://www.quantopian.com/posts/beneish-score-accounting-manipulation-as-pipeline-factor-memoryerror#56f2bc685fe2be6837000355
but unfortunately loading 255 days of data or more often lead to an out-of-memory error.

Quantopian is great and I hope you and your team will soon address this limitation that makes implementing algoriths based on historical fundamental data quite hard... it's not the first time I "invoked" this feature...sorry to seem insistent, nut in my opinion this a very important and necessary improvement.

I've now completed a Pipeline version of the Piotroski score.
It's the only accurate version on Quantopian I'm aware of. As said in the long post above, the other ones use a wrong timeframe.

I've run the algorithm factor by factor and compared the results of some stocks with that ones provided by Gurufocus.com and they are the same!
But there still a major problem: when you want to compute the whole score, a Memory or Timeout Error occurs

I hope somebody at Quantopian will be help to solve this issue...
The algo is attached... to reproduce the error, just comment/uncomment the follwing lines (starting at #214)

profitability = ROA() + ROAChange() + CashFlow() + EarningsQuality()  
#profitability = ROA() + CashFlow() + EarningsQuality() 

# Efficiency  
efficiency = GrossMarginChange() + AssetsTurnoverChange()  
#efficiency = GrossMarginChange()  

ROAChange() and AssetsTurnoverChange() cause the Memory-Error because - conform to the Piotrosky original paper - they requires two years of data (window_length=456).

Clone Algorithm
22
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: 56fbfaf41a631e0f39227934
There was a runtime error.