Test whether mood leads returns
Check whether changes in the Sentiment Index come before changes in prices, using your own price data and a few simple tests.
You need: an API key (opens in a new tab), your own price series and a notebook with Python or R.
Get the index series
Call
get_market_indexfor 90 days and save the daily values. Repeat each month to build a longer history.

Join it with your prices
Join the index with your own daily price series by date. Remember that the index for a day is calculated for the previous UTC day.
Test with lags
Compare the index with returns shifted by one, two, three and more days. Note which lags show a relation, and whether it holds in each half of the data.
Write down the result
Report the sample size, the lags and what failed. A weak or absent relation is also a result. Link the Sentiment index (opens in a new tab) page as the source.
What you will see
A small study: the relation between the index and returns at several lags, with the sample size and the limits.
Data used
get_market_index(7, 30 or 90 days), through the API (opens in a new tab). Store the daily values to build a longer history.Limits
- A short history gives weak tests.
- A relation in the past may not hold later, and mood is not a trading signal.
More use cases
Read the market mood
The AssetFeed Sentiment Index (0 to 100) shows how bullish or bearish the posts about the market are.
Look at the market mood over a year
A long view shows how the market mood moved through different periods, not only this week.
Look for crowded moods
When almost everyone is bullish or bearish, a portfolio may be more exposed to a sudden reversal.
Show the mood in your own app
Display the AssetFeed Sentiment Index in a dashboard, a widget or an app.