sigma-terminal 3.4.1__py3-none-any.whl → 3.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sigma/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- Sigma v3.4.1 - Finance Research Agent
2
+ Sigma v3.5.0 - Finance Research Agent
3
3
 
4
4
  An elite finance research agent combining:
5
5
  - Multi-provider AI (Google Gemini, OpenAI, Anthropic, Groq, xAI, Ollama)
@@ -12,8 +12,8 @@ An elite finance research agent combining:
12
12
  - Monitoring, alerts, and watchlists
13
13
  """
14
14
 
15
- __version__ = "3.4.1"
16
- __author__ = "Sigma Team"
15
+ __version__ = "3.5.0"
16
+ __author__ = "Desenyon"
17
17
 
18
18
  # Core functionality
19
19
  from .app import launch, SigmaApp
@@ -101,7 +101,7 @@ from .robustness import (
101
101
  )
102
102
 
103
103
  # Setup
104
- from .setup import run_setup, quick_setup
104
+ from .setup_agent import run_setup
105
105
 
106
106
  __all__ = [
107
107
  # Version
@@ -181,5 +181,4 @@ __all__ = [
181
181
 
182
182
  # Setup
183
183
  "run_setup",
184
- "quick_setup",
185
184
  ]
@@ -34,10 +34,10 @@ class PerformanceAnalytics:
34
34
  if n < 2:
35
35
  return {}
36
36
 
37
- # Basic metrics
38
- total_return = (1 + returns).prod() - 1
37
+ # Helper to ensure numeric
38
+ total_return = float((1 + returns).prod() - 1) # type: ignore
39
39
  cagr = (1 + total_return) ** (periods_per_year / n) - 1
40
- volatility = returns.std() * np.sqrt(periods_per_year)
40
+ volatility = float(returns.std() * np.sqrt(periods_per_year)) # type: ignore
41
41
 
42
42
  # Downside metrics
43
43
  negative_returns = returns[returns < 0]
@@ -98,7 +98,7 @@ class PerformanceAnalytics:
98
98
  alpha = cagr - (risk_free_rate + beta * (aligned.iloc[:, 1].mean() * periods_per_year - risk_free_rate))
99
99
 
100
100
  # R-squared
101
- correlation = aligned.corr().iloc[0, 1]
101
+ correlation = float(aligned.corr().iloc[0, 1]) # type: ignore
102
102
  r_squared = correlation ** 2
103
103
 
104
104
  # Tracking error
@@ -278,7 +278,8 @@ class SeasonalityAnalyzer:
278
278
  @staticmethod
279
279
  def monthly_seasonality(returns: pd.Series) -> Dict[int, Dict[str, float]]:
280
280
  """Analyze month-of-year seasonality."""
281
- monthly = returns.groupby(returns.index.month)
281
+ idx = pd.DatetimeIndex(returns.index)
282
+ monthly = returns.groupby(idx.month)
282
283
 
283
284
  result = {}
284
285
  for month in range(1, 13):
@@ -299,7 +300,8 @@ class SeasonalityAnalyzer:
299
300
  @staticmethod
300
301
  def day_of_week_seasonality(returns: pd.Series) -> Dict[int, Dict[str, float]]:
301
302
  """Analyze day-of-week seasonality."""
302
- daily = returns.groupby(returns.index.dayofweek)
303
+ idx = pd.DatetimeIndex(returns.index)
304
+ daily = returns.groupby(idx.dayofweek)
303
305
 
304
306
  day_names = {0: "Monday", 1: "Tuesday", 2: "Wednesday", 3: "Thursday", 4: "Friday"}
305
307
 
@@ -329,7 +331,7 @@ class SeasonalityAnalyzer:
329
331
  post_returns = []
330
332
 
331
333
  for event_date in event_dates:
332
- event_idx = returns.index.get_indexer([event_date], method='nearest')[0]
334
+ event_idx = returns.index.get_indexer(pd.Index([event_date]), method='nearest')[0]
333
335
 
334
336
  if event_idx >= pre_days and event_idx < len(returns) - post_days:
335
337
  pre_ret = returns.iloc[event_idx - pre_days:event_idx].sum()
@@ -387,8 +389,8 @@ class FactorAnalyzer:
387
389
  if len(aligned) < 30:
388
390
  return {}
389
391
 
390
- y = aligned["asset"].values
391
- X = aligned.drop("asset", axis=1).values
392
+ y = aligned["asset"].to_numpy(dtype=float)
393
+ X = aligned.drop("asset", axis=1).to_numpy(dtype=float)
392
394
  X = np.column_stack([np.ones(len(X)), X]) # Add intercept
393
395
 
394
396
  # OLS regression