Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save quantra-go-algo/80d3f3e951e0f021f6be8be7480dceea to your computer and use it in GitHub Desktop.

Select an option

Save quantra-go-algo/80d3f3e951e0f021f6be8be7480dceea to your computer and use it in GitHub Desktop.
guardrailed-llm-agent — Step 2: Getting the Data Right (snippet 2)
# Sanity check: the biggest daily move on split-adjusted AAPL should be
# around -52% (Sep 2000 earnings warning). If you see moves > 100%,
# the data is unadjusted.
_top = feat['ret'].abs().sort_values(ascending=False).head(5)
if feat['ret'].abs().max() > 1.0:
print('WARNING: possible split artifact: check auto_adjust=True')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment