diff --git a/crates/ml-dqn/src/multi_asset.rs b/crates/ml-dqn/src/multi_asset.rs index 794abfb8d..33338e412 100644 --- a/crates/ml-dqn/src/multi_asset.rs +++ b/crates/ml-dqn/src/multi_asset.rs @@ -12,7 +12,6 @@ //! MultiAssetPortfolioTracker //! ├── positions: HashMap //! ├── correlation_matrix: Array2 -//! ├── opportunity_scores: HashMap //! └── portfolio_history: Vec //! ``` //! @@ -67,8 +66,6 @@ pub struct MultiAssetPortfolioTracker { correlation_matrix: Array2, /// List of all symbols in order (for indexing into correlation matrix) symbols: Vec, - /// Opportunity scores for symbol selection (e.g., volatility, momentum) - opportunity_scores: HashMap, /// Portfolio value history for analytics portfolio_history: Vec, /// Trade P&L history for win rate calculation @@ -117,14 +114,10 @@ impl MultiAssetPortfolioTracker { // Initialize correlation matrix as identity (uncorrelated) let correlation_matrix = Array2::eye(num_symbols); - // Initialize opportunity scores to zero - let opportunity_scores = symbols.iter().map(|sym| (sym.clone(), 0.0)).collect(); - Self { positions, correlation_matrix, symbols, - opportunity_scores, portfolio_history: Vec::new(), trade_pnls: Vec::new(), max_positions: HashMap::new(), @@ -156,13 +149,11 @@ impl MultiAssetPortfolioTracker { .collect(); let correlation_matrix = Array2::eye(num_symbols); - let opportunity_scores = symbols.iter().map(|sym| (sym.clone(), 0.0)).collect(); Self { positions, correlation_matrix, symbols, - opportunity_scores, portfolio_history: Vec::new(), trade_pnls: Vec::new(), max_positions: HashMap::new(), @@ -300,28 +291,6 @@ impl MultiAssetPortfolioTracker { variance.abs().sqrt() } - /// Set opportunity scores for symbol selection - /// - /// # Arguments - /// - /// * `scores` - Opportunity scores per symbol (higher = more attractive) - pub fn set_opportunity_scores(&mut self, scores: HashMap) { - self.opportunity_scores = scores; - } - - /// Select active symbol based on opportunity scores - /// - /// # Returns - /// - /// Symbol with highest opportunity score - pub fn select_active_symbol(&self) -> Symbol { - self.opportunity_scores - .iter() - .max_by(|(_, a), (_, b)| a.partial_cmp(b).unwrap_or(std::cmp::Ordering::Equal)) - .map(|(sym, _)| sym.clone()) - .unwrap_or_else(|| self.symbols[0].clone()) - } - /// Build state vector for DQN input /// /// # Format