TS Decomposition

This module provides powerful tools for analyzing financial time series data, offering insights that can be valuable for financial analysis, investment decision-making, and economic research.

Tutorials are the best documentation — Time Series Decomposition Tutorial

Decomposition Techniques

The module primarily uses the Multiple Seasonal-Trend decomposition using LOESS method, which allows for:

  • Trend extraction

  • Multiple seasonal component extraction (e.g., weekly, monthly, quarterly)

  • Remainder (residual) calculation

Reactive Trend Analysis

This feature categorizes the trend in real-time as:

  • Increasing

  • Decreasing

  • Sideways

Usage Examples

import sovai as sov

# Authenticate and load data
sov.token_auth(token="your_token_here")

df_accounting = sov.data("accounting/weekly").select_stocks("mega")

Time Decomposition and Statistrics

# Perform time decomposition
df_time = df_accounting.time_decomposition(method="data", ticker="AAPL", feature="total_revenue")
# Access overall statistics
print(df_time.attrs["stats"])

Interactive Dashboard

# Generate decomposition plot
df_accounting.time_decomposition(method="plot", ticker="AAPL", feature="total_revenue")

Last updated