initial commit

This commit is contained in:
Rahul
2023-02-11 18:31:25 -05:00
parent b3fbb263ce
commit a3cc001f1b
3 changed files with 48 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
from enum import Enum
class MarketDirection(Enum):
"""
Enum for various market directions.
"""
LONG = "long"
SHORT = "short"
EVEN = "even"
NONE = ''
@staticmethod
def string_to_enum(label : str) -> str:
match label:
case "long":
return MarketDirection.LONG
case "short":
return MarketDirection.SHORT
case "even":
return MarketDirection.EVEN
case 'none':
return MarketDirection.NONE
case _:
return None