Phase 1: - Real-time signal alerts (Discord/Telegram webhook) - Trading journal with entry/exit tracking - Position sizing calculator (Fixed/Kelly/ATR) Phase 2: - Pension asset allocation (DC/IRP 70% risk limit) - Drawdown monitoring with SVG gauge - Benchmark dashboard (portfolio vs KOSPI vs deposit) Phase 3: - Tax benefit simulation (Korean pension tax rules) - Correlation matrix heatmap - Parameter optimizer with grid search + overfit detection
51 lines
1.1 KiB
Python
51 lines
1.1 KiB
Python
"""
|
|
Notification related Pydantic schemas.
|
|
"""
|
|
from datetime import datetime
|
|
from typing import Optional, List
|
|
from enum import Enum
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class ChannelType(str, Enum):
|
|
DISCORD = "discord"
|
|
TELEGRAM = "telegram"
|
|
|
|
|
|
class NotificationSettingCreate(BaseModel):
|
|
channel_type: ChannelType
|
|
webhook_url: str = Field(..., min_length=1, max_length=500)
|
|
enabled: bool = True
|
|
|
|
|
|
class NotificationSettingUpdate(BaseModel):
|
|
webhook_url: Optional[str] = Field(None, min_length=1, max_length=500)
|
|
enabled: Optional[bool] = None
|
|
|
|
|
|
class NotificationSettingResponse(BaseModel):
|
|
id: int
|
|
user_id: int
|
|
channel_type: str
|
|
webhook_url: str
|
|
enabled: bool
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class NotificationHistoryResponse(BaseModel):
|
|
id: int
|
|
signal_id: int
|
|
channel_type: str
|
|
sent_at: datetime
|
|
status: str
|
|
message: Optional[str] = None
|
|
error_message: Optional[str] = None
|
|
|
|
class Config:
|
|
from_attributes = True
|