Skip to content

sentiment_signal

mainsequence.virtualfundbuilder.contrib.time_series.sentiment_signal

SentimentSignal

Bases: WeightsBase, TimeSerie

Calculates portfolio weights based on aggregated news sentiment from Polygon.io. Weights are proportional to a score calculated as (Positive Articles - Negative Articles). Assets with insufficient recent news sentiment are excluded. This class acts as a TimeSerie node providing daily sentiment-based signal weights, starting from OFFSET_START on the first run.

maximum_forward_fill()

Signal is daily, so valid for slightly less than a day.

update(update_statistics)

Calculates daily sentiment weights for the required date range.