robottraderslab 0.1.0__tar.gz
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.
- robottraderslab-0.1.0/PKG-INFO +43 -0
- robottraderslab-0.1.0/README.md +15 -0
- robottraderslab-0.1.0/pyproject.toml +120 -0
- robottraderslab-0.1.0/pyproject.toml.orig +111 -0
- robottraderslab-0.1.0/src/robottraderslab/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/__init__.pyi +18 -0
- robottraderslab-0.1.0/src/robottraderslab/__main__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/__init__.pyi +284 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/account_requirements.py +345 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/account_snapshot.py +298 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/__init__.py +8 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/bookkeeper.py +68 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/exceptions.py +21 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/executor.py +250 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/members/__init__.py +30 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/members/action_builder.py +26 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/members/action_result.py +19 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/members/base_action.py +49 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/members/protection_action.py +24 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/actions/members/tags.py +109 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/async_bridge.py +51 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/balance.py +69 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/candle_grid.py +92 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/chart.py +55 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/currency.py +1 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/dynamic_class_loading.py +149 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exceptions.py +114 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exchange_position_tracker.py +389 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exchanges/__init__.py +28 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exchanges/http_messages.py +35 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exchanges/http_transport.py +171 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exchanges/ohlcv_adapter_interface.py +126 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exchanges/ohlcv_pager.py +102 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/exit_codes.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/fees.py +39 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/fill_effects.py +83 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/formatting.py +22 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/instance_lock.py +87 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/interfaces/__init__.py +11 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/interfaces/ohlcv_provider.py +17 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/interfaces/strategy_interface.py +80 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/logging/__init__.py +28 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/logging/formatters.py +20 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/logging/handler_levels.py +27 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/logging/log_level.py +11 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/logging/notebook_logging.py +109 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/margin.py +29 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/margin_targets.py +94 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/market.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/math/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/math/pnl.py +49 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/notifications.py +86 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/ohlcv/__init__.py +15 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/ohlcv/candle_windows.py +72 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/ohlcv/ohlcv_requirements.py +37 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/ohlcv/ohlcvs.py +494 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/ohlcv/timeframe_snapshot.py +62 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/ohlcv_assembly.py +209 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/order.py +386 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/performance_report.py +95 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/plugin_settings.py +21 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/position.py +56 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/position_tracker.py +51 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/price.py +11 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/profile.py +60 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/profile_failure_boundary.py +31 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/profile_protocol.py +16 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/profile_strategy.py +482 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/protection_readback.py +116 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/protection_sweep.py +57 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/quantity.py +15 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/__init__.py +22 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/chained_rate_limiter.py +23 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/endpoint_rate_limiter.py +37 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/file_lock.py +68 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/rate_limiter_protocol.py +14 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/shared_rate_limiter.py +34 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/shared_request_window.py +123 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/shared_token_bucket.py +119 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/rate_limiting/shared_venue_window.py +188 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/retry.py +61 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/sizing.py +619 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/strategy_requirements.py +21 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/symbol.py +103 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/symbol_timeframe.py +12 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/timeframes.py +141 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/tool_files.py +32 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/tracked_positions.py +61 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/tracker_requirements.py +144 -0
- robottraderslab-0.1.0/src/robottraderslab/_core/trading_system.py +21 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/__init__.py +13 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/accounting_methods.py +89 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/analyser.py +597 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/analysis_inputs.py +44 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/analysis_tables.py +151 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/backtest_report.py +33 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_metrics/__init__.py +10 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_metrics/equity_metrics.py +193 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_metrics/equity_metrics_mixin.py +63 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_metrics/equity_metrics_models.py +56 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_metrics/equity_metrics_service.py +352 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_metrics/tradingview_like.py +134 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/equity_sampling.py +20 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/execution_equity.py +98 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/execution_inputs.py +131 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/execution_positions.py +40 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/execution_trades.py +215 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/fill_inputs.py +35 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/performance_report.py +297 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/profile_names.py +59 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/reference_price_handler.py +73 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/summary_metrics.py +13 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_aggregator.py +192 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_filter.py +88 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/__init__.py +16 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/calculate_enhanced_reason_metrics.py +53 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/filtered_trade_metrics_models.py +78 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/reason_analysis.py +65 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/trade_metrics.py +268 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/trade_metrics_mixin.py +117 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/trade_metrics_models.py +139 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_metrics/trade_metrics_service.py +82 -0
- robottraderslab-0.1.0/src/robottraderslab/analyser/trade_record.py +102 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/__init__.py +9 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/backtest_logging.py +92 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/backtest_outputs.py +155 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/backtester.py +384 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/command.py +70 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/market_types.py +29 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/runners.py +82 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/__init__.py +72 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/base_simulation_engine.py +570 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/currency_converter.py +85 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/daily_equity_recorder.py +39 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/equity_snapshot.py +62 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/fees.py +106 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/fill_recorder.py +218 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/futures_simulated_exchange.py +352 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/futures_simulation_engine.py +808 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/order_book.py +118 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/order_models.py +159 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/quantities.py +11 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/simulated_position.py +135 -0
- robottraderslab-0.1.0/src/robottraderslab/backtester/simulator/trade_equity_recorder.py +14 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/__init__.pyi +51 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/account_loader.py +101 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/exchange_loader.py +111 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/market_type.py +10 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/market_type_loader.py +36 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/notifier_loader.py +160 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/ohlcv_provider_loader.py +188 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/ohlcv_sources.py +14 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/settings/__init__.py +31 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/settings/load_secrets.py +116 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/settings/settings.py +502 -0
- robottraderslab-0.1.0/src/robottraderslab/bootstrap/strategy_loader.py +79 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/assets/chart.css +410 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/assets/chart.html +37 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/assets/chart.js +1012 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/assets/lightweight-charts-5.2.0.standalone.production.js +7 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/builders.py +207 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/chart_service.py +461 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/encoding.py +138 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/payload.py +122 -0
- robottraderslab-0.1.0/src/robottraderslab/chart/renderer.py +62 -0
- robottraderslab-0.1.0/src/robottraderslab/cli/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/cli/app.py +314 -0
- robottraderslab-0.1.0/src/robottraderslab/cli/console.py +13 -0
- robottraderslab-0.1.0/src/robottraderslab/exceptions/__init__.py +27 -0
- robottraderslab-0.1.0/src/robottraderslab/exchanges/__init__.py +77 -0
- robottraderslab-0.1.0/src/robottraderslab/exchanges/__init__.pyi +124 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/__init__.py +50 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_account.py +568 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_batching.py +185 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_cancel_order.py +22 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_cancel_orders.py +36 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_capabilities.py +16 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_close_builder.py +113 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_close_position.py +104 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_exchange_base.py +26 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_exchange_protocol.py +241 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_limit_order.py +77 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_market_order.py +72 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_order_batch.py +150 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_order_builder.py +327 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_position_protection.py +55 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_position_target.py +135 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_set_leverage.py +30 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_set_margin_mode.py +18 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_update_position_stop_loss.py +29 -0
- robottraderslab-0.1.0/src/robottraderslab/futures/futures_update_position_take_profit.py +29 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/__init__.py +5 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/command.py +51 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/grid_point.py +14 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/grid_search_results.py +164 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/optimisation_config.py +115 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/optimisation_result.py +60 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/optimiser.py +324 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/parameter.py +131 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/plots/__init__.py +6 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/plots/plot_heatmap.py +109 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/pooled_sweep.py +161 -0
- robottraderslab-0.1.0/src/robottraderslab/grid_search/runner.py +25 -0
- robottraderslab-0.1.0/src/robottraderslab/indicators/__init__.py +14 -0
- robottraderslab-0.1.0/src/robottraderslab/indicators/averages.py +106 -0
- robottraderslab-0.1.0/src/robottraderslab/indicators/donchian.py +33 -0
- robottraderslab-0.1.0/src/robottraderslab/indicators/gaps.py +50 -0
- robottraderslab-0.1.0/src/robottraderslab/indicators/oscillators.py +66 -0
- robottraderslab-0.1.0/src/robottraderslab/live/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/live/__init__.pyi +5 -0
- robottraderslab-0.1.0/src/robottraderslab/live/command.py +90 -0
- robottraderslab-0.1.0/src/robottraderslab/live/flatten.py +429 -0
- robottraderslab-0.1.0/src/robottraderslab/live/livebot.py +477 -0
- robottraderslab-0.1.0/src/robottraderslab/live/logging.py +94 -0
- robottraderslab-0.1.0/src/robottraderslab/live/report/__init__.py +3 -0
- robottraderslab-0.1.0/src/robottraderslab/live/report/command.py +17 -0
- robottraderslab-0.1.0/src/robottraderslab/live/report/runners.py +202 -0
- robottraderslab-0.1.0/src/robottraderslab/live/runners.py +113 -0
- robottraderslab-0.1.0/src/robottraderslab/ma_strategy/__init__.py +0 -0
- robottraderslab-0.1.0/src/robottraderslab/ma_strategy/futures_ma_strategy.py +434 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/__init__.py +15 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/ccxt_ohlcv_adapter.py +258 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/csv_ohlcv_provider.py +111 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/date_utils.py +181 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exceptions.py +33 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/__init__.py +8 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/download.py +170 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/download_metadata.py +148 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/gap_analysis.py +201 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/missing_candles.py +117 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/ohlcv_adapter_factory.py +218 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/ohlcv_cache.py +74 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/ohlcv_provider.py +315 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/exchange/ohlcv_service.py +281 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/interfaces/__init__.py +5 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/interfaces/ohlcv_repository_interface.py +42 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/mock_ohlcv_provider.py +250 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/repositories/__init__.py +0 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/repositories/csv_ohlcv_repository.py +43 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/repositories/file_based_ohlcv_repository.py +194 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/repositories/null_ohlcv_repository.py +35 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/repositories/parquet_ohlcv_repository.py +21 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/settings.py +5 -0
- robottraderslab-0.1.0/src/robottraderslab/ohlcv_provider/types.py +14 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/__init__.py +15 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plot_base.py +151 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plot_cumulative_pnl_by_trade.py +52 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plot_drawdown.py +34 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plot_equity_curve.py +43 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plot_monthly_performance.py +87 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plot_performance_summary.py +133 -0
- robottraderslab-0.1.0/src/robottraderslab/plotting/plotting_service.py +126 -0
- robottraderslab-0.1.0/src/robottraderslab/py.typed +0 -0
- robottraderslab-0.1.0/src/robottraderslab/reporting/__init__.py +17 -0
- robottraderslab-0.1.0/src/robottraderslab/reporting/run_folder.py +52 -0
- robottraderslab-0.1.0/src/robottraderslab/reporting/summaries.py +56 -0
- robottraderslab-0.1.0/src/robottraderslab/reporting/text_format.py +62 -0
- robottraderslab-0.1.0/src/robottraderslab/scaffold/__init__.py +4 -0
- robottraderslab-0.1.0/src/robottraderslab/scaffold/command.py +18 -0
- robottraderslab-0.1.0/src/robottraderslab/scaffold/examples.py +63 -0
- robottraderslab-0.1.0/src/robottraderslab/scheduler/__init__.py +4 -0
- robottraderslab-0.1.0/src/robottraderslab/scheduler/command.py +78 -0
- robottraderslab-0.1.0/src/robottraderslab/scheduler/launch_memory.py +161 -0
- robottraderslab-0.1.0/src/robottraderslab/scheduler/scheduler.py +299 -0
- robottraderslab-0.1.0/src/robottraderslab/strategies/__init__.py +89 -0
- robottraderslab-0.1.0/src/robottraderslab/strategies/futures.py +68 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: robottraderslab
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Backtesting and live trading engine for algorithmic trading strategies
|
|
5
|
+
Keywords: trading,backtesting,algorithmic-trading,cryptocurrency
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Requires-Dist: aiohttp>=3.13.2
|
|
8
|
+
Requires-Dist: ccxt>=4.5.38
|
|
9
|
+
Requires-Dist: ipykernel>=7.2.0
|
|
10
|
+
Requires-Dist: matplotlib>=3.10.8
|
|
11
|
+
Requires-Dist: httpx>=0.27.0
|
|
12
|
+
Requires-Dist: numpy>=2.4.2
|
|
13
|
+
Requires-Dist: pandas>=3.0.0
|
|
14
|
+
Requires-Dist: pyarrow>=23.0.1
|
|
15
|
+
Requires-Dist: pydantic>=2.12.5
|
|
16
|
+
Requires-Dist: pytz>=2025.2
|
|
17
|
+
Requires-Dist: scipy>=1.17.0
|
|
18
|
+
Requires-Dist: tqdm>=4.67.3
|
|
19
|
+
Requires-Dist: pydantic-settings>=2.15.0
|
|
20
|
+
Requires-Dist: typer>=0.27.1
|
|
21
|
+
Requires-Dist: lazy-loader>=0.5
|
|
22
|
+
Requires-Python: >=3.13, <3.14
|
|
23
|
+
Project-URL: Homepage, https://robottraders.io/lab
|
|
24
|
+
Project-URL: Getting started, https://robottraders.io/lab/getting-started
|
|
25
|
+
Project-URL: Documentation, https://robottraders.io/lab/docs
|
|
26
|
+
Project-URL: Repository, https://github.com/RobotTraders/RobotTradersLab
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# RobotTradersLab
|
|
30
|
+
|
|
31
|
+
Backtesting and live trading engine for algorithmic trading strategies. Strategies and exchange connectors are plugins: the same strategy can be backtested and run live on any supported exchange.
|
|
32
|
+
|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
The walkthrough from an empty machine to a live bot is at [robottraders.io/lab/docs/getting-started](https://robottraders.io/lab/docs/getting-started.html). The [strategy guide](https://robottraders.io/lab/docs/build-a-strategy.html), the [CLI reference](https://robottraders.io/lab/docs/cli.html) and the [API reference](https://robottraders.io/lab/docs/reference.html) cover writing strategies and running the engine. Every plugin has its page alongside them, and the Lab lists them all at [robottraders.io/lab](https://robottraders.io/lab).
|
|
36
|
+
|
|
37
|
+
## Disclaimer
|
|
38
|
+
|
|
39
|
+
Nothing in this repository constitutes financial, investment, or trading advice, nor a recommendation of any trading strategy. Trading involves substantial risk of loss: deployed capital can be lost entirely. Backtested and past performance do not predict future results. The software is used at your own risk; the authors and affiliates accept no responsibility for trading results. Users are solely responsible for compliance with the laws and regulations of their jurisdiction.
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
[Apache-2.0](LICENSE)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# RobotTradersLab
|
|
2
|
+
|
|
3
|
+
Backtesting and live trading engine for algorithmic trading strategies. Strategies and exchange connectors are plugins: the same strategy can be backtested and run live on any supported exchange.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
The walkthrough from an empty machine to a live bot is at [robottraders.io/lab/docs/getting-started](https://robottraders.io/lab/docs/getting-started.html). The [strategy guide](https://robottraders.io/lab/docs/build-a-strategy.html), the [CLI reference](https://robottraders.io/lab/docs/cli.html) and the [API reference](https://robottraders.io/lab/docs/reference.html) cover writing strategies and running the engine. Every plugin has its page alongside them, and the Lab lists them all at [robottraders.io/lab](https://robottraders.io/lab).
|
|
8
|
+
|
|
9
|
+
## Disclaimer
|
|
10
|
+
|
|
11
|
+
Nothing in this repository constitutes financial, investment, or trading advice, nor a recommendation of any trading strategy. Trading involves substantial risk of loss: deployed capital can be lost entirely. Backtested and past performance do not predict future results. The software is used at your own risk; the authors and affiliates accept no responsibility for trading results. Users are solely responsible for compliance with the laws and regulations of their jurisdiction.
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
[Apache-2.0](LICENSE)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "robottraderslab"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Backtesting and live trading engine for algorithmic trading strategies"
|
|
5
|
+
requires-python = ">=3.13,<3.14"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
keywords = [
|
|
9
|
+
"trading",
|
|
10
|
+
"backtesting",
|
|
11
|
+
"algorithmic-trading",
|
|
12
|
+
"cryptocurrency",
|
|
13
|
+
]
|
|
14
|
+
dependencies = [
|
|
15
|
+
"aiohttp>=3.13.2",
|
|
16
|
+
"ccxt>=4.5.38",
|
|
17
|
+
"ipykernel>=7.2.0",
|
|
18
|
+
"matplotlib>=3.10.8",
|
|
19
|
+
"httpx>=0.27.0",
|
|
20
|
+
"numpy>=2.4.2",
|
|
21
|
+
"pandas>=3.0.0",
|
|
22
|
+
"pyarrow>=23.0.1",
|
|
23
|
+
"pydantic>=2.12.5",
|
|
24
|
+
"pytz>=2025.2",
|
|
25
|
+
"scipy>=1.17.0",
|
|
26
|
+
"tqdm>=4.67.3",
|
|
27
|
+
"pydantic-settings>=2.15.0",
|
|
28
|
+
"typer>=0.27.1",
|
|
29
|
+
"lazy-loader>=0.5",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://robottraders.io/lab"
|
|
34
|
+
"Getting started" = "https://robottraders.io/lab/getting-started"
|
|
35
|
+
Documentation = "https://robottraders.io/lab/docs"
|
|
36
|
+
Repository = "https://github.com/RobotTraders/RobotTradersLab"
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
rtlab = "robottraderslab.cli:main"
|
|
40
|
+
robottraderslab = "robottraderslab.cli:main"
|
|
41
|
+
|
|
42
|
+
[project.entry-points."robot_traders_lab.exchanges"]
|
|
43
|
+
simulator = "robottraderslab.backtester.simulator:create_simulator"
|
|
44
|
+
|
|
45
|
+
[project.entry-points."robot_traders_lab.ohlcv_adapters"]
|
|
46
|
+
ccxt = "robottraderslab.ohlcv_provider.ccxt_ohlcv_adapter:CcxtOhlcvAdapter"
|
|
47
|
+
|
|
48
|
+
[project.entry-points."robot_traders_lab.market_types"]
|
|
49
|
+
futures = "robottraderslab.backtester.market_types:create_futures_market"
|
|
50
|
+
|
|
51
|
+
[project.entry-points."robot_traders_lab.strategies"]
|
|
52
|
+
futures_ma = "robottraderslab.ma_strategy.futures_ma_strategy:FuturesMAStrategy"
|
|
53
|
+
|
|
54
|
+
[project.entry-points."robot_traders_lab.indicators"]
|
|
55
|
+
futures_ma = "robottraderslab.ma_strategy.futures_ma_strategy:get_lightweight_chart_indicators"
|
|
56
|
+
|
|
57
|
+
[build-system]
|
|
58
|
+
requires = ["uv_build>=0.10.4,<0.11.0"]
|
|
59
|
+
build-backend = "uv_build"
|
|
60
|
+
|
|
61
|
+
[dependency-groups]
|
|
62
|
+
dev = [
|
|
63
|
+
"bandit[toml]==1.9.4",
|
|
64
|
+
"mypy==1.20.0",
|
|
65
|
+
"pandas-stubs==3.0.0.260204",
|
|
66
|
+
"pytest==9.0.3",
|
|
67
|
+
"pytest-asyncio==1.3.0",
|
|
68
|
+
"pytest-cov==7.1.0",
|
|
69
|
+
"respx==0.23.1",
|
|
70
|
+
"ruff==0.15.10",
|
|
71
|
+
"types-pytz==2026.1.1.20260408",
|
|
72
|
+
"types-requests==2.33.0.20260408",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
[tool.coverage.run]
|
|
76
|
+
omit = [
|
|
77
|
+
"*/tests/*",
|
|
78
|
+
"*/test_*.py",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
[tool.pytest.ini_options]
|
|
82
|
+
testpaths = ["tests"]
|
|
83
|
+
markers = ["integration: requires testnet access"]
|
|
84
|
+
addopts = "-m 'not integration'"
|
|
85
|
+
asyncio_mode = "auto"
|
|
86
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
87
|
+
filterwarnings = ["ignore:enable_cleanup_closed ignored because.*:DeprecationWarning:aiohttp.connector"]
|
|
88
|
+
|
|
89
|
+
[tool.mypy]
|
|
90
|
+
packages = ["robottraderslab"]
|
|
91
|
+
follow_imports = "normal"
|
|
92
|
+
python_version = "3.13"
|
|
93
|
+
color_output = true
|
|
94
|
+
show_error_codes = true
|
|
95
|
+
check_untyped_defs = true
|
|
96
|
+
disallow_untyped_defs = true
|
|
97
|
+
no_implicit_optional = true
|
|
98
|
+
warn_return_any = true
|
|
99
|
+
warn_unreachable = true
|
|
100
|
+
warn_unused_ignores = true
|
|
101
|
+
ignore_missing_imports = true
|
|
102
|
+
namespace_packages = true
|
|
103
|
+
incremental = true
|
|
104
|
+
cache_dir = ".mypy_cache"
|
|
105
|
+
exclude = '^(build/|dist/|\.venv/|.*tests/)'
|
|
106
|
+
|
|
107
|
+
[tool.bandit]
|
|
108
|
+
skips = ["B101"]
|
|
109
|
+
|
|
110
|
+
[tool.ruff]
|
|
111
|
+
target-version = "py313"
|
|
112
|
+
|
|
113
|
+
[tool.ruff.lint]
|
|
114
|
+
extend-select = [
|
|
115
|
+
"I",
|
|
116
|
+
"PT",
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
[tool.ruff.lint.isort]
|
|
120
|
+
known-first-party = ["robottraderslab"]
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "robottraderslab"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Backtesting and live trading engine for algorithmic trading strategies"
|
|
5
|
+
requires-python = ">=3.13,<3.14"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
keywords = ["trading", "backtesting", "algorithmic-trading", "cryptocurrency"]
|
|
9
|
+
dependencies = [
|
|
10
|
+
"aiohttp>=3.13.2",
|
|
11
|
+
"ccxt>=4.5.38",
|
|
12
|
+
"ipykernel>=7.2.0",
|
|
13
|
+
"matplotlib>=3.10.8",
|
|
14
|
+
"httpx>=0.27.0",
|
|
15
|
+
"numpy>=2.4.2",
|
|
16
|
+
"pandas>=3.0.0",
|
|
17
|
+
"pyarrow>=23.0.1",
|
|
18
|
+
"pydantic>=2.12.5",
|
|
19
|
+
"pytz>=2025.2",
|
|
20
|
+
"scipy>=1.17.0",
|
|
21
|
+
"tqdm>=4.67.3",
|
|
22
|
+
"pydantic-settings>=2.15.0",
|
|
23
|
+
"typer>=0.27.1",
|
|
24
|
+
"lazy-loader>=0.5",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://robottraders.io/lab"
|
|
29
|
+
"Getting started" = "https://robottraders.io/lab/getting-started"
|
|
30
|
+
Documentation = "https://robottraders.io/lab/docs"
|
|
31
|
+
Repository = "https://github.com/RobotTraders/RobotTradersLab"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
rtlab = "robottraderslab.cli:main"
|
|
35
|
+
robottraderslab = "robottraderslab.cli:main"
|
|
36
|
+
|
|
37
|
+
[project.entry-points."robot_traders_lab.exchanges"]
|
|
38
|
+
simulator = "robottraderslab.backtester.simulator:create_simulator"
|
|
39
|
+
|
|
40
|
+
[project.entry-points."robot_traders_lab.ohlcv_adapters"]
|
|
41
|
+
ccxt = "robottraderslab.ohlcv_provider.ccxt_ohlcv_adapter:CcxtOhlcvAdapter"
|
|
42
|
+
|
|
43
|
+
[project.entry-points."robot_traders_lab.market_types"]
|
|
44
|
+
futures = "robottraderslab.backtester.market_types:create_futures_market"
|
|
45
|
+
|
|
46
|
+
[project.entry-points."robot_traders_lab.strategies"]
|
|
47
|
+
futures_ma = "robottraderslab.ma_strategy.futures_ma_strategy:FuturesMAStrategy"
|
|
48
|
+
|
|
49
|
+
[project.entry-points."robot_traders_lab.indicators"]
|
|
50
|
+
futures_ma = "robottraderslab.ma_strategy.futures_ma_strategy:get_lightweight_chart_indicators"
|
|
51
|
+
|
|
52
|
+
[build-system]
|
|
53
|
+
requires = ["uv_build>=0.10.4,<0.11.0"]
|
|
54
|
+
build-backend = "uv_build"
|
|
55
|
+
|
|
56
|
+
[dependency-groups]
|
|
57
|
+
dev = [
|
|
58
|
+
"bandit[toml]==1.9.4",
|
|
59
|
+
"mypy==1.20.0",
|
|
60
|
+
"pandas-stubs==3.0.0.260204",
|
|
61
|
+
"pytest==9.0.3",
|
|
62
|
+
"pytest-asyncio==1.3.0",
|
|
63
|
+
"pytest-cov==7.1.0",
|
|
64
|
+
"respx==0.23.1",
|
|
65
|
+
"ruff==0.15.10",
|
|
66
|
+
"types-pytz==2026.1.1.20260408",
|
|
67
|
+
"types-requests==2.33.0.20260408",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[tool.coverage.run]
|
|
71
|
+
omit = ["*/tests/*", "*/test_*.py"]
|
|
72
|
+
|
|
73
|
+
[tool.pytest.ini_options]
|
|
74
|
+
testpaths = ["tests"]
|
|
75
|
+
markers = ["integration: requires testnet access"]
|
|
76
|
+
addopts = "-m 'not integration'"
|
|
77
|
+
asyncio_mode = "auto"
|
|
78
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
79
|
+
filterwarnings = [
|
|
80
|
+
"ignore:enable_cleanup_closed ignored because.*:DeprecationWarning:aiohttp.connector",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[tool.mypy]
|
|
84
|
+
packages = ["robottraderslab"]
|
|
85
|
+
follow_imports = "normal"
|
|
86
|
+
python_version = "3.13"
|
|
87
|
+
color_output = true
|
|
88
|
+
show_error_codes = true
|
|
89
|
+
check_untyped_defs = true
|
|
90
|
+
disallow_untyped_defs = true
|
|
91
|
+
no_implicit_optional = true
|
|
92
|
+
warn_return_any = true
|
|
93
|
+
warn_unreachable = true
|
|
94
|
+
warn_unused_ignores = true
|
|
95
|
+
ignore_missing_imports = true
|
|
96
|
+
namespace_packages = true
|
|
97
|
+
incremental = true
|
|
98
|
+
cache_dir = ".mypy_cache"
|
|
99
|
+
exclude = '^(build/|dist/|\.venv/|.*tests/)'
|
|
100
|
+
|
|
101
|
+
[tool.bandit]
|
|
102
|
+
skips = ["B101"]
|
|
103
|
+
|
|
104
|
+
[tool.ruff]
|
|
105
|
+
target-version = "py313"
|
|
106
|
+
|
|
107
|
+
[tool.ruff.lint]
|
|
108
|
+
extend-select = ["I", "PT"]
|
|
109
|
+
|
|
110
|
+
[tool.ruff.lint.isort]
|
|
111
|
+
known-first-party = ["robottraderslab"]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from ._core import Symbol, TimeFrame
|
|
2
|
+
from .analyser import TradeFilter
|
|
3
|
+
from .backtester import BacktestOutputs, run_backtest
|
|
4
|
+
from .bootstrap import BotConfig
|
|
5
|
+
from .grid_search import GridSearchResults, run_grid_search
|
|
6
|
+
from .live import run_livebot
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"BacktestOutputs",
|
|
10
|
+
"BotConfig",
|
|
11
|
+
"GridSearchResults",
|
|
12
|
+
"Symbol",
|
|
13
|
+
"TimeFrame",
|
|
14
|
+
"TradeFilter",
|
|
15
|
+
"run_backtest",
|
|
16
|
+
"run_grid_search",
|
|
17
|
+
"run_livebot",
|
|
18
|
+
]
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
from .account_requirements import (
|
|
2
|
+
AccountProtocol,
|
|
3
|
+
AccountRequirement,
|
|
4
|
+
AccountRequirements,
|
|
5
|
+
fetch_account_snapshots,
|
|
6
|
+
)
|
|
7
|
+
from .account_snapshot import AccountSnapshot
|
|
8
|
+
from .actions import BookKeeper, execute_trading_actions
|
|
9
|
+
from .actions.members import (
|
|
10
|
+
ActionBuilder,
|
|
11
|
+
ActionResult,
|
|
12
|
+
BaseExchangeAction,
|
|
13
|
+
OrderOutcome,
|
|
14
|
+
PositionProtectionAction,
|
|
15
|
+
finished,
|
|
16
|
+
profile_identity,
|
|
17
|
+
profile_tag,
|
|
18
|
+
tag_of,
|
|
19
|
+
)
|
|
20
|
+
from .async_bridge import drain_tasks, run_async
|
|
21
|
+
from .balance import Balance
|
|
22
|
+
from .candle_grid import (
|
|
23
|
+
CandleStep,
|
|
24
|
+
candle_stamps,
|
|
25
|
+
candle_step,
|
|
26
|
+
candles_back,
|
|
27
|
+
last_per_month,
|
|
28
|
+
)
|
|
29
|
+
from .chart import Candles, ChartLine, DrawdownUnit
|
|
30
|
+
from .currency import Currency
|
|
31
|
+
from .dynamic_class_loading import ClassLoadingError, load_class
|
|
32
|
+
from .exceptions import (
|
|
33
|
+
DataError,
|
|
34
|
+
DownloadError,
|
|
35
|
+
ExchangeConnectionError,
|
|
36
|
+
ExchangeCriticalError,
|
|
37
|
+
ExchangeRecoverableError,
|
|
38
|
+
ExchangeTransientError,
|
|
39
|
+
InvalidTimeframeError,
|
|
40
|
+
OhlcvValidationError,
|
|
41
|
+
RateLimitExceededError,
|
|
42
|
+
StrategyCriticalError,
|
|
43
|
+
)
|
|
44
|
+
from .exit_codes import EX_CONFIG, EX_DATAERR, EX_TEMPFAIL
|
|
45
|
+
from .fees import DEFAULT_FEE_MODE, FeeMode, PlacementReserve
|
|
46
|
+
from .fill_effects import attribute_fill_effects
|
|
47
|
+
from .formatting import FRACTION_TO_PERCENT, format_money, format_percent, format_ratio
|
|
48
|
+
from .instance_lock import drop_dead_locks, hold_instance_lock
|
|
49
|
+
from .interfaces import OHLCVProviderProtocol
|
|
50
|
+
from .logging import (
|
|
51
|
+
LogLevel,
|
|
52
|
+
auto_configure_notebook_logging,
|
|
53
|
+
get_formatter_config,
|
|
54
|
+
lowest_handler_level,
|
|
55
|
+
setup_notebook_logging,
|
|
56
|
+
)
|
|
57
|
+
from .margin import MarginMode, MarginSettings
|
|
58
|
+
from .margin_targets import hold_margin_targets
|
|
59
|
+
from .math import calculate_pnl_long, calculate_pnl_short, calculate_trade_pnl_pct
|
|
60
|
+
from .notifications import (
|
|
61
|
+
Notifications,
|
|
62
|
+
OnOrderFilled,
|
|
63
|
+
OnOrderPlaced,
|
|
64
|
+
PlacementNotifier,
|
|
65
|
+
)
|
|
66
|
+
from .ohlcv import (
|
|
67
|
+
CandleWindows,
|
|
68
|
+
OHLCVRequirement,
|
|
69
|
+
OHLCVRequirements,
|
|
70
|
+
OHLCVRow,
|
|
71
|
+
OHLCVsBySymbol,
|
|
72
|
+
TimeframeSnapshot,
|
|
73
|
+
candle_windows,
|
|
74
|
+
)
|
|
75
|
+
from .ohlcv_assembly import (
|
|
76
|
+
assemble_all_ohlcvs_from_requirements,
|
|
77
|
+
assemble_available_ohlcvs_from_requirements,
|
|
78
|
+
)
|
|
79
|
+
from .order import (
|
|
80
|
+
RESTING_ENTRY_KINDS,
|
|
81
|
+
VENUE_FIRED_SOURCES,
|
|
82
|
+
Execution,
|
|
83
|
+
FillDescriber,
|
|
84
|
+
FillEffect,
|
|
85
|
+
FillSource,
|
|
86
|
+
OnFillRead,
|
|
87
|
+
OrderFill,
|
|
88
|
+
OrderModifyRequest,
|
|
89
|
+
OrderPlacement,
|
|
90
|
+
OrderProtocol,
|
|
91
|
+
OrderRequest,
|
|
92
|
+
OrderSide,
|
|
93
|
+
OrderType,
|
|
94
|
+
PlacedOrder,
|
|
95
|
+
ProtectionKind,
|
|
96
|
+
StopLoss,
|
|
97
|
+
TakeProfit,
|
|
98
|
+
TimeInForce,
|
|
99
|
+
)
|
|
100
|
+
from .performance_report import (
|
|
101
|
+
DEFAULT_ANNUALIZATION_FACTOR,
|
|
102
|
+
DEFAULT_CALCULATION_METHOD,
|
|
103
|
+
DEFAULT_RISK_FREE_RATE,
|
|
104
|
+
BacktestReport,
|
|
105
|
+
CalculationMethod,
|
|
106
|
+
PerformanceReport,
|
|
107
|
+
ReasonTable,
|
|
108
|
+
ReportGroup,
|
|
109
|
+
ReportRow,
|
|
110
|
+
ReportSection,
|
|
111
|
+
ReportTable,
|
|
112
|
+
ReportTableRow,
|
|
113
|
+
SymbolAnalysis,
|
|
114
|
+
)
|
|
115
|
+
from .plugin_settings import settings_the_factory_does_not_take
|
|
116
|
+
from .position import PositionSide, PositionSnapshot
|
|
117
|
+
from .position_tracker import TrackedPosition, signed_position
|
|
118
|
+
from .price import validate_price
|
|
119
|
+
from .profile_strategy import log_strategy_slots
|
|
120
|
+
from .protection_readback import confirm_booked_protections
|
|
121
|
+
from .protection_sweep import sweep_orphan_protections
|
|
122
|
+
from .quantity import StepCount, to_quantity, to_step_count
|
|
123
|
+
from .retry import BASE_DELAY_SECONDS, MAX_ATTEMPTS, retry_on_transient
|
|
124
|
+
from .sizing import (
|
|
125
|
+
SizingRule,
|
|
126
|
+
quantity_from_total_balance,
|
|
127
|
+
validate_ratio,
|
|
128
|
+
)
|
|
129
|
+
from .symbol import Symbol, SymbolStr
|
|
130
|
+
from .timeframes import (
|
|
131
|
+
TIMEFRAMES,
|
|
132
|
+
TimeFrame,
|
|
133
|
+
candle_closes_at,
|
|
134
|
+
candle_stamp_before,
|
|
135
|
+
newest_settled_candle_start,
|
|
136
|
+
to_milliseconds,
|
|
137
|
+
to_seconds,
|
|
138
|
+
)
|
|
139
|
+
from .tool_files import mark_root, tool_file, tool_root
|
|
140
|
+
from .tracked_positions import widen_tracked_positions
|
|
141
|
+
|
|
142
|
+
__all__ = [
|
|
143
|
+
"AccountProtocol",
|
|
144
|
+
"AccountRequirement",
|
|
145
|
+
"AccountRequirements",
|
|
146
|
+
"AccountSnapshot",
|
|
147
|
+
"ActionBuilder",
|
|
148
|
+
"ActionResult",
|
|
149
|
+
"assemble_all_ohlcvs_from_requirements",
|
|
150
|
+
"assemble_available_ohlcvs_from_requirements",
|
|
151
|
+
"attribute_fill_effects",
|
|
152
|
+
"auto_configure_notebook_logging",
|
|
153
|
+
"BacktestReport",
|
|
154
|
+
"Balance",
|
|
155
|
+
"BASE_DELAY_SECONDS",
|
|
156
|
+
"BaseExchangeAction",
|
|
157
|
+
"BookKeeper",
|
|
158
|
+
"calculate_pnl_long",
|
|
159
|
+
"calculate_pnl_short",
|
|
160
|
+
"calculate_trade_pnl_pct",
|
|
161
|
+
"CalculationMethod",
|
|
162
|
+
"candle_closes_at",
|
|
163
|
+
"candle_stamp_before",
|
|
164
|
+
"candle_stamps",
|
|
165
|
+
"candle_step",
|
|
166
|
+
"candle_windows",
|
|
167
|
+
"Candles",
|
|
168
|
+
"candles_back",
|
|
169
|
+
"CandleStep",
|
|
170
|
+
"CandleWindows",
|
|
171
|
+
"ChartLine",
|
|
172
|
+
"ClassLoadingError",
|
|
173
|
+
"confirm_booked_protections",
|
|
174
|
+
"Currency",
|
|
175
|
+
"DataError",
|
|
176
|
+
"DEFAULT_ANNUALIZATION_FACTOR",
|
|
177
|
+
"DEFAULT_CALCULATION_METHOD",
|
|
178
|
+
"DEFAULT_FEE_MODE",
|
|
179
|
+
"DEFAULT_RISK_FREE_RATE",
|
|
180
|
+
"DownloadError",
|
|
181
|
+
"drain_tasks",
|
|
182
|
+
"DrawdownUnit",
|
|
183
|
+
"drop_dead_locks",
|
|
184
|
+
"EX_CONFIG",
|
|
185
|
+
"EX_DATAERR",
|
|
186
|
+
"EX_TEMPFAIL",
|
|
187
|
+
"ExchangeConnectionError",
|
|
188
|
+
"ExchangeCriticalError",
|
|
189
|
+
"ExchangeRecoverableError",
|
|
190
|
+
"ExchangeTransientError",
|
|
191
|
+
"execute_trading_actions",
|
|
192
|
+
"Execution",
|
|
193
|
+
"FeeMode",
|
|
194
|
+
"fetch_account_snapshots",
|
|
195
|
+
"finished",
|
|
196
|
+
"FillDescriber",
|
|
197
|
+
"FillEffect",
|
|
198
|
+
"FillSource",
|
|
199
|
+
"format_money",
|
|
200
|
+
"format_percent",
|
|
201
|
+
"format_ratio",
|
|
202
|
+
"FRACTION_TO_PERCENT",
|
|
203
|
+
"get_formatter_config",
|
|
204
|
+
"hold_instance_lock",
|
|
205
|
+
"hold_margin_targets",
|
|
206
|
+
"InvalidTimeframeError",
|
|
207
|
+
"last_per_month",
|
|
208
|
+
"load_class",
|
|
209
|
+
"log_strategy_slots",
|
|
210
|
+
"LogLevel",
|
|
211
|
+
"lowest_handler_level",
|
|
212
|
+
"MarginMode",
|
|
213
|
+
"MarginSettings",
|
|
214
|
+
"MAX_ATTEMPTS",
|
|
215
|
+
"newest_settled_candle_start",
|
|
216
|
+
"Notifications",
|
|
217
|
+
"OHLCVProviderProtocol",
|
|
218
|
+
"OHLCVRequirement",
|
|
219
|
+
"OHLCVRequirements",
|
|
220
|
+
"OHLCVRow",
|
|
221
|
+
"OHLCVsBySymbol",
|
|
222
|
+
"OhlcvValidationError",
|
|
223
|
+
"OnFillRead",
|
|
224
|
+
"OnOrderFilled",
|
|
225
|
+
"OnOrderPlaced",
|
|
226
|
+
"OrderFill",
|
|
227
|
+
"OrderModifyRequest",
|
|
228
|
+
"OrderOutcome",
|
|
229
|
+
"OrderPlacement",
|
|
230
|
+
"OrderProtocol",
|
|
231
|
+
"OrderRequest",
|
|
232
|
+
"OrderSide",
|
|
233
|
+
"OrderType",
|
|
234
|
+
"PerformanceReport",
|
|
235
|
+
"PlacedOrder",
|
|
236
|
+
"PlacementNotifier",
|
|
237
|
+
"PlacementReserve",
|
|
238
|
+
"PositionProtectionAction",
|
|
239
|
+
"PositionSide",
|
|
240
|
+
"PositionSnapshot",
|
|
241
|
+
"profile_identity",
|
|
242
|
+
"profile_tag",
|
|
243
|
+
"ProtectionKind",
|
|
244
|
+
"RateLimitExceededError",
|
|
245
|
+
"ReasonTable",
|
|
246
|
+
"ReportGroup",
|
|
247
|
+
"ReportRow",
|
|
248
|
+
"ReportSection",
|
|
249
|
+
"ReportTable",
|
|
250
|
+
"ReportTableRow",
|
|
251
|
+
"RESTING_ENTRY_KINDS",
|
|
252
|
+
"retry_on_transient",
|
|
253
|
+
"run_async",
|
|
254
|
+
"settings_the_factory_does_not_take",
|
|
255
|
+
"setup_notebook_logging",
|
|
256
|
+
"signed_position",
|
|
257
|
+
"StepCount",
|
|
258
|
+
"StopLoss",
|
|
259
|
+
"StrategyCriticalError",
|
|
260
|
+
"sweep_orphan_protections",
|
|
261
|
+
"Symbol",
|
|
262
|
+
"SymbolAnalysis",
|
|
263
|
+
"SymbolStr",
|
|
264
|
+
"tag_of",
|
|
265
|
+
"TakeProfit",
|
|
266
|
+
"TimeFrame",
|
|
267
|
+
"TIMEFRAMES",
|
|
268
|
+
"TimeframeSnapshot",
|
|
269
|
+
"TimeInForce",
|
|
270
|
+
"to_milliseconds",
|
|
271
|
+
"to_quantity",
|
|
272
|
+
"to_seconds",
|
|
273
|
+
"TrackedPosition",
|
|
274
|
+
"validate_price",
|
|
275
|
+
"to_step_count",
|
|
276
|
+
"mark_root",
|
|
277
|
+
"tool_file",
|
|
278
|
+
"tool_root",
|
|
279
|
+
"VENUE_FIRED_SOURCES",
|
|
280
|
+
"widen_tracked_positions",
|
|
281
|
+
"quantity_from_total_balance",
|
|
282
|
+
"SizingRule",
|
|
283
|
+
"validate_ratio",
|
|
284
|
+
]
|