@barfinex/types
Version:
Core TypeScript type definitions and shared interfaces for the Barfinex ecosystem. Provides strongly-typed contracts for modules, services, and plugins.
63 lines • 1.94 kB
TypeScript
export type StrategyLifecycleState = 'CANDIDATE' | 'EXPERIMENT' | 'ACTIVE' | 'SUPPRESSED' | 'ARCHIVED';
export interface StrategyPromotionRule {
minimumSampleSize: number;
promotionQualityThreshold: number;
minimumWinRate: number;
minimumProfitFactor: number;
}
export interface StrategySuppressionRule {
minimumSampleSize: number;
suppressionQualityThreshold: number;
minimumWinRate: number;
minimumProfitFactor: number;
maxExperimentDurationHours: number;
}
export interface StrategyGovernancePolicy {
enabled: boolean;
minimumSampleSize: number;
rankingWindowSize: number;
experimentMaxDurationHours: number;
promotionQualityThreshold: number;
suppressionQualityThreshold: number;
minimumWinRate: number;
minimumProfitFactor: number;
promotion: StrategyPromotionRule;
suppression: StrategySuppressionRule;
}
export interface StrategyWeightState {
strategyId: string;
normalizedQualityScore: number;
stabilityFactor: number;
rankingScore: number;
weight: number;
}
export interface StrategyLifecycleTransition {
from: StrategyLifecycleState;
to: StrategyLifecycleState;
reason: string;
}
export interface StrategyExperimentStatus {
experimentTag?: string;
experimentCohort?: string;
ageHours: number;
sampleSize: number;
maxDurationHours: number;
isExpired: boolean;
}
export interface StrategyGovernanceState {
strategyId: string;
lifecycleState: StrategyLifecycleState;
qualityScore: number;
rankingScore: number;
weight: number;
sampleSize: number;
winRate: number;
profitFactor: number;
promotionSuggested: boolean;
suppressionSuggested: boolean;
suppressionReason?: string;
experiment: StrategyExperimentStatus;
transitions: StrategyLifecycleTransition[];
latestEvaluationTs?: string;
}
//# sourceMappingURL=strategy-governance.interface.d.ts.map