|
|
|
@ -411,7 +411,7 @@ class UniverseService:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
market_cap = shares * close
|
|
|
|
market_cap = shares * close
|
|
|
|
if math.isnan(market_cap) or market_cap <= 0 or market_cap > 5e12:
|
|
|
|
if math.isnan(market_cap) or market_cap <= 0 or market_cap > 2e13:
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
snapshot_dt = datetime(
|
|
|
|
snapshot_dt = datetime(
|
|
|
|
@ -596,7 +596,7 @@ class UniverseService:
|
|
|
|
snapshot_dt = datetime(target.year, target.month, 1, tzinfo=timezone.utc)
|
|
|
|
snapshot_dt = datetime(target.year, target.month, 1, tzinfo=timezone.utc)
|
|
|
|
|
|
|
|
|
|
|
|
# Always exclude clearly bad data (sanity cap: $5T max, historical record is ~$3.7T)
|
|
|
|
# Always exclude clearly bad data (sanity cap: $5T max, historical record is ~$3.7T)
|
|
|
|
_MAX_MARKET_CAP = 5e12
|
|
|
|
_MAX_MARKET_CAP = 2e13
|
|
|
|
conditions = [
|
|
|
|
conditions = [
|
|
|
|
UniverseSnapshot.snapshot_date == snapshot_dt,
|
|
|
|
UniverseSnapshot.snapshot_date == snapshot_dt,
|
|
|
|
UniverseSnapshot.market_cap <= _MAX_MARKET_CAP,
|
|
|
|
UniverseSnapshot.market_cap <= _MAX_MARKET_CAP,
|
|
|
|
|