File size: 1,847 Bytes
fc813d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
"""
Application constants for Chronos 2 Forecasting App
"""

# Chronos-2 Model from https://huggingface.co/papers/2510.15821
# The official Chronos-2 model with group attention mechanism
# Supports: univariate, multivariate, and covariate-informed forecasting
CHRONOS2_MODEL = 's3://autogluon/chronos-2'

# Forecast horizons with labels
FORECAST_HORIZONS = {
    '1D': 1,
    '1W': 7,
    '1M': 30,
    '3M': 90,
    '6M': 180,
    '1Y': 365
}

# Confidence levels
CONFIDENCE_LEVELS = [80, 90, 95, 99]

# File upload settings
MAX_FILE_SIZE = 100 * 1024 * 1024  # 100MB
ALLOWED_EXTENSIONS = ['csv', 'xlsx', 'xls']

# Data processing settings
MAX_MISSING_PERCENT = 10
MIN_DATA_POINTS_MULTIPLIER = 2
MAX_CHART_POINTS = 10000
MAX_PREDICTION_HISTORY = 10

# UI colors
COLORS = {
    'primary': '#0066CC',
    'secondary': '#5C6BC0',
    'success': '#4CAF50',
    'warning': '#FF9800',
    'danger': '#F44336',
    'info': '#2196F3',
    'historical': '#0066CC',
    'forecast': '#FFD700',
    'separator': '#999999',
    'confidence': {
        80: 'rgba(255, 215, 0, 0.4)',
        90: 'rgba(255, 215, 0, 0.3)',
        95: 'rgba(255, 215, 0, 0.2)',
        99: 'rgba(255, 215, 0, 0.1)'
    }
}

# Chart configuration
CHART_CONFIG = {
    'displayModeBar': True,
    'displaylogo': False,
    'modeBarButtonsToRemove': ['lasso2d', 'select2d'],
    'toImageButtonOptions': {
        'format': 'png',
        'filename': 'chronos_forecast',
        'height': 800,
        'width': 1200,
        'scale': 2
    }
}

# Performance settings
DEBOUNCE_DELAY = 500  # milliseconds
LARGE_DATASET_THRESHOLD = 100000

# Date format patterns to try
DATE_FORMATS = [
    '%Y-%m-%d',
    '%Y/%m/%d',
    '%d-%m-%Y',
    '%d/%m/%Y',
    '%m-%d-%Y',
    '%m/%d/%Y',
    '%Y-%m-%d %H:%M:%S',
    '%Y/%m/%d %H:%M:%S',
    '%d-%m-%Y %H:%M:%S',
    '%d/%m/%Y %H:%M:%S'
]