investfly.models.strategy.StrategyServices
Construct the common protective-exit DTO; the runtime owns its evaluation.
Continuous behavior that the runtime manages around custom strategy callbacks.
A custom strategy remains responsible for deciding when to request an entry or rebalance. The runtime owns the configured position management, asset lifecycle, and portfolio-limit algorithms before and after those callbacks.
Request runtime-managed instrument selection, sizing, and order construction.
Allocate one total execution budget equally across the supplied securities.
For percentage and notional sizing, execution.positionSize is the total pool and the
runtime divides it by the number of securities. For fixed quantity sizing, the quantity is
applied to each security.
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'.
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'.
Runtime-injected operations shared with configuration-driven strategies.
This class is a public contract only. Strategy authors call self.services; Investfly
injects the live/backtest implementation before any strategy callback is evaluated.