investfly.models.StrategyModels

def DataParams(params: Dict[str, Dict[str, Any]]):
class ScheduleInterval(builtins.str, enum.Enum):

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

DAILY_AFTER_MARKET_OPEN = DAILY_AFTER_MARKET_OPEN
DAILY_AFTER_MARKET_CLOSE = DAILY_AFTER_MARKET_CLOSE
HOURLY_DURING_MARKET_OPEN = HOURLY_DURING_MARKET_OPEN
def Schedule(param: ScheduleInterval | None):
@dataclass
class TradeSignal:
TradeSignal( security: investfly.models.MarketData.Security, position: investfly.models.PortfolioModels.PositionType, strength: int = 1, data: Optional[Dict[str, Any]] = None)
strength: int = 1
data: Optional[Dict[str, Any]] = None
@dataclass
class StandardCloseCriteria:
StandardCloseCriteria( targetProfit: float | None, stopLoss: float | None, trailingStop: float | None, timeOut: investfly.models.CommonModels.TimeDelta | None)
targetProfit: float | None
stopLoss: float | None
trailingStop: float | None
@staticmethod
def fromDict( json_dict: Dict[str, Any]) -> StandardCloseCriteria:
def toDict(self) -> Dict[str, Any]:
class PortfolioSecurityAllocator(abc.ABC):

Helper class that provides a standard way to create an ABC using inheritance.

@abstractmethod
def allocatePortfolio( self, portfolio: investfly.models.PortfolioModels.Portfolio, tradeSignals: List[TradeSignal]) -> List[investfly.models.PortfolioModels.TradeOrder]:
class LogLevel(builtins.str, enum.Enum):

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

INFO = <LogLevel.INFO: 'INFO'>
WARN = <LogLevel.WARN: 'WARN'>
ERROR = <LogLevel.ERROR: 'ERROR'>
@dataclass
class DeploymentLog:
DeploymentLog( date: datetime.datetime, level: LogLevel, message: str)
date: datetime.datetime
level: LogLevel
message: str
@staticmethod
def info(message: str) -> DeploymentLog:
@staticmethod
def warn(message: str) -> DeploymentLog:
@staticmethod
def error(message: str) -> DeploymentLog:
def toDict(self) -> Dict[str, Any]:
@staticmethod
def fromDict( json_dict: Dict[str, Any]) -> DeploymentLog:
class StandardOrCustom(builtins.str, enum.Enum):

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

STANDARD = <StandardOrCustom.STANDARD: 'STANDARD'>
CUSTOM = <StandardOrCustom.CUSTOM: 'CUSTOM'>
@dataclass
class TradingStrategyModel:
TradingStrategyModel( strategyName: str, strategyId: int | None = None, pythonCode: str | None = None, strategyDesc: str | None = None)
strategyName: str
strategyId: int | None = None
pythonCode: str | None = None
strategyDesc: str | None = None
@staticmethod
def fromDict( json_dict: Dict[str, Any]) -> TradingStrategyModel:
def toDict(self) -> Dict[str, Any]:
class BacktestStatus(builtins.str, enum.Enum):

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

NOT_STARTED = <BacktestStatus.NOT_STARTED: 'NOT_STARTED'>
QUEUED = <BacktestStatus.QUEUED: 'QUEUED'>
INITIALIZING = <BacktestStatus.INITIALIZING: 'INITIALIZING'>
RUNNING = <BacktestStatus.RUNNING: 'RUNNING'>
COMPLETE = <BacktestStatus.COMPLETE: 'COMPLETE'>
ERROR = <BacktestStatus.ERROR: 'ERROR'>
@dataclass
class BacktestResultStatus:
BacktestResultStatus( jobStatus: BacktestStatus, percentComplete: int)
jobStatus: BacktestStatus
percentComplete: int
def toDict(self) -> Dict[str, Any]:
@staticmethod
def fromDict( json_dict: Dict[str, Any]) -> BacktestResultStatus:
@dataclass
class BacktestResult:
def toDict(self) -> Dict[str, Any]:
@staticmethod
def fromDict( json_dict: Dict[str, Any]) -> BacktestResult: