lumibot 4.2.6__tar.gz → 4.2.7__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.6/lumibot.egg-info → lumibot-4.2.7}/PKG-INFO +1 -1
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/databento_backtesting_pandas.py +29 -4
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/databento_helper.py +14 -6
- {lumibot-4.2.6 → lumibot-4.2.7/lumibot.egg-info}/PKG-INFO +1 -1
- {lumibot-4.2.6 → lumibot-4.2.7}/setup.py +1 -1
- {lumibot-4.2.6 → lumibot-4.2.7}/LICENSE +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/MANIFEST.in +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/README.md +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/alpaca_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/alpha_vantage_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/backtesting_broker.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/ccxt_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/databento_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/databento_backtesting_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/fix_debug.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/interactive_brokers_rest_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/pandas_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/polygon_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/thetadata_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/thetadata_backtesting_pandas.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/backtesting/yahoo_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/alpaca.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/bitunix.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/broker.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/ccxt.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/example_broker.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/interactive_brokers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/interactive_brokers_rest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/projectx.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/schwab.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/tradier.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/brokers/tradovate.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/configs_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/drift_rebalancer_logic.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/grok_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/options_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/perplexity_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/quiver_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/components/vix_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/constants.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/credentials.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/alpaca_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/alpha_vantage_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/bitunix_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/ccxt_backtesting_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/ccxt_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/data_source.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/data_source_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/databento_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/databento_data_pandas.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/databento_data_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/example_broker_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/exceptions.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/interactive_brokers_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/interactive_brokers_rest_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/pandas_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/polars_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/polars_mixin.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/polygon_data_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/projectx_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/schwab_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/tradier_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/tradovate_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/yahoo_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/data_sources/yahoo_data_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/asset.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/bar.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/bars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/chains.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/data_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/dataline.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/order.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/position.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/quote.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/entities/trading_fee.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/bitunix_futures_example.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/ccxt_backtesting_example.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/classic_60_40.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/classic_60_40_config.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/crypto_50_50.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/crypto_50_50_config.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/crypto_important_functions.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/drift_rebalancer.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/forex_hold_to_expiry.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/futures_hold_to_expiry.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/lifecycle_logger.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/options_hold_to_expiry.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/schedule_function.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/simple_start_single_file.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_bracket.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_buy_and_hold.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_diversified_leverage.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_limit_and_trailing_stops.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_momentum.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_oco.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/strangle.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/test_broker_functions.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/resources/ThetaTerminal.jar +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/resources/conf.yaml +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/strategies/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/strategies/_strategy.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/strategies/session_manager.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/strategies/strategy.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/strategies/strategy_executor.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/alpaca_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/backtest_cache.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/bitunix_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/black_scholes.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/ccxt_data_store.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/databento_helper_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/debugers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/decorators.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/futures_roll.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/futures_symbols.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/indicators.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/lumibot_logger.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/lumibot_time.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/pandas.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/polars_utils.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/polygon_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/polygon_helper_async.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/polygon_helper_polars_optimized.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/projectx_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/schwab_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/thetadata_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/types.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/yahoo_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/tools/yahoo_helper_polars_optimized.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/traders/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/traders/debug_log_trader.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/traders/trader.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/trading_builtins/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/trading_builtins/custom_stream.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot/trading_builtins/safe_list.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot.egg-info/SOURCES.txt +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot.egg-info/dependency_links.txt +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot.egg-info/requires.txt +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/lumibot.egg-info/top_level.txt +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/pyproject.toml +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/setup.cfg +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/__init__.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/conftest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/performance_tracker.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/profile_thetadata_vs_polygon.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_accuracy_verification.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_backtesting_broker_processing.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_buy_hold_quiet_logs_full_run.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_crypto_cash_regressions.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_daily_data_timestamp_comparison.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_databento.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_databento_comprehensive_trading.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_databento_parity.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_debug_avg_fill_price.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_dividends.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_example_strategies.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_failing_backtest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_futures_edge_cases.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_futures_single_trade.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_futures_ultra_simple.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_index_data_verification.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_multileg_backtest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_pandas_backtest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_passing_trader_into_backtest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_polars_lru_eviction.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_polygon.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_strategy_executor.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_thetadata.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_thetadata_comprehensive.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_thetadata_vs_polygon.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/backtest/test_yahoo.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/conftest.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/fixtures.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca_auth_fix.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca_multileg_fix.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_alpaca_oauth.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_apscheduler_warnings.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_asset.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_asset_auto_expiry.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_auto_market_inference.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtest_cache_manager.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_broker.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_broker_await_close.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_broker_time_advance.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_crypto_cash_unit.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_data_source_env.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_datetime_normalization.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_flow_control.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_multileg_unit.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_backtesting_quiet_logs_complete.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_bars_aggregate_frequency_normalization.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_bars_aggregation_timeunits.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_bars_frequency_flex.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_botspot_handler.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_botspot_logger.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_broker_bitunix.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_broker_cleanup.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_broker_initialization.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_brokers_handle_crypto.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_cash.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_ccxt.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_ccxt_store.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_configs_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_continuous_futures.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_continuous_futures_integration.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_continuous_futures_resolution.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_data_polars_parity.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_data_source.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_asset_validation.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_auto_expiry_integration.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_backtesting.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_backtesting_polars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_live.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_databento_timezone_fixes.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_drift_rebalancer.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_futures_integration.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_futures_roll.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_get_historical_prices.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_indicator_subplots.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_integration_tests.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_interactive_brokers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_live_trading_resilience.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_logger_env_vars.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_logging.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_lumibot_logger.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_market_infinite_loop_bug.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_mes_symbols.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_momentum.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_options_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_order.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_order_serialization.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_pandas_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_polars_resample.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_polygon_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_position_serialization.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_bracket_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_bracket_lifecycle_unit.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_datetime_columns.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_datetime_index.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_helpers.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_lifecycle.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_lifecycle_unit.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_live_flow.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_timestep_alias.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_projectx_url_mappings.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_quiet_logs_buy_and_hold.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_quiet_logs_comprehensive.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_quiet_logs_functionality.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_quiet_logs_requirements.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_session_manager.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_strategy_methods.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_strategy_price_guard.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_thetadata_backwards_compat.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_thetadata_helper.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_thetadata_pandas_verification.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_tradier.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_tradier_data.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_tradingfee.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_tradovate.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_unified_logger.py +0 -0
- {lumibot-4.2.6 → lumibot-4.2.7}/tests/test_vix_helper.py +0 -0
|
@@ -410,6 +410,7 @@ class DataBentoDataBacktestingPandas(PandasData):
|
|
|
410
410
|
# OPTIMIZATION: Check cache first
|
|
411
411
|
self._check_and_clear_cache()
|
|
412
412
|
current_dt = self.get_datetime()
|
|
413
|
+
current_dt_aware = to_datetime_aware(current_dt)
|
|
413
414
|
|
|
414
415
|
# Try to get data from our cached pandas_data first
|
|
415
416
|
search_asset = asset
|
|
@@ -435,8 +436,6 @@ class DataBentoDataBacktestingPandas(PandasData):
|
|
|
435
436
|
|
|
436
437
|
if not df.empty and 'close' in df.columns:
|
|
437
438
|
# Ensure current_dt is timezone-aware for comparison
|
|
438
|
-
current_dt_aware = to_datetime_aware(current_dt)
|
|
439
|
-
|
|
440
439
|
# Step back one bar so only fully closed bars are visible
|
|
441
440
|
bar_delta = timedelta(minutes=1)
|
|
442
441
|
if asset_data.timestep == "hour":
|
|
@@ -461,12 +460,38 @@ class DataBentoDataBacktestingPandas(PandasData):
|
|
|
461
460
|
self._last_price_cache[cache_key] = price
|
|
462
461
|
return price
|
|
463
462
|
|
|
464
|
-
# If no cached data, try to
|
|
463
|
+
# If no cached data, try to load it for the backtest window
|
|
464
|
+
try:
|
|
465
|
+
fetched_bars = self.get_historical_prices(
|
|
466
|
+
asset_separated,
|
|
467
|
+
length=1,
|
|
468
|
+
quote=quote_asset,
|
|
469
|
+
timestep="minute",
|
|
470
|
+
)
|
|
471
|
+
if fetched_bars is not None:
|
|
472
|
+
asset_data = self.pandas_data.get(search_asset)
|
|
473
|
+
if asset_data is not None:
|
|
474
|
+
df = asset_data.df
|
|
475
|
+
if not df.empty and 'close' in df.columns:
|
|
476
|
+
valid_closes = df[df.index <= current_dt_aware]['close'].dropna()
|
|
477
|
+
if not valid_closes.empty:
|
|
478
|
+
price = float(valid_closes.iloc[-1])
|
|
479
|
+
self._last_price_cache[cache_key] = price
|
|
480
|
+
return price
|
|
481
|
+
except Exception as exc:
|
|
482
|
+
logger.debug(
|
|
483
|
+
"Attempted to hydrate Databento cache for %s but hit error: %s",
|
|
484
|
+
asset.symbol,
|
|
485
|
+
exc,
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
# If still no data, fall back to direct fetch (live-style)
|
|
465
489
|
logger.warning(f"No cached data for {asset.symbol}, attempting direct fetch")
|
|
466
490
|
return databento_helper.get_last_price_from_databento(
|
|
467
491
|
api_key=self._api_key,
|
|
468
492
|
asset=asset_separated,
|
|
469
|
-
venue=exchange
|
|
493
|
+
venue=exchange,
|
|
494
|
+
reference_date=current_dt_aware
|
|
470
495
|
)
|
|
471
496
|
|
|
472
497
|
except DataBentoAuthenticationError as e:
|
|
@@ -947,6 +947,7 @@ def get_last_price_from_databento(
|
|
|
947
947
|
api_key: str,
|
|
948
948
|
asset: Asset,
|
|
949
949
|
venue: Optional[str] = None,
|
|
950
|
+
reference_date: Optional[datetime] = None,
|
|
950
951
|
**kwargs
|
|
951
952
|
) -> Optional[Union[float, Decimal]]:
|
|
952
953
|
"""
|
|
@@ -978,12 +979,14 @@ def get_last_price_from_databento(
|
|
|
978
979
|
|
|
979
980
|
# For continuous futures, resolve to the current active contract
|
|
980
981
|
if asset.asset_type == Asset.AssetType.CONT_FUTURE:
|
|
981
|
-
#
|
|
982
|
-
resolved_symbol =
|
|
982
|
+
# Resolve based on reference date when backtesting so we match the contract in use
|
|
983
|
+
resolved_symbol = _format_futures_symbol_for_databento(
|
|
984
|
+
asset,
|
|
985
|
+
reference_date=reference_date,
|
|
986
|
+
)
|
|
983
987
|
if resolved_symbol is None:
|
|
984
988
|
logger.error(f"Could not resolve continuous futures contract for {asset.symbol}")
|
|
985
989
|
return None
|
|
986
|
-
# Generate the correct DataBento symbol format (should be single result)
|
|
987
990
|
symbols_to_try = _generate_databento_symbol_alternatives(asset.symbol, resolved_symbol)
|
|
988
991
|
logger.info(f"Resolved continuous future {asset.symbol} to specific contract: {resolved_symbol}")
|
|
989
992
|
logger.info(f"DataBento symbol format for last price: {symbols_to_try[0]}")
|
|
@@ -1000,12 +1003,17 @@ def get_last_price_from_databento(
|
|
|
1000
1003
|
if hasattr(range_result, 'end') and range_result.end:
|
|
1001
1004
|
if hasattr(range_result.end, 'tz_localize'):
|
|
1002
1005
|
# Already a pandas Timestamp
|
|
1003
|
-
|
|
1006
|
+
if range_result.end.tz is not None:
|
|
1007
|
+
available_end = range_result.end.tz_convert('UTC')
|
|
1008
|
+
else:
|
|
1009
|
+
available_end = range_result.end.tz_localize('UTC')
|
|
1004
1010
|
else:
|
|
1005
1011
|
# Convert to pandas Timestamp
|
|
1006
|
-
|
|
1012
|
+
ts = pd.to_datetime(range_result.end)
|
|
1013
|
+
available_end = ts if ts.tz is not None else ts.tz_localize('UTC')
|
|
1007
1014
|
elif isinstance(range_result, dict) and 'end' in range_result:
|
|
1008
|
-
|
|
1015
|
+
ts = pd.to_datetime(range_result['end'])
|
|
1016
|
+
available_end = ts if ts.tz is not None else ts.tz_localize('UTC')
|
|
1009
1017
|
else:
|
|
1010
1018
|
logger.warning(f"Could not parse dataset range for {dataset}: {range_result}")
|
|
1011
1019
|
# Fallback: use a recent date that's likely to have data
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lumibot-4.2.6 → lumibot-4.2.7}/lumibot/example_strategies/stock_limit_and_trailing_stops.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|