SOV.AI
  • Data & Screens
  • GET STARTED
    • Blog (Screener)
    • 🚀Quick Start
    • ⭐Tutorials
    • 💻Installation
    • ⚒️Release Notes
    • 🔘About
  • REALTIME DATASETS
    • Equity Datasets
      • Accounting Data
      • Bankruptcy Predictions
      • Employee Visa
      • Earnings Surprise
      • Congressional Data
      • Factor Signals
      • Financial Ratios
      • Government Contracts
      • Institutional Trading
      • Insider Flow Prediction
      • Liquidity Data
      • Lobbying Data
      • News Sentiment
      • Price Breakout
      • Risk Indicators
      • SEC Edgar Search
      • SEC 10K Filings
      • Short Selling
      • Wikipedia Views
      • Patents Data
    • Economic Datasets
      • Asset Rotation
      • Core Economic Data
      • ETF Flows
      • Government Traffic
      • 🏳️Turing Risk Index
    • Sectorial Datasets
      • Airbnb Data
      • Box Office Stats
      • CFPB Complaints
      • Phrama Clinical Trials
      • Request Datasets
  • Asset Managment
    • Signal Evaluation
    • Weight Optimization
    • Screens and Filters
  • Pattern Recognition
    • Pairwise Distance
    • Anomaly Detection
    • Clustering Panels
  • Feature Processing
    • Extract Features
    • Neutralize Features
    • Select Features
    • Dimensionality Reduction
    • Feature Importance
  • Time Series
    • Nowcasting Series
    • TS Decomposition
    • Time Segmentation
  • Dashboard Examples
    • 🔰Bankruptcy Prediction
    • 🛰️Turing Risk Index
  • IMPORTANT LINKS
    • ⚙️Main Website
    • 👮Forum and Issues
    • 🙋Web Application
    • 📤LinkedIn
    • 🟢Buy Subscription
Powered by GitBook
On this page
  • Overview
  • Getting Started
  • 1. Change Point Detection
  • 2. Regime Change Analysis
  • 3. Comprehensive Regime Analysis (PCA-based)
  • Tips for Users

Was this helpful?

  1. Time Series

Time Segmentation

Segments time series into different components according to statistical tests over the series. Helpful for understanding changes in regimes.

PreviousTS DecompositionNextBankruptcy Prediction

Last updated 6 months ago

Was this helpful?

Tutorials are the best documentation —

Overview

The Time Segmentation Module is a powerful tool for analyzing financial time series data. It offers four main functionalities:

  1. Change Point Detection

  2. Regime Change Analysis

  3. Comprehensive Regime Analysis (PCA-based)

Each functionality can be used for data analysis or visualization, allowing users to gain deep insights into their financial data.

Getting Started

To use the Time Segmentation Module, first import the necessary library and authenticate:

import sovai as sov
sov.token_auth(token="your_token_here")
df_accounting = sov.data("accounting/weekly").select_stocks("mega")

1. Change Point Detection

Identify significant changes in your time series data.

Data Analysis

df_change = df_accounting.change_point(method='data', feature="book_equity_value")
df_change.tail(10)  # View the last 10 rows
df_change.attrs['stats']  # View additional statistics

Visualization

df_accounting.change_point(method='plot')

2. Regime Change Analysis

Detect regime changes for a specific stock and feature.

Data Analysis

rc_result = df_accounting.regime_change(method="data", ticker="AAPL", feature="total_revenue")
rc_result.tail(10)  # View the last 10 rows
rc_result.attrs['stats']  # View additional statistics

Visualization

df_accounting.regime_change(method="plot", ticker="AAPL", feature="total_revenue")

3. Comprehensive Regime Analysis (PCA-based)

Perform a PCA-based regime change analysis on multiple features for a specific stock.

Data Analysis

pca_rc_result = df_accounting.pca_regime_change(method="data", ticker="AAPL")
pca_rc_result.tail()  # View the last rows
pca_rc_result.attrs['stats']  # View additional statistics

Visualization

df_accounting.pca_regime_change(method="plot", ticker="AAPL")

Tips for Users

  • Always check the .attrs['stats'] of the result for additional insights and metadata.

  • Use the 'plot' method for quick visual analysis and the 'data' method for detailed numerical results.

  • Experiment with different features and tickers to gain comprehensive insights into your financial data.


Time Segmentation Tutorial