Hello and hi from another beginner!
I am new to Quantopian. I would like to start research with market cap ranges. I selected two ranges, big and small. But some of the equities fall into both ranges. Why?
from quantopian.pipeline import Pipeline
from quantopian.research import run_pipeline
from quantopian.pipeline.data import morningstar
def make_pipeline():
million = 1000000
billion = 1000 * million
market_cap = morningstar.valuation.market_cap.latest
return Pipeline(
columns={
'market_cap': market_cap,
'big': 10 * billion < market_cap < 200 * billion,
'small': 50 * million < market_cap < 300 * million,
},
)
date = '2017-06-15'
result = run_pipeline(make_pipeline(), date, date)
result.head()
To take a visible example, why is AAME both big and small at the same time? According to Yahoo Finance it's market cap is 74.51M, so it should be only in "small" category. What am I doing wrong?
Additionally, is there a way to display market cap as a full float, not a scientific notation (with "e")?
Thanks in advance!
Remy