补充策略规格解析能力
This commit is contained in:
@@ -9,6 +9,7 @@ pub mod futures;
|
||||
pub mod instrument;
|
||||
pub mod metrics;
|
||||
pub mod platform_expr_strategy;
|
||||
pub mod platform_strategy_spec;
|
||||
pub mod portfolio;
|
||||
pub mod rules;
|
||||
pub mod scheduler;
|
||||
@@ -49,6 +50,15 @@ pub use platform_expr_strategy::{
|
||||
PlatformRebalanceSchedule, PlatformScheduleFrequency, PlatformTradeAction,
|
||||
PlatformUniverseActionKind,
|
||||
};
|
||||
pub use platform_strategy_spec::{
|
||||
DynamicRangeConfig, IndexThrottleConfig, MovingAverageFilterConfig, SkipWindowConfig,
|
||||
StrategyBenchmarkSpec, StrategyEngineConfig, StrategyExecutionSpec,
|
||||
StrategyExpressionActionConfig, StrategyExpressionAllocationConfig,
|
||||
StrategyExpressionOrderingConfig, StrategyExpressionRiskConfig,
|
||||
StrategyExpressionScheduleConfig, StrategyExpressionSelectionConfig,
|
||||
StrategyExpressionTradingConfig, StrategyRuntimeEnvironment, StrategyRuntimeExpressions,
|
||||
StrategyRuntimeSpec, platform_expr_config_from_spec, platform_expr_config_from_value,
|
||||
};
|
||||
pub use portfolio::{CashReceivable, HoldingSummary, PendingCashFlow, PortfolioState, Position};
|
||||
pub use rules::{ChinaEquityRuleHooks, EquityRuleHooks, RuleCheck};
|
||||
pub use scheduler::{
|
||||
|
||||
1036
crates/fidc-core/src/platform_strategy_spec.rs
Normal file
1036
crates/fidc-core/src/platform_strategy_spec.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1675,6 +1675,7 @@ impl OmniMicroCapStrategy {
|
||||
.max(1)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn projected_buy_quantity(&self, cash: f64, sizing_price: f64, execution_price: f64) -> u32 {
|
||||
if cash <= 0.0 || sizing_price <= 0.0 || execution_price <= 0.0 {
|
||||
return 0;
|
||||
@@ -1856,6 +1857,7 @@ impl OmniMicroCapStrategy {
|
||||
Some(fill.quantity)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn projected_market_fillable_quantity(
|
||||
&self,
|
||||
ctx: &StrategyContext<'_>,
|
||||
|
||||
Reference in New Issue
Block a user