OlympusTrader.insight.executors package¶
Subpackages¶
- OlympusTrader.insight.executors.canceled package
- OlympusTrader.insight.executors.closed package
- OlympusTrader.insight.executors.executed package
- OlympusTrader.insight.executors.filled package
- OlympusTrader.insight.executors.new package
- Submodules
- OlympusTrader.insight.executors.new.cancelAllOppositeSide module
- OlympusTrader.insight.executors.new.dynamicQuantityToRisk module
- OlympusTrader.insight.executors.new.fullAccountQuantiityToRisk module
- OlympusTrader.insight.executors.new.marketOrderEntryPrice module
- OlympusTrader.insight.executors.new.minimumRiskToReward module
- OlympusTrader.insight.executors.new.percentageDCALevels module
- OlympusTrader.insight.executors.new.rejectExpiredInsight module
- Module contents
- OlympusTrader.insight.executors.rejected package
Submodules¶
OlympusTrader.insight.executors.base_executor module¶
- class OlympusTrader.insight.executors.base_executor.BaseExecutor(strategy: BaseStrategy, state: InsightState, version: float = '1.0', allowed_assets: set[str] | None = None, allowed_alphas: set[str] | None = None, allowed_insight_change_state: bool = True)¶
Bases:
ABC### Abstract class for BaseExecutor implementations. Used to manage orders based on insights.
- ALLOWED_ALPHAS: set[str] | None = {}¶
Set of allowed alphas for the executor
- ALLOWED_ASSETS: set[str] | None = {}¶
Set of allowed assets for the executor
- ALLOW_INSIGHT_CHANGE_STATE: bool = True¶
- NAME: str¶
- STRATEGY: BaseStrategy¶
Reference to the strategy instance.
- VERSION: str¶
Version of the executor model.
- changeState(insight: Insight, state: InsightState, message: str = None) None¶
Change the state of the insight
- get_history(symbol: str) DataFrame¶
Get the history of a symbol
- get_latest_bar(symbol: str) DataFrame¶
Get the latest bar of a symbol
- get_previos_bar(symbol: str) DataFrame¶
Get the previous bar of a symbol
- isAllowedAlpha(alpha: str) bool¶
Check if the alpha is allowed
- isAllowedAsset(symbol: str) bool¶
Check if the asset is allowed
- returnResults(passed: bool, success: bool = True, message: str = None) ExecutorResults¶
- abstractmethod run(insight: Insight) ExecutorResults¶
Run the executor.
- state: InsightState¶
Reference to the working state of the executor
- class OlympusTrader.insight.executors.base_executor.ExecutorResults(passed: bool, success: bool = True, message: str = None, executor: str = None)¶
Bases:
object### Executor Results This class is used to store the results of the executor.
- executor: str¶
Name of the executor.
- message: str¶
Message indicating the result of the executor.
- passed: bool¶
Boolean value indicating if the executor passed or not.
- success: bool¶
Boolean value indicating if the executor was ran successful or not.