Files
All-in-one-Financial-Analysis/atlas-terminal/tests/conftest.py
T
shawnkim1997andClaude Opus 4.6 b2acda81ee feat: add Atlas Terminal — Next.js 14 + FastAPI full-stack migration
Complete migration from Streamlit to Next.js 14 App Router + FastAPI backend.

Frontend (Next.js 14):
- 10 pages: Overview, Research, Valuation, Technical, Markets, Earnings, News, Portfolio, Filings, Settings
- Terminal Noir dark theme with custom Tailwind config
- TradingView Lightweight Charts for candlestick/volume
- Valuation: DCF, Sensitivity Matrix, Monte Carlo, Tornado, Reverse DCF
- Financial Statements table with YoY growth badges and margin rows
- SEC EDGAR inline filing viewer with section tabs
- News split-view with iframe article embedding
- Technical Analysis with RSI, MACD, Bollinger, Fibonacci, Moving Averages
- Earnings beat/miss visualization
- AI Copilot chat panel with Gemini integration

Backend (FastAPI):
- 13 routers: market_data, financials, valuation, technical, earnings, insider, edgar, news, portfolio, analysis, chat, estimates, fx
- Services: DCF engine, Monte Carlo simulation, sensitivity analysis, risk metrics, SEC parser, technical indicators
- yfinance + yahooquery data sources with fallback pattern
- SQLite caching layer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 02:10:10 +00:00

50 lines
1.5 KiB
Python

"""Shared pytest fixtures for ATLAS Terminal test suite."""
import sys
from pathlib import Path
import pytest
# Ensure the project root is on sys.path so `server.*` imports work.
_PROJECT_ROOT = Path(__file__).resolve().parent.parent
if str(_PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(_PROJECT_ROOT))
@pytest.fixture
def sample_ticker():
"""A well-known US ticker for integration-style tests."""
return "AAPL"
@pytest.fixture
def sample_fcf_inputs():
"""Reasonable DCF inputs for unit-testing valuation functions."""
return {
"fcf": 100_000_000_000, # $100B trailing FCF
"wacc": 0.10, # 10%
"terminal_growth": 0.025, # 2.5%
"fcf_growth": 0.08, # 8%
"total_debt": 110_000_000_000, # $110B
"cash": 60_000_000_000, # $60B
"shares": 15_500_000_000, # 15.5B shares
}
@pytest.fixture
def sample_balance_sheet_values():
"""Simplified balance-sheet figures for Altman Z / DuPont tests."""
return {
"current_assets": 150_000_000_000,
"current_liabilities": 120_000_000_000,
"total_assets": 350_000_000_000,
"retained_earnings": 50_000_000_000,
"total_liabilities": 290_000_000_000,
"total_equity": 60_000_000_000,
"ebit": 120_000_000_000,
"sales": 400_000_000_000,
"market_cap": 2_800_000_000_000,
"net_income": 95_000_000_000,
"revenue": 400_000_000_000,
}