Skip to content
StatAlphaDocumentation

SEASONALITY API

Response and request schema references are described in API schemas.

Seasonality Doc

Returns documentation for the fields in the Seasonality analysis output.

{
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}

Month Seasonality

Name In Required Type / constraints Description
symbol query Yes {"type": "string"}
start_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} Start date (YYYY-MM-DD)
end_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} End date (YYYY-MM-DD)
time_window query No {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’)
include_extended_hours query No {"type": "boolean", "default": false} Include pre/post-market data if True
{
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}

Seasonality Summary

Name In Required Type / constraints Description
symbol query Yes {"type": "string"}
start_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} Start date (YYYY-MM-DD)
end_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} End date (YYYY-MM-DD)
time_window query No {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’)
include_extended_hours query No {"type": "boolean", "default": false} Include pre/post-market data if True
use_median query No {"type": "boolean", "default": true} If true, selects top/worst values using median_return_pct instead of avg_return_pct
{
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}

Top Seasonality Patterns

Name In Required Type / constraints Description
symbol query Yes {"type": "string"}
start_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} Start date (YYYY-MM-DD)
end_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} End date (YYYY-MM-DD)
time_window query No {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’)
type query Yes {"type": "string"} One of: weekday, week, month
direction query No {"type": "string", "default": "top"} Sort direction: top or bottom
sort_by query No {"type": "string", "default": "median_return_pct"} Sort by column: median_return_pct, avg_return_pct, green_days_pct or green_weeks_pct or green_months_pct
limit query No {"type": "integer", "default": 5} Number of top entries to return
include_extended_hours query No {"type": "boolean", "default": false} Include pre/post-market data if True
{
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}

Week Seasonality

Name In Required Type / constraints Description
symbol query Yes {"type": "string"}
start_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} Start date (YYYY-MM-DD)
end_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} End date (YYYY-MM-DD)
time_window query No {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’)
include_extended_hours query No {"type": "boolean", "default": false} Include pre/post-market data if True
{
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}

Weekday Seasonality

Name In Required Type / constraints Description
symbol query Yes {"type": "string"}
start_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} Start date (YYYY-MM-DD)
end_date query No {"anyOf": [{"type": "string"}, {"type": "null"}]} End date (YYYY-MM-DD)
time_window query No {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "12M"} Predefined time window (e.g., ‘1M’, ‘3M’, ‘6M’, ‘12M’, ‘24M’, ‘5Y’)
include_extended_hours query No {"type": "boolean", "default": false} Include pre/post-market data if True
use_median query No {"type": "boolean", "default": true} If true, selects top/worst values using median_return_pct instead of avg_return_pct
{
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}