51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
export type SignalType = 'bullish' | 'bearish' | 'neutral'
|
|
|
|
export interface AgentSignal {
|
|
agent: 'fundamentals' | 'sentiment' | 'news' | 'technical' | 'trader'
|
|
signal: SignalType
|
|
confidence: number
|
|
reasoning: string
|
|
timestamp: string
|
|
}
|
|
|
|
export interface AnalystReport {
|
|
analyst: 'fundamentals' | 'sentiment' | 'news' | 'technical'
|
|
report: string
|
|
signal: AgentSignal
|
|
}
|
|
|
|
export interface DebateRound {
|
|
bullishView: string
|
|
bearishView: string
|
|
researcher: 'bullish' | 'bearish'
|
|
}
|
|
|
|
export interface ExecutionPlan {
|
|
amount: number // number of shares to trade
|
|
riskManagement: {
|
|
maxLossPercent?: number
|
|
method?: string
|
|
}
|
|
takeProfit?: number // target price for take-profit
|
|
stopLoss?: number // stop-loss price or absolute value
|
|
note?: string
|
|
_llmReview?: { approved: boolean; notes?: string | null }
|
|
}
|
|
|
|
export interface TradingDecision {
|
|
action: 'buy' | 'sell' | 'hold'
|
|
confidence: number
|
|
targetPrice?: number
|
|
stopLoss?: number
|
|
reasoning: string
|
|
agentSignals: AgentSignal[]
|
|
debateRounds: DebateRound[]
|
|
executionPlan?: ExecutionPlan
|
|
}
|
|
|
|
export interface AgentConfig {
|
|
llmProvider: 'openrouter'
|
|
model: string
|
|
maxDebateRounds: number
|
|
temperature: number
|
|
} |