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
  • Key Features
  • Usage
  • Anomaly Detection
  • Notes

Was this helpful?

  1. Pattern Recognition

Anomaly Detection

It provides methods to detect global, local, and cluster anomalies in multivariate financial data

PreviousPairwise DistanceNextClustering Panels

Last updated 6 months ago

Was this helpful?

Tutorials are the best documentation —

Key Features

  1. Multiple anomaly detection methods:

    • Global anomalies: Identify outliers considering the entire dataset

    • Local anomalies: Detect outliers within local neighborhoods

    • Cluster anomalies: Find anomalies considering multi-dimensional data structure

  2. Anomaly scoring: Compute anomaly scores for each data point

  3. Feature-level anomaly analysis: Identify the most anomalous features for a given security

Usage

Load the accounting factors data:

import pandas as pd

df_factors = sov.data("factors/accounting", purge_cache=True)
df_last_3_years = df_factors.loc[(slice(None), slice(pd.Timestamp.now() - pd.DateOffset(years=3), None)), :]
df_last_3_years = df_last_3_years.percentile()

Anomaly Detection

Compute Anomaly Scores

df_anomaly_scores = df_last_3_years.anomalies("scores", ticker="TSLA")

Local Anomalies

df_local = df_last_3_years.anomalies("local", ticker="NVDA")

Global Anomalies

df_global = df_last_3_years.anomalies("global", ticker="NVDA")

Cluster Anomalies

df_cluster = df_last_3_years.anomalies("cluster", ticker="NVDA")

Notes

  • The module uses the sovai library for data loading and processing. Ensure you have the necessary permissions and valid authentication token.

  • Anomaly detection methods can be applied to different time ranges and tickers. Adjust the parameters as needed for your analysis.

  • The module provides flexibility in analyzing anomalies at both the overall and feature level. Experiment with different combinations of methods for comprehensive insights.

  • When working with large datasets, be mindful of computational resources, especially when applying multiple anomaly detection methods or creating complex visualizations.

Anomaly Detection Tutorial