Coverage for source/agent/agents/simple_trading_algorithm.py: 80%

5 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-08-04 21:16 +0000

1# agent/agents/simple_trading_algorithm.py 

2 

3# global imports 

4import numpy as np 

5 

6# local imports 

7from source.agent import TradingAlgorithmBase 

8 

9class SimpleTradingAlgorithm(TradingAlgorithmBase): 

10 """""" 

11 

12 def perform_action(self, trend_predictions: int, market_data: np.ndarray = None) -> int: 

13 """ 

14 Performs the trading action based on the trend predictions and market data. 

15 

16 Parameters: 

17 trend_predictions (np.ndarray): The predicted trends. 

18 market_data (np.ndarray): The current market data. This 

19 implementation does not use market data. 

20 

21 Returns: 

22 (int): The result of the trading action. 

23 """ 

24 

25 return trend_predictions