We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 827a2d6 commit 68db190Copy full SHA for 68db190
investing_bot_framework/core/strategies/strategy.py
@@ -0,0 +1,23 @@
1
+import logging
2
+from typing import Dict, Any
3
+from abc import abstractmethod
4
+
5
+from investing_bot_framework.core.workers import ScheduledWorker
6
7
+logger = logging.getLogger(__name__)
8
9
10
+class Strategy(ScheduledWorker):
11
+ """
12
+ Class Strategy
13
14
15
+ @abstractmethod
16
+ def apply_strategy(self) -> None:
17
+ pass
18
19
+ def work(self, **kwargs: Dict[str, Any]) -> None:
20
+ logger.info("Starting strategy {}".format(self.get_id()))
21
+ self.apply_strategy()
22
23
0 commit comments