lumibot 4.2.0__tar.gz → 4.2.1__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.
Potentially problematic release.
This version of lumibot might be problematic. Click here for more details.
- {lumibot-4.2.0/lumibot.egg-info → lumibot-4.2.1}/PKG-INFO +1 -1
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/thetadata_backtesting_pandas.py +43 -54
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/thetadata_helper.py +54 -54
- {lumibot-4.2.0 → lumibot-4.2.1/lumibot.egg-info}/PKG-INFO +1 -1
- {lumibot-4.2.0 → lumibot-4.2.1}/setup.py +1 -1
- {lumibot-4.2.0 → lumibot-4.2.1}/LICENSE +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/MANIFEST.in +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/README.md +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/alpaca_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/alpha_vantage_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/backtesting_broker.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/ccxt_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/databento_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/databento_backtesting_pandas.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/databento_backtesting_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/fix_debug.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/interactive_brokers_rest_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/pandas_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/polygon_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/thetadata_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/backtesting/yahoo_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/alpaca.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/bitunix.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/broker.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/ccxt.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/example_broker.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/interactive_brokers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/interactive_brokers_rest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/projectx.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/schwab.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/tradier.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/brokers/tradovate.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/configs_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/drift_rebalancer_logic.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/grok_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/options_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/perplexity_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/quiver_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/components/vix_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/constants.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/credentials.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/alpaca_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/alpha_vantage_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/bitunix_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/ccxt_backtesting_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/ccxt_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/data_source.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/data_source_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/databento_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/databento_data_pandas.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/databento_data_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/example_broker_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/exceptions.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/interactive_brokers_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/interactive_brokers_rest_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/pandas_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/polars_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/polars_mixin.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/polygon_data_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/projectx_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/schwab_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/tradier_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/tradovate_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/yahoo_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/data_sources/yahoo_data_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/asset.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/bar.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/bars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/chains.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/data_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/dataline.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/order.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/position.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/quote.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/entities/trading_fee.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/bitunix_futures_example.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/ccxt_backtesting_example.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/classic_60_40.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/classic_60_40_config.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/crypto_50_50.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/crypto_50_50_config.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/crypto_important_functions.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/drift_rebalancer.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/forex_hold_to_expiry.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/futures_hold_to_expiry.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/lifecycle_logger.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/options_hold_to_expiry.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/schedule_function.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/simple_start_single_file.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/stock_bracket.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/stock_buy_and_hold.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/stock_diversified_leverage.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/stock_limit_and_trailing_stops.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/stock_momentum.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/stock_oco.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/strangle.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/example_strategies/test_broker_functions.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/resources/ThetaTerminal.jar +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/resources/conf.yaml +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/strategies/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/strategies/_strategy.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/strategies/session_manager.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/strategies/strategy.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/strategies/strategy_executor.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/alpaca_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/backtest_cache.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/bitunix_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/black_scholes.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/ccxt_data_store.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/databento_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/databento_helper_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/debugers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/decorators.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/futures_roll.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/futures_symbols.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/indicators.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/lumibot_logger.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/lumibot_time.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/pandas.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/polars_utils.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/polygon_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/polygon_helper_async.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/polygon_helper_polars_optimized.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/projectx_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/schwab_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/types.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/yahoo_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/tools/yahoo_helper_polars_optimized.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/traders/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/traders/debug_log_trader.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/traders/trader.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/trading_builtins/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/trading_builtins/custom_stream.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot/trading_builtins/safe_list.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot.egg-info/SOURCES.txt +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot.egg-info/dependency_links.txt +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot.egg-info/requires.txt +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/lumibot.egg-info/top_level.txt +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/pyproject.toml +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/setup.cfg +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/__init__.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/conftest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/performance_tracker.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/profile_thetadata_vs_polygon.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_accuracy_verification.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_backtesting_broker_processing.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_buy_hold_quiet_logs_full_run.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_crypto_cash_regressions.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_daily_data_timestamp_comparison.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_databento.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_databento_comprehensive_trading.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_databento_parity.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_debug_avg_fill_price.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_dividends.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_example_strategies.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_failing_backtest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_futures_edge_cases.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_futures_single_trade.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_futures_ultra_simple.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_index_data_verification.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_multileg_backtest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_pandas_backtest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_passing_trader_into_backtest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_polars_lru_eviction.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_polygon.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_strategy_executor.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_thetadata.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_thetadata_comprehensive.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_thetadata_vs_polygon.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/backtest/test_yahoo.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/conftest.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/fixtures.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca_auth_fix.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca_multileg_fix.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_alpaca_oauth.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_apscheduler_warnings.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_asset.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_asset_auto_expiry.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_auto_market_inference.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtest_cache_manager.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_broker.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_broker_await_close.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_broker_time_advance.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_crypto_cash_unit.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_data_source_env.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_flow_control.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_multileg_unit.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_backtesting_quiet_logs_complete.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_bars_aggregate_frequency_normalization.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_bars_aggregation_timeunits.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_bars_frequency_flex.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_botspot_handler.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_botspot_logger.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_broker_bitunix.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_broker_cleanup.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_broker_initialization.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_brokers_handle_crypto.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_cash.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_ccxt.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_ccxt_store.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_configs_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_continuous_futures.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_continuous_futures_integration.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_continuous_futures_resolution.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_data_polars_parity.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_data_source.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_asset_validation.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_auto_expiry_integration.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_backtesting.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_backtesting_polars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_live.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_databento_timezone_fixes.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_drift_rebalancer.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_futures_integration.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_futures_roll.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_get_historical_prices.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_indicator_subplots.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_integration_tests.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_interactive_brokers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_live_trading_resilience.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_logger_env_vars.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_logging.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_lumibot_logger.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_market_infinite_loop_bug.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_mes_symbols.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_momentum.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_options_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_order.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_order_serialization.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_pandas_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_polars_resample.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_polygon_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_position_serialization.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_bracket_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_bracket_lifecycle_unit.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_datetime_columns.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_datetime_index.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_helpers.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_lifecycle.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_lifecycle_unit.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_live_flow.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_timestep_alias.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_projectx_url_mappings.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_quiet_logs_buy_and_hold.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_quiet_logs_comprehensive.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_quiet_logs_functionality.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_quiet_logs_requirements.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_session_manager.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_strategy_methods.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_thetadata_backwards_compat.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_thetadata_helper.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_thetadata_pandas_verification.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_tradier.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_tradier_data.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_tradingfee.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_tradovate.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_unified_logger.py +0 -0
- {lumibot-4.2.0 → lumibot-4.2.1}/tests/test_vix_helper.py +0 -0
|
@@ -184,7 +184,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
184
184
|
asset: Optional[Asset] = None, # DEBUG-LOG: Added for logging
|
|
185
185
|
) -> Optional[pd.DataFrame]:
|
|
186
186
|
# DEBUG-LOG: Method entry with full parameter context
|
|
187
|
-
logger.
|
|
187
|
+
logger.debug(
|
|
188
188
|
"[THETA][DEBUG][PANDAS][FINALIZE][ENTRY] asset=%s current_dt=%s requested_length=%s timeshift=%s input_shape=%s input_columns=%s input_index_type=%s input_has_tz=%s input_index_sample=%s",
|
|
189
189
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
190
190
|
current_dt.isoformat() if hasattr(current_dt, 'isoformat') else current_dt,
|
|
@@ -199,7 +199,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
199
199
|
|
|
200
200
|
if pandas_df is None or pandas_df.empty:
|
|
201
201
|
# DEBUG-LOG: Early return for empty input
|
|
202
|
-
logger.
|
|
202
|
+
logger.debug(
|
|
203
203
|
"[THETA][DEBUG][PANDAS][FINALIZE][EMPTY_INPUT] asset=%s returning_none_or_empty=True",
|
|
204
204
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN'
|
|
205
205
|
)
|
|
@@ -212,7 +212,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
212
212
|
frame.index = pd.to_datetime(frame.index)
|
|
213
213
|
|
|
214
214
|
# DEBUG-LOG: Timezone state before localization
|
|
215
|
-
logger.
|
|
215
|
+
logger.debug(
|
|
216
216
|
"[THETA][DEBUG][PANDAS][FINALIZE][TZ_CHECK] asset=%s frame_index_tz=%s target_tz=%s needs_localization=%s frame_shape=%s",
|
|
217
217
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
218
218
|
frame.index.tz,
|
|
@@ -227,7 +227,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
227
227
|
normalized_for_cutoff = localized_index.normalize()
|
|
228
228
|
|
|
229
229
|
# DEBUG-LOG: After localization
|
|
230
|
-
logger.
|
|
230
|
+
logger.debug(
|
|
231
231
|
"[THETA][DEBUG][PANDAS][FINALIZE][LOCALIZED] asset=%s localized_index_tz=%s localized_sample=%s",
|
|
232
232
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
233
233
|
localized_index.tz,
|
|
@@ -238,7 +238,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
238
238
|
cutoff_mask = normalized_for_cutoff <= cutoff
|
|
239
239
|
|
|
240
240
|
# DEBUG-LOG: Cutoff filtering state
|
|
241
|
-
logger.
|
|
241
|
+
logger.debug(
|
|
242
242
|
"[THETA][DEBUG][PANDAS][FINALIZE][CUTOFF] asset=%s cutoff=%s cutoff_mask_true=%s cutoff_mask_false=%s",
|
|
243
243
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
244
244
|
cutoff,
|
|
@@ -249,7 +249,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
249
249
|
if timeshift and not isinstance(timeshift, int):
|
|
250
250
|
cutoff_mask &= normalized_for_cutoff <= (cutoff - timeshift)
|
|
251
251
|
# DEBUG-LOG: After timeshift adjustment
|
|
252
|
-
logger.
|
|
252
|
+
logger.debug(
|
|
253
253
|
"[THETA][DEBUG][PANDAS][FINALIZE][TIMESHIFT_ADJUSTED] asset=%s timeshift=%s new_cutoff=%s cutoff_mask_true=%s",
|
|
254
254
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
255
255
|
timeshift,
|
|
@@ -262,7 +262,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
262
262
|
normalized_for_cutoff = normalized_for_cutoff[cutoff_mask]
|
|
263
263
|
|
|
264
264
|
# DEBUG-LOG: After cutoff filtering
|
|
265
|
-
logger.
|
|
265
|
+
logger.debug(
|
|
266
266
|
"[THETA][DEBUG][PANDAS][FINALIZE][AFTER_CUTOFF] asset=%s shape=%s index_range=%s",
|
|
267
267
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
268
268
|
frame.shape,
|
|
@@ -280,7 +280,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
280
280
|
raw_frame = frame.copy()
|
|
281
281
|
|
|
282
282
|
# DEBUG-LOG: After normalization
|
|
283
|
-
logger.
|
|
283
|
+
logger.debug(
|
|
284
284
|
"[THETA][DEBUG][PANDAS][FINALIZE][NORMALIZED_INDEX] asset=%s shape=%s index_sample=%s",
|
|
285
285
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
286
286
|
frame.shape,
|
|
@@ -291,7 +291,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
291
291
|
target_index = pd.date_range(end=expected_last_dt, periods=requested_length, freq="D", tz=self.tzinfo)
|
|
292
292
|
|
|
293
293
|
# DEBUG-LOG: Target index details
|
|
294
|
-
logger.
|
|
294
|
+
logger.debug(
|
|
295
295
|
"[THETA][DEBUG][PANDAS][FINALIZE][TARGET_INDEX] asset=%s target_length=%s target_range=%s",
|
|
296
296
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
297
297
|
len(target_index),
|
|
@@ -304,7 +304,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
304
304
|
frame = frame.reindex(target_index)
|
|
305
305
|
|
|
306
306
|
# DEBUG-LOG: After reindex
|
|
307
|
-
logger.
|
|
307
|
+
logger.debug(
|
|
308
308
|
"[THETA][DEBUG][PANDAS][FINALIZE][AFTER_REINDEX] asset=%s shape=%s columns=%s",
|
|
309
309
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
310
310
|
frame.shape,
|
|
@@ -318,7 +318,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
318
318
|
placeholder_mask = frame.isna().all(axis=1)
|
|
319
319
|
|
|
320
320
|
# DEBUG-LOG: Placeholder mask computation
|
|
321
|
-
logger.
|
|
321
|
+
logger.debug(
|
|
322
322
|
"[THETA][DEBUG][PANDAS][FINALIZE][PLACEHOLDER_MASK] asset=%s placeholder_true=%s placeholder_false=%s value_columns=%s",
|
|
323
323
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
324
324
|
int(placeholder_mask.sum()) if hasattr(placeholder_mask, 'sum') else 'N/A',
|
|
@@ -359,7 +359,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
359
359
|
# DEBUG-LOG: Final missing flag state
|
|
360
360
|
try:
|
|
361
361
|
missing_count = int(frame["missing"].sum())
|
|
362
|
-
logger.
|
|
362
|
+
logger.debug(
|
|
363
363
|
"[THETA][DEBUG][PANDAS][FINALIZE][MISSING_FINAL] asset=%s missing_true=%s missing_false=%s total_rows=%s",
|
|
364
364
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
365
365
|
missing_count,
|
|
@@ -367,14 +367,14 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
367
367
|
len(frame)
|
|
368
368
|
)
|
|
369
369
|
except Exception as e:
|
|
370
|
-
logger.
|
|
370
|
+
logger.debug(
|
|
371
371
|
"[THETA][DEBUG][PANDAS][FINALIZE][MISSING_FINAL] asset=%s error=%s",
|
|
372
372
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
373
373
|
str(e)
|
|
374
374
|
)
|
|
375
375
|
|
|
376
376
|
# DEBUG-LOG: Return value
|
|
377
|
-
logger.
|
|
377
|
+
logger.debug(
|
|
378
378
|
"[THETA][DEBUG][PANDAS][FINALIZE][RETURN] asset=%s shape=%s columns=%s index_range=%s",
|
|
379
379
|
getattr(asset, 'symbol', asset) if asset else 'UNKNOWN',
|
|
380
380
|
frame.shape,
|
|
@@ -451,7 +451,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
451
451
|
existing_end = existing_meta.get("end")
|
|
452
452
|
|
|
453
453
|
# DEBUG-LOG: Cache validation entry
|
|
454
|
-
logger.
|
|
454
|
+
logger.debug(
|
|
455
455
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][CACHE_VALIDATION][ENTRY] asset=%s timestep=%s | "
|
|
456
456
|
"REQUESTED: start=%s start_threshold=%s end_requirement=%s length=%d | "
|
|
457
457
|
"EXISTING: start=%s end=%s rows=%d",
|
|
@@ -472,7 +472,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
472
472
|
)
|
|
473
473
|
|
|
474
474
|
# DEBUG-LOG: Start validation result
|
|
475
|
-
logger.
|
|
475
|
+
logger.debug(
|
|
476
476
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][START_VALIDATION] asset=%s | "
|
|
477
477
|
"start_ok=%s | "
|
|
478
478
|
"existing_start=%s start_threshold=%s | "
|
|
@@ -489,7 +489,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
489
489
|
end_ok = True
|
|
490
490
|
|
|
491
491
|
# DEBUG-LOG: End validation entry
|
|
492
|
-
logger.
|
|
492
|
+
logger.debug(
|
|
493
493
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][END_VALIDATION][ENTRY] asset=%s | "
|
|
494
494
|
"end_requirement=%s existing_end=%s tail_placeholder=%s",
|
|
495
495
|
asset_separated.symbol if hasattr(asset_separated, 'symbol') else str(asset_separated),
|
|
@@ -501,7 +501,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
501
501
|
if end_requirement is not None:
|
|
502
502
|
if existing_end is None:
|
|
503
503
|
end_ok = False
|
|
504
|
-
logger.
|
|
504
|
+
logger.debug(
|
|
505
505
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][END_VALIDATION][RESULT] asset=%s | "
|
|
506
506
|
"end_ok=FALSE | reason=existing_end_is_None",
|
|
507
507
|
asset_separated.symbol if hasattr(asset_separated, 'symbol') else str(asset_separated)
|
|
@@ -520,7 +520,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
520
520
|
|
|
521
521
|
if existing_end_cmp > end_requirement_cmp:
|
|
522
522
|
end_ok = True
|
|
523
|
-
logger.
|
|
523
|
+
logger.debug(
|
|
524
524
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][END_VALIDATION][RESULT] asset=%s | "
|
|
525
525
|
"end_ok=TRUE | reason=existing_end_exceeds_requirement | "
|
|
526
526
|
"existing_end=%s end_requirement=%s ts_unit=%s",
|
|
@@ -535,7 +535,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
535
535
|
placeholder_empty_fetch = tail_placeholder and existing_meta.get("empty_fetch")
|
|
536
536
|
end_ok = (not tail_placeholder) or placeholder_on_weekend or placeholder_empty_fetch
|
|
537
537
|
|
|
538
|
-
logger.
|
|
538
|
+
logger.debug(
|
|
539
539
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][END_VALIDATION][EXACT_MATCH] asset=%s | "
|
|
540
540
|
"existing_end == end_requirement | "
|
|
541
541
|
"weekday=%s placeholder_on_weekend=%s placeholder_empty_fetch=%s | "
|
|
@@ -549,7 +549,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
549
549
|
)
|
|
550
550
|
else:
|
|
551
551
|
end_ok = False
|
|
552
|
-
logger.
|
|
552
|
+
logger.debug(
|
|
553
553
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][END_VALIDATION][RESULT] asset=%s | "
|
|
554
554
|
"end_ok=FALSE | reason=existing_end_less_than_requirement | "
|
|
555
555
|
"existing_end=%s end_requirement=%s ts_unit=%s",
|
|
@@ -566,7 +566,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
566
566
|
)
|
|
567
567
|
|
|
568
568
|
# DEBUG-LOG: Final cache decision
|
|
569
|
-
logger.
|
|
569
|
+
logger.debug(
|
|
570
570
|
"[DEBUG][BACKTEST][THETA][DEBUG][PANDAS][CACHE_DECISION] asset=%s | "
|
|
571
571
|
"cache_covers=%s | "
|
|
572
572
|
"start_ok=%s rows_ok=%s (existing=%d >= requested=%d) end_ok=%s",
|
|
@@ -586,7 +586,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
586
586
|
and expiration_dt == end_requirement
|
|
587
587
|
and not existing_meta.get("expiration_notice")
|
|
588
588
|
):
|
|
589
|
-
logger.
|
|
589
|
+
logger.debug(
|
|
590
590
|
"[THETA][DEBUG][THETADATA-PANDAS] Reusing cached data for %s/%s through option expiry %s.",
|
|
591
591
|
asset_separated,
|
|
592
592
|
quote_asset,
|
|
@@ -702,7 +702,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
702
702
|
and expiration_dt == end_requirement
|
|
703
703
|
)
|
|
704
704
|
if expired_reason:
|
|
705
|
-
logger.
|
|
705
|
+
logger.debug(
|
|
706
706
|
"[THETA][DEBUG][THETADATA-PANDAS] No new OHLC rows for %s/%s (%s); option expired on %s. Keeping cached data.",
|
|
707
707
|
asset_separated,
|
|
708
708
|
quote_asset,
|
|
@@ -851,9 +851,8 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
851
851
|
bars = self._parse_source_symbol_bars(response, asset, quote=quote)
|
|
852
852
|
final_df = getattr(bars, "df", None)
|
|
853
853
|
final_rows = len(final_df) if final_df is not None else 0
|
|
854
|
-
|
|
855
|
-
"[THETA][DEBUG][FETCH][THETA][DEBUG][PANDAS][FINAL] asset=%s quote=%s length=%s timestep=%s timeshift=%s current_dt=%s rows=%s"
|
|
856
|
-
) % (
|
|
854
|
+
logger.debug(
|
|
855
|
+
"[THETA][DEBUG][FETCH][THETA][DEBUG][PANDAS][FINAL] asset=%s quote=%s length=%s timestep=%s timeshift=%s current_dt=%s rows=%s",
|
|
857
856
|
getattr(asset, "symbol", asset) if not isinstance(asset, str) else asset,
|
|
858
857
|
getattr(quote, "symbol", quote),
|
|
859
858
|
length,
|
|
@@ -862,8 +861,6 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
862
861
|
current_dt,
|
|
863
862
|
final_rows,
|
|
864
863
|
)
|
|
865
|
-
logger.warning(message)
|
|
866
|
-
print(message)
|
|
867
864
|
return bars
|
|
868
865
|
|
|
869
866
|
def get_last_price(self, asset, timestep="minute", quote=None, exchange=None, **kwargs) -> Union[float, Decimal, None]:
|
|
@@ -893,7 +890,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
893
890
|
return super().get_last_price(asset=asset, quote=quote, exchange=exchange)
|
|
894
891
|
closes = close_series.dropna()
|
|
895
892
|
if closes.empty:
|
|
896
|
-
logger.
|
|
893
|
+
logger.debug(
|
|
897
894
|
"[THETA][DEBUG][THETADATA-PANDAS] get_last_price found no valid closes for %s/%s; returning None (likely expired).",
|
|
898
895
|
asset,
|
|
899
896
|
quote or Asset("USD", "forex"),
|
|
@@ -957,10 +954,9 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
957
954
|
return_polars=False,
|
|
958
955
|
)
|
|
959
956
|
if bars is None or getattr(bars, "df", None) is None or bars.df.empty:
|
|
960
|
-
|
|
957
|
+
logger.debug(
|
|
961
958
|
"[THETA][DEBUG][FETCH][THETA][DEBUG][PANDAS] asset=%s quote=%s length=%s timestep=%s timeshift=%s current_dt=%s "
|
|
962
|
-
"rows=0 first_ts=None last_ts=None columns=None"
|
|
963
|
-
) % (
|
|
959
|
+
"rows=0 first_ts=None last_ts=None columns=None",
|
|
964
960
|
getattr(asset, "symbol", asset) if not isinstance(asset, str) else asset,
|
|
965
961
|
getattr(quote, "symbol", quote),
|
|
966
962
|
length,
|
|
@@ -968,8 +964,6 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
968
964
|
timeshift,
|
|
969
965
|
current_dt,
|
|
970
966
|
)
|
|
971
|
-
logger.warning(message)
|
|
972
|
-
print(message)
|
|
973
967
|
return bars
|
|
974
968
|
|
|
975
969
|
df = bars.df
|
|
@@ -981,10 +975,10 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
981
975
|
else:
|
|
982
976
|
first_ts = df.index[0]
|
|
983
977
|
last_ts = df.index[-1]
|
|
984
|
-
|
|
978
|
+
|
|
979
|
+
logger.debug(
|
|
985
980
|
"[THETA][DEBUG][FETCH][THETA][DEBUG][PANDAS] asset=%s quote=%s length=%s timestep=%s timeshift=%s current_dt=%s rows=%s "
|
|
986
|
-
"first_ts=%s last_ts=%s columns=%s"
|
|
987
|
-
) % (
|
|
981
|
+
"first_ts=%s last_ts=%s columns=%s",
|
|
988
982
|
getattr(asset, "symbol", asset) if not isinstance(asset, str) else asset,
|
|
989
983
|
getattr(quote, "symbol", quote),
|
|
990
984
|
length,
|
|
@@ -996,8 +990,6 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
996
990
|
last_ts,
|
|
997
991
|
columns,
|
|
998
992
|
)
|
|
999
|
-
logger.warning(message)
|
|
1000
|
-
print(message)
|
|
1001
993
|
return bars
|
|
1002
994
|
|
|
1003
995
|
def get_quote(self, asset, timestep="minute", quote=None, exchange=None, **kwargs):
|
|
@@ -1026,7 +1018,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1026
1018
|
|
|
1027
1019
|
# [INSTRUMENTATION] Log full asset details for options
|
|
1028
1020
|
if hasattr(asset, 'asset_type') and asset.asset_type == Asset.AssetType.OPTION:
|
|
1029
|
-
logger.
|
|
1021
|
+
logger.debug(
|
|
1030
1022
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][OPTION_REQUEST] symbol=%s expiration=%s strike=%s right=%s current_dt=%s timestep=%s",
|
|
1031
1023
|
asset.symbol,
|
|
1032
1024
|
asset.expiration,
|
|
@@ -1036,7 +1028,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1036
1028
|
timestep
|
|
1037
1029
|
)
|
|
1038
1030
|
else:
|
|
1039
|
-
logger.
|
|
1031
|
+
logger.debug(
|
|
1040
1032
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][REQUEST] asset=%s current_dt=%s timestep=%s",
|
|
1041
1033
|
getattr(asset, "symbol", asset) if not isinstance(asset, str) else asset,
|
|
1042
1034
|
dt.isoformat() if hasattr(dt, 'isoformat') else dt,
|
|
@@ -1066,7 +1058,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1066
1058
|
if isinstance(df.index, pd.DatetimeIndex) and df.index.tz is not None:
|
|
1067
1059
|
tz_info = str(df.index.tz)
|
|
1068
1060
|
|
|
1069
|
-
logger.
|
|
1061
|
+
logger.debug(
|
|
1070
1062
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][DATAFRAME_STATE] asset=%s | total_rows=%d | timestep=%s | index_type=%s | timezone=%s",
|
|
1071
1063
|
getattr(asset, "symbol", asset),
|
|
1072
1064
|
len(df),
|
|
@@ -1079,7 +1071,7 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1079
1071
|
if isinstance(df.index, pd.DatetimeIndex):
|
|
1080
1072
|
first_dt_str = df.index[0].isoformat() if hasattr(df.index[0], 'isoformat') else str(df.index[0])
|
|
1081
1073
|
last_dt_str = df.index[-1].isoformat() if hasattr(df.index[-1], 'isoformat') else str(df.index[-1])
|
|
1082
|
-
logger.
|
|
1074
|
+
logger.debug(
|
|
1083
1075
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][DATETIME_RANGE] asset=%s | first_dt=%s | last_dt=%s | tz=%s",
|
|
1084
1076
|
getattr(asset, "symbol", asset),
|
|
1085
1077
|
first_dt_str,
|
|
@@ -1089,12 +1081,12 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1089
1081
|
|
|
1090
1082
|
# CRITICAL: Show tail with explicit datetime index to catch time-travel bug
|
|
1091
1083
|
if debug_enabled and len(available_cols) > 0:
|
|
1092
|
-
logger.
|
|
1084
|
+
logger.debug(
|
|
1093
1085
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][DATAFRAME_HEAD] asset=%s | first_5_rows (with datetime index):\n%s",
|
|
1094
1086
|
getattr(asset, "symbol", asset),
|
|
1095
1087
|
head_df[available_cols].to_string()
|
|
1096
1088
|
)
|
|
1097
|
-
logger.
|
|
1089
|
+
logger.debug(
|
|
1098
1090
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][DATAFRAME_TAIL] asset=%s | last_5_rows (with datetime index):\n%s",
|
|
1099
1091
|
getattr(asset, "symbol", asset),
|
|
1100
1092
|
tail_df[available_cols].to_string()
|
|
@@ -1102,18 +1094,18 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1102
1094
|
|
|
1103
1095
|
# Show tail datetime values explicitly
|
|
1104
1096
|
tail_datetimes = [dt.isoformat() if hasattr(dt, 'isoformat') else str(dt) for dt in tail_df.index]
|
|
1105
|
-
logger.
|
|
1097
|
+
logger.debug(
|
|
1106
1098
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][TAIL_DATETIMES] asset=%s | tail_index=%s",
|
|
1107
1099
|
getattr(asset, "symbol", asset),
|
|
1108
1100
|
tail_datetimes
|
|
1109
1101
|
)
|
|
1110
1102
|
else:
|
|
1111
|
-
logger.
|
|
1103
|
+
logger.debug(
|
|
1112
1104
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][DATAFRAME_STATE] asset=%s | EMPTY_DATAFRAME",
|
|
1113
1105
|
getattr(asset, "symbol", asset)
|
|
1114
1106
|
)
|
|
1115
1107
|
else:
|
|
1116
|
-
logger.
|
|
1108
|
+
logger.debug(
|
|
1117
1109
|
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][DATAFRAME_STATE] asset=%s | NO_DATA_FOUND_IN_STORE",
|
|
1118
1110
|
getattr(asset, "symbol", asset)
|
|
1119
1111
|
)
|
|
@@ -1121,9 +1113,8 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1121
1113
|
quote_obj = super().get_quote(asset=asset, quote=quote, exchange=exchange)
|
|
1122
1114
|
|
|
1123
1115
|
# [INSTRUMENTATION] Final quote result with all details
|
|
1124
|
-
|
|
1125
|
-
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][RESULT] asset=%s quote=%s current_dt=%s bid=%s ask=%s mid=%s last=%s source=%s"
|
|
1126
|
-
) % (
|
|
1116
|
+
logger.debug(
|
|
1117
|
+
"[THETA][DEBUG][QUOTE][THETA][DEBUG][PANDAS][RESULT] asset=%s quote=%s current_dt=%s bid=%s ask=%s mid=%s last=%s source=%s",
|
|
1127
1118
|
getattr(asset, "symbol", asset) if not isinstance(asset, str) else asset,
|
|
1128
1119
|
getattr(quote, "symbol", quote),
|
|
1129
1120
|
dt,
|
|
@@ -1133,8 +1124,6 @@ class ThetaDataBacktestingPandas(PandasData):
|
|
|
1133
1124
|
getattr(quote_obj, "last_price", None) if quote_obj else None,
|
|
1134
1125
|
getattr(quote_obj, "source", None) if quote_obj else None,
|
|
1135
1126
|
)
|
|
1136
|
-
logger.warning(message)
|
|
1137
|
-
print(message)
|
|
1138
1127
|
return quote_obj
|
|
1139
1128
|
|
|
1140
1129
|
def get_chains(self, asset):
|