quantbt-engine 1.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quantbt/__init__.py +862 -0
- quantbt/adapters/__init__.py +5 -0
- quantbt/adapters/nautilus/__init__.py +42 -0
- quantbt/adapters/nautilus/_dependency.py +53 -0
- quantbt/adapters/nautilus/backend.py +639 -0
- quantbt/adapters/nautilus/instruments.py +275 -0
- quantbt/adapters/nautilus/options.py +465 -0
- quantbt/adapters/nautilus/reports.py +231 -0
- quantbt/backends/__init__.py +29 -0
- quantbt/backends/_native_event_rust.py +2168 -0
- quantbt/backends/native_event.py +5048 -0
- quantbt/backends/native_option.py +796 -0
- quantbt/backends/native_portfolio.py +928 -0
- quantbt/backends/native_vectorized.py +1299 -0
- quantbt/backtester.py +485 -0
- quantbt/benchmarks/__init__.py +1 -0
- quantbt/benchmarks/compare_phase9_parity.py +302 -0
- quantbt/benchmarks/gamma_scalping_backtestsample.py +802 -0
- quantbt/benchmarks/profile_phase7.py +415 -0
- quantbt/benchmarks/run_arbitrage_phase_e.py +160 -0
- quantbt/benchmarks/run_optimization_overhead.py +195 -0
- quantbt/benchmarks/run_options_engine.py +272 -0
- quantbt/benchmarks/run_pct_equity_nautilus_smoke.py +227 -0
- quantbt/benchmarks/run_phase12_arbitrage_cert.py +402 -0
- quantbt/benchmarks/run_phase12_benchmark_nautilus_cert.py +430 -0
- quantbt/benchmarks/run_phase13_portfolio_report.py +97 -0
- quantbt/benchmarks/run_phase13_wfo_cache.py +162 -0
- quantbt/benchmarks/run_phase14_service_loop.py +694 -0
- quantbt/benchmarks/run_phase15a_nautilus_certification.py +514 -0
- quantbt/benchmarks/run_phase15b_synthetic_depth.py +175 -0
- quantbt/benchmarks/run_phase16_performance_debt.py +389 -0
- quantbt/benchmarks/run_phase30e_reactive_runner.py +161 -0
- quantbt/benchmarks/run_phase31_intrabar.py +441 -0
- quantbt/benchmarks/run_phase34a_native_event_memory.py +179 -0
- quantbt/benchmarks/run_phase34b_native_event_prepared_score.py +173 -0
- quantbt/benchmarks/run_phase34c_native_event_single_pass.py +176 -0
- quantbt/benchmarks/run_phase7.py +654 -0
- quantbt/benchmarks/run_portfolio_real_parity.py +537 -0
- quantbt/core/__init__.py +323 -0
- quantbt/core/arbitrage.py +767 -0
- quantbt/core/basket.py +234 -0
- quantbt/core/certification.py +274 -0
- quantbt/core/constraints.py +155 -0
- quantbt/core/engine.py +1144 -0
- quantbt/core/event.py +869 -0
- quantbt/core/execution_contract.py +197 -0
- quantbt/core/execution_depth.py +613 -0
- quantbt/core/intrabar_kernel.py +1906 -0
- quantbt/core/intrabar_reference.py +907 -0
- quantbt/core/intrabar_session.py +156 -0
- quantbt/core/market_tape.py +480 -0
- quantbt/core/native_event_capabilities.py +121 -0
- quantbt/core/native_event_parity.py +336 -0
- quantbt/core/order_compiler.py +422 -0
- quantbt/core/orders.py +319 -0
- quantbt/core/portfolio.py +392 -0
- quantbt/core/preprocessor.py +256 -0
- quantbt/core/reactive.py +173 -0
- quantbt/core/results.py +341 -0
- quantbt/core/schema.py +211 -0
- quantbt/core/scopes.py +96 -0
- quantbt/core/structured_orders.py +378 -0
- quantbt/core/types.py +87 -0
- quantbt/core/vectorized.py +203 -0
- quantbt/endpoint.py +4465 -0
- quantbt/engines.py +1014 -0
- quantbt/metrics/__init__.py +45 -0
- quantbt/metrics/options_analytics.py +46 -0
- quantbt/metrics/performance.py +541 -0
- quantbt/optimization/__init__.py +94 -0
- quantbt/optimization/callbacks.py +116 -0
- quantbt/optimization/candidate_selection.py +397 -0
- quantbt/optimization/config.py +84 -0
- quantbt/optimization/constraints.py +22 -0
- quantbt/optimization/evaluator.py +21 -0
- quantbt/optimization/evaluators/__init__.py +32 -0
- quantbt/optimization/evaluators/arbitrage.py +22 -0
- quantbt/optimization/evaluators/generic.py +34 -0
- quantbt/optimization/evaluators/grid_dca.py +22 -0
- quantbt/optimization/evaluators/intrabar.py +54 -0
- quantbt/optimization/evaluators/native_event.py +51 -0
- quantbt/optimization/evaluators/options.py +22 -0
- quantbt/optimization/evaluators/portfolio.py +42 -0
- quantbt/optimization/evaluators/signal.py +43 -0
- quantbt/optimization/multiseed.py +176 -0
- quantbt/optimization/objectives.py +221 -0
- quantbt/optimization/optimizer.py +500 -0
- quantbt/optimization/result.py +80 -0
- quantbt/optimization/samplers.py +84 -0
- quantbt/optimization/space.py +223 -0
- quantbt/options/__init__.py +215 -0
- quantbt/options/cache.py +116 -0
- quantbt/options/conventions.py +158 -0
- quantbt/options/data.py +177 -0
- quantbt/options/execution.py +600 -0
- quantbt/options/fees.py +135 -0
- quantbt/options/greeks.py +173 -0
- quantbt/options/hedging.py +232 -0
- quantbt/options/iv.py +188 -0
- quantbt/options/ledger.py +263 -0
- quantbt/options/lifecycle.py +94 -0
- quantbt/options/margin.py +311 -0
- quantbt/options/packages.py +147 -0
- quantbt/options/pricing.py +191 -0
- quantbt/options/schema.py +227 -0
- quantbt/options/selectors.py +281 -0
- quantbt/options/strategy.py +249 -0
- quantbt/options/surface.py +142 -0
- quantbt/options/tape.py +226 -0
- quantbt/options/templates/__init__.py +33 -0
- quantbt/options/templates/packages.py +354 -0
- quantbt/portfolio.py +606 -0
- quantbt/py.typed +1 -0
- quantbt/reporting/__init__.py +38 -0
- quantbt/reporting/arbitrage_audit.py +211 -0
- quantbt/reporting/nautilus_bundle.py +758 -0
- quantbt/reporting/nautilus_certification.py +226 -0
- quantbt/reporting/nautilus_diagnostics.py +225 -0
- quantbt/reporting/parity.py +496 -0
- quantbt/reporting/portfolio_audit.py +206 -0
- quantbt/reporting/portfolio_nautilus.py +140 -0
- quantbt/sizing/__init__.py +3 -0
- quantbt/sizing/fast.py +67 -0
- quantbt/sizing/modes.py +162 -0
- quantbt/viz/__init__.py +4 -0
- quantbt/viz/plots.py +310 -0
- quantbt/viz/themes.py +102 -0
- quantbt/walkforward.py +3136 -0
- quantbt_engine-1.0.7.dist-info/METADATA +891 -0
- quantbt_engine-1.0.7.dist-info/RECORD +133 -0
- quantbt_engine-1.0.7.dist-info/WHEEL +5 -0
- quantbt_engine-1.0.7.dist-info/licenses/LICENSE +21 -0
- quantbt_engine-1.0.7.dist-info/top_level.txt +1 -0
quantbt/__init__.py
ADDED
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
"""
|
|
2
|
+
quantbt
|
|
3
|
+
=======
|
|
4
|
+
Vectorised Binance-Futures backtest SDK.
|
|
5
|
+
|
|
6
|
+
Quick start
|
|
7
|
+
-----------
|
|
8
|
+
Single symbol::
|
|
9
|
+
|
|
10
|
+
from quantbt import BacktestEngine
|
|
11
|
+
|
|
12
|
+
bt = BacktestEngine(
|
|
13
|
+
Datetime = df["Datetime"],
|
|
14
|
+
Position = signal, # pd.Series of weights
|
|
15
|
+
Close = df["Close"],
|
|
16
|
+
fee = 0.0004,
|
|
17
|
+
initial_capital = 20_000,
|
|
18
|
+
leverage = 10,
|
|
19
|
+
hedge_type = "signal_notional",
|
|
20
|
+
alloc_per_trade = 100_000,
|
|
21
|
+
)
|
|
22
|
+
bt.analyze() # text report + chart
|
|
23
|
+
result = bt.result # BacktestResult dataclass
|
|
24
|
+
|
|
25
|
+
Multi-symbol portfolio::
|
|
26
|
+
|
|
27
|
+
from quantbt import MultiSymbolPortfolio
|
|
28
|
+
|
|
29
|
+
msp = MultiSymbolPortfolio(
|
|
30
|
+
positions = {"BTC": pos_btc, "ETH": pos_eth},
|
|
31
|
+
closes = {"BTC": close_btc, "ETH": close_eth},
|
|
32
|
+
datetime_index = common_dt,
|
|
33
|
+
mode = "market_neutral",
|
|
34
|
+
asset_type = "crypto",
|
|
35
|
+
)
|
|
36
|
+
msp.analyze()
|
|
37
|
+
|
|
38
|
+
Advanced — standalone metrics + plots::
|
|
39
|
+
|
|
40
|
+
from quantbt.metrics import full_report, sharpe, max_drawdown
|
|
41
|
+
from quantbt.viz import quick_plot, tearsheet
|
|
42
|
+
|
|
43
|
+
rpt = full_report(result)
|
|
44
|
+
quick_plot(result, theme="light")
|
|
45
|
+
tearsheet(result)
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
from importlib import import_module
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
_LAZY_EXPORTS = {
|
|
52
|
+
**{
|
|
53
|
+
name: (".optimization", name)
|
|
54
|
+
for name in (
|
|
55
|
+
"CONSTRAINTS_USER_ATTR",
|
|
56
|
+
"ArbitrageGenericEvaluator",
|
|
57
|
+
"ArbitrageTrialOutput",
|
|
58
|
+
"CandidateSelector",
|
|
59
|
+
"GenericEndpointEvaluator",
|
|
60
|
+
"GridDCAGenericEvaluator",
|
|
61
|
+
"GridDCATrialOutput",
|
|
62
|
+
"JsonlOptimizationLogger",
|
|
63
|
+
"MissingOptimizationMetricError",
|
|
64
|
+
"MultiSeedOptimization",
|
|
65
|
+
"ObjectiveResult",
|
|
66
|
+
"OptionPackageGenericEvaluator",
|
|
67
|
+
"OptionTrialOutput",
|
|
68
|
+
"OptimizationConfig",
|
|
69
|
+
"OptimizationResult",
|
|
70
|
+
"OptimizationTrialRecord",
|
|
71
|
+
"OptunaOptimizer",
|
|
72
|
+
"PreparedIntrabarEvaluator",
|
|
73
|
+
"PreparedNativeEventStrategyEvaluator",
|
|
74
|
+
"PreparedPortfolioEvaluator",
|
|
75
|
+
"PreparedSignalEvaluator",
|
|
76
|
+
"ReportMetricObjective",
|
|
77
|
+
"RobustSelectionConfig",
|
|
78
|
+
"SamplerConfig",
|
|
79
|
+
"SearchSpaceInfo",
|
|
80
|
+
"SelectedCandidate",
|
|
81
|
+
"SharpeObjective",
|
|
82
|
+
"SingleObjectiveEarlyStopping",
|
|
83
|
+
"TrialEvaluator",
|
|
84
|
+
"build_grid_search_space",
|
|
85
|
+
"build_sampler",
|
|
86
|
+
"constraints_feasible",
|
|
87
|
+
"constraints_from_trial",
|
|
88
|
+
"max_drawdown_constraint",
|
|
89
|
+
"max_margin_utilization_constraint",
|
|
90
|
+
"max_rejection_rate_constraint",
|
|
91
|
+
"max_turnover_constraint",
|
|
92
|
+
"metric_from_result",
|
|
93
|
+
"metrics_from_result",
|
|
94
|
+
"min_trades_constraint",
|
|
95
|
+
"result_full_report",
|
|
96
|
+
"search_space_info",
|
|
97
|
+
"set_trial_constraints",
|
|
98
|
+
"stable_params_key",
|
|
99
|
+
"suggest_parameter",
|
|
100
|
+
"suggest_params",
|
|
101
|
+
)
|
|
102
|
+
},
|
|
103
|
+
**{
|
|
104
|
+
name: (".walkforward", name)
|
|
105
|
+
for name in (
|
|
106
|
+
"DuplicatePruner",
|
|
107
|
+
"EarlyStoppingCallback",
|
|
108
|
+
"WalkForwardBenchmarkSnapshot",
|
|
109
|
+
"WalkForwardCompatibilityEntry",
|
|
110
|
+
"WalkForwardConfig",
|
|
111
|
+
"WalkForwardEngine",
|
|
112
|
+
"WalkForwardFold",
|
|
113
|
+
"WalkForwardResult",
|
|
114
|
+
"WalkForwardTrialRecord",
|
|
115
|
+
"benchmark_walkforward_kernels",
|
|
116
|
+
"logging_callback",
|
|
117
|
+
"score_strategy_output",
|
|
118
|
+
"select_full_sample_robust_record",
|
|
119
|
+
"select_is_plateau_robust_record",
|
|
120
|
+
"select_is_only_robust_record",
|
|
121
|
+
"select_flat_minima_record",
|
|
122
|
+
"stationary_bootstrap_sharpes",
|
|
123
|
+
"synthetic_walkforward_sharpes",
|
|
124
|
+
"stitch_oos_outputs",
|
|
125
|
+
"strategy_return_series",
|
|
126
|
+
"trade_frequency_penalty",
|
|
127
|
+
"validate_param_ranges",
|
|
128
|
+
"volatility_regime_labels",
|
|
129
|
+
"validate_walkforward_strategy_output",
|
|
130
|
+
"walkforward_support_matrix",
|
|
131
|
+
)
|
|
132
|
+
},
|
|
133
|
+
"quick_plot": (".viz", "quick_plot"),
|
|
134
|
+
"tearsheet": (".viz", "tearsheet"),
|
|
135
|
+
"apply_theme": (".viz", "apply_theme"),
|
|
136
|
+
**{
|
|
137
|
+
name: (".reporting", name)
|
|
138
|
+
for name in (
|
|
139
|
+
"build_arbitrage_domain_audit",
|
|
140
|
+
"build_native_nautilus_parity_report",
|
|
141
|
+
"build_nautilus_certification_profile",
|
|
142
|
+
"build_nautilus_depth_execution_report",
|
|
143
|
+
"build_nautilus_depth_parity_summary",
|
|
144
|
+
"build_nautilus_pct_equity_diagnostic",
|
|
145
|
+
"build_portfolio_domain_audit",
|
|
146
|
+
"build_portfolio_nautilus_position_report",
|
|
147
|
+
"build_portfolio_nautilus_validation_report",
|
|
148
|
+
"compare_native_arbitrage_results",
|
|
149
|
+
"export_nautilus_report_bundle",
|
|
150
|
+
"NautilusToleranceProfile",
|
|
151
|
+
"summarize_native_nautilus_parity_report",
|
|
152
|
+
"write_nautilus_certification_artifacts",
|
|
153
|
+
)
|
|
154
|
+
},
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def __getattr__(name: str):
|
|
159
|
+
"""Resolve optional/heavy public exports on first use."""
|
|
160
|
+
|
|
161
|
+
try:
|
|
162
|
+
module_name, attribute_name = _LAZY_EXPORTS[name]
|
|
163
|
+
except KeyError as exc: # pragma: no cover - normal Python attribute error
|
|
164
|
+
raise AttributeError(name) from exc
|
|
165
|
+
value = getattr(import_module(module_name, __name__), attribute_name)
|
|
166
|
+
globals()[name] = value
|
|
167
|
+
return value
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def __dir__():
|
|
171
|
+
return sorted(set(globals()) | set(_LAZY_EXPORTS))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
from .backtester import BacktestEngine
|
|
175
|
+
from .portfolio import MultiSymbolPortfolio
|
|
176
|
+
from .endpoint import (
|
|
177
|
+
EndpointConfig,
|
|
178
|
+
NativeEventProfile,
|
|
179
|
+
PreparedIntrabarRunner,
|
|
180
|
+
PreparedNativeEventStrategyRunner,
|
|
181
|
+
QuantBTEndpoint,
|
|
182
|
+
QuantBTPreparedContext,
|
|
183
|
+
format_metrics_report,
|
|
184
|
+
)
|
|
185
|
+
from .engines import BacktestEngineV2, EventDrivenBacktestEngine, OptionBacktestEngine, PortfolioBacktestEngine
|
|
186
|
+
from .backends import (
|
|
187
|
+
NativeEventBackend,
|
|
188
|
+
NativeEventConfig,
|
|
189
|
+
NativeEventScoreRequirements,
|
|
190
|
+
NativeOptionBackend,
|
|
191
|
+
NativeOptionConfig,
|
|
192
|
+
NativePortfolioBackend,
|
|
193
|
+
NativePortfolioConfig,
|
|
194
|
+
NativeVectorizedBackend,
|
|
195
|
+
NativeVectorizedConfig,
|
|
196
|
+
OptionSettlementEvent,
|
|
197
|
+
RustBatchedAuditResult,
|
|
198
|
+
RustBatchedChunkResult,
|
|
199
|
+
RustBatchedRunner,
|
|
200
|
+
RustBatchedScoreResult,
|
|
201
|
+
RustBatchedSession,
|
|
202
|
+
)
|
|
203
|
+
from .adapters.nautilus import NautilusBacktestEngine
|
|
204
|
+
from .core.types import BacktestResult
|
|
205
|
+
from .core.results import (
|
|
206
|
+
BacktestResultV2,
|
|
207
|
+
NativeAccountingArrays,
|
|
208
|
+
NativeEventScalarScoreResult,
|
|
209
|
+
NativeEventScoreResult,
|
|
210
|
+
OptionBacktestResult,
|
|
211
|
+
)
|
|
212
|
+
from .core.execution_contract import (
|
|
213
|
+
EXECUTION_CONTRACT_REGISTRY,
|
|
214
|
+
AmbiguityPolicy,
|
|
215
|
+
ExecutionContract,
|
|
216
|
+
FillPhase,
|
|
217
|
+
FundingPhase,
|
|
218
|
+
IntrabarSameBarPolicy,
|
|
219
|
+
LiquidationPriority,
|
|
220
|
+
MarketFillPolicy,
|
|
221
|
+
SignalPhase,
|
|
222
|
+
StopGapPolicy,
|
|
223
|
+
TakeProfitGapPolicy,
|
|
224
|
+
TrailingUpdatePhase,
|
|
225
|
+
get_execution_contract,
|
|
226
|
+
)
|
|
227
|
+
from .core.market_tape import MarketValidationCertificate, PreparedMarketTape, prepare_market_tape
|
|
228
|
+
from .core.intrabar_reference import (
|
|
229
|
+
IntrabarEventFlag,
|
|
230
|
+
IntrabarFill,
|
|
231
|
+
IntrabarFillReason,
|
|
232
|
+
IntrabarIntentTape,
|
|
233
|
+
IntrabarLevelMode,
|
|
234
|
+
IntrabarReferenceResult,
|
|
235
|
+
IntrabarSizingMode,
|
|
236
|
+
run_intrabar_reference,
|
|
237
|
+
)
|
|
238
|
+
from .core.intrabar_session import (
|
|
239
|
+
EntryPositionPolicy,
|
|
240
|
+
IntrabarSessionTape,
|
|
241
|
+
ProtectiveExitReentryPolicy,
|
|
242
|
+
SessionCounterBasis,
|
|
243
|
+
SessionExecutionPolicy,
|
|
244
|
+
)
|
|
245
|
+
from .core.intrabar_kernel import (
|
|
246
|
+
FillReplayTape,
|
|
247
|
+
NativeFillReplayResult,
|
|
248
|
+
NativeIntrabarKernelResult,
|
|
249
|
+
run_fill_replay_kernel,
|
|
250
|
+
run_intrabar_kernel,
|
|
251
|
+
run_intrabar_session_kernel,
|
|
252
|
+
)
|
|
253
|
+
from .core.certification import (
|
|
254
|
+
AlphaExecutionClassification,
|
|
255
|
+
CertificationLevel,
|
|
256
|
+
alpha_report_markdown,
|
|
257
|
+
build_alpha_certification_report,
|
|
258
|
+
certify_result_metadata,
|
|
259
|
+
classify_alpha_source,
|
|
260
|
+
scan_alpha_directory,
|
|
261
|
+
)
|
|
262
|
+
from .core.native_event_capabilities import (
|
|
263
|
+
NATIVE_EVENT_CAPABILITY_MATRIX,
|
|
264
|
+
NATIVE_EVENT_CAPABILITY_MATRIX_VERSION,
|
|
265
|
+
capability_matrix_fingerprint,
|
|
266
|
+
native_event_capability_matrix,
|
|
267
|
+
normalize_native_event_capabilities,
|
|
268
|
+
validate_native_event_capability_matrix,
|
|
269
|
+
)
|
|
270
|
+
from .core.native_event_parity import (
|
|
271
|
+
DEFAULT_NUMERIC_ATOL,
|
|
272
|
+
NativeEventParityCertificate,
|
|
273
|
+
NativeEventParityError,
|
|
274
|
+
assert_native_event_full_parity,
|
|
275
|
+
)
|
|
276
|
+
from .core.orders import (
|
|
277
|
+
BasketIntent,
|
|
278
|
+
Fill,
|
|
279
|
+
OrderAction,
|
|
280
|
+
OrderActivationPolicy,
|
|
281
|
+
OrderCommand,
|
|
282
|
+
OrderIntent,
|
|
283
|
+
Trade,
|
|
284
|
+
order_intents_to_lifecycle_commands,
|
|
285
|
+
)
|
|
286
|
+
from .core.reactive import (
|
|
287
|
+
NativeActiveOrderSnapshot,
|
|
288
|
+
NativeCommandBatch,
|
|
289
|
+
NativeEventStrategy,
|
|
290
|
+
NativeEventStrategyError,
|
|
291
|
+
NativeEventStrategyProtocol,
|
|
292
|
+
NativeFillEvent,
|
|
293
|
+
NativeOrderEvent,
|
|
294
|
+
NativeStrategyContext,
|
|
295
|
+
)
|
|
296
|
+
from .core.basket import FrozenBasketPlan, build_frozen_basket_orders
|
|
297
|
+
from .core.execution_depth import (
|
|
298
|
+
NautilusExecutionDepthConfig,
|
|
299
|
+
PackageDepthPreflightResult,
|
|
300
|
+
SUPPORTED_DEPTH_MODELS,
|
|
301
|
+
l2_replay_available,
|
|
302
|
+
simulate_nautilus_order_package_depth,
|
|
303
|
+
)
|
|
304
|
+
from .core.structured_orders import (
|
|
305
|
+
BracketOrderSpec,
|
|
306
|
+
DcaGridSpec,
|
|
307
|
+
StructuredOrderPlan,
|
|
308
|
+
build_bracket_order_plan,
|
|
309
|
+
build_dca_grid_order_plan,
|
|
310
|
+
)
|
|
311
|
+
from .core.arbitrage import (
|
|
312
|
+
ArbExecutionPolicy,
|
|
313
|
+
ArbitrageLeg,
|
|
314
|
+
ArbitragePlan,
|
|
315
|
+
ArbitrageSpec,
|
|
316
|
+
ArbitrageType,
|
|
317
|
+
BasisArbitrageSpec,
|
|
318
|
+
CalendarSpreadSpec,
|
|
319
|
+
ContractType,
|
|
320
|
+
CarryModel,
|
|
321
|
+
CarryModelKind,
|
|
322
|
+
CostModel,
|
|
323
|
+
CostModelKind,
|
|
324
|
+
CrossExchangeArbSpec,
|
|
325
|
+
FundingArbitrageSpec,
|
|
326
|
+
HedgePolicy,
|
|
327
|
+
HedgePolicyKind,
|
|
328
|
+
IndexBasketArbSpec,
|
|
329
|
+
LifecycleModel,
|
|
330
|
+
LifecycleModelKind,
|
|
331
|
+
MarginModel,
|
|
332
|
+
MarginModelKind,
|
|
333
|
+
OptionsVolArbSpec,
|
|
334
|
+
PackageExecutionKind,
|
|
335
|
+
PackageRejection,
|
|
336
|
+
SignalModel,
|
|
337
|
+
SignalModelKind,
|
|
338
|
+
SizingPolicy,
|
|
339
|
+
SizingPolicyKind,
|
|
340
|
+
SpotPerpCashCarrySpec,
|
|
341
|
+
SpreadFormula,
|
|
342
|
+
SpreadFormulaKind,
|
|
343
|
+
StatArbPairSpec,
|
|
344
|
+
TriangularArbSpec,
|
|
345
|
+
build_arbitrage_order_plan,
|
|
346
|
+
round_down_to_step,
|
|
347
|
+
)
|
|
348
|
+
from .core.constraints import QuantityConstraints, build_quantity_constraints, quantize_signed_quantity
|
|
349
|
+
from .core.schema import (
|
|
350
|
+
AccountConfig,
|
|
351
|
+
AssetType,
|
|
352
|
+
BasketExecutionPolicy,
|
|
353
|
+
BasketLegSpec,
|
|
354
|
+
BasketSpec,
|
|
355
|
+
ExecutionConfig,
|
|
356
|
+
FeeModel,
|
|
357
|
+
FillPricePolicy,
|
|
358
|
+
InstrumentSpec,
|
|
359
|
+
LiquiditySide,
|
|
360
|
+
MarginMode,
|
|
361
|
+
OmsMode,
|
|
362
|
+
OrderSide,
|
|
363
|
+
OrderType,
|
|
364
|
+
SameBarPolicy,
|
|
365
|
+
SignalSpec,
|
|
366
|
+
TimeInForce,
|
|
367
|
+
)
|
|
368
|
+
from .core.portfolio import (
|
|
369
|
+
LEGACY_PORTFOLIO_MODES,
|
|
370
|
+
LEGACY_PORTFOLIO_SIZING_MODES,
|
|
371
|
+
NATIVE_PORTFOLIO_ROADMAP_SIZING_MODES,
|
|
372
|
+
NATIVE_PORTFOLIO_SUPPORTED_SIZING_MODES,
|
|
373
|
+
PortfolioDomainSpec,
|
|
374
|
+
PortfolioMode,
|
|
375
|
+
PortfolioRebalancePolicy,
|
|
376
|
+
PortfolioSizingMode,
|
|
377
|
+
normalize_portfolio_mode,
|
|
378
|
+
normalize_portfolio_sizing_mode,
|
|
379
|
+
normalize_rebalance_policy,
|
|
380
|
+
portfolio_capability_matrix,
|
|
381
|
+
validate_portfolio_result_contract,
|
|
382
|
+
)
|
|
383
|
+
from .options import (
|
|
384
|
+
CANONICAL_OPTION_CHAIN_COLUMNS,
|
|
385
|
+
ExerciseStyle,
|
|
386
|
+
ExternalOptionMarginValidator,
|
|
387
|
+
GammaScalpingConfig,
|
|
388
|
+
HedgeDecision,
|
|
389
|
+
HedgePathResult,
|
|
390
|
+
IVStatus,
|
|
391
|
+
ImpliedVolResult,
|
|
392
|
+
InstrumentRegistrySignature,
|
|
393
|
+
OptionDecisionFillPolicy,
|
|
394
|
+
OptionDepthFidelity,
|
|
395
|
+
OptionExecutionConfig,
|
|
396
|
+
OptionFeeResult,
|
|
397
|
+
OptionFeeSchedule,
|
|
398
|
+
OptionGreeks,
|
|
399
|
+
OptionHedgeConfig,
|
|
400
|
+
OptionHedgePolicyType,
|
|
401
|
+
OptionInstrumentRegistry,
|
|
402
|
+
OptionInstrumentSpec,
|
|
403
|
+
OptionKind,
|
|
404
|
+
OptionLimitFidelity,
|
|
405
|
+
OptionLiquidationAudit,
|
|
406
|
+
OptionMarginConfig,
|
|
407
|
+
OptionMarginModel,
|
|
408
|
+
OptionMarginRequirement,
|
|
409
|
+
OptionPackageExecutionPolicy,
|
|
410
|
+
OptionPackageExecutionResult,
|
|
411
|
+
OptionPackageIntent,
|
|
412
|
+
OptionPackageLeg,
|
|
413
|
+
OptionLedger,
|
|
414
|
+
OptionPosition,
|
|
415
|
+
OptionPreparedRunCache,
|
|
416
|
+
OptionSelection,
|
|
417
|
+
OptionSelectionFilters,
|
|
418
|
+
OptionSettlementRepresentation,
|
|
419
|
+
OptionSettlementResult,
|
|
420
|
+
OptionStrategyRun,
|
|
421
|
+
OptionTapeSignature,
|
|
422
|
+
OptionVenueConvention,
|
|
423
|
+
PremiumConvention,
|
|
424
|
+
PreparedOptionTape,
|
|
425
|
+
SettlementStyle,
|
|
426
|
+
SurfaceDiagnostics,
|
|
427
|
+
TotalVarianceSurface,
|
|
428
|
+
YEAR_NS,
|
|
429
|
+
available_option_rows,
|
|
430
|
+
binance_european_options_convention,
|
|
431
|
+
black76_intrinsic,
|
|
432
|
+
black76_parity_residual,
|
|
433
|
+
black76_parity_value,
|
|
434
|
+
black76_price,
|
|
435
|
+
build_gamma_scalping_strategy_run,
|
|
436
|
+
butterfly,
|
|
437
|
+
calculate_option_fee,
|
|
438
|
+
calculate_option_margin,
|
|
439
|
+
calendar,
|
|
440
|
+
collar,
|
|
441
|
+
compile_option_package_orders,
|
|
442
|
+
condor,
|
|
443
|
+
covered_call,
|
|
444
|
+
deribit_inverse_option_convention,
|
|
445
|
+
deribit_inverse_fee_schedule,
|
|
446
|
+
deribit_linear_usdc_option_convention,
|
|
447
|
+
deribit_linear_usdc_fee_schedule,
|
|
448
|
+
implied_vol_black76,
|
|
449
|
+
implied_vol_inverse_black76_base,
|
|
450
|
+
inverse_black76_greeks_base,
|
|
451
|
+
inverse_black76_greeks_quote,
|
|
452
|
+
inverse_black76_intrinsic_base,
|
|
453
|
+
inverse_black76_parity_residual_base,
|
|
454
|
+
inverse_black76_parity_value_base,
|
|
455
|
+
inverse_black76_price_base,
|
|
456
|
+
linear_black76_greeks,
|
|
457
|
+
compute_net_option_delta,
|
|
458
|
+
execute_option_package,
|
|
459
|
+
hedge_decision,
|
|
460
|
+
liquidate_option_positions,
|
|
461
|
+
long_call,
|
|
462
|
+
long_put,
|
|
463
|
+
option_expiry_payoff_per_unit,
|
|
464
|
+
option_package_cache_key,
|
|
465
|
+
prepare_option_tape,
|
|
466
|
+
risk_reversal,
|
|
467
|
+
run_delta_hedge_path,
|
|
468
|
+
scale_greeks_to_reporting_currency,
|
|
469
|
+
select_atm_option,
|
|
470
|
+
select_target_delta_option,
|
|
471
|
+
select_target_dte_option,
|
|
472
|
+
select_target_moneyness_option,
|
|
473
|
+
settle_option_expiry,
|
|
474
|
+
short_call,
|
|
475
|
+
short_put,
|
|
476
|
+
straddle,
|
|
477
|
+
strangle,
|
|
478
|
+
vertical,
|
|
479
|
+
validate_option_chain_frame,
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
from .metrics import (
|
|
483
|
+
full_report,
|
|
484
|
+
sharpe,
|
|
485
|
+
sortino,
|
|
486
|
+
calmar,
|
|
487
|
+
omega,
|
|
488
|
+
cagr,
|
|
489
|
+
total_return,
|
|
490
|
+
max_drawdown,
|
|
491
|
+
max_drawdown_pct,
|
|
492
|
+
hitrate,
|
|
493
|
+
profit_factor,
|
|
494
|
+
rolling_sharpe,
|
|
495
|
+
rolling_drawdown,
|
|
496
|
+
option_attribution_report,
|
|
497
|
+
option_report_bundle,
|
|
498
|
+
option_run_manifest,
|
|
499
|
+
)
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
__version__ = "1.0.7"
|
|
503
|
+
__author__ = "quantbt"
|
|
504
|
+
|
|
505
|
+
__all__ = [
|
|
506
|
+
# engines
|
|
507
|
+
"BacktestEngine",
|
|
508
|
+
"BacktestEngineV2",
|
|
509
|
+
"EndpointConfig",
|
|
510
|
+
"EventDrivenBacktestEngine",
|
|
511
|
+
"MultiSymbolPortfolio",
|
|
512
|
+
"NautilusBacktestEngine",
|
|
513
|
+
"NativeEventBackend",
|
|
514
|
+
"NativeEventConfig",
|
|
515
|
+
"NativeEventScoreRequirements",
|
|
516
|
+
"NativeAccountingArrays",
|
|
517
|
+
"NativeEventProfile",
|
|
518
|
+
"NativeActiveOrderSnapshot",
|
|
519
|
+
"NativeCommandBatch",
|
|
520
|
+
"NativeEventScoreResult",
|
|
521
|
+
"NativeEventScalarScoreResult",
|
|
522
|
+
"NativeEventParityCertificate",
|
|
523
|
+
"NativeEventParityError",
|
|
524
|
+
"NativeEventStrategyError",
|
|
525
|
+
"NativeEventStrategy",
|
|
526
|
+
"NativeEventStrategyProtocol",
|
|
527
|
+
"NativeFillEvent",
|
|
528
|
+
"NativeOrderEvent",
|
|
529
|
+
"NativeStrategyContext",
|
|
530
|
+
"NativeOptionBackend",
|
|
531
|
+
"NativeOptionConfig",
|
|
532
|
+
"NativePortfolioBackend",
|
|
533
|
+
"NativePortfolioConfig",
|
|
534
|
+
"NativeVectorizedBackend",
|
|
535
|
+
"NativeVectorizedConfig",
|
|
536
|
+
"OptionBacktestEngine",
|
|
537
|
+
"OptionBacktestResult",
|
|
538
|
+
"OptionSettlementEvent",
|
|
539
|
+
"NautilusExecutionDepthConfig",
|
|
540
|
+
"PackageDepthPreflightResult",
|
|
541
|
+
"PortfolioBacktestEngine",
|
|
542
|
+
"PortfolioDomainSpec",
|
|
543
|
+
"PortfolioMode",
|
|
544
|
+
"PortfolioRebalancePolicy",
|
|
545
|
+
"PortfolioSizingMode",
|
|
546
|
+
"QuantBTEndpoint",
|
|
547
|
+
"PreparedNativeEventStrategyRunner",
|
|
548
|
+
"QuantBTPreparedContext",
|
|
549
|
+
"format_metrics_report",
|
|
550
|
+
"CANONICAL_OPTION_CHAIN_COLUMNS",
|
|
551
|
+
"ExerciseStyle",
|
|
552
|
+
"ExternalOptionMarginValidator",
|
|
553
|
+
"GammaScalpingConfig",
|
|
554
|
+
"HedgeDecision",
|
|
555
|
+
"HedgePathResult",
|
|
556
|
+
"IVStatus",
|
|
557
|
+
"ImpliedVolResult",
|
|
558
|
+
"InstrumentRegistrySignature",
|
|
559
|
+
"OptionDecisionFillPolicy",
|
|
560
|
+
"OptionDepthFidelity",
|
|
561
|
+
"OptionExecutionConfig",
|
|
562
|
+
"OptionFeeResult",
|
|
563
|
+
"OptionFeeSchedule",
|
|
564
|
+
"OptionGreeks",
|
|
565
|
+
"OptionHedgeConfig",
|
|
566
|
+
"OptionHedgePolicyType",
|
|
567
|
+
"OptionInstrumentRegistry",
|
|
568
|
+
"OptionInstrumentSpec",
|
|
569
|
+
"OptionKind",
|
|
570
|
+
"OptionLimitFidelity",
|
|
571
|
+
"OptionLiquidationAudit",
|
|
572
|
+
"OptionMarginConfig",
|
|
573
|
+
"OptionMarginModel",
|
|
574
|
+
"OptionMarginRequirement",
|
|
575
|
+
"OptionPackageExecutionPolicy",
|
|
576
|
+
"OptionPackageExecutionResult",
|
|
577
|
+
"OptionPackageIntent",
|
|
578
|
+
"OptionPackageLeg",
|
|
579
|
+
"OptionLedger",
|
|
580
|
+
"OptionPosition",
|
|
581
|
+
"OptionPreparedRunCache",
|
|
582
|
+
"OptionSelection",
|
|
583
|
+
"OptionSelectionFilters",
|
|
584
|
+
"OptionSettlementRepresentation",
|
|
585
|
+
"OptionSettlementResult",
|
|
586
|
+
"OptionStrategyRun",
|
|
587
|
+
"OptionTapeSignature",
|
|
588
|
+
"OptionVenueConvention",
|
|
589
|
+
"PremiumConvention",
|
|
590
|
+
"PreparedOptionTape",
|
|
591
|
+
"SettlementStyle",
|
|
592
|
+
"SurfaceDiagnostics",
|
|
593
|
+
"TotalVarianceSurface",
|
|
594
|
+
"YEAR_NS",
|
|
595
|
+
"available_option_rows",
|
|
596
|
+
"binance_european_options_convention",
|
|
597
|
+
"black76_intrinsic",
|
|
598
|
+
"black76_parity_residual",
|
|
599
|
+
"black76_parity_value",
|
|
600
|
+
"black76_price",
|
|
601
|
+
"build_gamma_scalping_strategy_run",
|
|
602
|
+
"butterfly",
|
|
603
|
+
"calculate_option_fee",
|
|
604
|
+
"calculate_option_margin",
|
|
605
|
+
"calendar",
|
|
606
|
+
"collar",
|
|
607
|
+
"compile_option_package_orders",
|
|
608
|
+
"condor",
|
|
609
|
+
"covered_call",
|
|
610
|
+
"deribit_inverse_option_convention",
|
|
611
|
+
"deribit_inverse_fee_schedule",
|
|
612
|
+
"deribit_linear_usdc_option_convention",
|
|
613
|
+
"deribit_linear_usdc_fee_schedule",
|
|
614
|
+
"implied_vol_black76",
|
|
615
|
+
"implied_vol_inverse_black76_base",
|
|
616
|
+
"inverse_black76_greeks_base",
|
|
617
|
+
"inverse_black76_greeks_quote",
|
|
618
|
+
"inverse_black76_intrinsic_base",
|
|
619
|
+
"inverse_black76_parity_residual_base",
|
|
620
|
+
"inverse_black76_parity_value_base",
|
|
621
|
+
"inverse_black76_price_base",
|
|
622
|
+
"linear_black76_greeks",
|
|
623
|
+
"long_call",
|
|
624
|
+
"long_put",
|
|
625
|
+
"compute_net_option_delta",
|
|
626
|
+
"execute_option_package",
|
|
627
|
+
"hedge_decision",
|
|
628
|
+
"liquidate_option_positions",
|
|
629
|
+
"option_expiry_payoff_per_unit",
|
|
630
|
+
"option_package_cache_key",
|
|
631
|
+
"prepare_option_tape",
|
|
632
|
+
"risk_reversal",
|
|
633
|
+
"run_delta_hedge_path",
|
|
634
|
+
"scale_greeks_to_reporting_currency",
|
|
635
|
+
"select_atm_option",
|
|
636
|
+
"select_target_delta_option",
|
|
637
|
+
"select_target_dte_option",
|
|
638
|
+
"select_target_moneyness_option",
|
|
639
|
+
"settle_option_expiry",
|
|
640
|
+
"short_call",
|
|
641
|
+
"short_put",
|
|
642
|
+
"straddle",
|
|
643
|
+
"strangle",
|
|
644
|
+
"vertical",
|
|
645
|
+
"validate_option_chain_frame",
|
|
646
|
+
"option_attribution_report",
|
|
647
|
+
"option_report_bundle",
|
|
648
|
+
"option_run_manifest",
|
|
649
|
+
"LEGACY_PORTFOLIO_MODES",
|
|
650
|
+
"LEGACY_PORTFOLIO_SIZING_MODES",
|
|
651
|
+
"NATIVE_PORTFOLIO_ROADMAP_SIZING_MODES",
|
|
652
|
+
"NATIVE_PORTFOLIO_SUPPORTED_SIZING_MODES",
|
|
653
|
+
"build_arbitrage_domain_audit",
|
|
654
|
+
"build_native_nautilus_parity_report",
|
|
655
|
+
"build_nautilus_certification_profile",
|
|
656
|
+
"build_nautilus_depth_execution_report",
|
|
657
|
+
"build_nautilus_depth_parity_summary",
|
|
658
|
+
"build_nautilus_pct_equity_diagnostic",
|
|
659
|
+
"build_portfolio_domain_audit",
|
|
660
|
+
"build_portfolio_nautilus_position_report",
|
|
661
|
+
"build_portfolio_nautilus_validation_report",
|
|
662
|
+
"compare_native_arbitrage_results",
|
|
663
|
+
"export_nautilus_report_bundle",
|
|
664
|
+
"NautilusToleranceProfile",
|
|
665
|
+
"summarize_native_nautilus_parity_report",
|
|
666
|
+
"write_nautilus_certification_artifacts",
|
|
667
|
+
"WalkForwardConfig",
|
|
668
|
+
"WalkForwardEngine",
|
|
669
|
+
"WalkForwardFold",
|
|
670
|
+
"WalkForwardResult",
|
|
671
|
+
"WalkForwardTrialRecord",
|
|
672
|
+
"WalkForwardBenchmarkSnapshot",
|
|
673
|
+
"WalkForwardCompatibilityEntry",
|
|
674
|
+
"EarlyStoppingCallback",
|
|
675
|
+
"DuplicatePruner",
|
|
676
|
+
"CONSTRAINTS_USER_ATTR",
|
|
677
|
+
"JsonlOptimizationLogger",
|
|
678
|
+
"MultiSeedOptimization",
|
|
679
|
+
"ObjectiveResult",
|
|
680
|
+
"OptimizationConfig",
|
|
681
|
+
"OptimizationResult",
|
|
682
|
+
"OptimizationTrialRecord",
|
|
683
|
+
"OptunaOptimizer",
|
|
684
|
+
"RobustSelectionConfig",
|
|
685
|
+
"SamplerConfig",
|
|
686
|
+
"SearchSpaceInfo",
|
|
687
|
+
"SingleObjectiveEarlyStopping",
|
|
688
|
+
"TrialEvaluator",
|
|
689
|
+
"build_grid_search_space",
|
|
690
|
+
"build_sampler",
|
|
691
|
+
"constraints_from_trial",
|
|
692
|
+
"search_space_info",
|
|
693
|
+
"set_trial_constraints",
|
|
694
|
+
"stable_params_key",
|
|
695
|
+
"suggest_parameter",
|
|
696
|
+
"suggest_params",
|
|
697
|
+
"benchmark_walkforward_kernels",
|
|
698
|
+
"logging_callback",
|
|
699
|
+
"score_strategy_output",
|
|
700
|
+
"select_flat_minima_record",
|
|
701
|
+
"select_full_sample_robust_record",
|
|
702
|
+
"select_is_only_robust_record",
|
|
703
|
+
"select_is_plateau_robust_record",
|
|
704
|
+
"stationary_bootstrap_sharpes",
|
|
705
|
+
"synthetic_walkforward_sharpes",
|
|
706
|
+
"stitch_oos_outputs",
|
|
707
|
+
"strategy_return_series",
|
|
708
|
+
"trade_frequency_penalty",
|
|
709
|
+
"validate_param_ranges",
|
|
710
|
+
"volatility_regime_labels",
|
|
711
|
+
"validate_walkforward_strategy_output",
|
|
712
|
+
"walkforward_support_matrix",
|
|
713
|
+
"BacktestResult",
|
|
714
|
+
"BacktestResultV2",
|
|
715
|
+
"BracketOrderSpec",
|
|
716
|
+
"AccountConfig",
|
|
717
|
+
"AlphaExecutionClassification",
|
|
718
|
+
"DEFAULT_NUMERIC_ATOL",
|
|
719
|
+
"NATIVE_EVENT_CAPABILITY_MATRIX",
|
|
720
|
+
"NATIVE_EVENT_CAPABILITY_MATRIX_VERSION",
|
|
721
|
+
"AmbiguityPolicy",
|
|
722
|
+
"ArbExecutionPolicy",
|
|
723
|
+
"ArbitrageLeg",
|
|
724
|
+
"ArbitragePlan",
|
|
725
|
+
"ArbitrageSpec",
|
|
726
|
+
"ArbitrageType",
|
|
727
|
+
"AssetType",
|
|
728
|
+
"BasisArbitrageSpec",
|
|
729
|
+
"BasketExecutionPolicy",
|
|
730
|
+
"BasketIntent",
|
|
731
|
+
"BasketLegSpec",
|
|
732
|
+
"BasketSpec",
|
|
733
|
+
"CalendarSpreadSpec",
|
|
734
|
+
"CertificationLevel",
|
|
735
|
+
"CarryModel",
|
|
736
|
+
"CarryModelKind",
|
|
737
|
+
"ContractType",
|
|
738
|
+
"CostModel",
|
|
739
|
+
"CostModelKind",
|
|
740
|
+
"CrossExchangeArbSpec",
|
|
741
|
+
"DcaGridSpec",
|
|
742
|
+
"EXECUTION_CONTRACT_REGISTRY",
|
|
743
|
+
"ExecutionConfig",
|
|
744
|
+
"ExecutionContract",
|
|
745
|
+
"FeeModel",
|
|
746
|
+
"Fill",
|
|
747
|
+
"FillReplayTape",
|
|
748
|
+
"FillPricePolicy",
|
|
749
|
+
"FillPhase",
|
|
750
|
+
"FundingPhase",
|
|
751
|
+
"FundingArbitrageSpec",
|
|
752
|
+
"FrozenBasketPlan",
|
|
753
|
+
"HedgePolicy",
|
|
754
|
+
"HedgePolicyKind",
|
|
755
|
+
"IndexBasketArbSpec",
|
|
756
|
+
"InstrumentSpec",
|
|
757
|
+
"IntrabarEventFlag",
|
|
758
|
+
"IntrabarFill",
|
|
759
|
+
"IntrabarFillReason",
|
|
760
|
+
"IntrabarIntentTape",
|
|
761
|
+
"IntrabarLevelMode",
|
|
762
|
+
"IntrabarReferenceResult",
|
|
763
|
+
"IntrabarSessionTape",
|
|
764
|
+
"IntrabarSizingMode",
|
|
765
|
+
"IntrabarSameBarPolicy",
|
|
766
|
+
"EntryPositionPolicy",
|
|
767
|
+
"ProtectiveExitReentryPolicy",
|
|
768
|
+
"SessionCounterBasis",
|
|
769
|
+
"SessionExecutionPolicy",
|
|
770
|
+
"LifecycleModel",
|
|
771
|
+
"LifecycleModelKind",
|
|
772
|
+
"LiquiditySide",
|
|
773
|
+
"LiquidationPriority",
|
|
774
|
+
"MarginMode",
|
|
775
|
+
"MarginModel",
|
|
776
|
+
"MarginModelKind",
|
|
777
|
+
"MarketFillPolicy",
|
|
778
|
+
"MarketValidationCertificate",
|
|
779
|
+
"NativeFillReplayResult",
|
|
780
|
+
"NativeIntrabarKernelResult",
|
|
781
|
+
"OmsMode",
|
|
782
|
+
"OrderAction",
|
|
783
|
+
"OrderActivationPolicy",
|
|
784
|
+
"OrderCommand",
|
|
785
|
+
"OrderIntent",
|
|
786
|
+
"OrderSide",
|
|
787
|
+
"OrderType",
|
|
788
|
+
"QuantityConstraints",
|
|
789
|
+
"OptionsVolArbSpec",
|
|
790
|
+
"PackageExecutionKind",
|
|
791
|
+
"PackageRejection",
|
|
792
|
+
"PreparedMarketTape",
|
|
793
|
+
"PreparedIntrabarRunner",
|
|
794
|
+
"SameBarPolicy",
|
|
795
|
+
"SignalModel",
|
|
796
|
+
"SignalModelKind",
|
|
797
|
+
"SignalSpec",
|
|
798
|
+
"SignalPhase",
|
|
799
|
+
"SizingPolicy",
|
|
800
|
+
"SizingPolicyKind",
|
|
801
|
+
"SpotPerpCashCarrySpec",
|
|
802
|
+
"SpreadFormula",
|
|
803
|
+
"SpreadFormulaKind",
|
|
804
|
+
"StatArbPairSpec",
|
|
805
|
+
"StopGapPolicy",
|
|
806
|
+
"StructuredOrderPlan",
|
|
807
|
+
"TakeProfitGapPolicy",
|
|
808
|
+
"TimeInForce",
|
|
809
|
+
"Trade",
|
|
810
|
+
"TrailingUpdatePhase",
|
|
811
|
+
"TriangularArbSpec",
|
|
812
|
+
"alpha_report_markdown",
|
|
813
|
+
"build_arbitrage_order_plan",
|
|
814
|
+
"build_alpha_certification_report",
|
|
815
|
+
"build_bracket_order_plan",
|
|
816
|
+
"build_quantity_constraints",
|
|
817
|
+
"build_dca_grid_order_plan",
|
|
818
|
+
"build_frozen_basket_orders",
|
|
819
|
+
"certify_result_metadata",
|
|
820
|
+
"classify_alpha_source",
|
|
821
|
+
"get_execution_contract",
|
|
822
|
+
"order_intents_to_lifecycle_commands",
|
|
823
|
+
"prepare_market_tape",
|
|
824
|
+
"normalize_portfolio_mode",
|
|
825
|
+
"normalize_portfolio_sizing_mode",
|
|
826
|
+
"normalize_rebalance_policy",
|
|
827
|
+
"portfolio_capability_matrix",
|
|
828
|
+
"quantize_signed_quantity",
|
|
829
|
+
"round_down_to_step",
|
|
830
|
+
"assert_native_event_full_parity",
|
|
831
|
+
"capability_matrix_fingerprint",
|
|
832
|
+
"native_event_capability_matrix",
|
|
833
|
+
"normalize_native_event_capabilities",
|
|
834
|
+
"validate_native_event_capability_matrix",
|
|
835
|
+
"run_fill_replay_kernel",
|
|
836
|
+
"run_intrabar_kernel",
|
|
837
|
+
"run_intrabar_session_kernel",
|
|
838
|
+
"run_intrabar_reference",
|
|
839
|
+
"scan_alpha_directory",
|
|
840
|
+
"SUPPORTED_DEPTH_MODELS",
|
|
841
|
+
"l2_replay_available",
|
|
842
|
+
"simulate_nautilus_order_package_depth",
|
|
843
|
+
"validate_portfolio_result_contract",
|
|
844
|
+
# metrics
|
|
845
|
+
"full_report",
|
|
846
|
+
"sharpe",
|
|
847
|
+
"sortino",
|
|
848
|
+
"calmar",
|
|
849
|
+
"omega",
|
|
850
|
+
"cagr",
|
|
851
|
+
"total_return",
|
|
852
|
+
"max_drawdown",
|
|
853
|
+
"max_drawdown_pct",
|
|
854
|
+
"hitrate",
|
|
855
|
+
"profit_factor",
|
|
856
|
+
"rolling_sharpe",
|
|
857
|
+
"rolling_drawdown",
|
|
858
|
+
# viz
|
|
859
|
+
"quick_plot",
|
|
860
|
+
"tearsheet",
|
|
861
|
+
"apply_theme",
|
|
862
|
+
]
|