diff --git a/docs/_sources/deployment.rst.txt b/docs/_sources/deployment.rst.txt index 9c309f114..001ee9759 100644 --- a/docs/_sources/deployment.rst.txt +++ b/docs/_sources/deployment.rst.txt @@ -414,6 +414,9 @@ In addition to broker-specific secrets, the following environment variables are * - **Secret** - **Description** - **Example** + * - LUMIWEALTH_API_KEY + - Your API key from the BotSpot.trade website so that you can track your bot's performance. To get this API key, visit the `BotSpot.trade `_ website and add/create a bot. After creating the bot, you will receive an API key. + - 694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2e * - LIVE_CONFIG - Your live config file, only needed for strategies that have multiple configurations (there will be a folder named "configurations" in the src/ folder) and if you are running the strategy live. - paper_1 diff --git a/docs/deployment.html b/docs/deployment.html index 855b56621..f9544cca6 100644 --- a/docs/deployment.html +++ b/docs/deployment.html @@ -855,35 +855,39 @@

General Environment Variables

LIVE_CONFIG

+

LUMIWEALTH_API_KEY

+

Your API key from the BotSpot.trade website so that you can track your bot’s performance. To get this API key, visit the BotSpot.trade website and add/create a bot. After creating the bot, you will receive an API key.

+

694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2e

+ +

LIVE_CONFIG

Your live config file, only needed for strategies that have multiple configurations (there will be a folder named “configurations” in the src/ folder) and if you are running the strategy live.

paper_1

-

IS_BACKTESTING

+

IS_BACKTESTING

(Optional) Set to “True” to run the strategy in backtesting mode, set to “False” to run the strategy live (defaults to False).

False

-

POLYGON_API_KEY

+

POLYGON_API_KEY

(Optional) Your API key from your Polygon account, only needed if you are backtesting.

a7py0zIdhxde6QkX8OjjKNp7cD87hwKU

-

DISCORD_WEBHOOK_URL

+

DISCORD_WEBHOOK_URL

(Optional) Your Discord webhook URL, only needed if you want to send notifications to Discord. Learn how to get a Discord webhook URL here: Discord Webhooks

https://discord.com/api/webhooks/123456789/

-

DB_CONNECTION_STR

+

DB_CONNECTION_STR

(Optional) Your connection string to your account history database, only needed if you want to save your account history to a database.

sqlite:///account_history.db

-

STRATEGY_NAME

+

STRATEGY_NAME

(Optional) The name of the strategy. This will change the strategy_id in the database and in the Discord messages.

My Strategy

-

MARKET

+

MARKET

(Optional) The market you want the bot to think it is. Eg. “24/7” will make the bot think it is trading in a 24/7 market.

24/7

-

POLYGON_MAX_MEMORY_BYTES

+

POLYGON_MAX_MEMORY_BYTES

(Optional) The maximum memory in bytes that the Polygon API can use. This is useful for limiting memory usage during backtesting.

512000000

diff --git a/docs/searchindex.js b/docs/searchindex.js index 42565beb0..ec2cb7cbe 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["backtesting", "backtesting.backtesting_function", "backtesting.how_to_backtest", "backtesting.indicators_files", "backtesting.logs_csv", "backtesting.pandas", "backtesting.polygon", "backtesting.tearsheet_html", "backtesting.thetadata", "backtesting.trades_files", "backtesting.yahoo", "brokers", "brokers.alpaca", "brokers.ccxt", "brokers.interactive_brokers", "brokers.interactive_brokers_legacy", "brokers.tradier", "deployment", "entities", "entities.asset", "entities.bars", "entities.data", "entities.order", "entities.position", "entities.trading_fee", "getting_started", "index", "lifecycle_methods", "lifecycle_methods.after_market_closes", "lifecycle_methods.before_market_closes", "lifecycle_methods.before_market_opens", "lifecycle_methods.before_starting_trading", "lifecycle_methods.initialize", "lifecycle_methods.on_abrupt_closing", "lifecycle_methods.on_bot_crash", "lifecycle_methods.on_canceled_order", "lifecycle_methods.on_filled_order", "lifecycle_methods.on_new_order", "lifecycle_methods.on_parameters_updated", "lifecycle_methods.on_partially_filled_order", "lifecycle_methods.on_trading_iteration", "lifecycle_methods.summary", "lifecycle_methods.trace_stats", "lumibot.backtesting", "lumibot.data_sources", "lumibot.strategies", "lumibot.traders", "strategy_methods", "strategy_methods.account", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_cash", "strategy_methods.account/strategies.strategy.Strategy.get_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/strategies.strategy.Strategy.get_position", "strategy_methods.account/strategies.strategy.Strategy.get_positions", "strategy_methods.account/strategies.strategy.Strategy.set_parameters", "strategy_methods.chart", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df", "strategy_methods.chart/strategies.strategy.Strategy.add_line", "strategy_methods.chart/strategies.strategy.Strategy.add_marker", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df", "strategy_methods.data", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars", "strategy_methods.datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone", "strategy_methods.misc", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/strategies.strategy.Strategy.log_message", "strategy_methods.misc/strategies.strategy.Strategy.set_market", "strategy_methods.misc/strategies.strategy.Strategy.sleep", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.options", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.options/strategies.strategy.Strategy.get_chain", "strategy_methods.options/strategies.strategy.Strategy.get_chains", "strategy_methods.options/strategies.strategy.Strategy.get_expiration", "strategy_methods.options/strategies.strategy.Strategy.get_greeks", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date", "strategy_methods.options/strategies.strategy.Strategy.get_strikes", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/strategies.strategy.Strategy.create_order", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/strategies.strategy.Strategy.get_order", "strategy_methods.orders/strategies.strategy.Strategy.get_orders", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/strategies.strategy.Strategy.sell_all", "strategy_methods.orders/strategies.strategy.Strategy.submit_order", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders", "strategy_methods.parameters", "strategy_properties", "strategy_properties/lumibot.strategies.strategy.Strategy.cash", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/lumibot.strategies.strategy.Strategy.name", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money", "strategy_properties/lumibot.strategies.strategy.pytz", "strategy_properties/strategies.strategy.Strategy.cash", "strategy_properties/strategies.strategy.Strategy.first_iteration", "strategy_properties/strategies.strategy.Strategy.initial_budget", "strategy_properties/strategies.strategy.Strategy.is_backtesting", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/strategies.strategy.Strategy.name", "strategy_properties/strategies.strategy.Strategy.portfolio_value", "strategy_properties/strategies.strategy.Strategy.pytz", "strategy_properties/strategies.strategy.Strategy.quote_asset", "strategy_properties/strategies.strategy.Strategy.sleeptime", "strategy_properties/strategies.strategy.Strategy.timezone", "strategy_properties/strategies.strategy.Strategy.unspent_money", "vars"], "filenames": ["backtesting.rst", "backtesting.backtesting_function.rst", "backtesting.how_to_backtest.rst", "backtesting.indicators_files.rst", "backtesting.logs_csv.rst", "backtesting.pandas.rst", "backtesting.polygon.rst", "backtesting.tearsheet_html.rst", "backtesting.thetadata.rst", "backtesting.trades_files.rst", "backtesting.yahoo.rst", "brokers.rst", "brokers.alpaca.rst", "brokers.ccxt.rst", "brokers.interactive_brokers.rst", "brokers.interactive_brokers_legacy.rst", "brokers.tradier.rst", "deployment.rst", "entities.rst", "entities.asset.rst", "entities.bars.rst", "entities.data.rst", "entities.order.rst", "entities.position.rst", "entities.trading_fee.rst", "getting_started.rst", "index.rst", "lifecycle_methods.rst", "lifecycle_methods.after_market_closes.rst", "lifecycle_methods.before_market_closes.rst", "lifecycle_methods.before_market_opens.rst", "lifecycle_methods.before_starting_trading.rst", "lifecycle_methods.initialize.rst", "lifecycle_methods.on_abrupt_closing.rst", "lifecycle_methods.on_bot_crash.rst", "lifecycle_methods.on_canceled_order.rst", "lifecycle_methods.on_filled_order.rst", "lifecycle_methods.on_new_order.rst", "lifecycle_methods.on_parameters_updated.rst", "lifecycle_methods.on_partially_filled_order.rst", "lifecycle_methods.on_trading_iteration.rst", "lifecycle_methods.summary.rst", "lifecycle_methods.trace_stats.rst", "lumibot.backtesting.rst", "lumibot.data_sources.rst", "lumibot.strategies.rst", "lumibot.traders.rst", "strategy_methods.rst", "strategy_methods.account.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.chart.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.data.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars.rst", "strategy_methods.datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.misc.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.options.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.parameters.rst", "strategy_properties.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.cash.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.name.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money.rst", "strategy_properties/lumibot.strategies.strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.cash.rst", "strategy_properties/strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/strategies.strategy.Strategy.name.rst", "strategy_properties/strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/strategies.strategy.Strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/strategies.strategy.Strategy.timezone.rst", "strategy_properties/strategies.strategy.Strategy.unspent_money.rst", "vars.rst"], "titles": ["Backtesting", "Backtesting Function", "How To Backtest", "Indicators Files", "Logs CSV", "Pandas (CSV or other data)", "Polygon.io Backtesting", "Tearsheet HTML", "ThetaData Backtesting", "Trades Files", "Yahoo", "Brokers", "Alpaca", "Crypto Brokers (Using CCXT)", "Interactive Brokers", "Interactive Brokers Legacy", "Tradier", "Deployment Guide", "Entities", "Asset", "Bars", "Data", "Order", "Position", "Trading Fee", "What is Lumibot?", "Lumibot: Backtesting and Algorithmic Trading Library", "Lifecycle Methods", "def after_market_closes", "def before_market_closes", "def before_market_opens", "def before_starting_trading", "def initialize", "def on_abrupt_closing", "def on_bot_crash", "def on_canceled_order", "def on_filled_order", "def on_new_order", "def on_parameters_updated", "def on_partially_filled_order", "def on_trading_iteration", "Summary", "def trace_stats", "Backtesting", "Data Sources", "Strategies", "Traders", "Strategy Methods", "Account Management", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "Chart Functions", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "Data", "self.cancel_realtime_bars", "self.get_historical_prices", "self.get_historical_prices_for_assets", "self.get_last_price", "self.get_last_prices", "self.get_next_trading_day", "self.get_quote", "self.get_realtime_bars", "self.get_yesterday_dividend", "self.get_yesterday_dividends", "self.start_realtime_bars", "DateTime", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "Miscellaneous", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "Options", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_strikes", "self.options_expiry_to_datetime_date", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_option_expiration_after_date", "self.get_strikes", "self.options_expiry_to_datetime_date", "Order Management", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "Parameters", "Strategy Properties", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "self.pytz", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "Variable Backup & Restore"], "terms": {"lumibot": [0, 1, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 22, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165], "ha": [0, 7, 15, 20, 22, 26, 35, 36, 37, 39, 45, 71, 74, 78, 196], "three": [0, 15, 20, 22], "mode": [0, 15, 17, 43, 170, 185], "yahoo": [0, 1, 2, 5, 20, 26, 72, 73, 106, 117], "daili": [0, 2, 5, 7, 10, 31, 72, 73], "stock": [0, 1, 2, 5, 6, 8, 9, 10, 12, 17, 19, 20, 21, 22, 23, 26, 32, 44, 106, 117, 126, 134, 146, 152, 157, 163], "data": [0, 1, 3, 6, 8, 10, 11, 13, 18, 19, 20, 23, 26, 30, 31, 40, 45, 47, 62, 66, 71, 72, 73, 78, 81, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "panda": [0, 2, 10, 20, 21, 26, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 78, 106, 117], "intra": [0, 5, 10], "dai": [0, 1, 2, 5, 6, 8, 10, 17, 21, 22, 26, 30, 31, 32, 40, 44, 72, 73, 76, 79, 80, 84, 85, 86, 87, 93, 94, 95, 96, 130, 138, 146, 153, 157, 164, 178, 193], "inter": [0, 5], "test": [0, 2, 15, 17], "futur": [0, 5, 12, 14, 17, 19, 20, 26, 43, 44, 74, 146, 147, 152, 157, 158, 163, 180, 195], "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 76, 82, 101, 105, 107, 116, 118, 127, 128, 129, 130, 131, 135, 136, 137, 138, 140, 142, 146, 157, 165, 166, 167, 177, 178, 180, 182, 192, 193, 195, 196], "csv": [0, 2, 3, 9, 21, 26, 44], "suppli": [0, 10, 21], "you": [0, 1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 20, 22, 25, 26, 29, 32, 44, 47, 48, 49, 51, 55, 57, 61, 62, 66, 70, 72, 73, 82, 101, 124, 142, 146, 157, 165, 166, 178, 193], "polygon": [0, 1, 5, 8, 10, 17, 26], "io": [0, 13, 20, 26], "It": [0, 4, 5, 6, 7, 8, 13, 14, 15, 17, 19, 22, 23, 25, 26, 41, 43, 44, 74, 77, 146, 157], "i": [0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 26, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 77, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 102, 103, 106, 113, 114, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 147, 149, 151, 153, 157, 158, 160, 162, 164, 166, 167, 168, 170, 172, 173, 177, 178, 182, 183, 185, 187, 188, 192, 193, 196], "recommend": [0, 15, 17, 25], "option": [0, 2, 6, 8, 9, 12, 14, 16, 17, 19, 20, 22, 26, 32, 36, 39, 41, 43, 44, 47, 72, 74, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 146, 152, 157, 163], "crypto": [0, 1, 5, 7, 11, 17, 19, 20, 23, 26, 49, 51, 55, 57, 72, 74, 106, 117, 146, 152, 153, 157, 163, 164, 167, 175, 182, 190], "forex": [0, 2, 5, 6, 8, 12, 17, 19, 26, 44, 73, 74, 146, 152, 153, 157, 163, 164], "an": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 19, 22, 23, 26, 34, 35, 36, 39, 40, 41, 43, 44, 52, 58, 72, 74, 75, 81, 102, 103, 105, 113, 114, 116, 126, 127, 131, 132, 134, 135, 140, 141, 144, 146, 147, 148, 152, 155, 157, 158, 159, 163, 165, 178, 193, 196], "advanc": [0, 2, 5, 25, 26, 146, 157], "featur": [0, 2, 6, 8, 26], "allow": [0, 2, 4, 5, 6, 8, 14, 17, 20, 22, 25, 26, 81, 146, 157, 165], "ani": [0, 1, 2, 5, 6, 7, 8, 10, 13, 14, 15, 17, 21, 22, 25, 41, 43, 62, 66, 72, 73, 105, 116, 145, 156, 165], "type": [0, 1, 2, 5, 12, 14, 18, 19, 20, 21, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "have": [0, 1, 2, 5, 6, 8, 10, 14, 16, 17, 20, 22, 23, 25, 26, 28, 43, 47, 49, 51, 55, 57, 72, 78], "format": [0, 5, 19, 21, 44, 76, 125, 126, 130, 132, 133, 134, 138, 141], "requir": [0, 1, 2, 10, 13, 14, 15, 17, 19, 22, 74, 75, 146, 153, 157, 164], "more": [0, 2, 3, 11, 13, 14, 16, 17, 18, 20, 25, 26, 43, 44, 47, 70, 72, 101, 124, 128, 136, 142], "work": [0, 2, 5, 11, 15, 17, 25, 26, 72, 73, 77, 166], "setup": [0, 2, 11, 26], "most": [0, 5, 7, 14, 17, 20, 25, 41, 72, 78, 128, 136], "user": [0, 2, 5, 10, 14, 17, 21, 25, 27, 41, 45, 46, 144, 146, 155, 157, 196], "when": [0, 1, 2, 5, 6, 8, 13, 14, 17, 19, 20, 22, 25, 26, 27, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 62, 63, 66, 67, 82, 146, 157, 167, 172, 182, 187, 196], "run": [0, 5, 6, 8, 10, 11, 12, 14, 17, 21, 26, 30, 32, 33, 34, 37, 44, 46, 81, 102, 103, 113, 114, 143, 145, 154, 156, 170, 185], "sever": [0, 2, 10, 11, 45, 165], "import": [0, 1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 26, 41, 42, 44, 45, 63, 67, 73, 80, 146, 152, 153, 157, 163, 164, 165], "ar": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 38, 41, 44, 45, 47, 48, 53, 59, 61, 62, 63, 66, 67, 70, 73, 78, 81, 82, 101, 106, 117, 124, 125, 126, 128, 133, 134, 136, 142, 143, 146, 147, 149, 151, 153, 154, 157, 158, 160, 162, 164, 165, 167, 182, 196], "each": [0, 1, 2, 3, 5, 7, 9, 13, 14, 20, 22, 26, 30, 32, 40, 41, 44, 45, 47, 53, 59, 72, 80, 126, 134, 149, 151, 160, 162, 196], "prefix": [0, 105, 116], "strategi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "name": [0, 1, 5, 10, 14, 17, 19, 21, 25, 26, 32, 44, 46, 62, 63, 66, 67, 74, 105, 116, 165, 196], "date": [0, 1, 2, 5, 6, 8, 10, 19, 21, 26, 32, 44, 74, 76, 82, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 141, 146, 157], "These": [0, 1, 2, 3, 4, 7, 10, 32, 45, 54, 60, 82], "provid": [0, 2, 4, 5, 6, 8, 9, 17, 20, 21, 44, 74, 75, 131, 140, 144, 145, 155, 156], "detail": [0, 2, 3, 4, 9, 14, 17, 19, 72, 148, 159], "insight": [0, 2], "perform": [0, 2, 3, 7, 17, 26, 41], "behavior": [0, 2], "how": [0, 3, 11, 12, 13, 17, 25, 26, 45, 72, 81, 166], "To": [0, 6, 8, 10, 13, 14, 16, 17, 22, 25, 26, 72], "instal": [0, 5, 10, 13, 15, 17], "choos": [0, 15, 26], "sourc": [0, 5, 8, 13, 20, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "tearsheet": [0, 1, 26, 46], "html": [0, 1, 3, 9, 20, 26], "trade": [0, 1, 4, 5, 10, 11, 13, 15, 17, 18, 19, 20, 21, 22, 27, 30, 31, 32, 33, 40, 41, 43, 44, 45, 52, 58, 73, 74, 76, 78, 81, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 126, 130, 134, 138, 146, 157, 171, 186, 196], "indic": [0, 1, 5, 13, 46, 52, 53, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 153, 164], "conclus": [0, 26], "function": [0, 2, 3, 13, 17, 21, 26, 32, 38, 41, 47, 48, 82, 142], "run_backtest": [0, 1, 2, 5, 6, 8, 10, 25], "other": [0, 2, 6, 8, 10, 13, 14, 15, 17, 20, 22, 25, 26, 41, 62, 66, 77, 101, 146, 157, 167, 182, 196], "In": [0, 6, 8, 13, 17, 22, 43, 74, 75, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98], "summari": [0, 6, 8, 26, 27], "thetadata": [0, 2, 26], "log": [0, 1, 2, 7, 10, 14, 15, 16, 17, 19, 26, 42, 101, 105, 116], "here": [1, 2, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 25, 26, 41, 165, 166], "descript": [1, 14, 17], "all": [1, 4, 5, 13, 17, 20, 21, 22, 25, 30, 33, 34, 43, 45, 46, 51, 53, 57, 59, 72, 73, 125, 127, 128, 129, 131, 133, 135, 136, 137, 140, 143, 145, 146, 149, 150, 151, 154, 156, 157, 160, 161, 162, 165, 196], "its": [1, 6, 8, 22, 42], "paramet": [1, 2, 6, 8, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 87, 88, 90, 91, 93, 96, 97, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 161, 162, 163, 164, 172, 187], "thi": [1, 2, 5, 6, 8, 9, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 49, 51, 55, 57, 62, 63, 66, 67, 72, 73, 74, 75, 77, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 107, 118, 146, 153, 157, 164, 167, 168, 177, 178, 182, 183, 192, 193], "true": [1, 5, 12, 13, 16, 17, 22, 24, 25, 26, 32, 43, 44, 46, 72, 73, 74, 105, 116, 151, 162, 168, 170, 183, 185], "kind": [1, 25], "do": [1, 5, 10, 13, 16, 20, 22, 25, 26, 38, 47, 101, 146, 157], "arg": [1, 21, 44], "minutes_before_clos": [1, 26, 29, 32, 40, 102, 113], "5": [1, 2, 5, 6, 8, 17, 26, 32, 44, 72, 73, 106, 107, 117, 118, 146, 157, 165, 172, 178, 187, 193, 196], "minutes_before_open": [1, 26, 30, 103, 114], "60": [1, 20, 173, 188], "sleeptim": [1, 2, 6, 8, 13, 25, 26, 32, 40, 107, 118], "1": [1, 2, 5, 6, 7, 8, 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 31, 44, 72, 73, 84, 90, 91, 93, 99, 100, 128, 136, 139, 146, 152, 153, 157, 163, 164, 178, 193, 196], "stats_fil": [1, 32], "none": [1, 12, 13, 17, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 43, 44, 46, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 81, 84, 93, 102, 103, 105, 106, 107, 108, 113, 114, 116, 117, 118, 119, 128, 131, 136, 140, 143, 144, 145, 146, 148, 150, 151, 154, 155, 156, 157, 159, 161, 162], "risk_free_r": [1, 44, 128, 136], "logfil": [1, 46], "config": [1, 12, 13, 16, 17, 25, 43], "auto_adjust": [1, 44], "fals": [1, 12, 13, 16, 17, 22, 25, 26, 32, 43, 44, 46, 73, 74, 83, 92, 105, 116, 128, 136, 146, 151, 157, 162], "budget": [1, 5, 10, 17, 25, 32, 169, 184], "benchmark_asset": [1, 2, 6, 8, 25], "spy": [1, 2, 5, 6, 8, 19, 22, 25, 30, 31, 32, 36, 40, 44, 71, 72, 73, 74, 75, 79, 80, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 144, 146, 150, 152, 153, 155, 157, 161, 163, 164, 165], "plot_file_html": 1, "trades_fil": 1, "settings_fil": 1, "pandas_data": [1, 5, 25, 43, 44], "quote_asset": [1, 13, 19, 23, 26, 152, 153, 163, 164], "usd": [1, 19, 21, 72, 73, 74, 146, 152, 153, 157, 163, 164], "starting_posit": 1, "show_plot": [1, 46], "tearsheet_fil": 1, "save_tearsheet": [1, 46], "show_tearsheet": [1, 46], "buy_trading_fe": [1, 25], "sell_trading_fe": [1, 25], "api_kei": [1, 12, 25, 26, 43, 44], "polygon_api_kei": [1, 2, 17], "polygon_has_paid_subscript": 1, "indicators_fil": 1, "show_ind": [1, 46], "save_logfil": 1, "kwarg": [1, 12, 19, 21, 43, 44, 153, 164], "datasource_class": 1, "class": [1, 2, 5, 6, 8, 10, 12, 13, 16, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 165, 196], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 27, 28, 34, 35, 36, 37, 38, 39, 41, 43, 44, 45, 49, 50, 51, 54, 55, 56, 57, 60, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 104, 106, 108, 115, 117, 119, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 139, 140, 146, 147, 150, 151, 153, 157, 158, 161, 162, 164, 165, 167, 169, 171, 172, 173, 174, 175, 176, 177, 179, 181, 182, 184, 186, 187, 188, 189, 190, 191, 192, 194], "datasourc": [1, 8, 43, 44], "For": [1, 2, 3, 5, 7, 10, 13, 14, 17, 19, 20, 22, 26, 28, 44, 49, 51, 55, 57, 109, 110, 111, 112, 120, 121, 122, 123, 146, 152, 153, 157, 163, 164, 165], "exampl": [1, 2, 6, 8, 11, 12, 15, 19, 20, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 52, 53, 58, 59, 62, 63, 66, 67, 71, 72, 73, 74, 75, 79, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 105, 106, 107, 109, 110, 111, 112, 113, 114, 116, 117, 118, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 196], "want": [1, 2, 5, 8, 10, 12, 13, 16, 17, 25, 26, 41, 44, 62, 66], "financ": [1, 2, 10, 26], "would": [1, 2, 5, 16, 19, 25, 26, 44, 51, 57, 146, 157, 178, 193], "pass": [1, 2, 5, 8, 10, 18, 22, 28, 36, 40, 41, 45, 102, 103, 113, 114, 128, 136, 146, 157], "yahoodatabacktest": [1, 10, 25, 26, 32], "backtesting_start": [1, 2, 5, 6, 8, 10, 25, 26, 32, 43], "datetim": [1, 2, 5, 6, 8, 10, 13, 19, 20, 21, 25, 26, 32, 43, 44, 47, 62, 63, 66, 67, 72, 76, 78, 81, 83, 84, 90, 91, 92, 93, 99, 100, 127, 130, 132, 135, 138, 139, 141, 146, 157, 171, 186], "start": [1, 2, 5, 6, 7, 8, 10, 11, 13, 17, 20, 21, 30, 32, 44, 72, 73, 78, 81, 102, 113, 173, 188], "period": [1, 2, 5, 7, 13, 21, 81, 196], "backtesting_end": [1, 2, 5, 6, 8, 10, 25, 26, 32], "end": [1, 2, 6, 7, 8, 10, 14, 20, 21, 26, 42], "int": [1, 12, 19, 20, 21, 22, 36, 39, 44, 62, 63, 66, 67, 72, 73, 81, 84, 85, 86, 87, 88, 89, 93, 94, 95, 96, 97, 98, 102, 103, 113, 114, 146, 147, 157, 158, 172, 173, 178, 187, 188, 193], "number": [1, 12, 15, 16, 17, 21, 22, 29, 32, 44, 72, 73, 84, 87, 88, 93, 96, 97, 146, 157, 172, 173, 178, 187, 188, 193], "minut": [1, 5, 13, 17, 20, 21, 25, 26, 29, 30, 32, 40, 43, 44, 72, 73, 84, 86, 88, 93, 95, 97, 102, 103, 113, 114, 172, 173, 178, 187, 188, 193], "befor": [1, 2, 5, 7, 10, 13, 14, 15, 17, 20, 22, 25, 26, 29, 30, 31, 32, 40, 41, 42, 44, 72, 73, 102, 103, 113, 114, 151, 162, 172, 173, 187, 188, 196], "close": [1, 5, 12, 13, 20, 21, 22, 28, 29, 32, 33, 40, 43, 51, 57, 72, 74, 75, 78, 81, 102, 103, 113, 114, 151, 162, 172, 187], "method": [1, 6, 8, 15, 19, 20, 22, 23, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 70, 101, 124, 125, 127, 129, 131, 133, 135, 137, 140, 165, 168, 172, 173, 178, 183, 187, 188, 193, 196], "call": [1, 5, 6, 8, 19, 20, 22, 28, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 72, 74, 75, 125, 126, 128, 133, 134, 136, 152, 163], "open": [1, 2, 5, 12, 17, 20, 21, 22, 25, 29, 30, 31, 40, 43, 63, 67, 72, 78, 81, 102, 103, 113, 114, 143, 144, 145, 149, 151, 154, 155, 156, 160, 162, 173, 188], "second": [1, 12, 22, 32, 40, 43, 73, 81, 101, 107, 118, 178, 193], "sleep": [1, 2, 26, 40, 47, 101, 102, 113, 178, 193], "between": [1, 2, 13, 20, 21, 26, 32, 72, 178, 193], "iter": [1, 2, 6, 8, 13, 21, 32, 40, 41, 168, 171, 183, 186, 196], "str": [1, 19, 20, 21, 22, 23, 44, 52, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 84, 93, 105, 106, 116, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 153, 157, 164, 174, 178, 179, 189, 193, 194], "file": [1, 4, 5, 7, 14, 15, 17, 25, 26, 101, 105, 116, 165, 196], "write": [1, 2, 6, 8], "stat": [1, 28, 42], "float": [1, 5, 19, 20, 22, 23, 36, 39, 43, 44, 49, 51, 55, 57, 62, 63, 66, 67, 74, 75, 79, 80, 102, 103, 107, 113, 114, 118, 128, 131, 136, 140, 146, 147, 153, 157, 158, 164, 167, 169, 175, 182, 184, 190], "risk": [1, 7, 14, 25, 128, 136], "free": [1, 2, 6, 8, 17, 23, 26, 128, 136], "rate": [1, 6, 8, 20, 128, 136], "dict": [1, 21, 38, 42, 44, 46, 50, 54, 56, 60, 77, 104, 108, 115, 119, 146, 157], "set": [1, 2, 6, 8, 11, 14, 15, 16, 17, 19, 20, 21, 22, 25, 26, 29, 32, 43, 44, 54, 60, 72, 73, 78, 106, 117, 125, 133, 146, 157, 165, 166, 172, 173, 178, 187, 188, 193, 196], "up": [1, 2, 5, 6, 11, 14, 15, 17, 19, 25, 26, 63, 67, 196], "broker": [1, 5, 12, 16, 19, 20, 22, 23, 24, 25, 26, 32, 35, 36, 37, 39, 45, 72, 73, 74, 77, 81, 109, 110, 111, 112, 120, 121, 122, 123, 128, 136, 146, 152, 153, 157, 163, 164, 167, 182], "live": [1, 2, 12, 14, 15, 17, 20, 25, 43, 44, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117], "bool": [1, 22, 43, 44, 46, 72, 73, 74, 105, 116, 128, 136, 153, 164, 168, 170, 183, 185], "whether": [1, 17, 22, 44, 46, 72, 82, 128, 136, 146, 157], "automat": [1, 6, 8, 22, 146, 147, 157, 158, 196], "adjust": [1, 7, 14, 20, 21, 44], "initi": [1, 2, 6, 8, 13, 15, 25, 26, 27, 41, 106, 117, 165, 169, 172, 173, 178, 184, 187, 188, 193], "asset": [1, 2, 5, 9, 12, 13, 17, 18, 20, 21, 22, 23, 26, 33, 34, 35, 36, 37, 39, 40, 43, 44, 49, 51, 52, 53, 55, 57, 58, 59, 62, 66, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 147, 152, 153, 157, 158, 163, 164, 167, 177, 182, 192], "benchmark": [1, 2, 7], "compar": [1, 7, 14, 17], "If": [1, 5, 6, 8, 12, 13, 14, 16, 17, 20, 21, 25, 26, 30, 32, 36, 40, 44, 72, 73, 74, 81, 102, 103, 105, 113, 114, 116, 131, 140, 143, 146, 151, 154, 157, 162], "string": [1, 17, 19, 20, 21, 22, 44, 72, 73, 105, 116, 132, 141, 146, 157, 178, 193, 196], "convert": [1, 19, 20, 22, 26, 43, 44, 132, 141, 146, 157], "object": [1, 5, 10, 12, 18, 19, 20, 21, 22, 23, 24, 35, 36, 37, 39, 43, 44, 46, 52, 53, 58, 59, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 109, 110, 111, 112, 120, 121, 122, 123, 126, 131, 134, 140, 144, 145, 146, 147, 148, 149, 152, 153, 155, 156, 157, 158, 159, 160, 163, 164, 176, 181, 191, 196], "plot": [1, 10, 46, 63, 67], "list": [1, 2, 13, 18, 19, 20, 23, 25, 31, 43, 44, 47, 48, 53, 59, 61, 70, 73, 75, 80, 82, 84, 93, 101, 106, 111, 112, 117, 122, 123, 124, 127, 129, 131, 135, 137, 140, 142, 145, 149, 153, 156, 160, 164, 166], "A": [1, 5, 7, 10, 12, 14, 22, 26, 44, 46, 52, 53, 58, 59, 77, 84, 93, 146, 153, 157, 164, 196], "pandasdatabacktest": [1, 5, 25], "contain": [1, 3, 20, 21, 22, 40, 42, 78, 152, 153, 163, 164], "cryptocurr": [1, 2, 6, 8, 13, 17, 20, 72, 73, 74, 75, 146, 157], "get": [1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 17, 18, 20, 21, 22, 30, 31, 33, 38, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 70, 72, 73, 75, 77, 79, 80, 82, 104, 115, 124, 147, 148, 149, 150, 158, 159, 160, 161, 165, 166, 167, 172, 173, 175, 178, 182, 187, 188, 190, 193, 196], "valuat": 1, "measur": [1, 7], "overal": [1, 7], "porfolio": 1, "valu": [1, 3, 5, 9, 12, 13, 14, 17, 19, 20, 21, 23, 28, 43, 45, 46, 48, 49, 51, 55, 57, 61, 62, 63, 66, 67, 72, 73, 128, 136, 153, 164, 175, 190, 196], "usual": [1, 47, 178, 193], "usdt": [1, 19, 49, 51, 55, 57, 72, 74, 146, 157], "usdc": 1, "dictionari": [1, 5, 8, 16, 36, 42, 43, 44, 46, 73, 77, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 157, 165], "posit": [1, 13, 18, 22, 26, 36, 39, 43, 45, 51, 52, 53, 57, 58, 59, 147, 150, 151, 158, 161, 162, 167, 175, 182, 190], "100": [1, 5, 12, 13, 16, 19, 20, 25, 26, 32, 42, 44, 72, 73, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 128, 133, 134, 136, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164], "200": [1, 12, 36, 44, 73, 111, 112, 122, 123, 153, 164], "aapl": [1, 2, 5, 6, 8, 10, 12, 16, 19, 20, 23, 26, 32, 35, 36, 37, 39, 72, 73, 145, 156], "show": [1, 7, 52, 53, 58, 59, 147, 148, 149, 158, 159, 160], "save": [1, 5, 10, 17, 25, 46, 196], "must": [1, 2, 5, 6, 8, 10, 12, 16, 21, 22, 41, 72, 73, 131, 140, 146, 157], "within": [1, 17, 18, 107, 118, 143, 154], "tradingfe": [1, 24, 25, 26], "appli": [1, 17, 44], "bui": [1, 2, 5, 6, 7, 8, 9, 10, 12, 13, 16, 19, 22, 25, 26, 36, 40, 45, 49, 55, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164, 167, 182], "order": [1, 2, 5, 6, 8, 9, 10, 12, 13, 18, 19, 23, 25, 26, 29, 30, 35, 36, 37, 39, 40, 41, 43, 47, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 182], "dure": [1, 2, 4, 7, 17, 45, 73], "sell": [1, 7, 9, 22, 23, 29, 33, 34, 36, 40, 43, 45, 146, 150, 151, 152, 153, 157, 161, 162, 163, 164], "api": [1, 2, 6, 8, 10, 12, 13, 14, 15, 16, 17, 20, 26, 128, 136], "kei": [1, 2, 3, 5, 6, 8, 12, 14, 15, 16, 17, 21, 26, 46, 128, 136, 165, 196], "onli": [1, 5, 10, 13, 14, 15, 17, 19, 20, 21, 22, 23, 25, 26, 32, 41, 43, 44, 46, 72, 73, 74, 77, 81, 128, 136, 143, 153, 154, 164, 172, 187], "polygondatabacktest": [1, 2, 6, 8], "deprec": [1, 15, 146, 157, 180, 195], "pleas": [1, 2, 5, 6, 8, 10, 13, 15, 22, 72, 180, 195], "instead": [1, 5, 17, 20, 43, 107, 118, 128, 136, 180, 195], "paid": [1, 2, 167, 182], "subscript": [1, 11, 26], "default": [1, 5, 10, 17, 19, 20, 21, 32, 34, 44, 45, 54, 60, 62, 63, 66, 67, 72, 73, 74, 76, 91, 100, 106, 117, 125, 127, 128, 129, 130, 133, 135, 136, 137, 138, 146, 151, 153, 157, 162, 164, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194, 196], "return": [1, 7, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "from": [1, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 26, 41, 42, 44, 45, 72, 73, 76, 80, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 140, 146, 152, 153, 157, 163, 164, 196], "simpl": [1, 5, 6, 8, 10, 16, 22, 26, 146, 157], "first": [1, 5, 6, 8, 10, 13, 16, 17, 20, 21, 22, 25, 26, 30, 32, 73, 168, 178, 183, 193, 196], "mystrategi": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 165], "def": [1, 2, 5, 6, 8, 10, 12, 13, 16, 25, 26, 27, 41, 106, 117, 165, 172, 173, 178, 187, 188, 193, 196], "on_trading_iter": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 27, 28, 41, 42, 47, 102, 103, 113, 114, 165, 168, 172, 178, 183, 187, 193, 196], "self": [1, 2, 5, 6, 8, 10, 12, 13, 14, 16, 17, 19, 20, 22, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 47, 165], "first_iter": [1, 2, 5, 6, 8, 10, 26], "create_ord": [1, 2, 5, 6, 8, 10, 12, 13, 19, 22, 25, 26, 40, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 152, 153, 155, 156, 163, 164], "quantiti": [1, 2, 6, 7, 8, 10, 12, 13, 22, 23, 25, 26, 36, 39, 52, 53, 58, 59, 146, 157], "side": [1, 2, 6, 8, 12, 22, 25, 36, 43, 146, 157], "submit_ord": [1, 2, 5, 6, 8, 10, 13, 19, 22, 25, 26, 40, 43, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 146, 150, 155, 156, 157, 161], "creat": [1, 2, 5, 6, 7, 8, 10, 13, 14, 16, 17, 19, 21, 22, 36, 72, 125, 127, 129, 131, 133, 135, 137, 140, 142, 144, 145, 146, 155, 156, 157], "2018": [1, 20], "31": [1, 5, 10, 25, 26, 44, 125, 126, 133, 134], "symbol": [1, 2, 5, 6, 8, 12, 13, 19, 20, 21, 22, 23, 25, 36, 44, 63, 67, 72, 73, 74, 146, 152, 153, 157, 163, 164], "qqq": 1, "asset_typ": [1, 5, 13, 19, 20, 44, 72, 73, 74, 146, 147, 152, 153, 157, 158, 163, 164], "vital": 2, "step": [2, 5, 14], "valid": [2, 19, 21, 22, 44, 125, 126, 133, 134, 146, 157], "your": [2, 5, 6, 7, 8, 10, 11, 12, 14, 15, 18, 20, 22, 40, 41, 47, 48, 49, 51, 55, 57, 61, 70, 82, 101, 146, 157, 165, 166, 178, 193, 196], "histor": [2, 6, 8, 12, 13, 20, 26, 43, 44, 70, 72, 73], "With": [2, 6, 8, 26], "can": [2, 5, 6, 8, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 29, 32, 41, 44, 45, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 82, 101, 124, 128, 136, 142, 146, 157, 165, 166, 178, 193], "across": [2, 17], "variou": [2, 6, 7, 8, 14], "even": [2, 6, 8, 30, 153, 164], "own": [2, 5, 6, 8, 12, 13, 16, 17, 23, 25, 26, 150, 161], "custom": [2, 25, 32, 146, 157, 165], "guid": [2, 13, 16, 25, 26], "walk": [2, 17], "through": [2, 13, 14, 17], "explain": 2, "introduc": 2, "why": [2, 26], "see": [2, 13, 14, 15, 17, 19, 20, 25, 26, 44, 48, 61, 70, 82, 101, 124, 142], "past": [2, 22, 25], "help": [2, 3, 6, 8, 25], "identifi": [2, 13, 19, 22, 148, 159], "weak": 2, "strength": 2, "deploi": [2, 26], "them": [2, 11, 17, 20, 22, 25, 26, 47, 48, 61, 70, 82, 101, 124, 142, 145, 156], "market": [2, 11, 12, 13, 17, 22, 25, 26, 28, 29, 30, 31, 32, 40, 43, 74, 75, 102, 103, 106, 109, 110, 111, 112, 113, 114, 117, 120, 121, 122, 123, 146, 151, 152, 153, 157, 162, 163, 164, 172, 173, 175, 187, 188, 190], "begin": [2, 43], "make": [2, 4, 5, 6, 8, 17, 22, 25, 26, 74, 75], "sure": [2, 6, 8, 25, 26], "machin": 2, "follow": [2, 5, 6, 8, 13, 14, 15, 17, 19, 20, 22, 26, 27, 30, 41, 78, 165, 178, 193], "command": [2, 25, 26], "pip": [2, 5, 10, 13, 25, 26], "upgrad": [2, 5, 10, 25, 26], "latest": [2, 5, 10, 13, 17, 25, 26, 72], "version": [2, 5, 7, 10, 17, 25, 26], "onc": [2, 14, 15, 16, 17, 22, 25, 26, 32, 41, 146, 157, 196], "id": [2, 15, 17, 148, 159, 196], "like": [2, 5, 17, 21, 25, 26, 29, 30, 31, 32, 33, 43, 165], "visual": [2, 3, 7, 25], "studio": 2, "code": [2, 5, 6, 7, 8, 13, 14, 17, 25, 26, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 62, 66, 102, 103, 113, 114, 165], "v": [2, 7, 19], "pycharm": 2, "quick": 2, "download": [2, 5, 6, 8, 25, 26], "offici": 2, "websit": [2, 7, 10, 13, 14, 16, 17], "http": [2, 6, 8, 12, 13, 14, 15, 16, 17, 20, 25, 26], "visualstudio": 2, "com": [2, 7, 15, 16, 17, 25, 26], "python": [2, 5, 25, 105, 116], "extens": 2, "go": [2, 5, 12, 15, 17, 25, 26], "search": [2, 26], "new": [2, 5, 7, 14, 17, 19, 20, 22, 26, 36, 37, 43, 54, 60, 146, 157, 167, 182], "project": [2, 6, 8, 17], "folder": [2, 5, 10, 13, 17], "termin": [2, 13, 25, 26], "re": [2, 11, 14, 17, 26, 82], "readi": [2, 14, 17, 41, 146, 157], "support": [2, 6, 7, 8, 13, 14, 17, 21, 25, 26, 44, 63, 67, 128, 136, 146, 157], "suit": [2, 26], "differ": [2, 3, 5, 7, 11, 13, 14, 17, 20, 25, 26, 45], "need": [2, 6, 8, 13, 14, 16, 17, 25, 27, 41, 43, 72, 73, 77], "": [2, 3, 6, 7, 8, 13, 14, 16, 17, 18, 21, 25, 26, 38, 41, 46, 52, 58, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 128, 136, 147, 158, 165, 178, 193, 196], "overview": 2, "avail": [2, 9, 10, 17, 20, 21, 23, 26, 47, 72, 73, 106, 117, 128, 136, 153, 164, 167, 182], "etf": [2, 10], "suitabl": [2, 17], "longer": 2, "term": 2, "ideal": [2, 17], "intradai": 2, "section": [2, 14, 17, 25, 47], "2": [2, 6, 17, 22, 30, 32, 62, 66, 72, 73, 111, 112, 122, 123, 153, 164, 178, 193], "offer": [2, 7, 14, 17, 26], "two": [2, 3, 11, 19, 22, 25, 26, 73, 145, 156], "year": [2, 6, 8], "plan": [2, 14, 17], "faster": [2, 6, 8], "retriev": [2, 19, 21, 74, 75, 78, 196], "coupon": [2, 6, 8], "lumi10": [2, 6], "10": [2, 6, 8, 13, 17, 19, 20, 32, 40, 44, 63, 67, 82, 127, 135, 152, 153, 163, 164, 165, 172, 173, 178, 187, 188, 193, 196], "off": [2, 6, 8], "3": [2, 12, 17, 146, 157], "design": [2, 17, 25, 27, 41], "look": [2, 5, 15, 26], "price": [2, 6, 8, 9, 13, 16, 17, 19, 20, 21, 22, 23, 31, 36, 39, 43, 44, 45, 47, 62, 63, 66, 67, 70, 72, 73, 74, 75, 78, 128, 136, 146, 152, 153, 157, 163, 164], "secur": [2, 5, 10, 14, 19, 22], "account": [2, 6, 8, 11, 12, 13, 15, 16, 17, 26, 43, 47, 49, 51, 53, 55, 57, 59, 61, 150, 161, 167, 182], "usernam": [2, 8, 11, 17, 26], "password": [2, 8, 13, 14, 17, 196], "net": [2, 8, 51, 57], "lumi": [2, 7, 8], "4": [2, 17, 26, 147, 158], "full": [2, 6, 8, 11, 14, 26, 125, 133], "flexibl": [2, 5, 6, 8, 25], "dataset": 2, "e": [2, 9, 17, 19, 20, 21, 22, 23, 25, 72, 73, 74, 146, 147, 152, 157, 158, 163], "g": [2, 9, 17, 20, 21, 22, 23, 25, 72, 73, 146, 157], "databas": [2, 5, 17, 26], "export": 2, "manual": [2, 14, 17], "configur": [2, 11, 15, 26], "ve": [2, 13, 16, 26], "select": [2, 14, 17], "built": [2, 5, 26], "addit": [2, 14, 17, 19, 22, 146, 157], "specif": [2, 7, 13, 14, 17, 19, 22, 41, 44, 62, 66, 109, 120, 125, 126, 133, 134, 146, 157, 166], "replac": [2, 6, 8, 13], "your_polygon_api_kei": [2, 6], "actual": [2, 13, 22, 41, 43, 175, 190], "1d": [2, 6, 8, 20, 21, 40, 44], "get_last_pric": [2, 6, 8, 10, 13, 16, 20, 21, 26, 44, 47], "qty": [2, 6, 8], "portfolio_valu": [2, 6, 8, 10, 13, 26, 28, 42, 177, 192], "__name__": [2, 6, 8, 13], "__main__": [2, 6, 8, 13], "2023": [2, 6, 8, 44, 125, 126, 133, 134, 196], "result": [2, 5, 6, 8, 10, 25, 26, 42], "inform": [2, 3, 5, 9, 10, 13, 17, 43, 44, 77, 78, 126, 131, 134, 140, 146, 157, 166], "about": [2, 9, 11, 26, 166], "refer": [2, 3, 17, 26, 27], "crucial": [2, 17, 25], "understand": [2, 4, 25], "aspect": 2, "execut": [2, 9, 17, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 102, 103, 107, 109, 111, 113, 114, 118, 120, 122, 143, 152, 154, 163, 172, 173, 178, 187, 188, 193], "statist": 2, "analysi": [2, 4, 13, 46], "tear": 2, "sheet": 2, "includ": [2, 3, 7, 9, 10, 13, 17, 19, 20, 26, 32, 41, 44, 54, 60, 72, 124, 146, 148, 157, 159, 175, 190], "equiti": [2, 14, 51, 57], "curv": 2, "metric": [2, 7], "sharp": [2, 7], "ratio": [2, 7], "drawdown": [2, 7], "comparison": 2, "everi": [2, 25, 32, 40, 43, 47, 81, 196], "which": [2, 6, 7, 8, 9, 13, 14, 17, 20, 21, 22, 32, 41, 49, 51, 55, 57, 74, 75, 76, 77, 128, 130, 136, 138, 178, 193], "wa": [2, 12, 13, 27, 30, 33, 34, 41, 43, 72, 167, 182], "timestamp": [2, 12, 20, 44, 62, 63, 66, 67, 85, 86, 87, 88, 89, 94, 95, 96, 97, 98, 196], "essenti": [2, 17], "review": [2, 14], "potenti": [2, 25, 26, 147, 158], "issu": 2, "optim": [2, 7, 17, 26], "interpret": [2, 178, 193], "technic": [2, 13, 41], "move": [2, 7, 22, 26], "averag": [2, 7, 22, 23], "rsi": [2, 13], "respond": 2, "condit": [2, 22, 40], "base": [2, 7, 12, 13, 19, 20, 21, 22, 23, 24, 26, 40, 43, 44, 46, 72, 73, 74, 146, 157], "power": [2, 6, 8, 17, 25, 26], "framework": [2, 41], "multipl": [2, 17, 143, 154, 196], "By": [2, 17, 26, 34, 128, 136, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194], "quickli": [2, 14, 17, 25], "environ": [2, 14, 26, 196], "confid": 2, "further": [2, 17], "individu": [2, 26], "abov": [2, 15, 19, 20, 32], "uniqu": 3, "becaus": [3, 5, 6, 8, 10, 17, 43], "thei": [3, 5, 11, 17, 20, 26, 41, 81, 128, 136], "add_mark": [3, 26, 47], "add": [3, 5, 13, 14, 17, 19, 22, 25, 32, 43, 46, 62, 63, 66, 67], "marker": [3, 46, 63, 65, 67, 69], "add_lin": [3, 26, 47], "line": [3, 26, 46, 62, 63, 64, 66, 67, 68], "influenc": [3, 27, 41], "decis": [3, 4], "point": [3, 7, 9, 15, 22, 44, 62, 66, 72, 73, 147, 158], "time": [3, 5, 6, 8, 9, 12, 13, 14, 17, 20, 21, 25, 32, 41, 43, 44, 45, 71, 72, 73, 78, 81, 82, 87, 88, 96, 97, 102, 103, 107, 113, 114, 118, 128, 136, 146, 157, 168, 178, 183, 193], "event": [4, 26, 33, 34, 35, 36, 37, 38, 39, 43, 63, 67], "action": [4, 17], "taken": 4, "backtest": [4, 5, 7, 10, 17, 21, 22, 24, 32, 44, 46, 63, 67, 72, 73, 74, 75, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 170, 185], "debug": [4, 46, 196], "process": [4, 6, 8, 14, 17, 25, 37, 39, 152, 153, 163, 164, 196], "collect": [4, 5], "comprehens": [4, 25], "view": [4, 17], "refin": [4, 25], "note": [5, 10, 13, 14, 15, 17, 20, 22, 43, 77, 146, 157], "ensur": [5, 10, 14, 17, 21, 22, 25, 26, 146, 157], "proceed": [5, 10, 14, 25], "been": [5, 10, 15, 22, 23, 35, 36, 37, 39, 43, 74, 78], "some": [5, 10, 14, 25, 26, 44, 45, 74, 146, 157], "major": [5, 10], "chang": [5, 10, 12, 14, 16, 17, 20, 32], "modul": [5, 10, 26], "situat": 5, "much": [5, 6, 8, 12], "easier": [5, 17], "intend": [5, 17], "who": [5, 17, 52, 58, 147, 158], "after": [5, 6, 8, 13, 14, 17, 21, 26, 28, 30, 31, 40, 42, 44, 63, 67, 72, 76, 130, 138, 139, 196], "librari": [5, 7, 13, 16, 17, 25], "strictli": [5, 21], "parquet": 5, "etc": [5, 16, 20, 21, 40, 45, 48, 61, 63, 67, 77, 148, 159], "wish": [5, 26], "accept": [5, 19], "one": [5, 7, 13, 14, 17, 22, 25, 26, 41, 43, 47, 72, 109, 120, 146, 153, 157, 164], "frame": 5, "raw": [5, 20, 22], "addition": [5, 10, 20], "possibl": [5, 14, 32, 44, 62, 63, 66, 67, 153, 164], "contract": [5, 19, 20, 22, 32, 43], "also": [5, 10, 15, 17, 22, 25, 26, 32, 43, 72, 146, 151, 157, 162, 166], "difficult": 5, "backtestingbrok": [5, 6, 8, 10, 43], "next": [5, 6, 8, 12, 17, 26, 40, 76, 130, 138, 139], "normal": [5, 16, 131, 140], "someth": [5, 13], "0000": 5, "hr": [5, 21], "2359": [5, 21], "last": [5, 13, 20, 21, 22, 28, 30, 31, 42, 43, 44, 72, 73, 74, 75, 85, 86, 94, 95, 171, 186, 196], "consid": [5, 20, 177, 192], "zone": [5, 20], "unless": 5, "america": [5, 20, 44, 176, 179, 181, 191, 194], "york": [5, 17], "aka": 5, "est": 5, "receiv": [5, 14], "index": [5, 19, 20, 21, 26, 78], "datetime64": [5, 21], "column": [5, 20, 21, 78, 196], "high": [5, 20, 21, 25, 26, 43, 78, 81], "low": [5, 17, 20, 21, 43, 78, 81], "volum": [5, 20, 21, 78, 81], "should": [5, 10, 14, 16, 20, 22, 27, 40, 43, 45, 74, 107, 118, 128, 136], "2020": [5, 10, 25, 26, 72, 90, 91, 99, 100, 147, 152, 158, 163], "01": [5, 6, 8, 20, 25, 146, 147, 152, 157, 158, 163], "02": [5, 20], "09": 5, "00": [5, 44, 110, 121, 146, 152, 153, 157, 163, 164, 196], "3237": 5, "3234": 5, "75": 5, "3235": 5, "25": [5, 17], "16808": 5, "32": 5, "10439": 5, "33": 5, "50": [5, 22, 32, 146, 157, 178, 193], "3233": 5, "8203": 5, "04": [5, 44], "22": 5, "15": [5, 17, 20, 32, 44, 72, 73], "56": 5, "2800": 5, "2796": 5, "8272": 5, "57": 5, "2794": 5, "7440": 5, "58": 5, "2793": 5, "7569": 5, "yfinanc": [5, 44], "yf": [5, 44], "5d": 5, "interv": 5, "1m": [5, 21, 44], "to_csv": 5, "subsequ": [5, 6, 8], "ad": [5, 11, 13, 17, 19, 26, 72, 73], "One": [5, 17, 19, 22, 44, 146, 157], "load": [5, 18, 21, 63, 67, 196], "mai": [5, 13, 14, 17, 19, 22, 25, 72, 73, 81, 146, 157], "might": [5, 13, 14, 17], "entiti": [5, 13, 19, 20, 21, 22, 23, 24, 25, 26, 72, 73, 80, 146, 152, 153, 157, 163, 164], "assettyp": [5, 13, 19, 146, 152, 153, 157, 163, 164], "pd": [5, 20], "awar": [5, 20], "df": [5, 13, 20, 21, 30, 72, 73], "read_csv": 5, "third": 5, "we": [5, 6, 7, 8, 10, 11, 13, 17, 25, 26, 28, 47, 72, 146, 157], "least": [5, 41], "timestep": [5, 21, 43, 44, 72, 73, 84, 93], "either": [5, 19, 21, 22, 72, 73, 74, 75], "final": [5, 6, 8, 10, 14, 26], "trader": [5, 6, 8, 10, 12, 13, 14, 15, 16, 26, 33], "data_sourc": [5, 12, 43, 44, 72, 73], "datetime_start": [5, 43], "datetime_end": [5, 43], "strat": 5, "100000": 5, "add_strategi": [5, 12, 13, 14, 15, 16, 25, 26, 46], "run_al": [5, 13, 14, 15, 16, 25, 26, 46], "put": [5, 12, 16, 19, 25], "togeth": [5, 22, 25], "Then": [5, 13, 16, 72], "startegi": 5, "read": [5, 15, 25, 44], "same": [5, 14, 17, 22, 26, 73], "directori": [5, 14, 17], "script": 5, "pick": [5, 10, 17, 26], "rang": [5, 13, 17, 20, 21], "link": [6, 8, 14], "give": [6, 8, 13, 131, 140], "u": [6, 7, 8, 13, 14, 21, 26, 175, 190], "credit": [6, 8, 153, 164], "sale": [6, 8], "utm_sourc": 6, "affili": 6, "utm_campaign": 6, "robust": [6, 8], "fetch": [6, 8, 44, 126, 131, 134, 140], "simplifi": [6, 8], "simpli": [6, 8], "polygondatasourc": 6, "get_historical_pric": [6, 8, 13, 20, 26, 31, 44, 47, 73], "As": [6, 8, 17], "pai": [6, 8, 14], "mani": [6, 8, 13, 26, 32, 41, 81], "won": [6, 8], "t": [6, 8, 13, 14, 17, 26], "limit": [6, 8, 13, 14, 17, 22, 43, 72, 73, 81, 110, 121, 146, 152, 153, 157, 163, 164], "cach": [6, 8], "comput": [6, 8, 17, 25, 26], "so": [6, 8, 10, 13, 14, 17, 19, 22, 25, 26, 47, 82, 128, 136], "take": [6, 8, 17, 22, 25, 41, 44, 62, 63, 66, 67, 73, 74, 75, 125, 133], "bit": [6, 8], "obtain": [6, 8, 13, 44, 126, 127, 129, 131, 134, 135, 137, 140], "dashboard": [6, 8, 25], "necessari": [6, 8, 17, 43], "inherit": [6, 8, 45], "defin": [6, 7, 8, 13, 24, 27, 32, 41, 42, 43, 45, 165, 196], "hold": [6, 8, 20, 22, 23, 26, 36], "until": [6, 8, 12, 20, 102, 103, 113, 114, 146, 157], "determin": [6, 7, 8, 12, 22, 43, 106, 117, 146, 157, 166], "05": [6, 8, 146, 157, 196], "form": [6, 21, 81, 106, 117, 127, 129, 135, 137, 167, 182], "tool": [6, 8, 17, 26], "capabl": [6, 8], "easi": [6, 8, 14, 17, 25, 26], "integr": [6, 8], "versatil": [6, 8, 13, 17], "choic": [6, 8, 14, 17], "gener": [7, 10, 13, 16, 26, 151, 162], "quantstat": 7, "varieti": 7, "annual": [7, 25, 26], "yearli": 7, "total": [7, 20, 28, 51, 57, 147, 158, 175, 190], "romad": 7, "over": [7, 19, 20, 25, 26, 62, 63, 66, 67], "maximum": [7, 17], "sortino": 7, "variat": 7, "differenti": 7, "harm": 7, "volatil": [7, 22, 128, 136], "max": [7, 13], "observ": 7, "loss": [7, 22, 43, 62, 63, 66, 67, 146, 152, 153, 157, 163, 164], "peak": 7, "trough": 7, "portfolio": [7, 9, 13, 23, 28, 51, 57, 63, 67, 175, 190], "attain": [7, 146, 157], "longest": 7, "durat": [7, 32, 146, 153, 157, 164, 178, 193], "reach": [7, 25, 26, 43], "accompani": 7, "graph": [7, 62, 63, 66, 67], "cumul": 7, "scale": [7, 196], "better": [7, 22, 146, 157], "exponenti": 7, "growth": 7, "showcas": 7, "tailor": 7, "achiev": [7, 22, 25, 26], "goal": 7, "condor": [7, 17], "martingal": 7, "iron": 7, "delta": [7, 128, 136], "previou": [7, 79, 80], "dte": 7, "expir": [7, 14, 19, 22, 32, 44, 72, 74, 125, 126, 127, 128, 133, 134, 135, 136, 139, 146, 157], "bband": 7, "v2": 7, "bolling": [7, 62, 66], "band": [7, 62, 66], "interest": [7, 13, 128, 136], "implement": [7, 17, 26, 27, 41, 44, 46], "visit": [7, 16, 17, 25, 26], "our": [7, 13, 17, 25, 26, 28], "lumiwealth": [7, 15, 26], "access": [7, 14, 16, 17, 20, 25, 26, 165, 196], "invest": [7, 14, 26], "question": 7, "email": [7, 14], "www": [8, 16], "thetadatabacktest": 8, "altern": 8, "both": [8, 14, 22, 25, 30, 146, 157], "argument": [8, 128, 136], "thetadata_usernam": 8, "thetadata_password": 8, "were": [9, 26, 38], "place": [9, 13, 18, 146, 151, 157, 162], "along": 9, "involv": 9, "strike": [9, 19, 44, 72, 126, 128, 131, 134, 136, 140, 146, 157], "ticker": [9, 19, 20, 32, 44, 81], "cash": [9, 13, 22, 26, 28, 42, 43, 48, 49, 51, 55, 57, 61, 175, 177, 180, 190, 192, 195], "amount": [9, 13, 20, 22, 28, 44, 49, 51, 55, 57, 79, 80, 146, 157], "cannot": 10, "veri": [10, 17, 26], "easili": [10, 26, 32, 45], "modifi": [10, 25, 26], "anyth": 10, "There": [10, 11, 146, 157], "aapl_pric": [10, 26], "alloc": 10, "11": [10, 17, 19, 26], "12": [10, 17, 19, 25, 26, 74], "speak": [11, 41], "learn": [11, 17, 25, 26], "alpaca": [11, 20, 26, 72, 73], "document": [11, 13, 14, 17, 25, 26, 72], "interact": [11, 13, 20, 22, 26, 45, 72, 73, 74, 81], "factor": [11, 26], "authent": [11, 26], "2fa": [11, 26], "secondari": [11, 26], "paper": [11, 12, 15, 16, 17, 26, 44], "legaci": [11, 26], "ccxt": [11, 26], "tradier": [11, 26, 77, 153, 164], "max_work": [12, 43, 44, 73], "20": [12, 13, 22, 32, 43, 165], "chunk_siz": [12, 44, 73], "connect_stream": [12, 43], "connect": [12, 13, 14, 17, 105, 116], "tradeapi": 12, "rest": [12, 14, 17, 41], "get_timestamp": [12, 26, 44, 47], "current": [12, 13, 14, 17, 21, 36, 37, 42, 43, 44, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 77, 78, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 128, 136, 143, 149, 153, 154, 160, 164, 167, 175, 178, 182, 190, 193, 196], "unix": 12, "represent": [12, 21, 22, 44, 72, 73], "is_market_open": [12, 43], "get_time_to_open": [12, 43], "remain": [12, 39, 43, 172, 187], "get_time_to_clos": [12, 43], "alpaca_config": [12, 25, 26], "your_api_kei": [12, 13], "secret": [12, 13, 14, 16, 25, 26], "api_secret": [12, 25, 26], "your_api_secret": 12, "endpoint": 12, "print": [12, 42, 196], "alpacastrategi": 12, "on_trading_inter": [12, 32], "order_typ": [12, 153, 164], "asset_type_map": 12, "us_equ": 12, "cancel_ord": [12, 26, 43, 47, 149, 160], "cancel": [12, 22, 30, 35, 43, 71, 109, 111, 120, 122, 142, 143, 144, 145, 146, 149, 151, 154, 155, 156, 157, 160, 162], "get_historical_account_valu": [12, 43], "1400": 12, "1600": 12, "7": [12, 13, 17, 26, 32, 106, 117], "0830": 12, "0930": 12, "600": 12, "sampl": [12, 26], "1612172730": 12, "000234": 12, "boolean": [12, 151, 153, 162, 164], "map_asset_typ": 12, "orderdata": 12, "to_request_field": 12, "cryoptocurr": 13, "popular": 13, "find": [13, 14, 15, 16, 17, 26, 44, 76, 127, 129, 130, 131, 135, 137, 138, 139, 140], "readthedoc": 13, "en": 13, "enabl": [13, 14, 15], "wide": [13, 17, 63, 67], "coinbas": [13, 26], "pro": 13, "binanc": [13, 26], "kraken": [13, 26, 146, 157], "kucoin": [13, 26], "constantli": [13, 26], "don": [13, 14, 17, 26], "let": 13, "know": [13, 18], "ll": [13, 14, 16, 26], "desir": [13, 14, 21, 81, 128, 136], "credenti": [13, 14, 15], "rememb": [13, 26], "under": [13, 14, 17, 25], "similar": [13, 17, 30], "alwai": [13, 30, 43, 106, 117, 167, 182], "24": [13, 17, 32, 106, 117], "set_market": [13, 26, 32, 47], "few": [13, 17, 26, 101], "common": [13, 14], "coinbase_config": 13, "exchange_id": 13, "apikei": 13, "your_secret_kei": 13, "sandbox": [13, 17], "kraken_config": 13, "margin": [13, 146, 157], "kucoin_config": 13, "your_passphras": 13, "NOT": 13, "your_secret": 13, "coinbasepro_config": 13, "coinbasepro": 13, "instanti": [13, 16, 26, 43], "chosen": [13, 16, 17], "correct": [13, 14, 16], "instanc": [13, 196], "strategy_executor": [13, 16], "complet": [13, 14, 15, 17, 22, 26, 74, 75], "demonstr": 13, "pandas_ta": 13, "error": [13, 17, 22, 34], "importantfunct": 13, "30": [13, 40, 72, 73, 81, 196], "sinc": 13, "those": [13, 17, 166], "hour": [13, 20, 21, 32, 40, 44, 72, 73, 106, 117, 178, 193], "quot": [13, 19, 20, 21, 22, 44, 49, 51, 55, 57, 72, 73, 74, 75, 77, 146, 152, 153, 157, 163, 164, 175, 177, 190, 192], "transact": [13, 22, 167, 182], "btc": [13, 19, 20, 72, 73, 74, 146, 152, 153, 157, 163, 164], "0": [13, 15, 17, 19, 21, 22, 23, 24, 25, 32, 42, 43, 44, 87, 88, 96, 97, 146, 152, 153, 157, 163, 164, 173, 188, 196], "mkt_order": 13, "000": [13, 25, 26], "lmt_order": 13, "limit_pric": [13, 22, 43, 110, 121, 146, 152, 153, 157, 163, 164], "10000": [13, 25], "pair": [13, 20, 22, 44, 74, 75, 125, 126, 133, 134, 146, 157], "bar": [13, 18, 21, 26, 43, 44, 63, 67, 71, 72, 73, 74, 75, 78, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 128, 136], "max_pric": 13, "log_messag": [13, 16, 20, 26, 28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 47, 52, 53, 58, 59, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 147, 148, 149, 158, 159, 160, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 194], "f": [13, 16, 28, 35, 36, 38, 39, 42, 72, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 169, 171, 174, 176, 177, 179, 181, 184, 186, 189, 191, 192, 194, 196], "calcul": [13, 20, 22, 43, 44, 128, 136], "ta": 13, "length": [13, 21, 43, 44, 72, 73, 78, 84, 93], "current_rsi": 13, "iloc": [13, 72], "macd": 13, "current_macd": 13, "55": 13, "ema": 13, "current_ema": 13, "get_posit": [13, 23, 26, 47, 150, 161], "share": [13, 16, 20, 22, 29, 31, 36, 39, 44, 146, 157, 175, 190], "asset_to_get": 13, "outstand": 13, "get_ord": [13, 26, 47], "whatev": 13, "last_pric": [13, 74, 75, 196], "color": [13, 62, 63, 66, 67, 105, 116], "green": [13, 62, 63, 66, 67, 105, 116], "dt": [13, 21, 44, 62, 63, 66, 67, 90, 91, 99, 100, 139], "get_datetim": [13, 26, 43, 44, 47], "check": [13, 17, 22, 26, 40, 43, 47, 72, 148, 149, 159, 160, 168, 170, 183, 185], "certain": [13, 63, 67], "eg": [13, 17, 19, 20, 25, 44, 47, 49, 51, 55, 57, 62, 63, 66, 67, 70, 77, 82, 105, 116, 125, 126, 133, 134, 146, 157, 178, 193], "9": [13, 17, 32], "30am": 13, "entir": 13, "example_strategi": [13, 25, 26], "github": [13, 15, 17, 20, 25, 26], "repositori": [13, 17], "brokerag": [14, 17], "firm": 14, "oper": [14, 17, 32, 41], "countri": 14, "around": [14, 17, 18], "world": [14, 17], "great": [14, 17], "especi": [14, 82, 196], "platform": [14, 26], "fee": [14, 17, 18, 26], "structur": [14, 26], "best": [14, 17], "deal": [14, 26], "real": [14, 16, 17, 25, 71, 78, 81], "subscrib": 14, "appropri": [14, 20], "packag": [14, 26], "depend": [14, 17, 72, 73], "exchang": [14, 21, 22, 44, 72, 73, 74, 75, 76, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 125, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, 140, 146, 157], "snapshot": [14, 42], "bundl": 14, "On": [14, 17], "stream": [14, 71, 78, 81], "nasdaq": [14, 32, 106, 117], "network": 14, "c": 14, "utp": 14, "totalview": 14, "nyse": [14, 32, 76, 106, 117, 130, 138], "cta": 14, "openbook": 14, "ultra": 14, "opra": 14, "top": [14, 17, 26], "relat": [14, 17, 36], "suffic": 14, "login": 14, "ibkr": 14, "client": [14, 15, 17], "portal": 14, "navig": [14, 15, 17], "menu": [14, 26], "click": [14, 17], "prompt": 14, "incur": 14, "cost": [14, 17, 43], "associ": 14, "notif": [14, 17], "ib": [14, 19, 132, 141], "mobil": 14, "app": 14, "approv": 14, "interrupt": [14, 33, 196], "autom": [14, 17], "handl": 14, "solut": 14, "fulli": 14, "doesn": 14, "approach": 14, "conveni": 14, "primari": [14, 196], "maintain": [14, 17], "without": [14, 17, 25, 131, 140], "separ": [14, 17], "control": [14, 178, 193], "twice": 14, "enhanc": [14, 25], "complex": [14, 25], "restrict": 14, "ip": [14, 15, 17], "address": [14, 17], "tw": [14, 17, 20], "ibgatewai": 14, "permiss": [14, 19], "what": [14, 26, 47, 82, 177, 192], "keep": [14, 17, 22, 23, 81, 146, 157], "below": [14, 45, 47, 48, 61, 70, 74, 82, 101, 124, 142], "instruct": [14, 17, 146, 152, 153, 157, 163, 164], "given": [14, 20, 21, 43, 44, 52, 58, 71, 72, 73, 76, 84, 93, 125, 127, 129, 130, 131, 133, 135, 137, 138, 139, 140, 143, 148, 154, 159], "attempt": [14, 175, 190], "while": [14, 17], "disconnect": 14, "caus": 14, "loop": [14, 31, 40, 103, 114, 172, 187], "stop": [14, 22, 25, 32, 33, 40, 43, 62, 63, 66, 67, 102, 103, 113, 114, 146, 152, 153, 157, 163, 164, 172, 187, 196], "tediou": 14, "upper": 14, "right": [14, 17, 19, 28, 63, 67, 72, 152, 163], "corner": [14, 17], "scroll": [14, 17], "down": [14, 17, 25, 33, 63, 67], "plu": [14, 105, 116, 175, 190], "sign": 14, "button": [14, 17], "header": 14, "fill": [14, 17, 21, 22, 23, 36, 39, 43, 146, 157, 167, 182], "out": [14, 26, 43, 47, 52, 58, 74], "field": [14, 20, 22], "page": [14, 16, 17, 26], "At": [14, 25], "confirm": [14, 17], "activ": [14, 17, 22, 26, 74, 75, 78, 152, 153, 163, 164], "back": [14, 196], "enter": [14, 17, 19, 22, 31, 146, 157, 178, 193], "via": 14, "act": 14, "promptli": 14, "ask": [14, 77], "proof": 14, "author": 14, "upload": 14, "request": 14, "eula": 14, "signatur": 14, "block": 14, "submit": [14, 22, 37, 43, 47, 142, 146, 152, 153, 157, 163, 164], "practic": 14, "monei": [14, 16, 17, 25, 49, 51, 55, 57, 167, 182], "avoid": 14, "conflict": [14, 196], "variabl": [14, 26, 31, 42, 166], "env": [14, 17, 196], "ib_usernam": [14, 17], "user123": [14, 17], "ib_password": [14, 17], "password123": [14, 17], "account_id": [14, 17], "subaccount": [14, 17], "u17369206": [14, 17], "ib_api_url": [14, 17], "url": [14, 17], "host": [14, 17], "localhost": [14, 17, 196], "8000": [14, 17], "strangl": [14, 15], "tutori": [15, 26], "workstat": 15, "global": [15, 17, 20, 45], "activex": 15, "socket": [15, 17], "disabl": 15, "port": [15, 17], "7496": 15, "7497": [15, 17], "highli": [15, 26], "thoroughli": 15, "algorithm": [15, 17, 25], "master": 15, "999": 15, "py": [15, 17, 25, 26], "interactive_brokers_config": 15, "socket_port": 15, "client_id": 15, "digit": 15, "127": [15, 17], "entri": [15, 22], "except": [15, 20, 25, 26, 34], "interactivebrok": [15, 20], "interactive_brok": 15, "simple_start_ib": 15, "bot": [15, 17, 25, 32, 34, 45, 196], "blob": [15, 25, 26], "getting_start": 15, "dash": [16, 62, 66], "tradier_config": 16, "access_token": 16, "qtrz3zurd9244ahuw2aoyapgvyra": 16, "account_numb": 16, "va22904793": 16, "your_access_token": 16, "your_account_numb": 16, "That": 16, "now": [16, 25, 44, 74], "abl": 16, "less": [16, 146, 147, 157, 158], "than": [16, 17, 44, 82, 146, 147, 157, 158], "cover": [17, 26], "topic": 17, "decid": [17, 72], "correctli": 17, "applic": [17, 106, 117], "success": 17, "skip": [17, 30], "repl": 17, "eas": 17, "afford": 17, "expens": [17, 128, 136], "browser": [17, 25, 46], "edit": 17, "directli": [17, 43], "tip": 17, "howev": [17, 22, 30, 32, 146, 157], "excel": 17, "develop": [17, 26], "month": [17, 85, 94], "fit": [17, 101], "scalabl": [17, 196], "figur": 17, "blueprint": 17, "worker": 17, "background": 17, "butterfli": 17, "afa": 17, "starter": 17, "itself": 17, "left": [17, 63, 67], "sidebar": 17, "delet": 17, "unnecessari": 17, "trashcan": 17, "mandatori": [17, 19, 45, 146, 157], "ones": [17, 41], "restart": [17, 40], "servic": [17, 105, 116], "commit": 17, "redeploi": 17, "tab": 17, "6": [17, 19, 26], "monitor": 17, "expect": [17, 25, 26, 128, 136], "regularli": 17, "profit": [17, 22, 25, 26, 43, 62, 63, 66, 67], "8": [17, 26], "bottom": 17, "press": 17, "consol": [17, 105, 116], "everyth": [17, 26], "part": [17, 22, 41, 153, 164, 165], "locat": 17, "reserv": 17, "vm": 17, "13": [17, 127, 135], "downgrad": 17, "vcpu": 17, "effect": 17, "reduc": 17, "todai": [17, 74, 82], "wait": [17, 22, 39, 109, 110, 111, 112, 120, 121, 122, 123], "messag": [17, 101, 105, 116], "14": [17, 196], "16": [17, 74], "17": [17, 19, 32], "proper": 17, "discord": [17, 26], "webhook": 17, "live_config": 17, "correspond": [17, 35, 36, 37], "soon": 17, "incred": 17, "commiss": 17, "lot": [17, 166], "engag": 17, "tradier_access_token": 17, "token": 17, "qtrz3zurl9244ahuw4aoyapgvyra": 17, "tradier_account_numb": 17, "va12204793": 17, "tradier_is_pap": 17, "align": 17, "perfectli": 17, "seamlessli": 17, "alpaca_api_kei": 17, "pk7t6yvax6pmh1em20yn": 17, "alpaca_api_secret": 17, "9wgjls3wixq54fcphwwzjcp8jcfjfkuwsryskkma": 17, "alpaca_is_pap": 17, "unit": [17, 44, 146, 157, 178, 193], "state": [17, 166, 196], "typic": [17, 22, 165], "challeng": 17, "friendli": 17, "coinbase_api_kei": 17, "steea9fhiszntmpihqjudeqolitj0javz": 17, "coinbase_api_secret": 17, "nuzcnprsxjxxouxrhqe5k2k1xnqlpckh2xcutifkcw": 17, "coinbase_is_sandbox": 17, "focus": 17, "competit": 17, "kraken_api_kei": 17, "xyz1234567890abcdef": 17, "kraken_api_secret": 17, "abcdef1234567890abcdef1234567890abcdef1234": 17, "intern": [17, 146, 157], "arrai": [17, 21], "cfd": 17, "Their": 17, "presenc": 17, "compat": 17, "purpos": 17, "newer": 17, "interactive_brokers_port": 17, "interactive_brokers_client_id": 17, "123456": 17, "interactive_brokers_ip": 17, "ib_subaccount": 17, "subaccount1": 17, "src": 17, "paper_1": 17, "is_backtest": [17, 26], "a7py0zidhxde6qkx8ojjknp7cd87hwku": 17, "discord_webhook_url": 17, "send": [17, 105, 116], "123456789": 17, "db_connection_str": [17, 196], "histori": 17, "sqlite": 17, "account_histori": 17, "db": 17, "strategy_nam": 17, "strategy_id": [17, 196], "my": [17, 25], "think": [17, 82], "polygon_max_memory_byt": 17, "memori": 17, "byte": 17, "usag": [17, 26], "512000000": 17, "main": [17, 18, 22, 26, 33, 40, 45, 146, 157], "smoothli": 17, "verifi": 17, "behav": 17, "ey": 17, "straightforward": 17, "happi": 17, "assist": 17, "repres": [19, 22, 44, 45, 72, 73, 126, 134], "attribut": [19, 196], "track": [19, 23, 26, 52, 53, 58, 59, 148, 149, 159, 160], "underli": [19, 21, 128, 131, 136, 140], "ibm": [19, 145, 156], "just": [19, 26, 32, 36, 43, 146, 157], "corpor": 19, "printout": 19, "multipli": [19, 20, 36, 39, 44, 125, 126, 129, 131, 133, 134, 137, 140, 152, 163], "nexpir": 19, "expiri": [19, 127, 132, 135, 141], "june": 19, "2021": [19, 32, 128, 136, 139], "18": 19, "currenc": [19, 72, 146, 157, 167, 175, 177, 182, 190, 192], "eur": [19, 72, 73, 146, 152, 153, 157, 163, 164], "convers": [19, 178, 193], "gbp": [19, 152, 163], "behind": 19, "scene": 19, "anytim": 19, "due": 19, "precis": [19, 128, 136], "underlying_asset": 19, "case": [19, 21, 22], "yyyymmdd": [19, 132, 141], "yyyymm": 19, "multileg": [19, 22, 153, 164], "leverag": [19, 146, 157], "_asset_typ": 19, "_right": 19, "asset_type_must_be_one_of": 19, "right_must_be_one_of": 19, "26": 19, "155": 19, "base_asset": [19, 152, 153, 163, 164], "optionright": 19, "classmethod": [19, 20, 22, 23, 44], "from_dict": [19, 22, 23], "is_valid": 19, "symbol2asset": 19, "particularli": 19, "to_dict": [19, 22, 23], "assetsmap": 19, "map": 19, "userdict": 19, "datafram": [20, 21, 44, 64, 65, 68, 69, 72, 78, 81], "dividend": [20, 44, 79, 80, 128, 136, 167, 182], "stock_split": 20, "local": [20, 21, 42, 44, 90, 91, 99, 100, 128, 136], "timezon": [20, 21, 26, 44, 90, 91, 99, 100, 176, 181, 191], "new_york": [20, 44, 176, 179, 181, 191, 194], "helper": [20, 22, 45], "row": [20, 42, 72, 73, 81], "get_last_dividend": 20, "per": [20, 44], "get_momentum": 20, "momentum": 20, "aggregate_bar": 20, "frequenc": [20, 21], "Will": [20, 25, 62, 63, 66, 67, 74, 75, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 151, 162, 176, 179, 181, 191, 194], "timefram": 20, "min": 20, "15min": 20, "1h": [20, 40], "specifi": [20, 22, 44, 72, 73, 146, 157, 196], "filter": 20, "daterang": 20, "get_total_volum": 20, "sum": [20, 51, 57], "themselv": 20, "supplier": 20, "exce": 20, "pace": 20, "throttl": 20, "respect": 20, "mention": 20, "tick": 20, "frequent": 20, "accur": [20, 44], "updat": [20, 22, 26, 36, 38, 108, 119, 146, 157, 167, 182], "rule": 20, "historical_limit": 20, "financi": [20, 25], "ohlcv": [20, 21, 43], "split": [20, 45], "instrument": 20, "yield": 20, "coin": [20, 146, 157], "eth": [20, 73, 146, 153, 157, 164], "num_period": 20, "get_total_dividend": 20, "get_total_stock_split": 20, "get_total_return": 20, "get_total_return_pct": 20, "percentag": [20, 25], "get_total_return_pct_chang": 20, "recent": [20, 72, 78], "get_bar": [20, 21, 44], "ethereum": 20, "bitcoin": 20, "grouper_kwarg": 20, "bars_agg": 20, "inclus": 20, "parse_bar_list": 20, "bar_list": 20, "singl": [20, 144, 155], "nobardatafound": 20, "date_start": 21, "date_end": 21, "trading_hours_start": 21, "trading_hours_end": 21, "23": 21, "59": 21, "input": [21, 102, 103, 113, 114], "manag": [21, 22, 26, 47, 61, 124], "attach": 21, "0001": 21, "localize_timezon": 21, "tz_local": 21, "eastern": 21, "utc": 21, "sybmol": 21, "datalin": 21, "numpi": 21, "iter_index": 21, "count": [21, 32, 78, 81, 196], "seri": 21, "set_tim": 21, "repair_times_and_fil": 21, "merg": 21, "reindex": 21, "nan": 21, "lower": 21, "set_date_format": 21, "set_dat": 21, "trim_data": 21, "trim": 21, "match": [21, 44], "to_datalin": 21, "exist": [21, 54, 60], "get_iter_count": 21, "len": 21, "check_data": 21, "wrapper": 21, "timeshift": [21, 43, 44, 72, 73, 84, 87, 88, 93, 96, 97], "_get_bars_dict": 21, "min_timestep": [21, 44], "timestep_map": [21, 44], "shift": [21, 44, 72, 73, 84, 87, 88, 93, 96, 97], "get_bars_between_d": 21, "start_dat": 21, "end_dat": 21, "get_quot": [21, 26, 47], "idx": 21, "belong": 22, "construct": 22, "goog": [22, 42, 72, 73], "googl": 22, "to_posit": 22, "get_incr": 22, "wait_to_be_regist": 22, "regist": [22, 110, 112, 121, 123], "wait_to_be_clos": 22, "keyword": 22, "my_limit_pric": 22, "500": [22, 36], "particular": [22, 125, 127, 129, 133, 135, 137], "higher": 22, "probabl": 22, "predetermin": 22, "exit": 22, "stop_pric": [22, 43, 146, 152, 153, 157, 163, 164], "my_stop_pric": 22, "400": 22, "stop_limit": [22, 146, 157], "combin": 22, "405": 22, "trail": [22, 146, 152, 157, 163], "continu": [22, 146, 157], "threshold": [22, 146, 157], "movement": [22, 146, 157], "trailing_stop": [22, 146, 157], "trail_pric": [22, 146, 157], "trail_perc": [22, 146, 157], "my_trail_pric": 22, "order_1": 22, "my_trail_perc": 22, "order_2": 22, "bracket": [22, 146, 157], "chain": [22, 44, 124, 125, 126, 127, 129, 131, 133, 134, 135, 137, 140], "long": 22, "short": [22, 106, 117], "importantli": 22, "extrem": 22, "fast": [22, 25, 26], "occur": 22, "take_profit_pric": [22, 146, 152, 157, 163], "stop_loss_pric": [22, 146, 152, 157, 163], "stop_loss_limit_pric": [22, 146, 157], "my_take_profit_pric": 22, "420": 22, "my_stop_loss_pric": 22, "parent": 22, "oto": [22, 146, 157], "trigger": [22, 146, 157], "variant": 22, "oco": [22, 146, 152, 157, 163], "word": [22, 167, 182], "where": [22, 25, 42, 146, 157], "alreadi": [22, 30, 36, 41], "submiss": 22, "position_fil": [22, 146, 157], "time_in_forc": [22, 146, 157], "good_till_d": [22, 146, 157], "date_cr": 22, "order_class": 22, "trade_cost": 22, "custom_param": [22, 146, 157], "avg_fill_pric": [22, 23], "error_messag": 22, "child_ord": 22, "tag": [22, 153, 164], "statu": [22, 148, 149, 159, 160], "unprocess": 22, "orderclass": 22, "ordersid": 22, "buy_to_clos": 22, "buy_to_cov": 22, "buy_to_open": 22, "sell_short": 22, "sell_to_clos": 22, "sell_to_open": 22, "orderstatu": 22, "cash_settl": 22, "partially_fil": 22, "partial_fil": 22, "ordertyp": 22, "tupl": [22, 73], "alia": 22, "add_child_ord": 22, "o": 22, "child": [22, 43], "add_transact": 22, "properti": [22, 23, 26, 43, 45, 46, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195], "cash_pend": 22, "equivalent_statu": 22, "equival": 22, "order_dict": 22, "get_fill_pric": 22, "weight": 22, "often": 22, "encount": 22, "partial": [22, 39], "pnl": 22, "yet": [22, 46], "is_act": 22, "otherwis": [22, 36], "rtype": [22, 44], "is_buy_ord": 22, "is_cancel": 22, "is_equivalent_statu": 22, "status1": 22, "status2": 22, "status": 22, "is_fil": 22, "is_opt": 22, "is_par": 22, "settlement": 22, "balanc": 22, "is_sell_ord": 22, "set_cancel": 22, "set_error": 22, "set_fil": 22, "set_identifi": 22, "set_new": 22, "set_partially_fil": 22, "update_raw": 22, "update_trail_stop_pric": 22, "was_transmit": 22, "retreiv": 23, "appl": 23, "add_ord": 23, "decim": [23, 74, 75, 146, 147, 157, 158], "get_selling_ord": [23, 26, 47], "value_typ": 23, "trading_fe": 24, "flat_fe": [24, 25], "percent_fe": [24, 25], "maker": 24, "taker": 24, "made": [25, 70, 82], "beginn": 25, "join": [25, 26], "commun": [25, 26], "cours": [25, 26], "shown": [25, 26], "discov": [25, 26], "skill": 25, "expert": [25, 26], "guidanc": 25, "resourc": 25, "welcom": 25, "hope": 25, "enjoi": 25, "easiest": 25, "comfort": 25, "copi": 25, "your_alpaca_api_kei": [25, 26], "your_alpaca_secret": [25, 26], "180": 25, "180m": 25, "carri": 25, "familiar": 25, "And": [25, 72, 73], "try": [25, 146, 157], "Or": [25, 26, 165], "dev": [25, 26], "simple_start_single_fil": [25, 26], "flat": 25, "trading_fee_1": 25, "trading_fee_2": 25, "sometim": 25, "spend": 25, "yappi": 25, "machinelearninglongshort": 25, "tqqq": 25, "get_func_stat": 25, "print_al": 25, "get_thread_stat": 25, "prof": 25, "pstat": 25, "snakeviz": 25, "web": [25, 46], "slow": 25, "robot": 26, "well": 26, "found": 26, "super": 26, "being": [26, 35, 36, 37, 38, 39, 44, 46, 72, 126, 134, 146, 157, 168, 183], "bug": 26, "fix": [26, 81], "fortun": 26, "against": 26, "switch": 26, "industri": 26, "tradest": 26, "build": [26, 27, 45], "analy": 26, "box": 26, "analyt": 26, "analyz": 26, "chart": [26, 47, 62, 63, 64, 65, 66, 67, 68, 69], "engin": [26, 41], "complic": 26, "confus": 26, "vector": 26, "math": 26, "mac": 26, "powershel": 26, "window": 26, "notic": 26, "exactli": 26, "suggest": 26, "lifecycl": [26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 47, 168, 172, 173, 178, 183, 187, 188, 193], "describ": [26, 45], "sub": 26, "tree": 26, "good": [26, 146, 157], "luck": 26, "forget": 26, "swim": 26, "gain": 26, "wealth": 26, "expertis": 26, "level": [26, 63, 67, 105, 116], "proven": 26, "record": 26, "home": 26, "pre": [26, 153, 164], "deploy": 26, "render": 26, "replit": 26, "profil": 26, "improv": 26, "before_market_open": [26, 27, 173, 188], "before_starting_trad": [26, 27, 30], "before_market_clos": [26, 27], "after_market_clos": [26, 27], "on_abrupt_clos": [26, 27, 34], "on_bot_crash": [26, 27], "trace_stat": [26, 27, 178, 193], "on_new_ord": [26, 27], "on_partially_filled_ord": [26, 27], "on_filled_ord": [26, 27], "on_canceled_ord": [26, 27], "on_parameters_upd": [26, 27], "backup": 26, "restor": 26, "benefit": 26, "var": 26, "storag": 26, "cancel_open_ord": [26, 30, 47, 151, 162], "sell_al": [26, 29, 33, 34, 47], "get_asset_potential_tot": [26, 47], "get_portfolio_valu": [26, 47], "get_cash": [26, 47], "get_historical_prices_for_asset": [26, 30, 47], "get_yesterday_dividend": [26, 44, 47], "get_next_trading_dai": [26, 47], "get_markers_df": [26, 47], "get_lines_df": [26, 47], "get_paramet": [26, 47, 165], "set_paramet": [26, 47, 165], "get_chain": [26, 44, 47, 127, 129, 131, 135, 137, 140], "get_greek": [26, 47], "get_strik": [26, 44, 47], "get_expir": [26, 47], "get_multipli": [26, 47], "options_expiry_to_datetime_d": [26, 47], "get_round_minut": [26, 44, 47], "get_last_minut": [26, 44, 47], "get_round_dai": [26, 44, 47], "get_last_dai": [26, 44, 47], "get_datetime_rang": [26, 43, 44, 47], "localize_datetim": [26, 44, 47], "to_default_timezon": [26, 44, 47], "miscellan": [26, 47], "update_paramet": [26, 38, 47], "await_market_to_clos": [26, 47], "await_market_to_open": [26, 47], "wait_for_order_registr": [26, 47], "wait_for_order_execut": [26, 47], "wait_for_orders_registr": [26, 47], "wait_for_orders_execut": [26, 47], "initial_budget": 26, "last_on_trading_iteration_datetim": 26, "pytz": 26, "unspent_monei": 26, "leg": 26, "abstract": [27, 41, 43, 44, 45], "pattern": [27, 41], "greatli": [27, 41], "react": [27, 41], "j": [27, 41], "compon": [27, 41, 196], "overload": [27, 34, 41, 43], "logic": [27, 29, 30, 40, 41, 43, 45], "dump": [28, 42], "report": 28, "busi": [29, 30], "execud": [29, 30], "unlik": 30, "launch": 30, "tlt": [30, 52, 58, 73, 75, 80, 111, 112, 122, 123, 146, 147, 153, 157, 158, 164], "bars_list": 30, "asset_bar": 30, "reiniti": 31, "reset": 31, "blacklist": 31, "my_custom_paramet": 32, "5m": [32, 178, 193], "d": [32, 178, 193], "constructor": 32, "later": 32, "strategy_1": 32, "my_other_paramet": 32, "strategy_2": 32, "my_last_paramet": 32, "asset_symbol": 32, "mnq": 32, "calendar": [32, 76, 130, 138], "marketcalendar": [32, 106, 117], "asx": [32, 106, 117], "bmf": [32, 106, 117], "cfe": [32, 106, 117], "bat": [32, 106, 117], "cme_equ": [32, 106, 117], "cbot_equ": [32, 106, 117], "cme_agricultur": [32, 106, 117], "cbot_agricultur": [32, 106, 117], "comex_agricultur": [32, 106, 117], "nymex_agricultur": [32, 106, 117], "cme_rat": [32, 106, 117], "cbot_rat": [32, 106, 117], "cme_interestr": [32, 106, 117], "cbot_interestr": [32, 106, 117], "cme_bond": [32, 106, 117], "cbot_bond": [32, 106, 117], "eurex": [32, 106, 117], "hkex": [32, 106, 117], "ic": [32, 106, 117], "iceu": [32, 106, 117], "nyfe": [32, 106, 117], "jpx": [32, 106, 117], "lse": [32, 106, 117], "os": [32, 106, 117], "six": [32, 106, 117], "sse": [32, 106, 117], "tsx": [32, 106, 117], "tsxv": [32, 106, 117], "bse": [32, 106, 117], "tase": [32, 106, 117], "tradingcalendar": [32, 106, 117], "asex": [32, 106, 117], "bvmf": [32, 106, 117], "cme": [32, 74, 106, 117], "iepa": [32, 106, 117], "xam": [32, 106, 117], "xasx": [32, 106, 117], "xbkk": [32, 106, 117], "xbog": [32, 106, 117], "xbom": [32, 106, 117], "xbru": [32, 106, 117], "xbud": [32, 106, 117], "xbue": [32, 106, 117], "xcbf": [32, 106, 117], "xcse": [32, 106, 117], "xdub": [32, 106, 117], "xfra": [32, 106, 117], "xetr": [32, 106, 117], "xhel": [32, 106, 117], "xhkg": [32, 106, 117], "xice": [32, 106, 117], "xidx": [32, 106, 117], "xist": [32, 106, 117], "xjse": [32, 106, 117], "xkar": [32, 106, 117], "xkl": [32, 106, 117], "xkrx": [32, 106, 117], "xlim": [32, 106, 117], "xli": [32, 106, 117], "xlon": [32, 106, 117], "xmad": [32, 106, 117], "xmex": [32, 106, 117], "xmil": [32, 106, 117], "xmo": [32, 106, 117], "xny": [32, 106, 117], "xnze": [32, 106, 117], "xosl": [32, 106, 117], "xpar": [32, 106, 117], "xph": [32, 106, 117], "xpra": [32, 106, 117], "xse": [32, 106, 117], "xsgo": [32, 106, 117], "xshg": [32, 106, 117], "xsto": [32, 106, 117], "xswx": [32, 106, 117], "xtae": [32, 106, 117], "xtai": [32, 106, 117], "xtk": [32, 106, 117], "xtse": [32, 106, 117], "xwar": [32, 106, 117], "xwbo": [32, 106, 117], "us_futur": [32, 106, 117], "max_bar": 32, "10m": [32, 178, 193], "20h": 32, "48": 32, "2d": [32, 178, 193], "gracefulli": 33, "shut": 33, "keybord": 33, "interupt": [33, 40], "abrupt": 33, "crash": [34, 40, 196], "rais": 34, "successfulli": [35, 36, 37], "300": [36, 178, 193], "sold": [36, 51, 57, 146, 157], "elif": 36, "bought": [36, 146, 157], "r": 37, "miss": 39, "again": [40, 103, 114], "pull": [40, 72], "hello": 40, "task": 41, "core": 41, "perspect": 41, "care": 41, "he": 41, "illustr": 41, "context": 42, "scope": 42, "random": 42, "google_symbol": 42, "snapshot_befor": 42, "random_numb": 42, "randint": 42, "my_custom_stat": 42, "trace": 42, "my_stat": 42, "my_other_stat": 42, "backtesting_brok": 43, "is_backtesting_brok": 43, "calculate_trade_cost": 43, "cash_settle_options_contract": 43, "settl": 43, "todo": [43, 74], "docstr": 43, "get_last_bar": 43, "els": 43, "limit_ord": [43, 146, 157], "open_": 43, "process_expired_option_contract": 43, "expri": 43, "process_pending_ord": 43, "evalu": 43, "mostli": 43, "should_continu": 43, "product": 43, "stop_ord": 43, "data_source_backtest": 43, "datasourcebacktest": [43, 44], "abc": [43, 44], "doe": [43, 44, 77, 146, 157], "pandasdata": [43, 44], "is_backtesting_data_sourc": [43, 44], "adjust_for_delai": [43, 44, 83, 92], "Not": [43, 106, 117], "delai": 44, "default_pytz": 44, "dsttzinfo": 44, "lmt": 44, "19": 44, "std": 44, "default_timezon": 44, "calculate_greek": 44, "asset_pric": [44, 128, 136], "underlying_pric": [44, 128, 136], "greek": [44, 124, 128, 136], "static": 44, "convert_timestep_str_to_timedelta": 44, "timedelta": [44, 72, 73, 102, 103, 113, 114], "1minut": 44, "1hour": 44, "1dai": 44, "include_after_hour": [44, 72, 73], "info": [44, 105, 116, 125, 126, 133, 134], "guarente": [44, 125, 126, 133, 134], "exp_dat": [44, 125, 126, 133, 134], "strike1": [44, 125, 126, 133, 134], "strike2": [44, 125, 126, 133, 134], "07": [44, 125, 126, 133, 134], "ago": [44, 72], "known": [44, 74, 75], "round": [44, 87, 88, 96, 97], "param": 44, "get_timestep": 44, "query_greek": [44, 128, 136], "queri": [44, 128, 136], "clean_trading_tim": 44, "dt_index": 44, "pcal": 44, "find_asset_in_data_stor": 44, "get_asset_by_nam": 44, "get_asset_by_symbol": 44, "get_asset": 44, "whose": [44, 126, 134], "smart": [44, 125, 127, 129, 133, 135, 137, 146, 157], "strke": [44, 125, 133], "stike": [44, 125, 133], "get_start_datetime_and_ts_unit": 44, "start_dt": 44, "start_buff": 44, "get_trading_days_panda": 44, "load_data": 44, "update_date_index": 44, "yahoo_data": 44, "yahoodata": 44, "15m": 44, "becuas": 44, "chain_data": 44, "option_chain": 44, "categori": [45, 101], "flow": 45, "is_backtest_brok": 46, "async_": 46, "async": 46, "asynchron": 46, "displi": 46, "displai": [46, 62, 63, 66, 67], "run_all_async": 46, "stop_al": 46, "insid": [47, 166, 172, 187], "thing": 47, "divid": 47, "sens": 47, "preced": 47, "seek": [52, 58, 144, 155], "sought": [52, 58, 147, 158], "assset": [52, 58], "empti": [53, 59], "overwrit": [54, 60], "style": [62, 66], "solid": [62, 66], "width": [62, 66, 72, 73], "detail_text": [62, 63, 66, 67], "overbought": [62, 63, 66, 67], "oversold": [62, 63, 66, 67], "red": [62, 63, 66, 67, 105, 116], "blue": [62, 63, 66, 67], "yellow": [62, 63, 66, 67], "orang": [62, 63, 66, 67], "purpl": [62, 63, 66, 67], "pink": [62, 63, 66, 67], "brown": [62, 63, 66, 67], "black": [62, 63, 66, 67], "white": [62, 63, 66, 67], "grai": [62, 66], "lightgrai": [62, 66], "darkgrai": [62, 66], "lightblu": [62, 66], "darkblu": [62, 66], "lightgreen": [62, 66], "darkgreen": [62, 66], "lightr": [62, 66], "darkr": [62, 66], "hex": [62, 66], "dot": [62, 63, 66, 67], "text": [62, 63, 66, 67], "hover": [62, 63, 66, 67], "add_chart_lin": [62, 66], "80": [62, 66], "circl": [63, 67], "size": [63, 67, 81], "mark": [63, 67], "cross": [63, 67], "resist": [63, 67], "squar": [63, 67], "diamond": [63, 67], "x": [63, 67], "triangl": [63, 67], "ne": [63, 67], "se": [63, 67], "sw": [63, 67], "nw": [63, 67], "pentagon": [63, 67], "hexagon": [63, 67], "hexagon2": [63, 67], "octagon": [63, 67], "star": [63, 67], "hexagram": [63, 67], "tall": [63, 67], "hourglass": [63, 67], "bowti": [63, 67], "thin": [63, 67], "asterisk": [63, 67], "hash": [63, 67], "y": [63, 67], "ew": [63, 67], "n": [63, 67], "arrow": [63, 67], "add_chart_mark": [63, 67], "get_symbol_bar": 70, "create_asset": [71, 72, 79], "backward": [72, 73], "week": [72, 73], "1month": [72, 73], "present": [72, 73, 128, 136], "integ": [72, 73, 178, 193], "extract": 72, "24h": 72, "last_ohlc": 72, "asset_bas": [72, 73, 152, 163], "asset_quot": [72, 73, 152, 153, 163, 164], "regular": 73, "eurusd": 73, "should_use_last_clos": 74, "depric": 74, "comment": 74, "2022": [74, 127, 135], "yyyi": [76, 130, 138], "mm": [76, 130, 138], "dd": [76, 130, 138], "next_trading_dai": [76, 130, 138], "backtets": 77, "bid": 77, "vwap": [78, 81], "intial": 78, "keep_bar": 81, "arriv": 81, "extend": 81, "kept": 81, "datatim": 82, "regardless": 82, "accord": [82, 83, 89, 92, 98], "1990": 82, "tell": 82, "jan": 82, "1991": 82, "rather": 82, "last_dai": [85, 94], "last_minut": [86, 95], "nearest": [87, 88, 96, 97], "round_dai": [87, 96], "round_minut": [88, 97], "paus": [102, 103, 107, 113, 114, 118, 178, 193], "overrid": [102, 103, 113, 114], "infinit": [103, 114], "await": [103, 114, 143, 154], "broadcast": [105, 116], "goe": [105, 116], "origin": [105, 116], "program": [107, 118, 165, 178, 193], "order1": [111, 112, 122, 123, 145, 153, 156, 164], "order2": [111, 112, 122, 123, 145, 153, 156, 164], "meant": 124, "cboe": [125, 127, 129, 133, 135, 137], "sort": [127, 129, 131, 135, 137, 140], "expiry_d": [127, 132, 135, 141], "could": [128, 136], "theoret": [128, 136], "implied_volatil": [128, 136], "impli": [128, 136], "option_pric": [128, 136], "pv_dividend": [128, 136], "gamma": [128, 136], "vega": [128, 136], "theta": [128, 136], "opt_asset": [128, 136], "option_typ": [128, 136], "20221013": [129, 137], "20200101": [132, 141], "next_option_expir": 139, "get_next_option_expir": 139, "gtc": [146, 153, 157, 164], "still": [146, 157], "restric": [146, 157], "compound": [146, 157], "suffici": [146, 157], "213": [146, 157], "obect": [146, 157], "favor": [146, 157], "guarante": [146, 157], "penetr": [146, 157], "forc": [146, 157], "remaind": [146, 157], "gtd": [146, 157], "though": [146, 157], "dollar": [146, 157, 175, 190], "percent": [146, 157], "stop_loss": [146, 152, 157, 163], "stop_loss_limit": [146, 157], "2019": [146, 157], "chf": [146, 157], "aset": [146, 152, 153, 157, 163, 164], "41000": [146, 157], "expiration_d": [147, 152, 158, 163], "order_id": [148, 159], "get_tracked_ord": [149, 160], "system": [151, 162], "leav": [151, 162], "strike_pric": [152, 163], "trailing_stop_pric": [152, 163], "41250": [152, 163], "41325": [152, 163], "41300": [152, 163], "is_multileg": [153, 164], "debit": [153, 164], "post": [153, 164], "asset_btc": [153, 164], "asset_eth": [153, 164], "my_paramet": 165, "main_tick": 165, "ema_threshold": 165, "whenev": [167, 182], "therefor": [167, 182], "zero": [167, 182], "excut": [168, 183], "happen": [171, 186], "equal": [172, 173, 178, 187, 188, 193], "resov": [175, 190], "held": [175, 190], "speed": [178, 193], "m": [178, 193], "h": [178, 193], "2h": [178, 193], "remov": [180, 195], "store": 196, "runtim": 196, "persist": 196, "resum": 196, "namespac": 196, "prevent": 196, "effici": 196, "assign": 196, "notat": 196, "trade_count": 196, "current_count": 196, "all_vari": 196, "output": 196, "102": 196, "postgresql": 196, "5432": 196, "database_nam": 196, "tabl": 196, "backup_table_nam": 196, "vars_backup": 196, "last_upd": 196, "json": 196, "550e8400": 196, "var1": 196, "var2": 196, "optionscondormartingal": 196}, "objects": {"entities": [[19, 0, 0, "-", "asset"], [20, 0, 0, "-", "bars"], [21, 0, 0, "-", "data"], [22, 0, 0, "-", "order"], [23, 0, 0, "-", "position"], [24, 0, 0, "-", "trading_fee"]], "entities.asset": [[19, 1, 1, "", "Asset"], [19, 1, 1, "", "AssetsMapping"]], "entities.asset.Asset": [[19, 1, 1, "", "AssetType"], [19, 1, 1, "", "OptionRight"], [19, 2, 1, "", "_asset_types"], [19, 2, 1, "", "_right"], [19, 2, 1, "id0", "asset_type"], [19, 3, 1, "id1", "asset_type_must_be_one_of"], [19, 2, 1, "id2", "expiration"], [19, 3, 1, "", "from_dict"], [19, 3, 1, "", "is_valid"], [19, 2, 1, "id3", "multiplier"], [19, 2, 1, "id4", "precision"], [19, 2, 1, "id5", "right"], [19, 3, 1, "id6", "right_must_be_one_of"], [19, 2, 1, "id7", "strike"], [19, 2, 1, "id8", "symbol"], [19, 3, 1, "", "symbol2asset"], [19, 3, 1, "", "to_dict"], [19, 2, 1, "", "underlying_asset"]], "entities.asset.Asset.AssetType": [[19, 2, 1, "", "CRYPTO"], [19, 2, 1, "", "FOREX"], [19, 2, 1, "", "FUTURE"], [19, 2, 1, "", "INDEX"], [19, 2, 1, "", "MULTILEG"], [19, 2, 1, "", "OPTION"], [19, 2, 1, "", "STOCK"]], "entities.asset.Asset.OptionRight": [[19, 2, 1, "", "CALL"], [19, 2, 1, "", "PUT"]], "entities.bars": [[20, 1, 1, "", "Bars"], [20, 4, 1, "", "NoBarDataFound"]], "entities.bars.Bars": [[20, 3, 1, "id0", "aggregate_bars"], [20, 3, 1, "", "filter"], [20, 3, 1, "id1", "get_last_dividend"], [20, 3, 1, "id2", "get_last_price"], [20, 3, 1, "id3", "get_momentum"], [20, 3, 1, "", "get_total_dividends"], [20, 3, 1, "", "get_total_return"], [20, 3, 1, "", "get_total_return_pct"], [20, 3, 1, "", "get_total_return_pct_change"], [20, 3, 1, "", "get_total_stock_splits"], [20, 3, 1, "id4", "get_total_volume"], [20, 3, 1, "", "parse_bar_list"], [20, 3, 1, "", "split"]], "entities.data": [[21, 1, 1, "", "Data"]], "entities.data.Data": [[21, 2, 1, "", "MIN_TIMESTEP"], [21, 2, 1, "", "TIMESTEP_MAPPING"], [21, 3, 1, "", "_get_bars_dict"], [21, 2, 1, "", "asset"], [21, 3, 1, "id0", "check_data"], [21, 3, 1, "id1", "columns"], [21, 2, 1, "", "datalines"], [21, 2, 1, "", "date_end"], [21, 2, 1, "", "date_start"], [21, 2, 1, "", "df"], [21, 3, 1, "id2", "get_bars"], [21, 3, 1, "", "get_bars_between_dates"], [21, 3, 1, "id3", "get_iter_count"], [21, 3, 1, "id4", "get_last_price"], [21, 3, 1, "", "get_quote"], [21, 2, 1, "", "iter_index"], [21, 3, 1, "id5", "repair_times_and_fill"], [21, 3, 1, "id6", "set_date_format"], [21, 3, 1, "id7", "set_dates"], [21, 3, 1, "id8", "set_times"], [21, 2, 1, "", "sybmol"], [21, 2, 1, "", "timestep"], [21, 3, 1, "id9", "to_datalines"], [21, 2, 1, "", "trading_hours_end"], [21, 2, 1, "", "trading_hours_start"], [21, 3, 1, "id10", "trim_data"]], "entities.order": [[22, 1, 1, "", "Order"]], "entities.order.Order": [[22, 1, 1, "", "OrderClass"], [22, 1, 1, "", "OrderSide"], [22, 1, 1, "", "OrderStatus"], [22, 1, 1, "", "OrderType"], [22, 1, 1, "", "Transaction"], [22, 3, 1, "", "add_child_order"], [22, 3, 1, "", "add_transaction"], [22, 5, 1, "", "avg_fill_price"], [22, 3, 1, "", "cash_pending"], [22, 3, 1, "", "equivalent_status"], [22, 3, 1, "", "from_dict"], [22, 3, 1, "", "get_fill_price"], [22, 3, 1, "", "get_increment"], [22, 3, 1, "", "is_active"], [22, 3, 1, "", "is_buy_order"], [22, 3, 1, "", "is_canceled"], [22, 3, 1, "", "is_equivalent_status"], [22, 3, 1, "", "is_filled"], [22, 3, 1, "", "is_option"], [22, 3, 1, "", "is_parent"], [22, 3, 1, "", "is_sell_order"], [22, 5, 1, "", "quantity"], [22, 3, 1, "", "set_canceled"], [22, 3, 1, "", "set_error"], [22, 3, 1, "", "set_filled"], [22, 3, 1, "", "set_identifier"], [22, 3, 1, "", "set_new"], [22, 3, 1, "", "set_partially_filled"], [22, 5, 1, "", "status"], [22, 3, 1, "", "to_dict"], [22, 3, 1, "", "to_position"], [22, 3, 1, "", "update_raw"], [22, 3, 1, "", "update_trail_stop_price"], [22, 3, 1, "", "wait_to_be_closed"], [22, 3, 1, "", "wait_to_be_registered"], [22, 3, 1, "", "was_transmitted"]], "entities.order.Order.OrderClass": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "MULTILEG"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"]], "entities.order.Order.OrderSide": [[22, 2, 1, "", "BUY"], [22, 2, 1, "", "BUY_TO_CLOSE"], [22, 2, 1, "", "BUY_TO_COVER"], [22, 2, 1, "", "BUY_TO_OPEN"], [22, 2, 1, "", "SELL"], [22, 2, 1, "", "SELL_SHORT"], [22, 2, 1, "", "SELL_TO_CLOSE"], [22, 2, 1, "", "SELL_TO_OPEN"]], "entities.order.Order.OrderStatus": [[22, 2, 1, "", "CANCELED"], [22, 2, 1, "", "CANCELLING"], [22, 2, 1, "", "CASH_SETTLED"], [22, 2, 1, "", "ERROR"], [22, 2, 1, "", "EXPIRED"], [22, 2, 1, "", "FILLED"], [22, 2, 1, "", "NEW"], [22, 2, 1, "", "OPEN"], [22, 2, 1, "", "PARTIALLY_FILLED"], [22, 2, 1, "", "SUBMITTED"], [22, 2, 1, "", "UNPROCESSED"]], "entities.order.Order.OrderType": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "LIMIT"], [22, 2, 1, "", "MARKET"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"], [22, 2, 1, "", "STOP"], [22, 2, 1, "", "STOP_LIMIT"], [22, 2, 1, "", "TRAIL"]], "entities.order.Order.Transaction": [[22, 2, 1, "", "price"], [22, 2, 1, "", "quantity"]], "entities.position": [[23, 1, 1, "", "Position"]], "entities.position.Position": [[23, 3, 1, "", "add_order"], [23, 2, 1, "", "asset"], [23, 5, 1, "id0", "available"], [23, 2, 1, "", "avg_fill_price"], [23, 3, 1, "", "from_dict"], [23, 3, 1, "", "get_selling_order"], [23, 5, 1, "id1", "hold"], [23, 2, 1, "", "orders"], [23, 5, 1, "id2", "quantity"], [23, 2, 1, "", "strategy"], [23, 2, 1, "", "symbol"], [23, 3, 1, "", "to_dict"], [23, 3, 1, "", "value_type"]], "entities.trading_fee": [[24, 1, 1, "", "TradingFee"]], "lumibot.backtesting": [[43, 0, 0, "-", "backtesting_broker"]], "lumibot.backtesting.backtesting_broker": [[43, 1, 1, "", "BacktestingBroker"]], "lumibot.backtesting.backtesting_broker.BacktestingBroker": [[43, 2, 1, "", "IS_BACKTESTING_BROKER"], [43, 3, 1, "", "calculate_trade_cost"], [43, 3, 1, "", "cancel_order"], [43, 3, 1, "", "cash_settle_options_contract"], [43, 5, 1, "", "datetime"], [43, 3, 1, "", "get_historical_account_value"], [43, 3, 1, "", "get_last_bar"], [43, 3, 1, "", "get_time_to_close"], [43, 3, 1, "", "get_time_to_open"], [43, 3, 1, "", "is_market_open"], [43, 3, 1, "", "limit_order"], [43, 3, 1, "", "process_expired_option_contracts"], [43, 3, 1, "", "process_pending_orders"], [43, 3, 1, "", "should_continue"], [43, 3, 1, "", "stop_order"], [43, 3, 1, "", "submit_order"], [43, 3, 1, "", "submit_orders"]], "lumibot.brokers": [[12, 0, 0, "-", "alpaca"]], "lumibot.brokers.alpaca": [[12, 1, 1, "", "Alpaca"], [12, 1, 1, "", "OrderData"]], "lumibot.brokers.alpaca.Alpaca": [[12, 2, 1, "", "ASSET_TYPE_MAP"], [12, 2, 1, "", "api"], [12, 3, 1, "", "cancel_order"], [12, 3, 1, "", "get_historical_account_value"], [12, 3, 1, "id0", "get_time_to_close"], [12, 3, 1, "id1", "get_time_to_open"], [12, 3, 1, "id2", "get_timestamp"], [12, 3, 1, "id3", "is_market_open"], [12, 3, 1, "", "map_asset_type"]], "lumibot.brokers.alpaca.OrderData": [[12, 3, 1, "", "to_request_fields"]], "lumibot": [[44, 0, 0, "-", "data_sources"]], "lumibot.data_sources": [[44, 0, 0, "-", "data_source"], [43, 0, 0, "-", "data_source_backtesting"], [44, 0, 0, "-", "pandas_data"], [44, 0, 0, "-", "yahoo_data"]], "lumibot.data_sources.data_source": [[44, 1, 1, "", "DataSource"]], "lumibot.data_sources.data_source.DataSource": [[44, 2, 1, "", "DEFAULT_PYTZ"], [44, 2, 1, "", "DEFAULT_TIMEZONE"], [44, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "calculate_greeks"], [44, 3, 1, "", "convert_timestep_str_to_timedelta"], [44, 3, 1, "", "get_bars"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_datetime"], [44, 3, 1, "", "get_datetime_range"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_day"], [44, 3, 1, "", "get_last_minute"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_round_day"], [44, 3, 1, "", "get_round_minute"], [44, 3, 1, "", "get_strikes"], [44, 3, 1, "", "get_timestamp"], [44, 3, 1, "", "get_timestep"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "localize_datetime"], [44, 3, 1, "", "query_greeks"], [44, 3, 1, "", "to_default_timezone"]], "lumibot.data_sources.data_source_backtesting": [[43, 1, 1, "", "DataSourceBacktesting"]], "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting": [[43, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [43, 3, 1, "", "get_datetime"], [43, 3, 1, "", "get_datetime_range"]], "lumibot.data_sources.pandas_data": [[44, 1, 1, "", "PandasData"]], "lumibot.data_sources.pandas_data.PandasData": [[44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "clean_trading_times"], [44, 3, 1, "", "find_asset_in_data_store"], [44, 3, 1, "", "get_asset_by_name"], [44, 3, 1, "", "get_asset_by_symbol"], [44, 3, 1, "", "get_assets"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_start_datetime_and_ts_unit"], [44, 3, 1, "", "get_trading_days_pandas"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "load_data"], [44, 3, 1, "", "update_date_index"]], "lumibot.data_sources.yahoo_data": [[44, 1, 1, "", "YahooData"]], "lumibot.data_sources.yahoo_data.YahooData": [[44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_strikes"]], "lumibot.strategies.strategy": [[45, 0, 0, "-", "Strategy"]], "lumibot.strategies.strategy.Strategy": [[66, 6, 1, "", "add_line"], [67, 6, 1, "", "add_marker"], [28, 6, 1, "", "after_market_closes"], [113, 6, 1, "", "await_market_to_close"], [114, 6, 1, "", "await_market_to_open"], [29, 6, 1, "", "before_market_closes"], [30, 6, 1, "", "before_market_opens"], [31, 6, 1, "", "before_starting_trading"], [154, 6, 1, "", "cancel_open_orders"], [155, 6, 1, "", "cancel_order"], [156, 6, 1, "", "cancel_orders"], [71, 6, 1, "", "cancel_realtime_bars"], [182, 5, 1, "", "cash"], [157, 6, 1, "", "create_order"], [183, 5, 1, "", "first_iteration"], [158, 6, 1, "", "get_asset_potential_total"], [55, 6, 1, "", "get_cash"], [133, 6, 1, "", "get_chain"], [134, 6, 1, "", "get_chains"], [92, 6, 1, "", "get_datetime"], [93, 6, 1, "", "get_datetime_range"], [135, 6, 1, "", "get_expiration"], [136, 6, 1, "", "get_greeks"], [72, 6, 1, "", "get_historical_prices"], [73, 6, 1, "", "get_historical_prices_for_assets"], [94, 6, 1, "", "get_last_day"], [95, 6, 1, "", "get_last_minute"], [74, 6, 1, "", "get_last_price"], [75, 6, 1, "", "get_last_prices"], [68, 6, 1, "", "get_lines_df"], [69, 6, 1, "", "get_markers_df"], [137, 6, 1, "", "get_multiplier"], [138, 6, 1, "", "get_next_trading_day"], [139, 6, 1, "", "get_option_expiration_after_date"], [159, 6, 1, "", "get_order"], [160, 6, 1, "", "get_orders"], [115, 6, 1, "", "get_parameters"], [57, 6, 1, "", "get_portfolio_value"], [58, 6, 1, "", "get_position"], [59, 6, 1, "", "get_positions"], [77, 6, 1, "", "get_quote"], [78, 6, 1, "", "get_realtime_bars"], [96, 6, 1, "", "get_round_day"], [97, 6, 1, "", "get_round_minute"], [161, 6, 1, "", "get_selling_order"], [140, 6, 1, "", "get_strikes"], [98, 6, 1, "", "get_timestamp"], [79, 6, 1, "", "get_yesterday_dividend"], [80, 6, 1, "", "get_yesterday_dividends"], [184, 5, 1, "", "initial_budget"], [32, 6, 1, "", "initialize"], [185, 5, 1, "", "is_backtesting"], [186, 5, 1, "", "last_on_trading_iteration_datetime"], [99, 6, 1, "", "localize_datetime"], [116, 6, 1, "", "log_message"], [187, 5, 1, "", "minutes_before_closing"], [188, 5, 1, "", "minutes_before_opening"], [189, 5, 1, "", "name"], [33, 6, 1, "", "on_abrupt_closing"], [34, 6, 1, "", "on_bot_crash"], [35, 6, 1, "", "on_canceled_order"], [36, 6, 1, "", "on_filled_order"], [37, 6, 1, "", "on_new_order"], [38, 6, 1, "", "on_parameters_updated"], [39, 6, 1, "", "on_partially_filled_order"], [40, 6, 1, "", "on_trading_iteration"], [141, 6, 1, "", "options_expiry_to_datetime_date"], [190, 5, 1, "", "portfolio_value"], [191, 5, 1, "", "pytz"], [192, 5, 1, "", "quote_asset"], [1, 6, 1, "", "run_backtest"], [162, 6, 1, "", "sell_all"], [117, 6, 1, "", "set_market"], [60, 6, 1, "", "set_parameters"], [118, 6, 1, "", "sleep"], [193, 5, 1, "", "sleeptime"], [81, 6, 1, "", "start_realtime_bars"], [163, 6, 1, "", "submit_order"], [164, 6, 1, "", "submit_orders"], [194, 5, 1, "", "timezone"], [100, 6, 1, "", "to_default_timezone"], [42, 6, 1, "", "trace_stats"], [195, 5, 1, "", "unspent_money"], [119, 6, 1, "", "update_parameters"], [120, 6, 1, "", "wait_for_order_execution"], [121, 6, 1, "", "wait_for_order_registration"], [122, 6, 1, "", "wait_for_orders_execution"], [123, 6, 1, "", "wait_for_orders_registration"]], "lumibot.traders": [[46, 0, 0, "-", "trader"]], "lumibot.traders.trader": [[46, 1, 1, "", "Trader"]], "lumibot.traders.trader.Trader": [[46, 3, 1, "", "add_strategy"], [46, 5, 1, "", "is_backtest_broker"], [46, 3, 1, "", "run_all"], [46, 3, 1, "", "run_all_async"], [46, 3, 1, "", "stop_all"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:exception", "5": "py:property", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "exception", "Python exception"], "5": ["py", "property", "Python property"], "6": ["py", "function", "Python function"]}, "titleterms": {"backtest": [0, 1, 2, 6, 8, 25, 26, 43], "file": [0, 2, 3, 9], "gener": [0, 2, 17], "from": [0, 2], "content": [0, 11, 18, 26, 27, 44, 47], "function": [1, 61], "how": [2, 196], "To": 2, "instal": [2, 25, 26], "lumibot": [2, 25, 26], "choos": [2, 17], "data": [2, 5, 14, 21, 43, 44, 70], "sourc": [2, 43, 44], "run": [2, 13, 16, 25], "polygon": [2, 6], "io": [2, 6], "tearsheet": [2, 7], "html": [2, 7], "trade": [2, 9, 14, 24, 25, 26], "indic": [2, 3, 26], "conclus": [2, 17], "log": 4, "csv": [4, 5], "panda": [5, 44], "other": 5, "exampl": [5, 13, 14, 16, 17], "datafram": 5, "In": 5, "summari": [5, 41], "thetadata": 8, "yahoo": [10, 44], "broker": [11, 13, 14, 15, 17, 43], "alpaca": [12, 17, 25], "document": [12, 19, 20, 22, 45], "crypto": 13, "us": [13, 14], "ccxt": 13, "configur": [13, 14, 16, 17, 25, 196], "set": 13, "your": [13, 16, 17, 25, 26], "strategi": [13, 14, 16, 17, 25, 26, 45, 47, 166], "full": [13, 16], "interact": [14, 15, 17], "market": 14, "subscript": 14, "two": 14, "factor": 14, "authent": 14, "2fa": 14, "secondari": 14, "usernam": 14, "paper": [14, 25], "account": [14, 25, 48], "setup": 14, "legaci": [15, 17], "tradier": [16, 17], "get": [16, 25, 26], "start": [16, 25, 26], "deploy": 17, "guid": [17, 196], "platform": 17, "deploi": 17, "render": 17, "replit": 17, "secret": 17, "coinbas": 17, "kraken": 17, "environ": 17, "variabl": [17, 196], "final": 17, "step": [17, 25, 26], "entiti": 18, "asset": 19, "bar": 20, "order": [22, 142], "advanc": 22, "type": 22, "With": [22, 25], "leg": 22, "posit": 23, "fee": [24, 25], "what": 25, "i": 25, "lumiwealth": 25, "1": [25, 26], "packag": 25, "2": [25, 26], "import": 25, "follow": 25, "modul": [25, 44], "3": [25, 26], "creat": [25, 26], "an": 25, "4": 25, "api": 25, "kei": 25, "5": 25, "class": 25, "6": 25, "instanti": 25, "trader": [25, 46], "7": 25, "option": [25, 124], "8": 25, "ad": 25, "profil": 25, "improv": 25, "perform": 25, "algorithm": 26, "librari": 26, "take": 26, "bot": 26, "live": 26, "all": 26, "togeth": 26, "addit": 26, "resourc": 26, "need": 26, "extra": 26, "help": 26, "tabl": 26, "lifecycl": 27, "method": [27, 47], "def": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "after_market_clos": 28, "refer": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "before_market_clos": 29, "before_market_open": 30, "before_starting_trad": 31, "initi": 32, "on_abrupt_clos": 33, "on_bot_crash": 34, "on_canceled_ord": 35, "on_filled_ord": 36, "on_new_ord": 37, "on_parameters_upd": 38, "on_partially_filled_ord": 39, "on_trading_iter": 40, "trace_stat": 42, "manag": [48, 142], "self": [49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "get_cash": [49, 55], "get_paramet": [50, 56, 104, 115], "get_portfolio_valu": [51, 57], "get_posit": [52, 53, 58, 59], "set_paramet": [54, 60], "chart": 61, "add_lin": [62, 66], "add_mark": [63, 67], "get_lines_df": [64, 68], "get_markers_df": [65, 69], "cancel_realtime_bar": 71, "get_historical_pric": 72, "get_historical_prices_for_asset": 73, "get_last_pric": [74, 75], "get_next_trading_dai": [76, 130, 138], "get_quot": 77, "get_realtime_bar": 78, "get_yesterday_dividend": [79, 80], "start_realtime_bar": 81, "datetim": 82, "get_datetim": [83, 92], "get_datetime_rang": [84, 93], "get_last_dai": [85, 94], "get_last_minut": [86, 95], "get_round_dai": [87, 96], "get_round_minut": [88, 97], "get_timestamp": [89, 98], "localize_datetim": [90, 99], "to_default_timezon": [91, 100], "miscellan": 101, "await_market_to_clos": [102, 113], "await_market_to_open": [103, 114], "log_messag": [105, 116], "set_market": [106, 117], "sleep": [107, 118], "update_paramet": [108, 119], "wait_for_order_execut": [109, 120], "wait_for_order_registr": [110, 121], "wait_for_orders_execut": [111, 122], "wait_for_orders_registr": [112, 123], "get_chain": [125, 126, 133, 134], "get_expir": [127, 135], "get_greek": [128, 136], "get_multipli": [129, 137], "get_strik": [131, 140], "options_expiry_to_datetime_d": [132, 141], "get_option_expiration_after_d": 139, "cancel_open_ord": [143, 154], "cancel_ord": [144, 145, 155, 156], "create_ord": [146, 157], "get_asset_potential_tot": [147, 158], "get_ord": [148, 149, 159, 160], "get_selling_ord": [150, 161], "sell_al": [151, 162], "submit_ord": [152, 153, 163, 164], "paramet": 165, "properti": 166, "cash": [167, 182], "first_iter": [168, 183], "initial_budget": [169, 184], "is_backtest": [170, 185], "last_on_trading_iteration_datetim": [171, 186], "minutes_before_clos": [172, 187], "minutes_before_open": [173, 188], "name": [174, 189], "portfolio_valu": [175, 190], "pytz": [176, 181, 191], "quote_asset": [177, 192], "sleeptim": [178, 193], "timezon": [179, 194], "unspent_monei": [180, 195], "backup": 196, "restor": 196, "It": 196, "work": 196, "benefit": 196, "var": 196, "usag": 196, "databas": 196, "storag": 196, "structur": 196}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"Backtesting": [[0, "backtesting"], [43, "backtesting"]], "Files Generated from Backtesting": [[0, "files-generated-from-backtesting"], [2, "files-generated-from-backtesting"]], "Contents:": [[0, null], [11, null], [18, null], [27, null], [47, null]], "Backtesting Function": [[1, "backtesting-function"]], "How To Backtest": [[2, "how-to-backtest"]], "Installing LumiBot": [[2, "installing-lumibot"]], "Choosing a Data Source": [[2, "choosing-a-data-source"]], "Running a Backtest with Polygon.io": [[2, "running-a-backtest-with-polygon-io"]], "Tearsheet HTML": [[2, "tearsheet-html"], [7, "tearsheet-html"]], "Trades Files": [[2, "trades-files"], [9, "trades-files"]], "Indicators Files": [[2, "indicators-files"], [3, "indicators-files"]], "Conclusion": [[2, "conclusion"], [17, "conclusion"]], "Logs CSV": [[4, "logs-csv"]], "Pandas (CSV or other data)": [[5, "pandas-csv-or-other-data"]], "Example Dataframe": [[5, "id1"]], "In Summary": [[5, "in-summary"]], "Polygon.io Backtesting": [[6, "polygon-io-backtesting"]], "ThetaData Backtesting": [[8, "thetadata-backtesting"]], "Yahoo": [[10, "yahoo"], [44, "module-lumibot.data_sources.yahoo_data"]], "Brokers": [[11, "brokers"]], "Alpaca": [[12, "alpaca"]], "Documentation": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [22, "module-entities.order"], [45, "module-lumibot.strategies.strategy.Strategy"]], "Crypto Brokers (Using CCXT)": [[13, "crypto-brokers-using-ccxt"]], "Configuration Settings": [[13, "configuration-settings"]], "Running Your Strategy": [[13, "running-your-strategy"], [16, "running-your-strategy"]], "Full Example Strategy": [[13, "full-example-strategy"], [16, "full-example-strategy"]], "Interactive Brokers": [[14, "interactive-brokers"]], "Market Data Subscriptions": [[14, "market-data-subscriptions"]], "Two-Factor Authentication (2FA)": [[14, "two-factor-authentication-2fa"]], "Using a Secondary Username": [[14, "using-a-secondary-username"]], "Using a Paper Trading Account": [[14, "using-a-paper-trading-account"]], "Strategy Setup": [[14, "strategy-setup"]], "Interactive Brokers Configuration": [[14, "id1"], [17, "interactive-brokers-configuration"], [17, "id25"]], "Example Strategy": [[14, "example-strategy"]], "Interactive Brokers Legacy": [[15, "interactive-brokers-legacy"]], "Tradier": [[16, "tradier"]], "Getting Started": [[16, "getting-started"], [26, "getting-started"]], "Configuration": [[16, "configuration"]], "Deployment Guide": [[17, "deployment-guide"]], "Example Strategy for Deployment": [[17, "example-strategy-for-deployment"]], "Choosing Your Deployment Platform": [[17, "id1"]], "Deploying to Render": [[17, "id2"]], "Deploying to Replit": [[17, "id3"]], "Secrets Configuration": [[17, "secrets-configuration"]], "Broker Configuration": [[17, "broker-configuration"]], "Tradier Configuration": [[17, "tradier-configuration"], [17, "id21"]], "Alpaca Configuration": [[17, "alpaca-configuration"], [17, "id22"]], "Coinbase Configuration": [[17, "coinbase-configuration"], [17, "id23"]], "Kraken Configuration": [[17, "kraken-configuration"], [17, "id24"]], "Interactive Brokers-Legacy Configuration": [[17, "interactive-brokers-legacy-configuration"], [17, "id26"]], "General Environment Variables": [[17, "general-environment-variables"], [17, "id27"]], "Final Steps": [[17, "final-steps"]], "Entities": [[18, "entities"]], "Asset": [[19, "asset"]], "Bars": [[20, "bars"]], "Data": [[21, "module-entities.data"], [70, "data"]], "Order": [[22, "order"]], "Advanced Order Types": [[22, "advanced-order-types"]], "Order With Legs": [[22, "order-with-legs"]], "Position": [[23, "module-entities.position"]], "Trading Fee": [[24, "module-entities.trading_fee"]], "What is Lumibot?": [[25, "what-is-lumibot"]], "Lumiwealth": [[25, "id1"]], "Getting Started With Lumibot": [[25, "getting-started-with-lumibot"]], "Step 1: Install the Package": [[25, "step-1-install-the-package"]], "Step 2: Import the Following Modules": [[25, "step-2-import-the-following-modules"]], "Step 3: Create an Alpaca Paper Trading Account": [[25, "step-3-create-an-alpaca-paper-trading-account"]], "Step 4: Configure Your API Keys": [[25, "step-4-configure-your-api-keys"]], "Step 5: Create a Strategy Class": [[25, "step-5-create-a-strategy-class"]], "Step 6: Instantiate the Trader, Alpaca, and Strategy Classes": [[25, "step-6-instantiate-the-trader-alpaca-and-strategy-classes"]], "Step 7: Backtest the Strategy (Optional)": [[25, "step-7-backtest-the-strategy-optional"]], "Step 8: Run the Strategy": [[25, "step-8-run-the-strategy"]], "Adding Trading Fees": [[25, "adding-trading-fees"]], "Profiling to Improve Performance": [[25, "profiling-to-improve-performance"]], "Lumibot: Backtesting and Algorithmic Trading Library": [[26, "lumibot-backtesting-and-algorithmic-trading-library"]], "Step 1: Install Lumibot": [[26, "step-1-install-lumibot"]], "Step 2: Create a Strategy for Backtesting": [[26, "step-2-create-a-strategy-for-backtesting"]], "Step 3: Take Your Bot Live": [[26, "step-3-take-your-bot-live"]], "All Together": [[26, "all-together"]], "Additional Resources": [[26, "additional-resources"]], "Need Extra Help?": [[26, "need-extra-help"]], "Table of Contents": [[26, "table-of-contents"]], "Indices and tables": [[26, "indices-and-tables"]], "Lifecycle Methods": [[27, "lifecycle-methods"]], "def after_market_closes": [[28, "def-after-market-closes"]], "Reference": [[28, "reference"], [29, "reference"], [30, "reference"], [31, "reference"], [32, "reference"], [33, "reference"], [34, "reference"], [35, "reference"], [36, "reference"], [37, "reference"], [38, "reference"], [39, "reference"], [40, "reference"], [42, "reference"]], "def before_market_closes": [[29, "def-before-market-closes"]], "def before_market_opens": [[30, "def-before-market-opens"]], "def before_starting_trading": [[31, "def-before-starting-trading"]], "def initialize": [[32, "def-initialize"]], "def on_abrupt_closing": [[33, "def-on-abrupt-closing"]], "def on_bot_crash": [[34, "def-on-bot-crash"]], "def on_canceled_order": [[35, "def-on-canceled-order"]], "def on_filled_order": [[36, "def-on-filled-order"]], "def on_new_order": [[37, "def-on-new-order"]], "def on_parameters_updated": [[38, "def-on-parameters-updated"]], "def on_partially_filled_order": [[39, "def-on-partially-filled-order"]], "def on_trading_iteration": [[40, "def-on-trading-iteration"]], "Summary": [[41, "summary"]], "def trace_stats": [[42, "def-trace-stats"]], "Backtesting Broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "Data Source Backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "Data Sources": [[44, "data-sources"]], "Data Source": [[44, "module-lumibot.data_sources.data_source"]], "Pandas": [[44, "module-lumibot.data_sources.pandas_data"]], "Module contents": [[44, "module-lumibot.data_sources"]], "Strategies": [[45, "strategies"]], "Traders": [[46, "traders"]], "Trader": [[46, "module-lumibot.traders.trader"]], "Strategy Methods": [[47, "strategy-methods"]], "Account Management": [[48, "account-management"]], "self.get_cash": [[49, "self-get-cash"], [55, "self-get-cash"]], "self.get_parameters": [[50, "self-get-parameters"], [56, "self-get-parameters"], [104, "self-get-parameters"], [115, "self-get-parameters"]], "self.get_portfolio_value": [[51, "self-get-portfolio-value"], [57, "self-get-portfolio-value"]], "self.get_position": [[52, "self-get-position"], [58, "self-get-position"]], "self.get_positions": [[53, "self-get-positions"], [59, "self-get-positions"]], "self.set_parameters": [[54, "self-set-parameters"], [60, "self-set-parameters"]], "Chart Functions": [[61, "chart-functions"]], "self.add_line": [[62, "self-add-line"], [66, "self-add-line"]], "self.add_marker": [[63, "self-add-marker"], [67, "self-add-marker"]], "self.get_lines_df": [[64, "self-get-lines-df"], [68, "self-get-lines-df"]], "self.get_markers_df": [[65, "self-get-markers-df"], [69, "self-get-markers-df"]], "self.cancel_realtime_bars": [[71, "self-cancel-realtime-bars"]], "self.get_historical_prices": [[72, "self-get-historical-prices"]], "self.get_historical_prices_for_assets": [[73, "self-get-historical-prices-for-assets"]], "self.get_last_price": [[74, "self-get-last-price"]], "self.get_last_prices": [[75, "self-get-last-prices"]], "self.get_next_trading_day": [[76, "self-get-next-trading-day"], [130, "self-get-next-trading-day"], [138, "self-get-next-trading-day"]], "self.get_quote": [[77, "self-get-quote"]], "self.get_realtime_bars": [[78, "self-get-realtime-bars"]], "self.get_yesterday_dividend": [[79, "self-get-yesterday-dividend"]], "self.get_yesterday_dividends": [[80, "self-get-yesterday-dividends"]], "self.start_realtime_bars": [[81, "self-start-realtime-bars"]], "DateTime": [[82, "datetime"]], "self.get_datetime": [[83, "self-get-datetime"], [92, "self-get-datetime"]], "self.get_datetime_range": [[84, "self-get-datetime-range"], [93, "self-get-datetime-range"]], "self.get_last_day": [[85, "self-get-last-day"], [94, "self-get-last-day"]], "self.get_last_minute": [[86, "self-get-last-minute"], [95, "self-get-last-minute"]], "self.get_round_day": [[87, "self-get-round-day"], [96, "self-get-round-day"]], "self.get_round_minute": [[88, "self-get-round-minute"], [97, "self-get-round-minute"]], "self.get_timestamp": [[89, "self-get-timestamp"], [98, "self-get-timestamp"]], "self.localize_datetime": [[90, "self-localize-datetime"], [99, "self-localize-datetime"]], "self.to_default_timezone": [[91, "self-to-default-timezone"], [100, "self-to-default-timezone"]], "Miscellaneous": [[101, "miscellaneous"]], "self.await_market_to_close": [[102, "self-await-market-to-close"], [113, "self-await-market-to-close"]], "self.await_market_to_open": [[103, "self-await-market-to-open"], [114, "self-await-market-to-open"]], "self.log_message": [[105, "self-log-message"], [116, "self-log-message"]], "self.set_market": [[106, "self-set-market"], [117, "self-set-market"]], "self.sleep": [[107, "self-sleep"], [118, "self-sleep"]], "self.update_parameters": [[108, "self-update-parameters"], [119, "self-update-parameters"]], "self.wait_for_order_execution": [[109, "self-wait-for-order-execution"], [120, "self-wait-for-order-execution"]], "self.wait_for_order_registration": [[110, "self-wait-for-order-registration"], [121, "self-wait-for-order-registration"]], "self.wait_for_orders_execution": [[111, "self-wait-for-orders-execution"], [122, "self-wait-for-orders-execution"]], "self.wait_for_orders_registration": [[112, "self-wait-for-orders-registration"], [123, "self-wait-for-orders-registration"]], "Options": [[124, "options"]], "self.get_chain": [[125, "self-get-chain"], [133, "self-get-chain"]], "self.get_chains": [[126, "self-get-chains"], [134, "self-get-chains"]], "self.get_expiration": [[127, "self-get-expiration"], [135, "self-get-expiration"]], "self.get_greeks": [[128, "self-get-greeks"], [136, "self-get-greeks"]], "self.get_multiplier": [[129, "self-get-multiplier"], [137, "self-get-multiplier"]], "self.get_strikes": [[131, "self-get-strikes"], [140, "self-get-strikes"]], "self.options_expiry_to_datetime_date": [[132, "self-options-expiry-to-datetime-date"], [141, "self-options-expiry-to-datetime-date"]], "self.get_option_expiration_after_date": [[139, "self-get-option-expiration-after-date"]], "Order Management": [[142, "order-management"]], "self.cancel_open_orders": [[143, "self-cancel-open-orders"], [154, "self-cancel-open-orders"]], "self.cancel_order": [[144, "self-cancel-order"], [155, "self-cancel-order"]], "self.cancel_orders": [[145, "self-cancel-orders"], [156, "self-cancel-orders"]], "self.create_order": [[146, "self-create-order"], [157, "self-create-order"]], "self.get_asset_potential_total": [[147, "self-get-asset-potential-total"], [158, "self-get-asset-potential-total"]], "self.get_order": [[148, "self-get-order"], [159, "self-get-order"]], "self.get_orders": [[149, "self-get-orders"], [160, "self-get-orders"]], "self.get_selling_order": [[150, "self-get-selling-order"], [161, "self-get-selling-order"]], "self.sell_all": [[151, "self-sell-all"], [162, "self-sell-all"]], "self.submit_order": [[152, "self-submit-order"], [163, "self-submit-order"]], "self.submit_orders": [[153, "self-submit-orders"], [164, "self-submit-orders"]], "Parameters": [[165, "parameters"]], "Strategy Properties": [[166, "strategy-properties"]], "self.cash": [[167, "self-cash"], [182, "self-cash"]], "self.first_iteration": [[168, "self-first-iteration"], [183, "self-first-iteration"]], "self.initial_budget": [[169, "self-initial-budget"], [184, "self-initial-budget"]], "self.is_backtesting": [[170, "self-is-backtesting"], [185, "self-is-backtesting"]], "self.last_on_trading_iteration_datetime": [[171, "self-last-on-trading-iteration-datetime"], [186, "self-last-on-trading-iteration-datetime"]], "self.minutes_before_closing": [[172, "self-minutes-before-closing"], [187, "self-minutes-before-closing"]], "self.minutes_before_opening": [[173, "self-minutes-before-opening"], [188, "self-minutes-before-opening"]], "self.name": [[174, "self-name"], [189, "self-name"]], "self.portfolio_value": [[175, "self-portfolio-value"], [190, "self-portfolio-value"]], "self.pytz": [[176, "self-pytz"], [181, "self-pytz"], [191, "self-pytz"]], "self.quote_asset": [[177, "self-quote-asset"], [192, "self-quote-asset"]], "self.sleeptime": [[178, "self-sleeptime"], [193, "self-sleeptime"]], "self.timezone": [[179, "self-timezone"], [194, "self-timezone"]], "self.unspent_money": [[180, "self-unspent-money"], [195, "self-unspent-money"]], "Variable Backup & Restore": [[196, "variable-backup-restore"]], "How It Works": [[196, "how-it-works"]], "Benefits of self.vars": [[196, "benefits-of-self-vars"]], "Usage Guide": [[196, "usage-guide"]], "Database Configuration": [[196, "database-configuration"]], "Database Storage Structure": [[196, "database-storage-structure"]]}, "indexentries": {"run_backtest() (in module lumibot.strategies.strategy.strategy)": [[1, "lumibot.strategies.strategy.Strategy.run_backtest"]], "asset_type_map (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.ASSET_TYPE_MAP"]], "alpaca (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.Alpaca"]], "orderdata (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.OrderData"]], "api (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.api"]], "cancel_order() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.cancel_order"]], "get_historical_account_value() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.get_historical_account_value"]], "get_time_to_close() (lumibot.brokers.alpaca.alpaca method)": [[12, "id0"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_close"]], "get_time_to_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id1"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_open"]], "get_timestamp() (lumibot.brokers.alpaca.alpaca method)": [[12, "id2"], [12, "lumibot.brokers.alpaca.Alpaca.get_timestamp"]], "is_market_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id3"], [12, "lumibot.brokers.alpaca.Alpaca.is_market_open"]], "lumibot.brokers.alpaca": [[12, "module-lumibot.brokers.alpaca"]], "map_asset_type() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.map_asset_type"]], "module": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [21, "module-entities.data"], [22, "module-entities.order"], [23, "module-entities.position"], [24, "module-entities.trading_fee"], [43, "module-lumibot.backtesting.backtesting_broker"], [43, "module-lumibot.data_sources.data_source_backtesting"], [44, "module-lumibot.data_sources"], [44, "module-lumibot.data_sources.data_source"], [44, "module-lumibot.data_sources.pandas_data"], [44, "module-lumibot.data_sources.yahoo_data"], [45, "module-lumibot.strategies.strategy.Strategy"], [46, "module-lumibot.traders.trader"]], "to_request_fields() (lumibot.brokers.alpaca.orderdata method)": [[12, "lumibot.brokers.alpaca.OrderData.to_request_fields"]], "asset (class in entities.asset)": [[19, "entities.asset.Asset"]], "asset.assettype (class in entities.asset)": [[19, "entities.asset.Asset.AssetType"]], "asset.optionright (class in entities.asset)": [[19, "entities.asset.Asset.OptionRight"]], "assetsmapping (class in entities.asset)": [[19, "entities.asset.AssetsMapping"]], "call (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.CALL"]], "crypto (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.CRYPTO"]], "forex (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FOREX"]], "future (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FUTURE"]], "index (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.INDEX"]], "multileg (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.MULTILEG"]], "option (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.OPTION"]], "put (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.PUT"]], "stock (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.STOCK"]], "_asset_types (entities.asset.asset attribute)": [[19, "entities.asset.Asset._asset_types"]], "_right (entities.asset.asset attribute)": [[19, "entities.asset.Asset._right"]], "asset_type (entities.asset.asset attribute)": [[19, "entities.asset.Asset.asset_type"], [19, "id0"]], "asset_type_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.asset_type_must_be_one_of"], [19, "id1"]], "entities.asset": [[19, "module-entities.asset"]], "expiration (entities.asset.asset attribute)": [[19, "entities.asset.Asset.expiration"], [19, "id2"]], "from_dict() (entities.asset.asset class method)": [[19, "entities.asset.Asset.from_dict"]], "is_valid() (entities.asset.asset method)": [[19, "entities.asset.Asset.is_valid"]], "multiplier (entities.asset.asset attribute)": [[19, "entities.asset.Asset.multiplier"], [19, "id3"]], "precision (entities.asset.asset attribute)": [[19, "entities.asset.Asset.precision"], [19, "id4"]], "right (entities.asset.asset attribute)": [[19, "entities.asset.Asset.right"], [19, "id5"]], "right_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.right_must_be_one_of"], [19, "id6"]], "strike (entities.asset.asset attribute)": [[19, "entities.asset.Asset.strike"], [19, "id7"]], "symbol (entities.asset.asset attribute)": [[19, "entities.asset.Asset.symbol"], [19, "id8"]], "symbol2asset() (entities.asset.asset class method)": [[19, "entities.asset.Asset.symbol2asset"]], "to_dict() (entities.asset.asset method)": [[19, "entities.asset.Asset.to_dict"]], "underlying_asset (entities.asset.asset attribute)": [[19, "entities.asset.Asset.underlying_asset"]], "bars (class in entities.bars)": [[20, "entities.bars.Bars"]], "nobardatafound": [[20, "entities.bars.NoBarDataFound"]], "aggregate_bars() (entities.bars.bars method)": [[20, "entities.bars.Bars.aggregate_bars"], [20, "id0"]], "entities.bars": [[20, "module-entities.bars"]], "filter() (entities.bars.bars method)": [[20, "entities.bars.Bars.filter"]], "get_last_dividend() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_dividend"], [20, "id1"]], "get_last_price() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_price"], [20, "id2"]], "get_momentum() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_momentum"], [20, "id3"]], "get_total_dividends() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_dividends"]], "get_total_return() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return"]], "get_total_return_pct() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct"]], "get_total_return_pct_change() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct_change"]], "get_total_stock_splits() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_stock_splits"]], "get_total_volume() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_volume"], [20, "id4"]], "parse_bar_list() (entities.bars.bars class method)": [[20, "entities.bars.Bars.parse_bar_list"]], "split() (entities.bars.bars method)": [[20, "entities.bars.Bars.split"]], "data (class in entities.data)": [[21, "entities.data.Data"]], "min_timestep (entities.data.data attribute)": [[21, "entities.data.Data.MIN_TIMESTEP"]], "timestep_mapping (entities.data.data attribute)": [[21, "entities.data.Data.TIMESTEP_MAPPING"]], "_get_bars_dict() (entities.data.data method)": [[21, "entities.data.Data._get_bars_dict"]], "asset (entities.data.data attribute)": [[21, "entities.data.Data.asset"]], "check_data() (entities.data.data method)": [[21, "entities.data.Data.check_data"], [21, "id0"]], "columns() (entities.data.data method)": [[21, "entities.data.Data.columns"], [21, "id1"]], "datalines (entities.data.data attribute)": [[21, "entities.data.Data.datalines"]], "date_end (entities.data.data attribute)": [[21, "entities.data.Data.date_end"]], "date_start (entities.data.data attribute)": [[21, "entities.data.Data.date_start"]], "df (entities.data.data attribute)": [[21, "entities.data.Data.df"]], "entities.data": [[21, "module-entities.data"]], "get_bars() (entities.data.data method)": [[21, "entities.data.Data.get_bars"], [21, "id2"]], "get_bars_between_dates() (entities.data.data method)": [[21, "entities.data.Data.get_bars_between_dates"]], "get_iter_count() (entities.data.data method)": [[21, "entities.data.Data.get_iter_count"], [21, "id3"]], "get_last_price() (entities.data.data method)": [[21, "entities.data.Data.get_last_price"], [21, "id4"]], "get_quote() (entities.data.data method)": [[21, "entities.data.Data.get_quote"]], "iter_index (entities.data.data attribute)": [[21, "entities.data.Data.iter_index"]], "repair_times_and_fill() (entities.data.data method)": [[21, "entities.data.Data.repair_times_and_fill"], [21, "id5"]], "set_date_format() (entities.data.data method)": [[21, "entities.data.Data.set_date_format"], [21, "id6"]], "set_dates() (entities.data.data method)": [[21, "entities.data.Data.set_dates"], [21, "id7"]], "set_times() (entities.data.data method)": [[21, "entities.data.Data.set_times"], [21, "id8"]], "sybmol (entities.data.data attribute)": [[21, "entities.data.Data.sybmol"]], "timestep (entities.data.data attribute)": [[21, "entities.data.Data.timestep"]], "to_datalines() (entities.data.data method)": [[21, "entities.data.Data.to_datalines"], [21, "id9"]], "trading_hours_end (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_end"]], "trading_hours_start (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_start"]], "trim_data() (entities.data.data method)": [[21, "entities.data.Data.trim_data"], [21, "id10"]], "bracket (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.BRACKET"]], "bracket (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.BRACKET"]], "buy (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY"]], "buy_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_CLOSE"]], "buy_to_cover (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_COVER"]], "buy_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_OPEN"]], "canceled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELED"]], "cancelling (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELLING"]], "cash_settled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CASH_SETTLED"]], "error (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.ERROR"]], "expired (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.EXPIRED"]], "filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.FILLED"]], "limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.LIMIT"]], "market (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.MARKET"]], "multileg (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.MULTILEG"]], "new (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.NEW"]], "oco (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OCO"]], "oco (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OCO"]], "open (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.OPEN"]], "oto (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OTO"]], "oto (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OTO"]], "order (class in entities.order)": [[22, "entities.order.Order"]], "order.orderclass (class in entities.order)": [[22, "entities.order.Order.OrderClass"]], "order.orderside (class in entities.order)": [[22, "entities.order.Order.OrderSide"]], "order.orderstatus (class in entities.order)": [[22, "entities.order.Order.OrderStatus"]], "order.ordertype (class in entities.order)": [[22, "entities.order.Order.OrderType"]], "order.transaction (class in entities.order)": [[22, "entities.order.Order.Transaction"]], "partially_filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.PARTIALLY_FILLED"]], "sell (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL"]], "sell_short (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_SHORT"]], "sell_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_CLOSE"]], "sell_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_OPEN"]], "stop (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP"]], "stop_limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP_LIMIT"]], "submitted (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.SUBMITTED"]], "trail (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.TRAIL"]], "unprocessed (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.UNPROCESSED"]], "add_child_order() (entities.order.order method)": [[22, "entities.order.Order.add_child_order"]], "add_transaction() (entities.order.order method)": [[22, "entities.order.Order.add_transaction"]], "avg_fill_price (entities.order.order property)": [[22, "entities.order.Order.avg_fill_price"]], "cash_pending() (entities.order.order method)": [[22, "entities.order.Order.cash_pending"]], "entities.order": [[22, "module-entities.order"]], "equivalent_status() (entities.order.order method)": [[22, "entities.order.Order.equivalent_status"]], "from_dict() (entities.order.order class method)": [[22, "entities.order.Order.from_dict"]], "get_fill_price() (entities.order.order method)": [[22, "entities.order.Order.get_fill_price"]], "get_increment() (entities.order.order method)": [[22, "entities.order.Order.get_increment"]], "is_active() (entities.order.order method)": [[22, "entities.order.Order.is_active"]], "is_buy_order() (entities.order.order method)": [[22, "entities.order.Order.is_buy_order"]], "is_canceled() (entities.order.order method)": [[22, "entities.order.Order.is_canceled"]], "is_equivalent_status() (entities.order.order class method)": [[22, "entities.order.Order.is_equivalent_status"]], "is_filled() (entities.order.order method)": [[22, "entities.order.Order.is_filled"]], "is_option() (entities.order.order method)": [[22, "entities.order.Order.is_option"]], "is_parent() (entities.order.order method)": [[22, "entities.order.Order.is_parent"]], "is_sell_order() (entities.order.order method)": [[22, "entities.order.Order.is_sell_order"]], "price (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.price"]], "quantity (entities.order.order property)": [[22, "entities.order.Order.quantity"]], "quantity (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.quantity"]], "set_canceled() (entities.order.order method)": [[22, "entities.order.Order.set_canceled"]], "set_error() (entities.order.order method)": [[22, "entities.order.Order.set_error"]], "set_filled() (entities.order.order method)": [[22, "entities.order.Order.set_filled"]], "set_identifier() (entities.order.order method)": [[22, "entities.order.Order.set_identifier"]], "set_new() (entities.order.order method)": [[22, "entities.order.Order.set_new"]], "set_partially_filled() (entities.order.order method)": [[22, "entities.order.Order.set_partially_filled"]], "status (entities.order.order property)": [[22, "entities.order.Order.status"]], "to_dict() (entities.order.order method)": [[22, "entities.order.Order.to_dict"]], "to_position() (entities.order.order method)": [[22, "entities.order.Order.to_position"]], "update_raw() (entities.order.order method)": [[22, "entities.order.Order.update_raw"]], "update_trail_stop_price() (entities.order.order method)": [[22, "entities.order.Order.update_trail_stop_price"]], "wait_to_be_closed() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_closed"]], "wait_to_be_registered() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_registered"]], "was_transmitted() (entities.order.order method)": [[22, "entities.order.Order.was_transmitted"]], "position (class in entities.position)": [[23, "entities.position.Position"]], "add_order() (entities.position.position method)": [[23, "entities.position.Position.add_order"]], "asset (entities.position.position attribute)": [[23, "entities.position.Position.asset"]], "available (entities.position.position attribute)": [[23, "entities.position.Position.available"]], "available (entities.position.position property)": [[23, "id0"]], "avg_fill_price (entities.position.position attribute)": [[23, "entities.position.Position.avg_fill_price"]], "entities.position": [[23, "module-entities.position"]], "from_dict() (entities.position.position class method)": [[23, "entities.position.Position.from_dict"]], "get_selling_order() (entities.position.position method)": [[23, "entities.position.Position.get_selling_order"]], "hold (entities.position.position attribute)": [[23, "entities.position.Position.hold"]], "hold (entities.position.position property)": [[23, "id1"]], "orders (entities.position.position attribute)": [[23, "entities.position.Position.orders"]], "quantity (entities.position.position attribute)": [[23, "entities.position.Position.quantity"]], "quantity (entities.position.position property)": [[23, "id2"]], "strategy (entities.position.position attribute)": [[23, "entities.position.Position.strategy"]], "symbol (entities.position.position attribute)": [[23, "entities.position.Position.symbol"]], "to_dict() (entities.position.position method)": [[23, "entities.position.Position.to_dict"]], "value_type() (entities.position.position method)": [[23, "entities.position.Position.value_type"]], "tradingfee (class in entities.trading_fee)": [[24, "entities.trading_fee.TradingFee"]], "entities.trading_fee": [[24, "module-entities.trading_fee"]], "after_market_closes() (in module lumibot.strategies.strategy.strategy)": [[28, "lumibot.strategies.strategy.Strategy.after_market_closes"]], "before_market_closes() (in module lumibot.strategies.strategy.strategy)": [[29, "lumibot.strategies.strategy.Strategy.before_market_closes"]], "before_market_opens() (in module lumibot.strategies.strategy.strategy)": [[30, "lumibot.strategies.strategy.Strategy.before_market_opens"]], "before_starting_trading() (in module lumibot.strategies.strategy.strategy)": [[31, "lumibot.strategies.strategy.Strategy.before_starting_trading"]], "initialize() (in module lumibot.strategies.strategy.strategy)": [[32, "lumibot.strategies.strategy.Strategy.initialize"]], "on_abrupt_closing() (in module lumibot.strategies.strategy.strategy)": [[33, "lumibot.strategies.strategy.Strategy.on_abrupt_closing"]], "on_bot_crash() (in module lumibot.strategies.strategy.strategy)": [[34, "lumibot.strategies.strategy.Strategy.on_bot_crash"]], "on_canceled_order() (in module lumibot.strategies.strategy.strategy)": [[35, "lumibot.strategies.strategy.Strategy.on_canceled_order"]], "on_filled_order() (in module lumibot.strategies.strategy.strategy)": [[36, "lumibot.strategies.strategy.Strategy.on_filled_order"]], "on_new_order() (in module lumibot.strategies.strategy.strategy)": [[37, "lumibot.strategies.strategy.Strategy.on_new_order"]], "on_parameters_updated() (in module lumibot.strategies.strategy.strategy)": [[38, "lumibot.strategies.strategy.Strategy.on_parameters_updated"]], "on_partially_filled_order() (in module lumibot.strategies.strategy.strategy)": [[39, "lumibot.strategies.strategy.Strategy.on_partially_filled_order"]], "on_trading_iteration() (in module lumibot.strategies.strategy.strategy)": [[40, "lumibot.strategies.strategy.Strategy.on_trading_iteration"]], "trace_stats() (in module lumibot.strategies.strategy.strategy)": [[42, "lumibot.strategies.strategy.Strategy.trace_stats"]], "backtestingbroker (class in lumibot.backtesting.backtesting_broker)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker"]], "datasourcebacktesting (class in lumibot.data_sources.data_source_backtesting)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting"]], "is_backtesting_broker (lumibot.backtesting.backtesting_broker.backtestingbroker attribute)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.IS_BACKTESTING_BROKER"]], "is_backtesting_data_source (lumibot.data_sources.data_source_backtesting.datasourcebacktesting attribute)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.IS_BACKTESTING_DATA_SOURCE"]], "calculate_trade_cost() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.calculate_trade_cost"]], "cancel_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cancel_order"]], "cash_settle_options_contract() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cash_settle_options_contract"]], "datetime (lumibot.backtesting.backtesting_broker.backtestingbroker property)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.datetime"]], "get_datetime() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime_range"]], "get_historical_account_value() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_historical_account_value"]], "get_last_bar() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_last_bar"]], "get_time_to_close() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_close"]], "get_time_to_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_open"]], "is_market_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.is_market_open"]], "limit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.limit_order"]], "lumibot.backtesting.backtesting_broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "lumibot.data_sources.data_source_backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "process_expired_option_contracts() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_expired_option_contracts"]], "process_pending_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_pending_orders"]], "should_continue() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.should_continue"]], "stop_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.stop_order"]], "submit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_order"]], "submit_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_orders"]], "default_pytz (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_PYTZ"]], "default_timezone (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_TIMEZONE"]], "datasource (class in lumibot.data_sources.data_source)": [[44, "lumibot.data_sources.data_source.DataSource"]], "is_backtesting_data_source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.IS_BACKTESTING_DATA_SOURCE"]], "min_timestep (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.MIN_TIMESTEP"]], "min_timestep (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.MIN_TIMESTEP"]], "pandasdata (class in lumibot.data_sources.pandas_data)": [[44, "lumibot.data_sources.pandas_data.PandasData"]], "source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.SOURCE"]], "source (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.SOURCE"]], "source (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.SOURCE"]], "timestep_mapping (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.TIMESTEP_MAPPING"]], "yahoodata (class in lumibot.data_sources.yahoo_data)": [[44, "lumibot.data_sources.yahoo_data.YahooData"]], "calculate_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.calculate_greeks"]], "clean_trading_times() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.clean_trading_times"]], "convert_timestep_str_to_timedelta() (lumibot.data_sources.data_source.datasource static method)": [[44, "lumibot.data_sources.data_source.DataSource.convert_timestep_str_to_timedelta"]], "find_asset_in_data_store() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.find_asset_in_data_store"]], "get_asset_by_name() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_name"]], "get_asset_by_symbol() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_symbol"]], "get_assets() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_assets"]], "get_bars() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_bars"]], "get_chains() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_chains"]], "get_chains() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_chains"]], "get_chains() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_chains"]], "get_datetime() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime_range"]], "get_historical_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_historical_prices"]], "get_last_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_day"]], "get_last_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_minute"]], "get_last_price() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_price"]], "get_last_price() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_price"]], "get_last_price() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_last_price"]], "get_last_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_prices"]], "get_last_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_prices"]], "get_round_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_day"]], "get_round_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_minute"]], "get_start_datetime_and_ts_unit() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_start_datetime_and_ts_unit"]], "get_strikes() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_strikes"]], "get_strikes() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_strikes"]], "get_timestamp() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestamp"]], "get_timestep() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestep"]], "get_trading_days_pandas() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_trading_days_pandas"]], "get_yesterday_dividend() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividend"]], "get_yesterday_dividend() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividend"]], "get_yesterday_dividends() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividends"]], "get_yesterday_dividends() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividends"]], "load_data() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.load_data"]], "localize_datetime() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.localize_datetime"]], "lumibot.data_sources": [[44, "module-lumibot.data_sources"]], "lumibot.data_sources.data_source": [[44, "module-lumibot.data_sources.data_source"]], "lumibot.data_sources.pandas_data": [[44, "module-lumibot.data_sources.pandas_data"]], "lumibot.data_sources.yahoo_data": [[44, "module-lumibot.data_sources.yahoo_data"]], "query_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.query_greeks"]], "to_default_timezone() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.to_default_timezone"]], "update_date_index() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.update_date_index"]], "lumibot.strategies.strategy.strategy": [[45, "module-lumibot.strategies.strategy.Strategy"]], "trader (class in lumibot.traders.trader)": [[46, "lumibot.traders.trader.Trader"]], "add_strategy() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.add_strategy"]], "is_backtest_broker (lumibot.traders.trader.trader property)": [[46, "lumibot.traders.trader.Trader.is_backtest_broker"]], "lumibot.traders.trader": [[46, "module-lumibot.traders.trader"]], "run_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all"]], "run_all_async() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all_async"]], "stop_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.stop_all"]], "get_cash() (in module lumibot.strategies.strategy.strategy)": [[49, "lumibot.strategies.strategy.Strategy.get_cash"], [55, "lumibot.strategies.strategy.Strategy.get_cash"]], "get_parameters() (in module lumibot.strategies.strategy.strategy)": [[50, "lumibot.strategies.strategy.Strategy.get_parameters"], [56, "lumibot.strategies.strategy.Strategy.get_parameters"], [104, "lumibot.strategies.strategy.Strategy.get_parameters"], [115, "lumibot.strategies.strategy.Strategy.get_parameters"]], "get_portfolio_value() (in module lumibot.strategies.strategy.strategy)": [[51, "lumibot.strategies.strategy.Strategy.get_portfolio_value"], [57, "lumibot.strategies.strategy.Strategy.get_portfolio_value"]], "get_position() (in module lumibot.strategies.strategy.strategy)": [[52, "lumibot.strategies.strategy.Strategy.get_position"], [58, "lumibot.strategies.strategy.Strategy.get_position"]], "get_positions() (in module lumibot.strategies.strategy.strategy)": [[53, "lumibot.strategies.strategy.Strategy.get_positions"], [59, "lumibot.strategies.strategy.Strategy.get_positions"]], "set_parameters() (in module lumibot.strategies.strategy.strategy)": [[54, "lumibot.strategies.strategy.Strategy.set_parameters"], [60, "lumibot.strategies.strategy.Strategy.set_parameters"]], "add_line() (in module lumibot.strategies.strategy.strategy)": [[62, "lumibot.strategies.strategy.Strategy.add_line"], [66, "lumibot.strategies.strategy.Strategy.add_line"]], "add_marker() (in module lumibot.strategies.strategy.strategy)": [[63, "lumibot.strategies.strategy.Strategy.add_marker"], [67, "lumibot.strategies.strategy.Strategy.add_marker"]], "get_lines_df() (in module lumibot.strategies.strategy.strategy)": [[64, "lumibot.strategies.strategy.Strategy.get_lines_df"], [68, "lumibot.strategies.strategy.Strategy.get_lines_df"]], "get_markers_df() (in module lumibot.strategies.strategy.strategy)": [[65, "lumibot.strategies.strategy.Strategy.get_markers_df"], [69, "lumibot.strategies.strategy.Strategy.get_markers_df"]], "cancel_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[71, "lumibot.strategies.strategy.Strategy.cancel_realtime_bars"]], "get_historical_prices() (in module lumibot.strategies.strategy.strategy)": [[72, "lumibot.strategies.strategy.Strategy.get_historical_prices"]], "get_historical_prices_for_assets() (in module lumibot.strategies.strategy.strategy)": [[73, "lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets"]], "get_last_price() (in module lumibot.strategies.strategy.strategy)": [[74, "lumibot.strategies.strategy.Strategy.get_last_price"]], "get_last_prices() (in module lumibot.strategies.strategy.strategy)": [[75, "lumibot.strategies.strategy.Strategy.get_last_prices"]], "get_next_trading_day() (in module lumibot.strategies.strategy.strategy)": [[76, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [130, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [138, "lumibot.strategies.strategy.Strategy.get_next_trading_day"]], "get_quote() (in module lumibot.strategies.strategy.strategy)": [[77, "lumibot.strategies.strategy.Strategy.get_quote"]], "get_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[78, "lumibot.strategies.strategy.Strategy.get_realtime_bars"]], "get_yesterday_dividend() (in module lumibot.strategies.strategy.strategy)": [[79, "lumibot.strategies.strategy.Strategy.get_yesterday_dividend"]], "get_yesterday_dividends() (in module lumibot.strategies.strategy.strategy)": [[80, "lumibot.strategies.strategy.Strategy.get_yesterday_dividends"]], "start_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[81, "lumibot.strategies.strategy.Strategy.start_realtime_bars"]], "get_datetime() (in module lumibot.strategies.strategy.strategy)": [[83, "lumibot.strategies.strategy.Strategy.get_datetime"], [92, "lumibot.strategies.strategy.Strategy.get_datetime"]], "get_datetime_range() (in module lumibot.strategies.strategy.strategy)": [[84, "lumibot.strategies.strategy.Strategy.get_datetime_range"], [93, "lumibot.strategies.strategy.Strategy.get_datetime_range"]], "get_last_day() (in module lumibot.strategies.strategy.strategy)": [[85, "lumibot.strategies.strategy.Strategy.get_last_day"], [94, "lumibot.strategies.strategy.Strategy.get_last_day"]], "get_last_minute() (in module lumibot.strategies.strategy.strategy)": [[86, "lumibot.strategies.strategy.Strategy.get_last_minute"], [95, "lumibot.strategies.strategy.Strategy.get_last_minute"]], "get_round_day() (in module lumibot.strategies.strategy.strategy)": [[87, "lumibot.strategies.strategy.Strategy.get_round_day"], [96, "lumibot.strategies.strategy.Strategy.get_round_day"]], "get_round_minute() (in module lumibot.strategies.strategy.strategy)": [[88, "lumibot.strategies.strategy.Strategy.get_round_minute"], [97, "lumibot.strategies.strategy.Strategy.get_round_minute"]], "get_timestamp() (in module lumibot.strategies.strategy.strategy)": [[89, "lumibot.strategies.strategy.Strategy.get_timestamp"], [98, "lumibot.strategies.strategy.Strategy.get_timestamp"]], "localize_datetime() (in module lumibot.strategies.strategy.strategy)": [[90, "lumibot.strategies.strategy.Strategy.localize_datetime"], [99, "lumibot.strategies.strategy.Strategy.localize_datetime"]], "to_default_timezone() (in module lumibot.strategies.strategy.strategy)": [[91, "lumibot.strategies.strategy.Strategy.to_default_timezone"], [100, "lumibot.strategies.strategy.Strategy.to_default_timezone"]], "await_market_to_close() (in module lumibot.strategies.strategy.strategy)": [[102, "lumibot.strategies.strategy.Strategy.await_market_to_close"], [113, "lumibot.strategies.strategy.Strategy.await_market_to_close"]], "await_market_to_open() (in module lumibot.strategies.strategy.strategy)": [[103, "lumibot.strategies.strategy.Strategy.await_market_to_open"], [114, "lumibot.strategies.strategy.Strategy.await_market_to_open"]], "log_message() (in module lumibot.strategies.strategy.strategy)": [[105, "lumibot.strategies.strategy.Strategy.log_message"], [116, "lumibot.strategies.strategy.Strategy.log_message"]], "set_market() (in module lumibot.strategies.strategy.strategy)": [[106, "lumibot.strategies.strategy.Strategy.set_market"], [117, "lumibot.strategies.strategy.Strategy.set_market"]], "sleep() (in module lumibot.strategies.strategy.strategy)": [[107, "lumibot.strategies.strategy.Strategy.sleep"], [118, "lumibot.strategies.strategy.Strategy.sleep"]], "update_parameters() (in module lumibot.strategies.strategy.strategy)": [[108, "lumibot.strategies.strategy.Strategy.update_parameters"], [119, "lumibot.strategies.strategy.Strategy.update_parameters"]], "wait_for_order_execution() (in module lumibot.strategies.strategy.strategy)": [[109, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"], [120, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"]], "wait_for_order_registration() (in module lumibot.strategies.strategy.strategy)": [[110, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"], [121, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"]], "wait_for_orders_execution() (in module lumibot.strategies.strategy.strategy)": [[111, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"], [122, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"]], "wait_for_orders_registration() (in module lumibot.strategies.strategy.strategy)": [[112, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"], [123, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"]], "get_chain() (in module lumibot.strategies.strategy.strategy)": [[125, "lumibot.strategies.strategy.Strategy.get_chain"], [133, "lumibot.strategies.strategy.Strategy.get_chain"]], "get_chains() (in module lumibot.strategies.strategy.strategy)": [[126, "lumibot.strategies.strategy.Strategy.get_chains"], [134, "lumibot.strategies.strategy.Strategy.get_chains"]], "get_expiration() (in module lumibot.strategies.strategy.strategy)": [[127, "lumibot.strategies.strategy.Strategy.get_expiration"], [135, "lumibot.strategies.strategy.Strategy.get_expiration"]], "get_greeks() (in module lumibot.strategies.strategy.strategy)": [[128, "lumibot.strategies.strategy.Strategy.get_greeks"], [136, "lumibot.strategies.strategy.Strategy.get_greeks"]], "get_multiplier() (in module lumibot.strategies.strategy.strategy)": [[129, "lumibot.strategies.strategy.Strategy.get_multiplier"], [137, "lumibot.strategies.strategy.Strategy.get_multiplier"]], "get_strikes() (in module lumibot.strategies.strategy.strategy)": [[131, "lumibot.strategies.strategy.Strategy.get_strikes"], [140, "lumibot.strategies.strategy.Strategy.get_strikes"]], "options_expiry_to_datetime_date() (in module lumibot.strategies.strategy.strategy)": [[132, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"], [141, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"]], "get_option_expiration_after_date() (in module lumibot.strategies.strategy.strategy)": [[139, "lumibot.strategies.strategy.Strategy.get_option_expiration_after_date"]], "cancel_open_orders() (in module lumibot.strategies.strategy.strategy)": [[143, "lumibot.strategies.strategy.Strategy.cancel_open_orders"], [154, "lumibot.strategies.strategy.Strategy.cancel_open_orders"]], "cancel_order() (in module lumibot.strategies.strategy.strategy)": [[144, "lumibot.strategies.strategy.Strategy.cancel_order"], [155, "lumibot.strategies.strategy.Strategy.cancel_order"]], "cancel_orders() (in module lumibot.strategies.strategy.strategy)": [[145, "lumibot.strategies.strategy.Strategy.cancel_orders"], [156, "lumibot.strategies.strategy.Strategy.cancel_orders"]], "create_order() (in module lumibot.strategies.strategy.strategy)": [[146, "lumibot.strategies.strategy.Strategy.create_order"], [157, "lumibot.strategies.strategy.Strategy.create_order"]], "get_asset_potential_total() (in module lumibot.strategies.strategy.strategy)": [[147, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"], [158, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"]], "get_order() (in module lumibot.strategies.strategy.strategy)": [[148, "lumibot.strategies.strategy.Strategy.get_order"], [159, "lumibot.strategies.strategy.Strategy.get_order"]], "get_orders() (in module lumibot.strategies.strategy.strategy)": [[149, "lumibot.strategies.strategy.Strategy.get_orders"], [160, "lumibot.strategies.strategy.Strategy.get_orders"]], "get_selling_order() (in module lumibot.strategies.strategy.strategy)": [[150, "lumibot.strategies.strategy.Strategy.get_selling_order"], [161, "lumibot.strategies.strategy.Strategy.get_selling_order"]], "sell_all() (in module lumibot.strategies.strategy.strategy)": [[151, "lumibot.strategies.strategy.Strategy.sell_all"], [162, "lumibot.strategies.strategy.Strategy.sell_all"]], "submit_order() (in module lumibot.strategies.strategy.strategy)": [[152, "lumibot.strategies.strategy.Strategy.submit_order"], [163, "lumibot.strategies.strategy.Strategy.submit_order"]], "submit_orders() (in module lumibot.strategies.strategy.strategy)": [[153, "lumibot.strategies.strategy.Strategy.submit_orders"], [164, "lumibot.strategies.strategy.Strategy.submit_orders"]], "cash (lumibot.strategies.strategy.strategy property)": [[167, "lumibot.strategies.strategy.Strategy.cash"], [182, "lumibot.strategies.strategy.Strategy.cash"]], "first_iteration (lumibot.strategies.strategy.strategy property)": [[168, "lumibot.strategies.strategy.Strategy.first_iteration"], [183, "lumibot.strategies.strategy.Strategy.first_iteration"]], "initial_budget (lumibot.strategies.strategy.strategy property)": [[169, "lumibot.strategies.strategy.Strategy.initial_budget"], [184, "lumibot.strategies.strategy.Strategy.initial_budget"]], "is_backtesting (lumibot.strategies.strategy.strategy property)": [[170, "lumibot.strategies.strategy.Strategy.is_backtesting"], [185, "lumibot.strategies.strategy.Strategy.is_backtesting"]], "last_on_trading_iteration_datetime (lumibot.strategies.strategy.strategy property)": [[171, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"], [186, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"]], "minutes_before_closing (lumibot.strategies.strategy.strategy property)": [[172, "lumibot.strategies.strategy.Strategy.minutes_before_closing"], [187, "lumibot.strategies.strategy.Strategy.minutes_before_closing"]], "minutes_before_opening (lumibot.strategies.strategy.strategy property)": [[173, "lumibot.strategies.strategy.Strategy.minutes_before_opening"], [188, "lumibot.strategies.strategy.Strategy.minutes_before_opening"]], "name (lumibot.strategies.strategy.strategy property)": [[174, "lumibot.strategies.strategy.Strategy.name"], [189, "lumibot.strategies.strategy.Strategy.name"]], "portfolio_value (lumibot.strategies.strategy.strategy property)": [[175, "lumibot.strategies.strategy.Strategy.portfolio_value"], [190, "lumibot.strategies.strategy.Strategy.portfolio_value"]], "pytz (lumibot.strategies.strategy.strategy property)": [[176, "lumibot.strategies.strategy.Strategy.pytz"], [181, "lumibot.strategies.strategy.Strategy.pytz"], [191, "lumibot.strategies.strategy.Strategy.pytz"]], "quote_asset (lumibot.strategies.strategy.strategy property)": [[177, "lumibot.strategies.strategy.Strategy.quote_asset"], [192, "lumibot.strategies.strategy.Strategy.quote_asset"]], "sleeptime (lumibot.strategies.strategy.strategy property)": [[178, "lumibot.strategies.strategy.Strategy.sleeptime"], [193, "lumibot.strategies.strategy.Strategy.sleeptime"]], "timezone (lumibot.strategies.strategy.strategy property)": [[179, "lumibot.strategies.strategy.Strategy.timezone"], [194, "lumibot.strategies.strategy.Strategy.timezone"]], "unspent_money (lumibot.strategies.strategy.strategy property)": [[180, "lumibot.strategies.strategy.Strategy.unspent_money"], [195, "lumibot.strategies.strategy.Strategy.unspent_money"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["backtesting", "backtesting.backtesting_function", "backtesting.how_to_backtest", "backtesting.indicators_files", "backtesting.logs_csv", "backtesting.pandas", "backtesting.polygon", "backtesting.tearsheet_html", "backtesting.thetadata", "backtesting.trades_files", "backtesting.yahoo", "brokers", "brokers.alpaca", "brokers.ccxt", "brokers.interactive_brokers", "brokers.interactive_brokers_legacy", "brokers.tradier", "deployment", "entities", "entities.asset", "entities.bars", "entities.data", "entities.order", "entities.position", "entities.trading_fee", "getting_started", "index", "lifecycle_methods", "lifecycle_methods.after_market_closes", "lifecycle_methods.before_market_closes", "lifecycle_methods.before_market_opens", "lifecycle_methods.before_starting_trading", "lifecycle_methods.initialize", "lifecycle_methods.on_abrupt_closing", "lifecycle_methods.on_bot_crash", "lifecycle_methods.on_canceled_order", "lifecycle_methods.on_filled_order", "lifecycle_methods.on_new_order", "lifecycle_methods.on_parameters_updated", "lifecycle_methods.on_partially_filled_order", "lifecycle_methods.on_trading_iteration", "lifecycle_methods.summary", "lifecycle_methods.trace_stats", "lumibot.backtesting", "lumibot.data_sources", "lumibot.strategies", "lumibot.traders", "strategy_methods", "strategy_methods.account", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_cash", "strategy_methods.account/strategies.strategy.Strategy.get_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/strategies.strategy.Strategy.get_position", "strategy_methods.account/strategies.strategy.Strategy.get_positions", "strategy_methods.account/strategies.strategy.Strategy.set_parameters", "strategy_methods.chart", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df", "strategy_methods.chart/strategies.strategy.Strategy.add_line", "strategy_methods.chart/strategies.strategy.Strategy.add_marker", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df", "strategy_methods.data", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars", "strategy_methods.datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone", "strategy_methods.misc", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/strategies.strategy.Strategy.log_message", "strategy_methods.misc/strategies.strategy.Strategy.set_market", "strategy_methods.misc/strategies.strategy.Strategy.sleep", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.options", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.options/strategies.strategy.Strategy.get_chain", "strategy_methods.options/strategies.strategy.Strategy.get_chains", "strategy_methods.options/strategies.strategy.Strategy.get_expiration", "strategy_methods.options/strategies.strategy.Strategy.get_greeks", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date", "strategy_methods.options/strategies.strategy.Strategy.get_strikes", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/strategies.strategy.Strategy.create_order", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/strategies.strategy.Strategy.get_order", "strategy_methods.orders/strategies.strategy.Strategy.get_orders", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/strategies.strategy.Strategy.sell_all", "strategy_methods.orders/strategies.strategy.Strategy.submit_order", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders", "strategy_methods.parameters", "strategy_properties", "strategy_properties/lumibot.strategies.strategy.Strategy.cash", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/lumibot.strategies.strategy.Strategy.name", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money", "strategy_properties/lumibot.strategies.strategy.pytz", "strategy_properties/strategies.strategy.Strategy.cash", "strategy_properties/strategies.strategy.Strategy.first_iteration", "strategy_properties/strategies.strategy.Strategy.initial_budget", "strategy_properties/strategies.strategy.Strategy.is_backtesting", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/strategies.strategy.Strategy.name", "strategy_properties/strategies.strategy.Strategy.portfolio_value", "strategy_properties/strategies.strategy.Strategy.pytz", "strategy_properties/strategies.strategy.Strategy.quote_asset", "strategy_properties/strategies.strategy.Strategy.sleeptime", "strategy_properties/strategies.strategy.Strategy.timezone", "strategy_properties/strategies.strategy.Strategy.unspent_money", "vars"], "filenames": ["backtesting.rst", "backtesting.backtesting_function.rst", "backtesting.how_to_backtest.rst", "backtesting.indicators_files.rst", "backtesting.logs_csv.rst", "backtesting.pandas.rst", "backtesting.polygon.rst", "backtesting.tearsheet_html.rst", "backtesting.thetadata.rst", "backtesting.trades_files.rst", "backtesting.yahoo.rst", "brokers.rst", "brokers.alpaca.rst", "brokers.ccxt.rst", "brokers.interactive_brokers.rst", "brokers.interactive_brokers_legacy.rst", "brokers.tradier.rst", "deployment.rst", "entities.rst", "entities.asset.rst", "entities.bars.rst", "entities.data.rst", "entities.order.rst", "entities.position.rst", "entities.trading_fee.rst", "getting_started.rst", "index.rst", "lifecycle_methods.rst", "lifecycle_methods.after_market_closes.rst", "lifecycle_methods.before_market_closes.rst", "lifecycle_methods.before_market_opens.rst", "lifecycle_methods.before_starting_trading.rst", "lifecycle_methods.initialize.rst", "lifecycle_methods.on_abrupt_closing.rst", "lifecycle_methods.on_bot_crash.rst", "lifecycle_methods.on_canceled_order.rst", "lifecycle_methods.on_filled_order.rst", "lifecycle_methods.on_new_order.rst", "lifecycle_methods.on_parameters_updated.rst", "lifecycle_methods.on_partially_filled_order.rst", "lifecycle_methods.on_trading_iteration.rst", "lifecycle_methods.summary.rst", "lifecycle_methods.trace_stats.rst", "lumibot.backtesting.rst", "lumibot.data_sources.rst", "lumibot.strategies.rst", "lumibot.traders.rst", "strategy_methods.rst", "strategy_methods.account.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.chart.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.data.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars.rst", "strategy_methods.datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.misc.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.options.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.parameters.rst", "strategy_properties.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.cash.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.name.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money.rst", "strategy_properties/lumibot.strategies.strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.cash.rst", "strategy_properties/strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/strategies.strategy.Strategy.name.rst", "strategy_properties/strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/strategies.strategy.Strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/strategies.strategy.Strategy.timezone.rst", "strategy_properties/strategies.strategy.Strategy.unspent_money.rst", "vars.rst"], "titles": ["Backtesting", "Backtesting Function", "How To Backtest", "Indicators Files", "Logs CSV", "Pandas (CSV or other data)", "Polygon.io Backtesting", "Tearsheet HTML", "ThetaData Backtesting", "Trades Files", "Yahoo", "Brokers", "Alpaca", "Crypto Brokers (Using CCXT)", "Interactive Brokers", "Interactive Brokers Legacy", "Tradier", "Deployment Guide", "Entities", "Asset", "Bars", "Data", "Order", "Position", "Trading Fee", "What is Lumibot?", "Lumibot: Backtesting and Algorithmic Trading Library", "Lifecycle Methods", "def after_market_closes", "def before_market_closes", "def before_market_opens", "def before_starting_trading", "def initialize", "def on_abrupt_closing", "def on_bot_crash", "def on_canceled_order", "def on_filled_order", "def on_new_order", "def on_parameters_updated", "def on_partially_filled_order", "def on_trading_iteration", "Summary", "def trace_stats", "Backtesting", "Data Sources", "Strategies", "Traders", "Strategy Methods", "Account Management", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "Chart Functions", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "Data", "self.cancel_realtime_bars", "self.get_historical_prices", "self.get_historical_prices_for_assets", "self.get_last_price", "self.get_last_prices", "self.get_next_trading_day", "self.get_quote", "self.get_realtime_bars", "self.get_yesterday_dividend", "self.get_yesterday_dividends", "self.start_realtime_bars", "DateTime", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "Miscellaneous", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "Options", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_strikes", "self.options_expiry_to_datetime_date", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_option_expiration_after_date", "self.get_strikes", "self.options_expiry_to_datetime_date", "Order Management", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "Parameters", "Strategy Properties", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "self.pytz", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "Variable Backup & Restore"], "terms": {"lumibot": [0, 1, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 22, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165], "ha": [0, 7, 15, 20, 22, 26, 35, 36, 37, 39, 45, 71, 74, 78, 196], "three": [0, 15, 20, 22], "mode": [0, 15, 17, 43, 170, 185], "yahoo": [0, 1, 2, 5, 20, 26, 72, 73, 106, 117], "daili": [0, 2, 5, 7, 10, 31, 72, 73], "stock": [0, 1, 2, 5, 6, 8, 9, 10, 12, 17, 19, 20, 21, 22, 23, 26, 32, 44, 106, 117, 126, 134, 146, 152, 157, 163], "data": [0, 1, 3, 6, 8, 10, 11, 13, 18, 19, 20, 23, 26, 30, 31, 40, 45, 47, 62, 66, 71, 72, 73, 78, 81, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "panda": [0, 2, 10, 20, 21, 26, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 78, 106, 117], "intra": [0, 5, 10], "dai": [0, 1, 2, 5, 6, 8, 10, 17, 21, 22, 26, 30, 31, 32, 40, 44, 72, 73, 76, 79, 80, 84, 85, 86, 87, 93, 94, 95, 96, 130, 138, 146, 153, 157, 164, 178, 193], "inter": [0, 5], "test": [0, 2, 15, 17], "futur": [0, 5, 12, 14, 17, 19, 20, 26, 43, 44, 74, 146, 147, 152, 157, 158, 163, 180, 195], "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 76, 82, 101, 105, 107, 116, 118, 127, 128, 129, 130, 131, 135, 136, 137, 138, 140, 142, 146, 157, 165, 166, 167, 177, 178, 180, 182, 192, 193, 195, 196], "csv": [0, 2, 3, 9, 21, 26, 44], "suppli": [0, 10, 21], "you": [0, 1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 20, 22, 25, 26, 29, 32, 44, 47, 48, 49, 51, 55, 57, 61, 62, 66, 70, 72, 73, 82, 101, 124, 142, 146, 157, 165, 166, 178, 193], "polygon": [0, 1, 5, 8, 10, 17, 26], "io": [0, 13, 20, 26], "It": [0, 4, 5, 6, 7, 8, 13, 14, 15, 17, 19, 22, 23, 25, 26, 41, 43, 44, 74, 77, 146, 157], "i": [0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 26, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 77, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 102, 103, 106, 113, 114, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 147, 149, 151, 153, 157, 158, 160, 162, 164, 166, 167, 168, 170, 172, 173, 177, 178, 182, 183, 185, 187, 188, 192, 193, 196], "recommend": [0, 15, 17, 25], "option": [0, 2, 6, 8, 9, 12, 14, 16, 17, 19, 20, 22, 26, 32, 36, 39, 41, 43, 44, 47, 72, 74, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 146, 152, 157, 163], "crypto": [0, 1, 5, 7, 11, 17, 19, 20, 23, 26, 49, 51, 55, 57, 72, 74, 106, 117, 146, 152, 153, 157, 163, 164, 167, 175, 182, 190], "forex": [0, 2, 5, 6, 8, 12, 17, 19, 26, 44, 73, 74, 146, 152, 153, 157, 163, 164], "an": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 19, 22, 23, 26, 34, 35, 36, 39, 40, 41, 43, 44, 52, 58, 72, 74, 75, 81, 102, 103, 105, 113, 114, 116, 126, 127, 131, 132, 134, 135, 140, 141, 144, 146, 147, 148, 152, 155, 157, 158, 159, 163, 165, 178, 193, 196], "advanc": [0, 2, 5, 25, 26, 146, 157], "featur": [0, 2, 6, 8, 26], "allow": [0, 2, 4, 5, 6, 8, 14, 17, 20, 22, 25, 26, 81, 146, 157, 165], "ani": [0, 1, 2, 5, 6, 7, 8, 10, 13, 14, 15, 17, 21, 22, 25, 41, 43, 62, 66, 72, 73, 105, 116, 145, 156, 165], "type": [0, 1, 2, 5, 12, 14, 18, 19, 20, 21, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "have": [0, 1, 2, 5, 6, 8, 10, 14, 16, 17, 20, 22, 23, 25, 26, 28, 43, 47, 49, 51, 55, 57, 72, 78], "format": [0, 5, 19, 21, 44, 76, 125, 126, 130, 132, 133, 134, 138, 141], "requir": [0, 1, 2, 10, 13, 14, 15, 17, 19, 22, 74, 75, 146, 153, 157, 164], "more": [0, 2, 3, 11, 13, 14, 16, 17, 18, 20, 25, 26, 43, 44, 47, 70, 72, 101, 124, 128, 136, 142], "work": [0, 2, 5, 11, 15, 17, 25, 26, 72, 73, 77, 166], "setup": [0, 2, 11, 26], "most": [0, 5, 7, 14, 17, 20, 25, 41, 72, 78, 128, 136], "user": [0, 2, 5, 10, 14, 17, 21, 25, 27, 41, 45, 46, 144, 146, 155, 157, 196], "when": [0, 1, 2, 5, 6, 8, 13, 14, 17, 19, 20, 22, 25, 26, 27, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 62, 63, 66, 67, 82, 146, 157, 167, 172, 182, 187, 196], "run": [0, 5, 6, 8, 10, 11, 12, 14, 17, 21, 26, 30, 32, 33, 34, 37, 44, 46, 81, 102, 103, 113, 114, 143, 145, 154, 156, 170, 185], "sever": [0, 2, 10, 11, 45, 165], "import": [0, 1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 26, 41, 42, 44, 45, 63, 67, 73, 80, 146, 152, 153, 157, 163, 164, 165], "ar": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 38, 41, 44, 45, 47, 48, 53, 59, 61, 62, 63, 66, 67, 70, 73, 78, 81, 82, 101, 106, 117, 124, 125, 126, 128, 133, 134, 136, 142, 143, 146, 147, 149, 151, 153, 154, 157, 158, 160, 162, 164, 165, 167, 182, 196], "each": [0, 1, 2, 3, 5, 7, 9, 13, 14, 20, 22, 26, 30, 32, 40, 41, 44, 45, 47, 53, 59, 72, 80, 126, 134, 149, 151, 160, 162, 196], "prefix": [0, 105, 116], "strategi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "name": [0, 1, 5, 10, 14, 17, 19, 21, 25, 26, 32, 44, 46, 62, 63, 66, 67, 74, 105, 116, 165, 196], "date": [0, 1, 2, 5, 6, 8, 10, 19, 21, 26, 32, 44, 74, 76, 82, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 141, 146, 157], "These": [0, 1, 2, 3, 4, 7, 10, 32, 45, 54, 60, 82], "provid": [0, 2, 4, 5, 6, 8, 9, 17, 20, 21, 44, 74, 75, 131, 140, 144, 145, 155, 156], "detail": [0, 2, 3, 4, 9, 14, 17, 19, 72, 148, 159], "insight": [0, 2], "perform": [0, 2, 3, 7, 17, 26, 41], "behavior": [0, 2], "how": [0, 3, 11, 12, 13, 17, 25, 26, 45, 72, 81, 166], "To": [0, 6, 8, 10, 13, 14, 16, 17, 22, 25, 26, 72], "instal": [0, 5, 10, 13, 15, 17], "choos": [0, 15, 26], "sourc": [0, 5, 8, 13, 20, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "tearsheet": [0, 1, 26, 46], "html": [0, 1, 3, 9, 20, 26], "trade": [0, 1, 4, 5, 10, 11, 13, 15, 17, 18, 19, 20, 21, 22, 27, 30, 31, 32, 33, 40, 41, 43, 44, 45, 52, 58, 73, 74, 76, 78, 81, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 126, 130, 134, 138, 146, 157, 171, 186, 196], "indic": [0, 1, 5, 13, 46, 52, 53, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 153, 164], "conclus": [0, 26], "function": [0, 2, 3, 13, 17, 21, 26, 32, 38, 41, 47, 48, 82, 142], "run_backtest": [0, 1, 2, 5, 6, 8, 10, 25], "other": [0, 2, 6, 8, 10, 13, 14, 15, 17, 20, 22, 25, 26, 41, 62, 66, 77, 101, 146, 157, 167, 182, 196], "In": [0, 6, 8, 13, 17, 22, 43, 74, 75, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98], "summari": [0, 6, 8, 26, 27], "thetadata": [0, 2, 26], "log": [0, 1, 2, 7, 10, 14, 15, 16, 17, 19, 26, 42, 101, 105, 116], "here": [1, 2, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 25, 26, 41, 165, 166], "descript": [1, 14, 17], "all": [1, 4, 5, 13, 17, 20, 21, 22, 25, 30, 33, 34, 43, 45, 46, 51, 53, 57, 59, 72, 73, 125, 127, 128, 129, 131, 133, 135, 136, 137, 140, 143, 145, 146, 149, 150, 151, 154, 156, 157, 160, 161, 162, 165, 196], "its": [1, 6, 8, 22, 42], "paramet": [1, 2, 6, 8, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 87, 88, 90, 91, 93, 96, 97, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 161, 162, 163, 164, 172, 187], "thi": [1, 2, 5, 6, 8, 9, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 49, 51, 55, 57, 62, 63, 66, 67, 72, 73, 74, 75, 77, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 107, 118, 146, 153, 157, 164, 167, 168, 177, 178, 182, 183, 192, 193], "true": [1, 5, 12, 13, 16, 17, 22, 24, 25, 26, 32, 43, 44, 46, 72, 73, 74, 105, 116, 151, 162, 168, 170, 183, 185], "kind": [1, 25], "do": [1, 5, 10, 13, 16, 20, 22, 25, 26, 38, 47, 101, 146, 157], "arg": [1, 21, 44], "minutes_before_clos": [1, 26, 29, 32, 40, 102, 113], "5": [1, 2, 5, 6, 8, 17, 26, 32, 44, 72, 73, 106, 107, 117, 118, 146, 157, 165, 172, 178, 187, 193, 196], "minutes_before_open": [1, 26, 30, 103, 114], "60": [1, 20, 173, 188], "sleeptim": [1, 2, 6, 8, 13, 25, 26, 32, 40, 107, 118], "1": [1, 2, 5, 6, 7, 8, 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 31, 44, 72, 73, 84, 90, 91, 93, 99, 100, 128, 136, 139, 146, 152, 153, 157, 163, 164, 178, 193, 196], "stats_fil": [1, 32], "none": [1, 12, 13, 17, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 43, 44, 46, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 81, 84, 93, 102, 103, 105, 106, 107, 108, 113, 114, 116, 117, 118, 119, 128, 131, 136, 140, 143, 144, 145, 146, 148, 150, 151, 154, 155, 156, 157, 159, 161, 162], "risk_free_r": [1, 44, 128, 136], "logfil": [1, 46], "config": [1, 12, 13, 16, 17, 25, 43], "auto_adjust": [1, 44], "fals": [1, 12, 13, 16, 17, 22, 25, 26, 32, 43, 44, 46, 73, 74, 83, 92, 105, 116, 128, 136, 146, 151, 157, 162], "budget": [1, 5, 10, 17, 25, 32, 169, 184], "benchmark_asset": [1, 2, 6, 8, 25], "spy": [1, 2, 5, 6, 8, 19, 22, 25, 30, 31, 32, 36, 40, 44, 71, 72, 73, 74, 75, 79, 80, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 144, 146, 150, 152, 153, 155, 157, 161, 163, 164, 165], "plot_file_html": 1, "trades_fil": 1, "settings_fil": 1, "pandas_data": [1, 5, 25, 43, 44], "quote_asset": [1, 13, 19, 23, 26, 152, 153, 163, 164], "usd": [1, 19, 21, 72, 73, 74, 146, 152, 153, 157, 163, 164], "starting_posit": 1, "show_plot": [1, 46], "tearsheet_fil": 1, "save_tearsheet": [1, 46], "show_tearsheet": [1, 46], "buy_trading_fe": [1, 25], "sell_trading_fe": [1, 25], "api_kei": [1, 12, 25, 26, 43, 44], "polygon_api_kei": [1, 2, 17], "polygon_has_paid_subscript": 1, "indicators_fil": 1, "show_ind": [1, 46], "save_logfil": 1, "kwarg": [1, 12, 19, 21, 43, 44, 153, 164], "datasource_class": 1, "class": [1, 2, 5, 6, 8, 10, 12, 13, 16, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 165, 196], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 27, 28, 34, 35, 36, 37, 38, 39, 41, 43, 44, 45, 49, 50, 51, 54, 55, 56, 57, 60, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 104, 106, 108, 115, 117, 119, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 139, 140, 146, 147, 150, 151, 153, 157, 158, 161, 162, 164, 165, 167, 169, 171, 172, 173, 174, 175, 176, 177, 179, 181, 182, 184, 186, 187, 188, 189, 190, 191, 192, 194], "datasourc": [1, 8, 43, 44], "For": [1, 2, 3, 5, 7, 10, 13, 14, 17, 19, 20, 22, 26, 28, 44, 49, 51, 55, 57, 109, 110, 111, 112, 120, 121, 122, 123, 146, 152, 153, 157, 163, 164, 165], "exampl": [1, 2, 6, 8, 11, 12, 15, 19, 20, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 52, 53, 58, 59, 62, 63, 66, 67, 71, 72, 73, 74, 75, 79, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 105, 106, 107, 109, 110, 111, 112, 113, 114, 116, 117, 118, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 196], "want": [1, 2, 5, 8, 10, 12, 13, 16, 17, 25, 26, 41, 44, 62, 66], "financ": [1, 2, 10, 26], "would": [1, 2, 5, 16, 19, 25, 26, 44, 51, 57, 146, 157, 178, 193], "pass": [1, 2, 5, 8, 10, 18, 22, 28, 36, 40, 41, 45, 102, 103, 113, 114, 128, 136, 146, 157], "yahoodatabacktest": [1, 10, 25, 26, 32], "backtesting_start": [1, 2, 5, 6, 8, 10, 25, 26, 32, 43], "datetim": [1, 2, 5, 6, 8, 10, 13, 19, 20, 21, 25, 26, 32, 43, 44, 47, 62, 63, 66, 67, 72, 76, 78, 81, 83, 84, 90, 91, 92, 93, 99, 100, 127, 130, 132, 135, 138, 139, 141, 146, 157, 171, 186], "start": [1, 2, 5, 6, 7, 8, 10, 11, 13, 17, 20, 21, 30, 32, 44, 72, 73, 78, 81, 102, 113, 173, 188], "period": [1, 2, 5, 7, 13, 21, 81, 196], "backtesting_end": [1, 2, 5, 6, 8, 10, 25, 26, 32], "end": [1, 2, 6, 7, 8, 10, 14, 20, 21, 26, 42], "int": [1, 12, 19, 20, 21, 22, 36, 39, 44, 62, 63, 66, 67, 72, 73, 81, 84, 85, 86, 87, 88, 89, 93, 94, 95, 96, 97, 98, 102, 103, 113, 114, 146, 147, 157, 158, 172, 173, 178, 187, 188, 193], "number": [1, 12, 15, 16, 17, 21, 22, 29, 32, 44, 72, 73, 84, 87, 88, 93, 96, 97, 146, 157, 172, 173, 178, 187, 188, 193], "minut": [1, 5, 13, 17, 20, 21, 25, 26, 29, 30, 32, 40, 43, 44, 72, 73, 84, 86, 88, 93, 95, 97, 102, 103, 113, 114, 172, 173, 178, 187, 188, 193], "befor": [1, 2, 5, 7, 10, 13, 14, 15, 17, 20, 22, 25, 26, 29, 30, 31, 32, 40, 41, 42, 44, 72, 73, 102, 103, 113, 114, 151, 162, 172, 173, 187, 188, 196], "close": [1, 5, 12, 13, 20, 21, 22, 28, 29, 32, 33, 40, 43, 51, 57, 72, 74, 75, 78, 81, 102, 103, 113, 114, 151, 162, 172, 187], "method": [1, 6, 8, 15, 19, 20, 22, 23, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 70, 101, 124, 125, 127, 129, 131, 133, 135, 137, 140, 165, 168, 172, 173, 178, 183, 187, 188, 193, 196], "call": [1, 5, 6, 8, 19, 20, 22, 28, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 72, 74, 75, 125, 126, 128, 133, 134, 136, 152, 163], "open": [1, 2, 5, 12, 17, 20, 21, 22, 25, 29, 30, 31, 40, 43, 63, 67, 72, 78, 81, 102, 103, 113, 114, 143, 144, 145, 149, 151, 154, 155, 156, 160, 162, 173, 188], "second": [1, 12, 22, 32, 40, 43, 73, 81, 101, 107, 118, 178, 193], "sleep": [1, 2, 26, 40, 47, 101, 102, 113, 178, 193], "between": [1, 2, 13, 20, 21, 26, 32, 72, 178, 193], "iter": [1, 2, 6, 8, 13, 21, 32, 40, 41, 168, 171, 183, 186, 196], "str": [1, 19, 20, 21, 22, 23, 44, 52, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 84, 93, 105, 106, 116, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 153, 157, 164, 174, 178, 179, 189, 193, 194], "file": [1, 4, 5, 7, 14, 15, 17, 25, 26, 101, 105, 116, 165, 196], "write": [1, 2, 6, 8], "stat": [1, 28, 42], "float": [1, 5, 19, 20, 22, 23, 36, 39, 43, 44, 49, 51, 55, 57, 62, 63, 66, 67, 74, 75, 79, 80, 102, 103, 107, 113, 114, 118, 128, 131, 136, 140, 146, 147, 153, 157, 158, 164, 167, 169, 175, 182, 184, 190], "risk": [1, 7, 14, 25, 128, 136], "free": [1, 2, 6, 8, 17, 23, 26, 128, 136], "rate": [1, 6, 8, 20, 128, 136], "dict": [1, 21, 38, 42, 44, 46, 50, 54, 56, 60, 77, 104, 108, 115, 119, 146, 157], "set": [1, 2, 6, 8, 11, 14, 15, 16, 17, 19, 20, 21, 22, 25, 26, 29, 32, 43, 44, 54, 60, 72, 73, 78, 106, 117, 125, 133, 146, 157, 165, 166, 172, 173, 178, 187, 188, 193, 196], "up": [1, 2, 5, 6, 11, 14, 15, 17, 19, 25, 26, 63, 67, 196], "broker": [1, 5, 12, 16, 19, 20, 22, 23, 24, 25, 26, 32, 35, 36, 37, 39, 45, 72, 73, 74, 77, 81, 109, 110, 111, 112, 120, 121, 122, 123, 128, 136, 146, 152, 153, 157, 163, 164, 167, 182], "live": [1, 2, 12, 14, 15, 17, 20, 25, 43, 44, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117], "bool": [1, 22, 43, 44, 46, 72, 73, 74, 105, 116, 128, 136, 153, 164, 168, 170, 183, 185], "whether": [1, 17, 22, 44, 46, 72, 82, 128, 136, 146, 157], "automat": [1, 6, 8, 22, 146, 147, 157, 158, 196], "adjust": [1, 7, 14, 20, 21, 44], "initi": [1, 2, 6, 8, 13, 15, 25, 26, 27, 41, 106, 117, 165, 169, 172, 173, 178, 184, 187, 188, 193], "asset": [1, 2, 5, 9, 12, 13, 17, 18, 20, 21, 22, 23, 26, 33, 34, 35, 36, 37, 39, 40, 43, 44, 49, 51, 52, 53, 55, 57, 58, 59, 62, 66, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 147, 152, 153, 157, 158, 163, 164, 167, 177, 182, 192], "benchmark": [1, 2, 7], "compar": [1, 7, 14, 17], "If": [1, 5, 6, 8, 12, 13, 14, 16, 17, 20, 21, 25, 26, 30, 32, 36, 40, 44, 72, 73, 74, 81, 102, 103, 105, 113, 114, 116, 131, 140, 143, 146, 151, 154, 157, 162], "string": [1, 17, 19, 20, 21, 22, 44, 72, 73, 105, 116, 132, 141, 146, 157, 178, 193, 196], "convert": [1, 19, 20, 22, 26, 43, 44, 132, 141, 146, 157], "object": [1, 5, 10, 12, 18, 19, 20, 21, 22, 23, 24, 35, 36, 37, 39, 43, 44, 46, 52, 53, 58, 59, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 109, 110, 111, 112, 120, 121, 122, 123, 126, 131, 134, 140, 144, 145, 146, 147, 148, 149, 152, 153, 155, 156, 157, 158, 159, 160, 163, 164, 176, 181, 191, 196], "plot": [1, 10, 46, 63, 67], "list": [1, 2, 13, 18, 19, 20, 23, 25, 31, 43, 44, 47, 48, 53, 59, 61, 70, 73, 75, 80, 82, 84, 93, 101, 106, 111, 112, 117, 122, 123, 124, 127, 129, 131, 135, 137, 140, 142, 145, 149, 153, 156, 160, 164, 166], "A": [1, 5, 7, 10, 12, 14, 22, 26, 44, 46, 52, 53, 58, 59, 77, 84, 93, 146, 153, 157, 164, 196], "pandasdatabacktest": [1, 5, 25], "contain": [1, 3, 20, 21, 22, 40, 42, 78, 152, 153, 163, 164], "cryptocurr": [1, 2, 6, 8, 13, 17, 20, 72, 73, 74, 75, 146, 157], "get": [1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 17, 18, 20, 21, 22, 30, 31, 33, 38, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 70, 72, 73, 75, 77, 79, 80, 82, 104, 115, 124, 147, 148, 149, 150, 158, 159, 160, 161, 165, 166, 167, 172, 173, 175, 178, 182, 187, 188, 190, 193, 196], "valuat": 1, "measur": [1, 7], "overal": [1, 7], "porfolio": 1, "valu": [1, 3, 5, 9, 12, 13, 14, 17, 19, 20, 21, 23, 28, 43, 45, 46, 48, 49, 51, 55, 57, 61, 62, 63, 66, 67, 72, 73, 128, 136, 153, 164, 175, 190, 196], "usual": [1, 47, 178, 193], "usdt": [1, 19, 49, 51, 55, 57, 72, 74, 146, 157], "usdc": 1, "dictionari": [1, 5, 8, 16, 36, 42, 43, 44, 46, 73, 77, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 157, 165], "posit": [1, 13, 18, 22, 26, 36, 39, 43, 45, 51, 52, 53, 57, 58, 59, 147, 150, 151, 158, 161, 162, 167, 175, 182, 190], "100": [1, 5, 12, 13, 16, 19, 20, 25, 26, 32, 42, 44, 72, 73, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 128, 133, 134, 136, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164], "200": [1, 12, 36, 44, 73, 111, 112, 122, 123, 153, 164], "aapl": [1, 2, 5, 6, 8, 10, 12, 16, 19, 20, 23, 26, 32, 35, 36, 37, 39, 72, 73, 145, 156], "show": [1, 7, 52, 53, 58, 59, 147, 148, 149, 158, 159, 160], "save": [1, 5, 10, 17, 25, 46, 196], "must": [1, 2, 5, 6, 8, 10, 12, 16, 21, 22, 41, 72, 73, 131, 140, 146, 157], "within": [1, 17, 18, 107, 118, 143, 154], "tradingfe": [1, 24, 25, 26], "appli": [1, 17, 44], "bui": [1, 2, 5, 6, 7, 8, 9, 10, 12, 13, 16, 19, 22, 25, 26, 36, 40, 45, 49, 55, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164, 167, 182], "order": [1, 2, 5, 6, 8, 9, 10, 12, 13, 18, 19, 23, 25, 26, 29, 30, 35, 36, 37, 39, 40, 41, 43, 47, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 182], "dure": [1, 2, 4, 7, 17, 45, 73], "sell": [1, 7, 9, 22, 23, 29, 33, 34, 36, 40, 43, 45, 146, 150, 151, 152, 153, 157, 161, 162, 163, 164], "api": [1, 2, 6, 8, 10, 12, 13, 14, 15, 16, 17, 20, 26, 128, 136], "kei": [1, 2, 3, 5, 6, 8, 12, 14, 15, 16, 17, 21, 26, 46, 128, 136, 165, 196], "onli": [1, 5, 10, 13, 14, 15, 17, 19, 20, 21, 22, 23, 25, 26, 32, 41, 43, 44, 46, 72, 73, 74, 77, 81, 128, 136, 143, 153, 154, 164, 172, 187], "polygondatabacktest": [1, 2, 6, 8], "deprec": [1, 15, 146, 157, 180, 195], "pleas": [1, 2, 5, 6, 8, 10, 13, 15, 22, 72, 180, 195], "instead": [1, 5, 17, 20, 43, 107, 118, 128, 136, 180, 195], "paid": [1, 2, 167, 182], "subscript": [1, 11, 26], "default": [1, 5, 10, 17, 19, 20, 21, 32, 34, 44, 45, 54, 60, 62, 63, 66, 67, 72, 73, 74, 76, 91, 100, 106, 117, 125, 127, 128, 129, 130, 133, 135, 136, 137, 138, 146, 151, 153, 157, 162, 164, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194, 196], "return": [1, 7, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "from": [1, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 26, 41, 42, 44, 45, 72, 73, 76, 80, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 140, 146, 152, 153, 157, 163, 164, 196], "simpl": [1, 5, 6, 8, 10, 16, 22, 26, 146, 157], "first": [1, 5, 6, 8, 10, 13, 16, 17, 20, 21, 22, 25, 26, 30, 32, 73, 168, 178, 183, 193, 196], "mystrategi": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 165], "def": [1, 2, 5, 6, 8, 10, 12, 13, 16, 25, 26, 27, 41, 106, 117, 165, 172, 173, 178, 187, 188, 193, 196], "on_trading_iter": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 27, 28, 41, 42, 47, 102, 103, 113, 114, 165, 168, 172, 178, 183, 187, 193, 196], "self": [1, 2, 5, 6, 8, 10, 12, 13, 14, 16, 17, 19, 20, 22, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 47, 165], "first_iter": [1, 2, 5, 6, 8, 10, 26], "create_ord": [1, 2, 5, 6, 8, 10, 12, 13, 19, 22, 25, 26, 40, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 152, 153, 155, 156, 163, 164], "quantiti": [1, 2, 6, 7, 8, 10, 12, 13, 22, 23, 25, 26, 36, 39, 52, 53, 58, 59, 146, 157], "side": [1, 2, 6, 8, 12, 22, 25, 36, 43, 146, 157], "submit_ord": [1, 2, 5, 6, 8, 10, 13, 19, 22, 25, 26, 40, 43, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 146, 150, 155, 156, 157, 161], "creat": [1, 2, 5, 6, 7, 8, 10, 13, 14, 16, 17, 19, 21, 22, 36, 72, 125, 127, 129, 131, 133, 135, 137, 140, 142, 144, 145, 146, 155, 156, 157], "2018": [1, 20], "31": [1, 5, 10, 25, 26, 44, 125, 126, 133, 134], "symbol": [1, 2, 5, 6, 8, 12, 13, 19, 20, 21, 22, 23, 25, 36, 44, 63, 67, 72, 73, 74, 146, 152, 153, 157, 163, 164], "qqq": 1, "asset_typ": [1, 5, 13, 19, 20, 44, 72, 73, 74, 146, 147, 152, 153, 157, 158, 163, 164], "vital": 2, "step": [2, 5, 14], "valid": [2, 19, 21, 22, 44, 125, 126, 133, 134, 146, 157], "your": [2, 5, 6, 7, 8, 10, 11, 12, 14, 15, 18, 20, 22, 40, 41, 47, 48, 49, 51, 55, 57, 61, 70, 82, 101, 146, 157, 165, 166, 178, 193, 196], "histor": [2, 6, 8, 12, 13, 20, 26, 43, 44, 70, 72, 73], "With": [2, 6, 8, 26], "can": [2, 5, 6, 8, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 29, 32, 41, 44, 45, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 82, 101, 124, 128, 136, 142, 146, 157, 165, 166, 178, 193], "across": [2, 17], "variou": [2, 6, 7, 8, 14], "even": [2, 6, 8, 30, 153, 164], "own": [2, 5, 6, 8, 12, 13, 16, 17, 23, 25, 26, 150, 161], "custom": [2, 25, 32, 146, 157, 165], "guid": [2, 13, 16, 25, 26], "walk": [2, 17], "through": [2, 13, 14, 17], "explain": 2, "introduc": 2, "why": [2, 26], "see": [2, 13, 14, 15, 17, 19, 20, 25, 26, 44, 48, 61, 70, 82, 101, 124, 142], "past": [2, 22, 25], "help": [2, 3, 6, 8, 25], "identifi": [2, 13, 19, 22, 148, 159], "weak": 2, "strength": 2, "deploi": [2, 26], "them": [2, 11, 17, 20, 22, 25, 26, 47, 48, 61, 70, 82, 101, 124, 142, 145, 156], "market": [2, 11, 12, 13, 17, 22, 25, 26, 28, 29, 30, 31, 32, 40, 43, 74, 75, 102, 103, 106, 109, 110, 111, 112, 113, 114, 117, 120, 121, 122, 123, 146, 151, 152, 153, 157, 162, 163, 164, 172, 173, 175, 187, 188, 190], "begin": [2, 43], "make": [2, 4, 5, 6, 8, 17, 22, 25, 26, 74, 75], "sure": [2, 6, 8, 25, 26], "machin": 2, "follow": [2, 5, 6, 8, 13, 14, 15, 17, 19, 20, 22, 26, 27, 30, 41, 78, 165, 178, 193], "command": [2, 25, 26], "pip": [2, 5, 10, 13, 25, 26], "upgrad": [2, 5, 10, 25, 26], "latest": [2, 5, 10, 13, 17, 25, 26, 72], "version": [2, 5, 7, 10, 17, 25, 26], "onc": [2, 14, 15, 16, 17, 22, 25, 26, 32, 41, 146, 157, 196], "id": [2, 15, 17, 148, 159, 196], "like": [2, 5, 17, 21, 25, 26, 29, 30, 31, 32, 33, 43, 165], "visual": [2, 3, 7, 25], "studio": 2, "code": [2, 5, 6, 7, 8, 13, 14, 17, 25, 26, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 62, 66, 102, 103, 113, 114, 165], "v": [2, 7, 19], "pycharm": 2, "quick": 2, "download": [2, 5, 6, 8, 25, 26], "offici": 2, "websit": [2, 7, 10, 13, 14, 16, 17], "http": [2, 6, 8, 12, 13, 14, 15, 16, 17, 20, 25, 26], "visualstudio": 2, "com": [2, 7, 15, 16, 17, 25, 26], "python": [2, 5, 25, 105, 116], "extens": 2, "go": [2, 5, 12, 15, 17, 25, 26], "search": [2, 26], "new": [2, 5, 7, 14, 17, 19, 20, 22, 26, 36, 37, 43, 54, 60, 146, 157, 167, 182], "project": [2, 6, 8, 17], "folder": [2, 5, 10, 13, 17], "termin": [2, 13, 25, 26], "re": [2, 11, 14, 17, 26, 82], "readi": [2, 14, 17, 41, 146, 157], "support": [2, 6, 7, 8, 13, 14, 17, 21, 25, 26, 44, 63, 67, 128, 136, 146, 157], "suit": [2, 26], "differ": [2, 3, 5, 7, 11, 13, 14, 17, 20, 25, 26, 45], "need": [2, 6, 8, 13, 14, 16, 17, 25, 27, 41, 43, 72, 73, 77], "": [2, 3, 6, 7, 8, 13, 14, 16, 17, 18, 21, 25, 26, 38, 41, 46, 52, 58, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 128, 136, 147, 158, 165, 178, 193, 196], "overview": 2, "avail": [2, 9, 10, 17, 20, 21, 23, 26, 47, 72, 73, 106, 117, 128, 136, 153, 164, 167, 182], "etf": [2, 10], "suitabl": [2, 17], "longer": 2, "term": 2, "ideal": [2, 17], "intradai": 2, "section": [2, 14, 17, 25, 47], "2": [2, 6, 17, 22, 30, 32, 62, 66, 72, 73, 111, 112, 122, 123, 153, 164, 178, 193], "offer": [2, 7, 14, 17, 26], "two": [2, 3, 11, 19, 22, 25, 26, 73, 145, 156], "year": [2, 6, 8], "plan": [2, 14, 17], "faster": [2, 6, 8], "retriev": [2, 19, 21, 74, 75, 78, 196], "coupon": [2, 6, 8], "lumi10": [2, 6], "10": [2, 6, 8, 13, 17, 19, 20, 32, 40, 44, 63, 67, 82, 127, 135, 152, 153, 163, 164, 165, 172, 173, 178, 187, 188, 193, 196], "off": [2, 6, 8], "3": [2, 12, 17, 146, 157], "design": [2, 17, 25, 27, 41], "look": [2, 5, 15, 26], "price": [2, 6, 8, 9, 13, 16, 17, 19, 20, 21, 22, 23, 31, 36, 39, 43, 44, 45, 47, 62, 63, 66, 67, 70, 72, 73, 74, 75, 78, 128, 136, 146, 152, 153, 157, 163, 164], "secur": [2, 5, 10, 14, 19, 22], "account": [2, 6, 8, 11, 12, 13, 15, 16, 17, 26, 43, 47, 49, 51, 53, 55, 57, 59, 61, 150, 161, 167, 182], "usernam": [2, 8, 11, 17, 26], "password": [2, 8, 13, 14, 17, 196], "net": [2, 8, 51, 57], "lumi": [2, 7, 8], "4": [2, 17, 26, 147, 158], "full": [2, 6, 8, 11, 14, 26, 125, 133], "flexibl": [2, 5, 6, 8, 25], "dataset": 2, "e": [2, 9, 17, 19, 20, 21, 22, 23, 25, 72, 73, 74, 146, 147, 152, 157, 158, 163], "g": [2, 9, 17, 20, 21, 22, 23, 25, 72, 73, 146, 157], "databas": [2, 5, 17, 26], "export": 2, "manual": [2, 14, 17], "configur": [2, 11, 15, 26], "ve": [2, 13, 16, 26], "select": [2, 14, 17], "built": [2, 5, 26], "addit": [2, 14, 17, 19, 22, 146, 157], "specif": [2, 7, 13, 14, 17, 19, 22, 41, 44, 62, 66, 109, 120, 125, 126, 133, 134, 146, 157, 166], "replac": [2, 6, 8, 13], "your_polygon_api_kei": [2, 6], "actual": [2, 13, 22, 41, 43, 175, 190], "1d": [2, 6, 8, 20, 21, 40, 44], "get_last_pric": [2, 6, 8, 10, 13, 16, 20, 21, 26, 44, 47], "qty": [2, 6, 8], "portfolio_valu": [2, 6, 8, 10, 13, 26, 28, 42, 177, 192], "__name__": [2, 6, 8, 13], "__main__": [2, 6, 8, 13], "2023": [2, 6, 8, 44, 125, 126, 133, 134, 196], "result": [2, 5, 6, 8, 10, 25, 26, 42], "inform": [2, 3, 5, 9, 10, 13, 17, 43, 44, 77, 78, 126, 131, 134, 140, 146, 157, 166], "about": [2, 9, 11, 26, 166], "refer": [2, 3, 17, 26, 27], "crucial": [2, 17, 25], "understand": [2, 4, 25], "aspect": 2, "execut": [2, 9, 17, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 102, 103, 107, 109, 111, 113, 114, 118, 120, 122, 143, 152, 154, 163, 172, 173, 178, 187, 188, 193], "statist": 2, "analysi": [2, 4, 13, 46], "tear": 2, "sheet": 2, "includ": [2, 3, 7, 9, 10, 13, 17, 19, 20, 26, 32, 41, 44, 54, 60, 72, 124, 146, 148, 157, 159, 175, 190], "equiti": [2, 14, 51, 57], "curv": 2, "metric": [2, 7], "sharp": [2, 7], "ratio": [2, 7], "drawdown": [2, 7], "comparison": 2, "everi": [2, 25, 32, 40, 43, 47, 81, 196], "which": [2, 6, 7, 8, 9, 13, 14, 17, 20, 21, 22, 32, 41, 49, 51, 55, 57, 74, 75, 76, 77, 128, 130, 136, 138, 178, 193], "wa": [2, 12, 13, 27, 30, 33, 34, 41, 43, 72, 167, 182], "timestamp": [2, 12, 20, 44, 62, 63, 66, 67, 85, 86, 87, 88, 89, 94, 95, 96, 97, 98, 196], "essenti": [2, 17], "review": [2, 14], "potenti": [2, 25, 26, 147, 158], "issu": 2, "optim": [2, 7, 17, 26], "interpret": [2, 178, 193], "technic": [2, 13, 41], "move": [2, 7, 22, 26], "averag": [2, 7, 22, 23], "rsi": [2, 13], "respond": 2, "condit": [2, 22, 40], "base": [2, 7, 12, 13, 19, 20, 21, 22, 23, 24, 26, 40, 43, 44, 46, 72, 73, 74, 146, 157], "power": [2, 6, 8, 17, 25, 26], "framework": [2, 41], "multipl": [2, 17, 143, 154, 196], "By": [2, 17, 26, 34, 128, 136, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194], "quickli": [2, 14, 17, 25], "environ": [2, 14, 26, 196], "confid": 2, "further": [2, 17], "individu": [2, 26], "abov": [2, 15, 19, 20, 32], "uniqu": 3, "becaus": [3, 5, 6, 8, 10, 17, 43], "thei": [3, 5, 11, 17, 20, 26, 41, 81, 128, 136], "add_mark": [3, 26, 47], "add": [3, 5, 13, 14, 17, 19, 22, 25, 32, 43, 46, 62, 63, 66, 67], "marker": [3, 46, 63, 65, 67, 69], "add_lin": [3, 26, 47], "line": [3, 26, 46, 62, 63, 64, 66, 67, 68], "influenc": [3, 27, 41], "decis": [3, 4], "point": [3, 7, 9, 15, 22, 44, 62, 66, 72, 73, 147, 158], "time": [3, 5, 6, 8, 9, 12, 13, 14, 17, 20, 21, 25, 32, 41, 43, 44, 45, 71, 72, 73, 78, 81, 82, 87, 88, 96, 97, 102, 103, 107, 113, 114, 118, 128, 136, 146, 157, 168, 178, 183, 193], "event": [4, 26, 33, 34, 35, 36, 37, 38, 39, 43, 63, 67], "action": [4, 17], "taken": 4, "backtest": [4, 5, 7, 10, 17, 21, 22, 24, 32, 44, 46, 63, 67, 72, 73, 74, 75, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 170, 185], "debug": [4, 46, 196], "process": [4, 6, 8, 14, 17, 25, 37, 39, 152, 153, 163, 164, 196], "collect": [4, 5], "comprehens": [4, 25], "view": [4, 17], "refin": [4, 25], "note": [5, 10, 13, 14, 15, 17, 20, 22, 43, 77, 146, 157], "ensur": [5, 10, 14, 17, 21, 22, 25, 26, 146, 157], "proceed": [5, 10, 14, 25], "been": [5, 10, 15, 22, 23, 35, 36, 37, 39, 43, 74, 78], "some": [5, 10, 14, 25, 26, 44, 45, 74, 146, 157], "major": [5, 10], "chang": [5, 10, 12, 14, 16, 17, 20, 32], "modul": [5, 10, 26], "situat": 5, "much": [5, 6, 8, 12], "easier": [5, 17], "intend": [5, 17], "who": [5, 17, 52, 58, 147, 158], "after": [5, 6, 8, 13, 14, 17, 21, 26, 28, 30, 31, 40, 42, 44, 63, 67, 72, 76, 130, 138, 139, 196], "librari": [5, 7, 13, 16, 17, 25], "strictli": [5, 21], "parquet": 5, "etc": [5, 16, 20, 21, 40, 45, 48, 61, 63, 67, 77, 148, 159], "wish": [5, 26], "accept": [5, 19], "one": [5, 7, 13, 14, 17, 22, 25, 26, 41, 43, 47, 72, 109, 120, 146, 153, 157, 164], "frame": 5, "raw": [5, 20, 22], "addition": [5, 10, 20], "possibl": [5, 14, 32, 44, 62, 63, 66, 67, 153, 164], "contract": [5, 19, 20, 22, 32, 43], "also": [5, 10, 15, 17, 22, 25, 26, 32, 43, 72, 146, 151, 157, 162, 166], "difficult": 5, "backtestingbrok": [5, 6, 8, 10, 43], "next": [5, 6, 8, 12, 17, 26, 40, 76, 130, 138, 139], "normal": [5, 16, 131, 140], "someth": [5, 13], "0000": 5, "hr": [5, 21], "2359": [5, 21], "last": [5, 13, 20, 21, 22, 28, 30, 31, 42, 43, 44, 72, 73, 74, 75, 85, 86, 94, 95, 171, 186, 196], "consid": [5, 20, 177, 192], "zone": [5, 20], "unless": 5, "america": [5, 20, 44, 176, 179, 181, 191, 194], "york": [5, 17], "aka": 5, "est": 5, "receiv": [5, 14, 17], "index": [5, 19, 20, 21, 26, 78], "datetime64": [5, 21], "column": [5, 20, 21, 78, 196], "high": [5, 20, 21, 25, 26, 43, 78, 81], "low": [5, 17, 20, 21, 43, 78, 81], "volum": [5, 20, 21, 78, 81], "should": [5, 10, 14, 16, 20, 22, 27, 40, 43, 45, 74, 107, 118, 128, 136], "2020": [5, 10, 25, 26, 72, 90, 91, 99, 100, 147, 152, 158, 163], "01": [5, 6, 8, 20, 25, 146, 147, 152, 157, 158, 163], "02": [5, 20], "09": 5, "00": [5, 44, 110, 121, 146, 152, 153, 157, 163, 164, 196], "3237": 5, "3234": 5, "75": 5, "3235": 5, "25": [5, 17], "16808": 5, "32": 5, "10439": 5, "33": 5, "50": [5, 22, 32, 146, 157, 178, 193], "3233": 5, "8203": 5, "04": [5, 44], "22": 5, "15": [5, 17, 20, 32, 44, 72, 73], "56": 5, "2800": 5, "2796": 5, "8272": 5, "57": 5, "2794": 5, "7440": 5, "58": 5, "2793": 5, "7569": 5, "yfinanc": [5, 44], "yf": [5, 44], "5d": 5, "interv": 5, "1m": [5, 21, 44], "to_csv": 5, "subsequ": [5, 6, 8], "ad": [5, 11, 13, 17, 19, 26, 72, 73], "One": [5, 17, 19, 22, 44, 146, 157], "load": [5, 18, 21, 63, 67, 196], "mai": [5, 13, 14, 17, 19, 22, 25, 72, 73, 81, 146, 157], "might": [5, 13, 14, 17], "entiti": [5, 13, 19, 20, 21, 22, 23, 24, 25, 26, 72, 73, 80, 146, 152, 153, 157, 163, 164], "assettyp": [5, 13, 19, 146, 152, 153, 157, 163, 164], "pd": [5, 20], "awar": [5, 20], "df": [5, 13, 20, 21, 30, 72, 73], "read_csv": 5, "third": 5, "we": [5, 6, 7, 8, 10, 11, 13, 17, 25, 26, 28, 47, 72, 146, 157], "least": [5, 41], "timestep": [5, 21, 43, 44, 72, 73, 84, 93], "either": [5, 19, 21, 22, 72, 73, 74, 75], "final": [5, 6, 8, 10, 14, 26], "trader": [5, 6, 8, 10, 12, 13, 14, 15, 16, 26, 33], "data_sourc": [5, 12, 43, 44, 72, 73], "datetime_start": [5, 43], "datetime_end": [5, 43], "strat": 5, "100000": 5, "add_strategi": [5, 12, 13, 14, 15, 16, 25, 26, 46], "run_al": [5, 13, 14, 15, 16, 25, 26, 46], "put": [5, 12, 16, 19, 25], "togeth": [5, 22, 25], "Then": [5, 13, 16, 72], "startegi": 5, "read": [5, 15, 25, 44], "same": [5, 14, 17, 22, 26, 73], "directori": [5, 14, 17], "script": 5, "pick": [5, 10, 17, 26], "rang": [5, 13, 17, 20, 21], "link": [6, 8, 14], "give": [6, 8, 13, 131, 140], "u": [6, 7, 8, 13, 14, 21, 26, 175, 190], "credit": [6, 8, 153, 164], "sale": [6, 8], "utm_sourc": 6, "affili": 6, "utm_campaign": 6, "robust": [6, 8], "fetch": [6, 8, 44, 126, 131, 134, 140], "simplifi": [6, 8], "simpli": [6, 8], "polygondatasourc": 6, "get_historical_pric": [6, 8, 13, 20, 26, 31, 44, 47, 73], "As": [6, 8, 17], "pai": [6, 8, 14], "mani": [6, 8, 13, 26, 32, 41, 81], "won": [6, 8], "t": [6, 8, 13, 14, 17, 26], "limit": [6, 8, 13, 14, 17, 22, 43, 72, 73, 81, 110, 121, 146, 152, 153, 157, 163, 164], "cach": [6, 8], "comput": [6, 8, 17, 25, 26], "so": [6, 8, 10, 13, 14, 17, 19, 22, 25, 26, 47, 82, 128, 136], "take": [6, 8, 17, 22, 25, 41, 44, 62, 63, 66, 67, 73, 74, 75, 125, 133], "bit": [6, 8], "obtain": [6, 8, 13, 44, 126, 127, 129, 131, 134, 135, 137, 140], "dashboard": [6, 8, 25], "necessari": [6, 8, 17, 43], "inherit": [6, 8, 45], "defin": [6, 7, 8, 13, 24, 27, 32, 41, 42, 43, 45, 165, 196], "hold": [6, 8, 20, 22, 23, 26, 36], "until": [6, 8, 12, 20, 102, 103, 113, 114, 146, 157], "determin": [6, 7, 8, 12, 22, 43, 106, 117, 146, 157, 166], "05": [6, 8, 146, 157, 196], "form": [6, 21, 81, 106, 117, 127, 129, 135, 137, 167, 182], "tool": [6, 8, 17, 26], "capabl": [6, 8], "easi": [6, 8, 14, 17, 25, 26], "integr": [6, 8], "versatil": [6, 8, 13, 17], "choic": [6, 8, 14, 17], "gener": [7, 10, 13, 16, 26, 151, 162], "quantstat": 7, "varieti": 7, "annual": [7, 25, 26], "yearli": 7, "total": [7, 20, 28, 51, 57, 147, 158, 175, 190], "romad": 7, "over": [7, 19, 20, 25, 26, 62, 63, 66, 67], "maximum": [7, 17], "sortino": 7, "variat": 7, "differenti": 7, "harm": 7, "volatil": [7, 22, 128, 136], "max": [7, 13], "observ": 7, "loss": [7, 22, 43, 62, 63, 66, 67, 146, 152, 153, 157, 163, 164], "peak": 7, "trough": 7, "portfolio": [7, 9, 13, 23, 28, 51, 57, 63, 67, 175, 190], "attain": [7, 146, 157], "longest": 7, "durat": [7, 32, 146, 153, 157, 164, 178, 193], "reach": [7, 25, 26, 43], "accompani": 7, "graph": [7, 62, 63, 66, 67], "cumul": 7, "scale": [7, 196], "better": [7, 22, 146, 157], "exponenti": 7, "growth": 7, "showcas": 7, "tailor": 7, "achiev": [7, 22, 25, 26], "goal": 7, "condor": [7, 17], "martingal": 7, "iron": 7, "delta": [7, 128, 136], "previou": [7, 79, 80], "dte": 7, "expir": [7, 14, 19, 22, 32, 44, 72, 74, 125, 126, 127, 128, 133, 134, 135, 136, 139, 146, 157], "bband": 7, "v2": 7, "bolling": [7, 62, 66], "band": [7, 62, 66], "interest": [7, 13, 128, 136], "implement": [7, 17, 26, 27, 41, 44, 46], "visit": [7, 16, 17, 25, 26], "our": [7, 13, 17, 25, 26, 28], "lumiwealth": [7, 15, 26], "access": [7, 14, 16, 17, 20, 25, 26, 165, 196], "invest": [7, 14, 26], "question": 7, "email": [7, 14], "www": [8, 16], "thetadatabacktest": 8, "altern": 8, "both": [8, 14, 22, 25, 30, 146, 157], "argument": [8, 128, 136], "thetadata_usernam": 8, "thetadata_password": 8, "were": [9, 26, 38], "place": [9, 13, 18, 146, 151, 157, 162], "along": 9, "involv": 9, "strike": [9, 19, 44, 72, 126, 128, 131, 134, 136, 140, 146, 157], "ticker": [9, 19, 20, 32, 44, 81], "cash": [9, 13, 22, 26, 28, 42, 43, 48, 49, 51, 55, 57, 61, 175, 177, 180, 190, 192, 195], "amount": [9, 13, 20, 22, 28, 44, 49, 51, 55, 57, 79, 80, 146, 157], "cannot": 10, "veri": [10, 17, 26], "easili": [10, 26, 32, 45], "modifi": [10, 25, 26], "anyth": 10, "There": [10, 11, 146, 157], "aapl_pric": [10, 26], "alloc": 10, "11": [10, 17, 19, 26], "12": [10, 17, 19, 25, 26, 74], "speak": [11, 41], "learn": [11, 17, 25, 26], "alpaca": [11, 20, 26, 72, 73], "document": [11, 13, 14, 17, 25, 26, 72], "interact": [11, 13, 20, 22, 26, 45, 72, 73, 74, 81], "factor": [11, 26], "authent": [11, 26], "2fa": [11, 26], "secondari": [11, 26], "paper": [11, 12, 15, 16, 17, 26, 44], "legaci": [11, 26], "ccxt": [11, 26], "tradier": [11, 26, 77, 153, 164], "max_work": [12, 43, 44, 73], "20": [12, 13, 22, 32, 43, 165], "chunk_siz": [12, 44, 73], "connect_stream": [12, 43], "connect": [12, 13, 14, 17, 105, 116], "tradeapi": 12, "rest": [12, 14, 17, 41], "get_timestamp": [12, 26, 44, 47], "current": [12, 13, 14, 17, 21, 36, 37, 42, 43, 44, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 77, 78, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 128, 136, 143, 149, 153, 154, 160, 164, 167, 175, 178, 182, 190, 193, 196], "unix": 12, "represent": [12, 21, 22, 44, 72, 73], "is_market_open": [12, 43], "get_time_to_open": [12, 43], "remain": [12, 39, 43, 172, 187], "get_time_to_clos": [12, 43], "alpaca_config": [12, 25, 26], "your_api_kei": [12, 13], "secret": [12, 13, 14, 16, 25, 26], "api_secret": [12, 25, 26], "your_api_secret": 12, "endpoint": 12, "print": [12, 42, 196], "alpacastrategi": 12, "on_trading_inter": [12, 32], "order_typ": [12, 153, 164], "asset_type_map": 12, "us_equ": 12, "cancel_ord": [12, 26, 43, 47, 149, 160], "cancel": [12, 22, 30, 35, 43, 71, 109, 111, 120, 122, 142, 143, 144, 145, 146, 149, 151, 154, 155, 156, 157, 160, 162], "get_historical_account_valu": [12, 43], "1400": 12, "1600": 12, "7": [12, 13, 17, 26, 32, 106, 117], "0830": 12, "0930": 12, "600": 12, "sampl": [12, 26], "1612172730": 12, "000234": 12, "boolean": [12, 151, 153, 162, 164], "map_asset_typ": 12, "orderdata": 12, "to_request_field": 12, "cryoptocurr": 13, "popular": 13, "find": [13, 14, 15, 16, 17, 26, 44, 76, 127, 129, 130, 131, 135, 137, 138, 139, 140], "readthedoc": 13, "en": 13, "enabl": [13, 14, 15], "wide": [13, 17, 63, 67], "coinbas": [13, 26], "pro": 13, "binanc": [13, 26], "kraken": [13, 26, 146, 157], "kucoin": [13, 26], "constantli": [13, 26], "don": [13, 14, 17, 26], "let": 13, "know": [13, 18], "ll": [13, 14, 16, 26], "desir": [13, 14, 21, 81, 128, 136], "credenti": [13, 14, 15], "rememb": [13, 26], "under": [13, 14, 17, 25], "similar": [13, 17, 30], "alwai": [13, 30, 43, 106, 117, 167, 182], "24": [13, 17, 32, 106, 117], "set_market": [13, 26, 32, 47], "few": [13, 17, 26, 101], "common": [13, 14], "coinbase_config": 13, "exchange_id": 13, "apikei": 13, "your_secret_kei": 13, "sandbox": [13, 17], "kraken_config": 13, "margin": [13, 146, 157], "kucoin_config": 13, "your_passphras": 13, "NOT": 13, "your_secret": 13, "coinbasepro_config": 13, "coinbasepro": 13, "instanti": [13, 16, 26, 43], "chosen": [13, 16, 17], "correct": [13, 14, 16], "instanc": [13, 196], "strategy_executor": [13, 16], "complet": [13, 14, 15, 17, 22, 26, 74, 75], "demonstr": 13, "pandas_ta": 13, "error": [13, 17, 22, 34], "importantfunct": 13, "30": [13, 40, 72, 73, 81, 196], "sinc": 13, "those": [13, 17, 166], "hour": [13, 20, 21, 32, 40, 44, 72, 73, 106, 117, 178, 193], "quot": [13, 19, 20, 21, 22, 44, 49, 51, 55, 57, 72, 73, 74, 75, 77, 146, 152, 153, 157, 163, 164, 175, 177, 190, 192], "transact": [13, 22, 167, 182], "btc": [13, 19, 20, 72, 73, 74, 146, 152, 153, 157, 163, 164], "0": [13, 15, 17, 19, 21, 22, 23, 24, 25, 32, 42, 43, 44, 87, 88, 96, 97, 146, 152, 153, 157, 163, 164, 173, 188, 196], "mkt_order": 13, "000": [13, 25, 26], "lmt_order": 13, "limit_pric": [13, 22, 43, 110, 121, 146, 152, 153, 157, 163, 164], "10000": [13, 25], "pair": [13, 20, 22, 44, 74, 75, 125, 126, 133, 134, 146, 157], "bar": [13, 18, 21, 26, 43, 44, 63, 67, 71, 72, 73, 74, 75, 78, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 128, 136], "max_pric": 13, "log_messag": [13, 16, 20, 26, 28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 47, 52, 53, 58, 59, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 147, 148, 149, 158, 159, 160, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 194], "f": [13, 16, 28, 35, 36, 38, 39, 42, 72, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 169, 171, 174, 176, 177, 179, 181, 184, 186, 189, 191, 192, 194, 196], "calcul": [13, 20, 22, 43, 44, 128, 136], "ta": 13, "length": [13, 21, 43, 44, 72, 73, 78, 84, 93], "current_rsi": 13, "iloc": [13, 72], "macd": 13, "current_macd": 13, "55": 13, "ema": 13, "current_ema": 13, "get_posit": [13, 23, 26, 47, 150, 161], "share": [13, 16, 20, 22, 29, 31, 36, 39, 44, 146, 157, 175, 190], "asset_to_get": 13, "outstand": 13, "get_ord": [13, 26, 47], "whatev": 13, "last_pric": [13, 74, 75, 196], "color": [13, 62, 63, 66, 67, 105, 116], "green": [13, 62, 63, 66, 67, 105, 116], "dt": [13, 21, 44, 62, 63, 66, 67, 90, 91, 99, 100, 139], "get_datetim": [13, 26, 43, 44, 47], "check": [13, 17, 22, 26, 40, 43, 47, 72, 148, 149, 159, 160, 168, 170, 183, 185], "certain": [13, 63, 67], "eg": [13, 17, 19, 20, 25, 44, 47, 49, 51, 55, 57, 62, 63, 66, 67, 70, 77, 82, 105, 116, 125, 126, 133, 134, 146, 157, 178, 193], "9": [13, 17, 32], "30am": 13, "entir": 13, "example_strategi": [13, 25, 26], "github": [13, 15, 17, 20, 25, 26], "repositori": [13, 17], "brokerag": [14, 17], "firm": 14, "oper": [14, 17, 32, 41], "countri": 14, "around": [14, 17, 18], "world": [14, 17], "great": [14, 17], "especi": [14, 82, 196], "platform": [14, 26], "fee": [14, 17, 18, 26], "structur": [14, 26], "best": [14, 17], "deal": [14, 26], "real": [14, 16, 17, 25, 71, 78, 81], "subscrib": 14, "appropri": [14, 20], "packag": [14, 26], "depend": [14, 17, 72, 73], "exchang": [14, 21, 22, 44, 72, 73, 74, 75, 76, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 125, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, 140, 146, 157], "snapshot": [14, 42], "bundl": 14, "On": [14, 17], "stream": [14, 71, 78, 81], "nasdaq": [14, 32, 106, 117], "network": 14, "c": 14, "utp": 14, "totalview": 14, "nyse": [14, 32, 76, 106, 117, 130, 138], "cta": 14, "openbook": 14, "ultra": 14, "opra": 14, "top": [14, 17, 26], "relat": [14, 17, 36], "suffic": 14, "login": 14, "ibkr": 14, "client": [14, 15, 17], "portal": 14, "navig": [14, 15, 17], "menu": [14, 26], "click": [14, 17], "prompt": 14, "incur": 14, "cost": [14, 17, 43], "associ": 14, "notif": [14, 17], "ib": [14, 19, 132, 141], "mobil": 14, "app": 14, "approv": 14, "interrupt": [14, 33, 196], "autom": [14, 17], "handl": 14, "solut": 14, "fulli": 14, "doesn": 14, "approach": 14, "conveni": 14, "primari": [14, 196], "maintain": [14, 17], "without": [14, 17, 25, 131, 140], "separ": [14, 17], "control": [14, 178, 193], "twice": 14, "enhanc": [14, 25], "complex": [14, 25], "restrict": 14, "ip": [14, 15, 17], "address": [14, 17], "tw": [14, 17, 20], "ibgatewai": 14, "permiss": [14, 19], "what": [14, 26, 47, 82, 177, 192], "keep": [14, 17, 22, 23, 81, 146, 157], "below": [14, 45, 47, 48, 61, 70, 74, 82, 101, 124, 142], "instruct": [14, 17, 146, 152, 153, 157, 163, 164], "given": [14, 20, 21, 43, 44, 52, 58, 71, 72, 73, 76, 84, 93, 125, 127, 129, 130, 131, 133, 135, 137, 138, 139, 140, 143, 148, 154, 159], "attempt": [14, 175, 190], "while": [14, 17], "disconnect": 14, "caus": 14, "loop": [14, 31, 40, 103, 114, 172, 187], "stop": [14, 22, 25, 32, 33, 40, 43, 62, 63, 66, 67, 102, 103, 113, 114, 146, 152, 153, 157, 163, 164, 172, 187, 196], "tediou": 14, "upper": 14, "right": [14, 17, 19, 28, 63, 67, 72, 152, 163], "corner": [14, 17], "scroll": [14, 17], "down": [14, 17, 25, 33, 63, 67], "plu": [14, 105, 116, 175, 190], "sign": 14, "button": [14, 17], "header": 14, "fill": [14, 17, 21, 22, 23, 36, 39, 43, 146, 157, 167, 182], "out": [14, 26, 43, 47, 52, 58, 74], "field": [14, 20, 22], "page": [14, 16, 17, 26], "At": [14, 25], "confirm": [14, 17], "activ": [14, 17, 22, 26, 74, 75, 78, 152, 153, 163, 164], "back": [14, 196], "enter": [14, 17, 19, 22, 31, 146, 157, 178, 193], "via": 14, "act": 14, "promptli": 14, "ask": [14, 77], "proof": 14, "author": 14, "upload": 14, "request": 14, "eula": 14, "signatur": 14, "block": 14, "submit": [14, 22, 37, 43, 47, 142, 146, 152, 153, 157, 163, 164], "practic": 14, "monei": [14, 16, 17, 25, 49, 51, 55, 57, 167, 182], "avoid": 14, "conflict": [14, 196], "variabl": [14, 26, 31, 42, 166], "env": [14, 17, 196], "ib_usernam": [14, 17], "user123": [14, 17], "ib_password": [14, 17], "password123": [14, 17], "account_id": [14, 17], "subaccount": [14, 17], "u17369206": [14, 17], "ib_api_url": [14, 17], "url": [14, 17], "host": [14, 17], "localhost": [14, 17, 196], "8000": [14, 17], "strangl": [14, 15], "tutori": [15, 26], "workstat": 15, "global": [15, 17, 20, 45], "activex": 15, "socket": [15, 17], "disabl": 15, "port": [15, 17], "7496": 15, "7497": [15, 17], "highli": [15, 26], "thoroughli": 15, "algorithm": [15, 17, 25], "master": 15, "999": 15, "py": [15, 17, 25, 26], "interactive_brokers_config": 15, "socket_port": 15, "client_id": 15, "digit": 15, "127": [15, 17], "entri": [15, 22], "except": [15, 20, 25, 26, 34], "interactivebrok": [15, 20], "interactive_brok": 15, "simple_start_ib": 15, "bot": [15, 17, 25, 32, 34, 45, 196], "blob": [15, 25, 26], "getting_start": 15, "dash": [16, 62, 66], "tradier_config": 16, "access_token": 16, "qtrz3zurd9244ahuw2aoyapgvyra": 16, "account_numb": 16, "va22904793": 16, "your_access_token": 16, "your_account_numb": 16, "That": 16, "now": [16, 25, 44, 74], "abl": 16, "less": [16, 146, 147, 157, 158], "than": [16, 17, 44, 82, 146, 147, 157, 158], "cover": [17, 26], "topic": 17, "decid": [17, 72], "correctli": 17, "applic": [17, 106, 117], "success": 17, "skip": [17, 30], "repl": 17, "eas": 17, "afford": 17, "expens": [17, 128, 136], "browser": [17, 25, 46], "edit": 17, "directli": [17, 43], "tip": 17, "howev": [17, 22, 30, 32, 146, 157], "excel": 17, "develop": [17, 26], "month": [17, 85, 94], "fit": [17, 101], "scalabl": [17, 196], "figur": 17, "blueprint": 17, "worker": 17, "background": 17, "butterfli": 17, "afa": 17, "starter": 17, "itself": 17, "left": [17, 63, 67], "sidebar": 17, "delet": 17, "unnecessari": 17, "trashcan": 17, "mandatori": [17, 19, 45, 146, 157], "ones": [17, 41], "restart": [17, 40], "servic": [17, 105, 116], "commit": 17, "redeploi": 17, "tab": 17, "6": [17, 19, 26], "monitor": 17, "expect": [17, 25, 26, 128, 136], "regularli": 17, "profit": [17, 22, 25, 26, 43, 62, 63, 66, 67], "8": [17, 26], "bottom": 17, "press": 17, "consol": [17, 105, 116], "everyth": [17, 26], "part": [17, 22, 41, 153, 164, 165], "locat": 17, "reserv": 17, "vm": 17, "13": [17, 127, 135], "downgrad": 17, "vcpu": 17, "effect": 17, "reduc": 17, "todai": [17, 74, 82], "wait": [17, 22, 39, 109, 110, 111, 112, 120, 121, 122, 123], "messag": [17, 101, 105, 116], "14": [17, 196], "16": [17, 74], "17": [17, 19, 32], "proper": 17, "discord": [17, 26], "webhook": 17, "live_config": 17, "correspond": [17, 35, 36, 37], "soon": 17, "incred": 17, "commiss": 17, "lot": [17, 166], "engag": 17, "tradier_access_token": 17, "token": 17, "qtrz3zurl9244ahuw4aoyapgvyra": 17, "tradier_account_numb": 17, "va12204793": 17, "tradier_is_pap": 17, "align": 17, "perfectli": 17, "seamlessli": 17, "alpaca_api_kei": 17, "pk7t6yvax6pmh1em20yn": 17, "alpaca_api_secret": 17, "9wgjls3wixq54fcphwwzjcp8jcfjfkuwsryskkma": 17, "alpaca_is_pap": 17, "unit": [17, 44, 146, 157, 178, 193], "state": [17, 166, 196], "typic": [17, 22, 165], "challeng": 17, "friendli": 17, "coinbase_api_kei": 17, "steea9fhiszntmpihqjudeqolitj0javz": 17, "coinbase_api_secret": 17, "nuzcnprsxjxxouxrhqe5k2k1xnqlpckh2xcutifkcw": 17, "coinbase_is_sandbox": 17, "focus": 17, "competit": 17, "kraken_api_kei": 17, "xyz1234567890abcdef": 17, "kraken_api_secret": 17, "abcdef1234567890abcdef1234567890abcdef1234": 17, "intern": [17, 146, 157], "arrai": [17, 21], "cfd": 17, "Their": 17, "presenc": 17, "compat": 17, "purpos": 17, "newer": 17, "interactive_brokers_port": 17, "interactive_brokers_client_id": 17, "123456": 17, "interactive_brokers_ip": 17, "ib_subaccount": 17, "subaccount1": 17, "src": 17, "paper_1": 17, "is_backtest": [17, 26], "a7py0zidhxde6qkx8ojjknp7cd87hwku": 17, "discord_webhook_url": 17, "send": [17, 105, 116], "123456789": 17, "db_connection_str": [17, 196], "histori": 17, "sqlite": 17, "account_histori": 17, "db": 17, "strategy_nam": 17, "strategy_id": [17, 196], "my": [17, 25], "think": [17, 82], "polygon_max_memory_byt": 17, "memori": 17, "byte": 17, "usag": [17, 26], "512000000": 17, "main": [17, 18, 22, 26, 33, 40, 45, 146, 157], "smoothli": 17, "verifi": 17, "behav": 17, "ey": 17, "straightforward": 17, "happi": 17, "assist": 17, "repres": [19, 22, 44, 45, 72, 73, 126, 134], "attribut": [19, 196], "track": [17, 19, 23, 26, 52, 53, 58, 59, 148, 149, 159, 160], "underli": [19, 21, 128, 131, 136, 140], "ibm": [19, 145, 156], "just": [19, 26, 32, 36, 43, 146, 157], "corpor": 19, "printout": 19, "multipli": [19, 20, 36, 39, 44, 125, 126, 129, 131, 133, 134, 137, 140, 152, 163], "nexpir": 19, "expiri": [19, 127, 132, 135, 141], "june": 19, "2021": [19, 32, 128, 136, 139], "18": 19, "currenc": [19, 72, 146, 157, 167, 175, 177, 182, 190, 192], "eur": [19, 72, 73, 146, 152, 153, 157, 163, 164], "convers": [19, 178, 193], "gbp": [19, 152, 163], "behind": 19, "scene": 19, "anytim": 19, "due": 19, "precis": [19, 128, 136], "underlying_asset": 19, "case": [19, 21, 22], "yyyymmdd": [19, 132, 141], "yyyymm": 19, "multileg": [19, 22, 153, 164], "leverag": [19, 146, 157], "_asset_typ": 19, "_right": 19, "asset_type_must_be_one_of": 19, "right_must_be_one_of": 19, "26": 19, "155": 19, "base_asset": [19, 152, 153, 163, 164], "optionright": 19, "classmethod": [19, 20, 22, 23, 44], "from_dict": [19, 22, 23], "is_valid": 19, "symbol2asset": 19, "particularli": 19, "to_dict": [19, 22, 23], "assetsmap": 19, "map": 19, "userdict": 19, "datafram": [20, 21, 44, 64, 65, 68, 69, 72, 78, 81], "dividend": [20, 44, 79, 80, 128, 136, 167, 182], "stock_split": 20, "local": [20, 21, 42, 44, 90, 91, 99, 100, 128, 136], "timezon": [20, 21, 26, 44, 90, 91, 99, 100, 176, 181, 191], "new_york": [20, 44, 176, 179, 181, 191, 194], "helper": [20, 22, 45], "row": [20, 42, 72, 73, 81], "get_last_dividend": 20, "per": [20, 44], "get_momentum": 20, "momentum": 20, "aggregate_bar": 20, "frequenc": [20, 21], "Will": [20, 25, 62, 63, 66, 67, 74, 75, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 151, 162, 176, 179, 181, 191, 194], "timefram": 20, "min": 20, "15min": 20, "1h": [20, 40], "specifi": [20, 22, 44, 72, 73, 146, 157, 196], "filter": 20, "daterang": 20, "get_total_volum": 20, "sum": [20, 51, 57], "themselv": 20, "supplier": 20, "exce": 20, "pace": 20, "throttl": 20, "respect": 20, "mention": 20, "tick": 20, "frequent": 20, "accur": [20, 44], "updat": [20, 22, 26, 36, 38, 108, 119, 146, 157, 167, 182], "rule": 20, "historical_limit": 20, "financi": [20, 25], "ohlcv": [20, 21, 43], "split": [20, 45], "instrument": 20, "yield": 20, "coin": [20, 146, 157], "eth": [20, 73, 146, 153, 157, 164], "num_period": 20, "get_total_dividend": 20, "get_total_stock_split": 20, "get_total_return": 20, "get_total_return_pct": 20, "percentag": [20, 25], "get_total_return_pct_chang": 20, "recent": [20, 72, 78], "get_bar": [20, 21, 44], "ethereum": 20, "bitcoin": 20, "grouper_kwarg": 20, "bars_agg": 20, "inclus": 20, "parse_bar_list": 20, "bar_list": 20, "singl": [20, 144, 155], "nobardatafound": 20, "date_start": 21, "date_end": 21, "trading_hours_start": 21, "trading_hours_end": 21, "23": 21, "59": 21, "input": [21, 102, 103, 113, 114], "manag": [21, 22, 26, 47, 61, 124], "attach": 21, "0001": 21, "localize_timezon": 21, "tz_local": 21, "eastern": 21, "utc": 21, "sybmol": 21, "datalin": 21, "numpi": 21, "iter_index": 21, "count": [21, 32, 78, 81, 196], "seri": 21, "set_tim": 21, "repair_times_and_fil": 21, "merg": 21, "reindex": 21, "nan": 21, "lower": 21, "set_date_format": 21, "set_dat": 21, "trim_data": 21, "trim": 21, "match": [21, 44], "to_datalin": 21, "exist": [21, 54, 60], "get_iter_count": 21, "len": 21, "check_data": 21, "wrapper": 21, "timeshift": [21, 43, 44, 72, 73, 84, 87, 88, 93, 96, 97], "_get_bars_dict": 21, "min_timestep": [21, 44], "timestep_map": [21, 44], "shift": [21, 44, 72, 73, 84, 87, 88, 93, 96, 97], "get_bars_between_d": 21, "start_dat": 21, "end_dat": 21, "get_quot": [21, 26, 47], "idx": 21, "belong": 22, "construct": 22, "goog": [22, 42, 72, 73], "googl": 22, "to_posit": 22, "get_incr": 22, "wait_to_be_regist": 22, "regist": [22, 110, 112, 121, 123], "wait_to_be_clos": 22, "keyword": 22, "my_limit_pric": 22, "500": [22, 36], "particular": [22, 125, 127, 129, 133, 135, 137], "higher": 22, "probabl": 22, "predetermin": 22, "exit": 22, "stop_pric": [22, 43, 146, 152, 153, 157, 163, 164], "my_stop_pric": 22, "400": 22, "stop_limit": [22, 146, 157], "combin": 22, "405": 22, "trail": [22, 146, 152, 157, 163], "continu": [22, 146, 157], "threshold": [22, 146, 157], "movement": [22, 146, 157], "trailing_stop": [22, 146, 157], "trail_pric": [22, 146, 157], "trail_perc": [22, 146, 157], "my_trail_pric": 22, "order_1": 22, "my_trail_perc": 22, "order_2": 22, "bracket": [22, 146, 157], "chain": [22, 44, 124, 125, 126, 127, 129, 131, 133, 134, 135, 137, 140], "long": 22, "short": [22, 106, 117], "importantli": 22, "extrem": 22, "fast": [22, 25, 26], "occur": 22, "take_profit_pric": [22, 146, 152, 157, 163], "stop_loss_pric": [22, 146, 152, 157, 163], "stop_loss_limit_pric": [22, 146, 157], "my_take_profit_pric": 22, "420": 22, "my_stop_loss_pric": 22, "parent": 22, "oto": [22, 146, 157], "trigger": [22, 146, 157], "variant": 22, "oco": [22, 146, 152, 157, 163], "word": [22, 167, 182], "where": [22, 25, 42, 146, 157], "alreadi": [22, 30, 36, 41], "submiss": 22, "position_fil": [22, 146, 157], "time_in_forc": [22, 146, 157], "good_till_d": [22, 146, 157], "date_cr": 22, "order_class": 22, "trade_cost": 22, "custom_param": [22, 146, 157], "avg_fill_pric": [22, 23], "error_messag": 22, "child_ord": 22, "tag": [22, 153, 164], "statu": [22, 148, 149, 159, 160], "unprocess": 22, "orderclass": 22, "ordersid": 22, "buy_to_clos": 22, "buy_to_cov": 22, "buy_to_open": 22, "sell_short": 22, "sell_to_clos": 22, "sell_to_open": 22, "orderstatu": 22, "cash_settl": 22, "partially_fil": 22, "partial_fil": 22, "ordertyp": 22, "tupl": [22, 73], "alia": 22, "add_child_ord": 22, "o": 22, "child": [22, 43], "add_transact": 22, "properti": [22, 23, 26, 43, 45, 46, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195], "cash_pend": 22, "equivalent_statu": 22, "equival": 22, "order_dict": 22, "get_fill_pric": 22, "weight": 22, "often": 22, "encount": 22, "partial": [22, 39], "pnl": 22, "yet": [22, 46], "is_act": 22, "otherwis": [22, 36], "rtype": [22, 44], "is_buy_ord": 22, "is_cancel": 22, "is_equivalent_statu": 22, "status1": 22, "status2": 22, "status": 22, "is_fil": 22, "is_opt": 22, "is_par": 22, "settlement": 22, "balanc": 22, "is_sell_ord": 22, "set_cancel": 22, "set_error": 22, "set_fil": 22, "set_identifi": 22, "set_new": 22, "set_partially_fil": 22, "update_raw": 22, "update_trail_stop_pric": 22, "was_transmit": 22, "retreiv": 23, "appl": 23, "add_ord": 23, "decim": [23, 74, 75, 146, 147, 157, 158], "get_selling_ord": [23, 26, 47], "value_typ": 23, "trading_fe": 24, "flat_fe": [24, 25], "percent_fe": [24, 25], "maker": 24, "taker": 24, "made": [25, 70, 82], "beginn": 25, "join": [25, 26], "commun": [25, 26], "cours": [25, 26], "shown": [25, 26], "discov": [25, 26], "skill": 25, "expert": [25, 26], "guidanc": 25, "resourc": 25, "welcom": 25, "hope": 25, "enjoi": 25, "easiest": 25, "comfort": 25, "copi": 25, "your_alpaca_api_kei": [25, 26], "your_alpaca_secret": [25, 26], "180": 25, "180m": 25, "carri": 25, "familiar": 25, "And": [25, 72, 73], "try": [25, 146, 157], "Or": [25, 26, 165], "dev": [25, 26], "simple_start_single_fil": [25, 26], "flat": 25, "trading_fee_1": 25, "trading_fee_2": 25, "sometim": 25, "spend": 25, "yappi": 25, "machinelearninglongshort": 25, "tqqq": 25, "get_func_stat": 25, "print_al": 25, "get_thread_stat": 25, "prof": 25, "pstat": 25, "snakeviz": 25, "web": [25, 46], "slow": 25, "robot": 26, "well": 26, "found": 26, "super": 26, "being": [26, 35, 36, 37, 38, 39, 44, 46, 72, 126, 134, 146, 157, 168, 183], "bug": 26, "fix": [26, 81], "fortun": 26, "against": 26, "switch": 26, "industri": 26, "tradest": 26, "build": [26, 27, 45], "analy": 26, "box": 26, "analyt": 26, "analyz": 26, "chart": [26, 47, 62, 63, 64, 65, 66, 67, 68, 69], "engin": [26, 41], "complic": 26, "confus": 26, "vector": 26, "math": 26, "mac": 26, "powershel": 26, "window": 26, "notic": 26, "exactli": 26, "suggest": 26, "lifecycl": [26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 47, 168, 172, 173, 178, 183, 187, 188, 193], "describ": [26, 45], "sub": 26, "tree": 26, "good": [26, 146, 157], "luck": 26, "forget": 26, "swim": 26, "gain": 26, "wealth": 26, "expertis": 26, "level": [26, 63, 67, 105, 116], "proven": 26, "record": 26, "home": 26, "pre": [26, 153, 164], "deploy": 26, "render": 26, "replit": 26, "profil": 26, "improv": 26, "before_market_open": [26, 27, 173, 188], "before_starting_trad": [26, 27, 30], "before_market_clos": [26, 27], "after_market_clos": [26, 27], "on_abrupt_clos": [26, 27, 34], "on_bot_crash": [26, 27], "trace_stat": [26, 27, 178, 193], "on_new_ord": [26, 27], "on_partially_filled_ord": [26, 27], "on_filled_ord": [26, 27], "on_canceled_ord": [26, 27], "on_parameters_upd": [26, 27], "backup": 26, "restor": 26, "benefit": 26, "var": 26, "storag": 26, "cancel_open_ord": [26, 30, 47, 151, 162], "sell_al": [26, 29, 33, 34, 47], "get_asset_potential_tot": [26, 47], "get_portfolio_valu": [26, 47], "get_cash": [26, 47], "get_historical_prices_for_asset": [26, 30, 47], "get_yesterday_dividend": [26, 44, 47], "get_next_trading_dai": [26, 47], "get_markers_df": [26, 47], "get_lines_df": [26, 47], "get_paramet": [26, 47, 165], "set_paramet": [26, 47, 165], "get_chain": [26, 44, 47, 127, 129, 131, 135, 137, 140], "get_greek": [26, 47], "get_strik": [26, 44, 47], "get_expir": [26, 47], "get_multipli": [26, 47], "options_expiry_to_datetime_d": [26, 47], "get_round_minut": [26, 44, 47], "get_last_minut": [26, 44, 47], "get_round_dai": [26, 44, 47], "get_last_dai": [26, 44, 47], "get_datetime_rang": [26, 43, 44, 47], "localize_datetim": [26, 44, 47], "to_default_timezon": [26, 44, 47], "miscellan": [26, 47], "update_paramet": [26, 38, 47], "await_market_to_clos": [26, 47], "await_market_to_open": [26, 47], "wait_for_order_registr": [26, 47], "wait_for_order_execut": [26, 47], "wait_for_orders_registr": [26, 47], "wait_for_orders_execut": [26, 47], "initial_budget": 26, "last_on_trading_iteration_datetim": 26, "pytz": 26, "unspent_monei": 26, "leg": 26, "abstract": [27, 41, 43, 44, 45], "pattern": [27, 41], "greatli": [27, 41], "react": [27, 41], "j": [27, 41], "compon": [27, 41, 196], "overload": [27, 34, 41, 43], "logic": [27, 29, 30, 40, 41, 43, 45], "dump": [28, 42], "report": 28, "busi": [29, 30], "execud": [29, 30], "unlik": 30, "launch": 30, "tlt": [30, 52, 58, 73, 75, 80, 111, 112, 122, 123, 146, 147, 153, 157, 158, 164], "bars_list": 30, "asset_bar": 30, "reiniti": 31, "reset": 31, "blacklist": 31, "my_custom_paramet": 32, "5m": [32, 178, 193], "d": [32, 178, 193], "constructor": 32, "later": 32, "strategy_1": 32, "my_other_paramet": 32, "strategy_2": 32, "my_last_paramet": 32, "asset_symbol": 32, "mnq": 32, "calendar": [32, 76, 130, 138], "marketcalendar": [32, 106, 117], "asx": [32, 106, 117], "bmf": [32, 106, 117], "cfe": [32, 106, 117], "bat": [32, 106, 117], "cme_equ": [32, 106, 117], "cbot_equ": [32, 106, 117], "cme_agricultur": [32, 106, 117], "cbot_agricultur": [32, 106, 117], "comex_agricultur": [32, 106, 117], "nymex_agricultur": [32, 106, 117], "cme_rat": [32, 106, 117], "cbot_rat": [32, 106, 117], "cme_interestr": [32, 106, 117], "cbot_interestr": [32, 106, 117], "cme_bond": [32, 106, 117], "cbot_bond": [32, 106, 117], "eurex": [32, 106, 117], "hkex": [32, 106, 117], "ic": [32, 106, 117], "iceu": [32, 106, 117], "nyfe": [32, 106, 117], "jpx": [32, 106, 117], "lse": [32, 106, 117], "os": [32, 106, 117], "six": [32, 106, 117], "sse": [32, 106, 117], "tsx": [32, 106, 117], "tsxv": [32, 106, 117], "bse": [32, 106, 117], "tase": [32, 106, 117], "tradingcalendar": [32, 106, 117], "asex": [32, 106, 117], "bvmf": [32, 106, 117], "cme": [32, 74, 106, 117], "iepa": [32, 106, 117], "xam": [32, 106, 117], "xasx": [32, 106, 117], "xbkk": [32, 106, 117], "xbog": [32, 106, 117], "xbom": [32, 106, 117], "xbru": [32, 106, 117], "xbud": [32, 106, 117], "xbue": [32, 106, 117], "xcbf": [32, 106, 117], "xcse": [32, 106, 117], "xdub": [32, 106, 117], "xfra": [32, 106, 117], "xetr": [32, 106, 117], "xhel": [32, 106, 117], "xhkg": [32, 106, 117], "xice": [32, 106, 117], "xidx": [32, 106, 117], "xist": [32, 106, 117], "xjse": [32, 106, 117], "xkar": [32, 106, 117], "xkl": [32, 106, 117], "xkrx": [32, 106, 117], "xlim": [32, 106, 117], "xli": [32, 106, 117], "xlon": [32, 106, 117], "xmad": [32, 106, 117], "xmex": [32, 106, 117], "xmil": [32, 106, 117], "xmo": [32, 106, 117], "xny": [32, 106, 117], "xnze": [32, 106, 117], "xosl": [32, 106, 117], "xpar": [32, 106, 117], "xph": [32, 106, 117], "xpra": [32, 106, 117], "xse": [32, 106, 117], "xsgo": [32, 106, 117], "xshg": [32, 106, 117], "xsto": [32, 106, 117], "xswx": [32, 106, 117], "xtae": [32, 106, 117], "xtai": [32, 106, 117], "xtk": [32, 106, 117], "xtse": [32, 106, 117], "xwar": [32, 106, 117], "xwbo": [32, 106, 117], "us_futur": [32, 106, 117], "max_bar": 32, "10m": [32, 178, 193], "20h": 32, "48": 32, "2d": [32, 178, 193], "gracefulli": 33, "shut": 33, "keybord": 33, "interupt": [33, 40], "abrupt": 33, "crash": [34, 40, 196], "rais": 34, "successfulli": [35, 36, 37], "300": [36, 178, 193], "sold": [36, 51, 57, 146, 157], "elif": 36, "bought": [36, 146, 157], "r": 37, "miss": 39, "again": [40, 103, 114], "pull": [40, 72], "hello": 40, "task": 41, "core": 41, "perspect": 41, "care": 41, "he": 41, "illustr": 41, "context": 42, "scope": 42, "random": 42, "google_symbol": 42, "snapshot_befor": 42, "random_numb": 42, "randint": 42, "my_custom_stat": 42, "trace": 42, "my_stat": 42, "my_other_stat": 42, "backtesting_brok": 43, "is_backtesting_brok": 43, "calculate_trade_cost": 43, "cash_settle_options_contract": 43, "settl": 43, "todo": [43, 74], "docstr": 43, "get_last_bar": 43, "els": 43, "limit_ord": [43, 146, 157], "open_": 43, "process_expired_option_contract": 43, "expri": 43, "process_pending_ord": 43, "evalu": 43, "mostli": 43, "should_continu": 43, "product": 43, "stop_ord": 43, "data_source_backtest": 43, "datasourcebacktest": [43, 44], "abc": [43, 44], "doe": [43, 44, 77, 146, 157], "pandasdata": [43, 44], "is_backtesting_data_sourc": [43, 44], "adjust_for_delai": [43, 44, 83, 92], "Not": [43, 106, 117], "delai": 44, "default_pytz": 44, "dsttzinfo": 44, "lmt": 44, "19": 44, "std": 44, "default_timezon": 44, "calculate_greek": 44, "asset_pric": [44, 128, 136], "underlying_pric": [44, 128, 136], "greek": [44, 124, 128, 136], "static": 44, "convert_timestep_str_to_timedelta": 44, "timedelta": [44, 72, 73, 102, 103, 113, 114], "1minut": 44, "1hour": 44, "1dai": 44, "include_after_hour": [44, 72, 73], "info": [44, 105, 116, 125, 126, 133, 134], "guarente": [44, 125, 126, 133, 134], "exp_dat": [44, 125, 126, 133, 134], "strike1": [44, 125, 126, 133, 134], "strike2": [44, 125, 126, 133, 134], "07": [44, 125, 126, 133, 134], "ago": [44, 72], "known": [44, 74, 75], "round": [44, 87, 88, 96, 97], "param": 44, "get_timestep": 44, "query_greek": [44, 128, 136], "queri": [44, 128, 136], "clean_trading_tim": 44, "dt_index": 44, "pcal": 44, "find_asset_in_data_stor": 44, "get_asset_by_nam": 44, "get_asset_by_symbol": 44, "get_asset": 44, "whose": [44, 126, 134], "smart": [44, 125, 127, 129, 133, 135, 137, 146, 157], "strke": [44, 125, 133], "stike": [44, 125, 133], "get_start_datetime_and_ts_unit": 44, "start_dt": 44, "start_buff": 44, "get_trading_days_panda": 44, "load_data": 44, "update_date_index": 44, "yahoo_data": 44, "yahoodata": 44, "15m": 44, "becuas": 44, "chain_data": 44, "option_chain": 44, "categori": [45, 101], "flow": 45, "is_backtest_brok": 46, "async_": 46, "async": 46, "asynchron": 46, "displi": 46, "displai": [46, 62, 63, 66, 67], "run_all_async": 46, "stop_al": 46, "insid": [47, 166, 172, 187], "thing": 47, "divid": 47, "sens": 47, "preced": 47, "seek": [52, 58, 144, 155], "sought": [52, 58, 147, 158], "assset": [52, 58], "empti": [53, 59], "overwrit": [54, 60], "style": [62, 66], "solid": [62, 66], "width": [62, 66, 72, 73], "detail_text": [62, 63, 66, 67], "overbought": [62, 63, 66, 67], "oversold": [62, 63, 66, 67], "red": [62, 63, 66, 67, 105, 116], "blue": [62, 63, 66, 67], "yellow": [62, 63, 66, 67], "orang": [62, 63, 66, 67], "purpl": [62, 63, 66, 67], "pink": [62, 63, 66, 67], "brown": [62, 63, 66, 67], "black": [62, 63, 66, 67], "white": [62, 63, 66, 67], "grai": [62, 66], "lightgrai": [62, 66], "darkgrai": [62, 66], "lightblu": [62, 66], "darkblu": [62, 66], "lightgreen": [62, 66], "darkgreen": [62, 66], "lightr": [62, 66], "darkr": [62, 66], "hex": [62, 66], "dot": [62, 63, 66, 67], "text": [62, 63, 66, 67], "hover": [62, 63, 66, 67], "add_chart_lin": [62, 66], "80": [62, 66], "circl": [63, 67], "size": [63, 67, 81], "mark": [63, 67], "cross": [63, 67], "resist": [63, 67], "squar": [63, 67], "diamond": [63, 67], "x": [63, 67], "triangl": [63, 67], "ne": [63, 67], "se": [63, 67], "sw": [63, 67], "nw": [63, 67], "pentagon": [63, 67], "hexagon": [63, 67], "hexagon2": [63, 67], "octagon": [63, 67], "star": [63, 67], "hexagram": [63, 67], "tall": [63, 67], "hourglass": [63, 67], "bowti": [63, 67], "thin": [63, 67], "asterisk": [63, 67], "hash": [63, 67], "y": [63, 67], "ew": [63, 67], "n": [63, 67], "arrow": [63, 67], "add_chart_mark": [63, 67], "get_symbol_bar": 70, "create_asset": [71, 72, 79], "backward": [72, 73], "week": [72, 73], "1month": [72, 73], "present": [72, 73, 128, 136], "integ": [72, 73, 178, 193], "extract": 72, "24h": 72, "last_ohlc": 72, "asset_bas": [72, 73, 152, 163], "asset_quot": [72, 73, 152, 153, 163, 164], "regular": 73, "eurusd": 73, "should_use_last_clos": 74, "depric": 74, "comment": 74, "2022": [74, 127, 135], "yyyi": [76, 130, 138], "mm": [76, 130, 138], "dd": [76, 130, 138], "next_trading_dai": [76, 130, 138], "backtets": 77, "bid": 77, "vwap": [78, 81], "intial": 78, "keep_bar": 81, "arriv": 81, "extend": 81, "kept": 81, "datatim": 82, "regardless": 82, "accord": [82, 83, 89, 92, 98], "1990": 82, "tell": 82, "jan": 82, "1991": 82, "rather": 82, "last_dai": [85, 94], "last_minut": [86, 95], "nearest": [87, 88, 96, 97], "round_dai": [87, 96], "round_minut": [88, 97], "paus": [102, 103, 107, 113, 114, 118, 178, 193], "overrid": [102, 103, 113, 114], "infinit": [103, 114], "await": [103, 114, 143, 154], "broadcast": [105, 116], "goe": [105, 116], "origin": [105, 116], "program": [107, 118, 165, 178, 193], "order1": [111, 112, 122, 123, 145, 153, 156, 164], "order2": [111, 112, 122, 123, 145, 153, 156, 164], "meant": 124, "cboe": [125, 127, 129, 133, 135, 137], "sort": [127, 129, 131, 135, 137, 140], "expiry_d": [127, 132, 135, 141], "could": [128, 136], "theoret": [128, 136], "implied_volatil": [128, 136], "impli": [128, 136], "option_pric": [128, 136], "pv_dividend": [128, 136], "gamma": [128, 136], "vega": [128, 136], "theta": [128, 136], "opt_asset": [128, 136], "option_typ": [128, 136], "20221013": [129, 137], "20200101": [132, 141], "next_option_expir": 139, "get_next_option_expir": 139, "gtc": [146, 153, 157, 164], "still": [146, 157], "restric": [146, 157], "compound": [146, 157], "suffici": [146, 157], "213": [146, 157], "obect": [146, 157], "favor": [146, 157], "guarante": [146, 157], "penetr": [146, 157], "forc": [146, 157], "remaind": [146, 157], "gtd": [146, 157], "though": [146, 157], "dollar": [146, 157, 175, 190], "percent": [146, 157], "stop_loss": [146, 152, 157, 163], "stop_loss_limit": [146, 157], "2019": [146, 157], "chf": [146, 157], "aset": [146, 152, 153, 157, 163, 164], "41000": [146, 157], "expiration_d": [147, 152, 158, 163], "order_id": [148, 159], "get_tracked_ord": [149, 160], "system": [151, 162], "leav": [151, 162], "strike_pric": [152, 163], "trailing_stop_pric": [152, 163], "41250": [152, 163], "41325": [152, 163], "41300": [152, 163], "is_multileg": [153, 164], "debit": [153, 164], "post": [153, 164], "asset_btc": [153, 164], "asset_eth": [153, 164], "my_paramet": 165, "main_tick": 165, "ema_threshold": 165, "whenev": [167, 182], "therefor": [167, 182], "zero": [167, 182], "excut": [168, 183], "happen": [171, 186], "equal": [172, 173, 178, 187, 188, 193], "resov": [175, 190], "held": [175, 190], "speed": [178, 193], "m": [178, 193], "h": [178, 193], "2h": [178, 193], "remov": [180, 195], "store": 196, "runtim": 196, "persist": 196, "resum": 196, "namespac": 196, "prevent": 196, "effici": 196, "assign": 196, "notat": 196, "trade_count": 196, "current_count": 196, "all_vari": 196, "output": 196, "102": 196, "postgresql": 196, "5432": 196, "database_nam": 196, "tabl": 196, "backup_table_nam": 196, "vars_backup": 196, "last_upd": 196, "json": 196, "550e8400": 196, "var1": 196, "var2": 196, "optionscondormartingal": 196, "lumiwealth_api_kei": 17, "botspot": 17, "694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2": 17}, "objects": {"entities": [[19, 0, 0, "-", "asset"], [20, 0, 0, "-", "bars"], [21, 0, 0, "-", "data"], [22, 0, 0, "-", "order"], [23, 0, 0, "-", "position"], [24, 0, 0, "-", "trading_fee"]], "entities.asset": [[19, 1, 1, "", "Asset"], [19, 1, 1, "", "AssetsMapping"]], "entities.asset.Asset": [[19, 1, 1, "", "AssetType"], [19, 1, 1, "", "OptionRight"], [19, 2, 1, "", "_asset_types"], [19, 2, 1, "", "_right"], [19, 2, 1, "id0", "asset_type"], [19, 3, 1, "id1", "asset_type_must_be_one_of"], [19, 2, 1, "id2", "expiration"], [19, 3, 1, "", "from_dict"], [19, 3, 1, "", "is_valid"], [19, 2, 1, "id3", "multiplier"], [19, 2, 1, "id4", "precision"], [19, 2, 1, "id5", "right"], [19, 3, 1, "id6", "right_must_be_one_of"], [19, 2, 1, "id7", "strike"], [19, 2, 1, "id8", "symbol"], [19, 3, 1, "", "symbol2asset"], [19, 3, 1, "", "to_dict"], [19, 2, 1, "", "underlying_asset"]], "entities.asset.Asset.AssetType": [[19, 2, 1, "", "CRYPTO"], [19, 2, 1, "", "FOREX"], [19, 2, 1, "", "FUTURE"], [19, 2, 1, "", "INDEX"], [19, 2, 1, "", "MULTILEG"], [19, 2, 1, "", "OPTION"], [19, 2, 1, "", "STOCK"]], "entities.asset.Asset.OptionRight": [[19, 2, 1, "", "CALL"], [19, 2, 1, "", "PUT"]], "entities.bars": [[20, 1, 1, "", "Bars"], [20, 4, 1, "", "NoBarDataFound"]], "entities.bars.Bars": [[20, 3, 1, "id0", "aggregate_bars"], [20, 3, 1, "", "filter"], [20, 3, 1, "id1", "get_last_dividend"], [20, 3, 1, "id2", "get_last_price"], [20, 3, 1, "id3", "get_momentum"], [20, 3, 1, "", "get_total_dividends"], [20, 3, 1, "", "get_total_return"], [20, 3, 1, "", "get_total_return_pct"], [20, 3, 1, "", "get_total_return_pct_change"], [20, 3, 1, "", "get_total_stock_splits"], [20, 3, 1, "id4", "get_total_volume"], [20, 3, 1, "", "parse_bar_list"], [20, 3, 1, "", "split"]], "entities.data": [[21, 1, 1, "", "Data"]], "entities.data.Data": [[21, 2, 1, "", "MIN_TIMESTEP"], [21, 2, 1, "", "TIMESTEP_MAPPING"], [21, 3, 1, "", "_get_bars_dict"], [21, 2, 1, "", "asset"], [21, 3, 1, "id0", "check_data"], [21, 3, 1, "id1", "columns"], [21, 2, 1, "", "datalines"], [21, 2, 1, "", "date_end"], [21, 2, 1, "", "date_start"], [21, 2, 1, "", "df"], [21, 3, 1, "id2", "get_bars"], [21, 3, 1, "", "get_bars_between_dates"], [21, 3, 1, "id3", "get_iter_count"], [21, 3, 1, "id4", "get_last_price"], [21, 3, 1, "", "get_quote"], [21, 2, 1, "", "iter_index"], [21, 3, 1, "id5", "repair_times_and_fill"], [21, 3, 1, "id6", "set_date_format"], [21, 3, 1, "id7", "set_dates"], [21, 3, 1, "id8", "set_times"], [21, 2, 1, "", "sybmol"], [21, 2, 1, "", "timestep"], [21, 3, 1, "id9", "to_datalines"], [21, 2, 1, "", "trading_hours_end"], [21, 2, 1, "", "trading_hours_start"], [21, 3, 1, "id10", "trim_data"]], "entities.order": [[22, 1, 1, "", "Order"]], "entities.order.Order": [[22, 1, 1, "", "OrderClass"], [22, 1, 1, "", "OrderSide"], [22, 1, 1, "", "OrderStatus"], [22, 1, 1, "", "OrderType"], [22, 1, 1, "", "Transaction"], [22, 3, 1, "", "add_child_order"], [22, 3, 1, "", "add_transaction"], [22, 5, 1, "", "avg_fill_price"], [22, 3, 1, "", "cash_pending"], [22, 3, 1, "", "equivalent_status"], [22, 3, 1, "", "from_dict"], [22, 3, 1, "", "get_fill_price"], [22, 3, 1, "", "get_increment"], [22, 3, 1, "", "is_active"], [22, 3, 1, "", "is_buy_order"], [22, 3, 1, "", "is_canceled"], [22, 3, 1, "", "is_equivalent_status"], [22, 3, 1, "", "is_filled"], [22, 3, 1, "", "is_option"], [22, 3, 1, "", "is_parent"], [22, 3, 1, "", "is_sell_order"], [22, 5, 1, "", "quantity"], [22, 3, 1, "", "set_canceled"], [22, 3, 1, "", "set_error"], [22, 3, 1, "", "set_filled"], [22, 3, 1, "", "set_identifier"], [22, 3, 1, "", "set_new"], [22, 3, 1, "", "set_partially_filled"], [22, 5, 1, "", "status"], [22, 3, 1, "", "to_dict"], [22, 3, 1, "", "to_position"], [22, 3, 1, "", "update_raw"], [22, 3, 1, "", "update_trail_stop_price"], [22, 3, 1, "", "wait_to_be_closed"], [22, 3, 1, "", "wait_to_be_registered"], [22, 3, 1, "", "was_transmitted"]], "entities.order.Order.OrderClass": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "MULTILEG"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"]], "entities.order.Order.OrderSide": [[22, 2, 1, "", "BUY"], [22, 2, 1, "", "BUY_TO_CLOSE"], [22, 2, 1, "", "BUY_TO_COVER"], [22, 2, 1, "", "BUY_TO_OPEN"], [22, 2, 1, "", "SELL"], [22, 2, 1, "", "SELL_SHORT"], [22, 2, 1, "", "SELL_TO_CLOSE"], [22, 2, 1, "", "SELL_TO_OPEN"]], "entities.order.Order.OrderStatus": [[22, 2, 1, "", "CANCELED"], [22, 2, 1, "", "CANCELLING"], [22, 2, 1, "", "CASH_SETTLED"], [22, 2, 1, "", "ERROR"], [22, 2, 1, "", "EXPIRED"], [22, 2, 1, "", "FILLED"], [22, 2, 1, "", "NEW"], [22, 2, 1, "", "OPEN"], [22, 2, 1, "", "PARTIALLY_FILLED"], [22, 2, 1, "", "SUBMITTED"], [22, 2, 1, "", "UNPROCESSED"]], "entities.order.Order.OrderType": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "LIMIT"], [22, 2, 1, "", "MARKET"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"], [22, 2, 1, "", "STOP"], [22, 2, 1, "", "STOP_LIMIT"], [22, 2, 1, "", "TRAIL"]], "entities.order.Order.Transaction": [[22, 2, 1, "", "price"], [22, 2, 1, "", "quantity"]], "entities.position": [[23, 1, 1, "", "Position"]], "entities.position.Position": [[23, 3, 1, "", "add_order"], [23, 2, 1, "", "asset"], [23, 5, 1, "id0", "available"], [23, 2, 1, "", "avg_fill_price"], [23, 3, 1, "", "from_dict"], [23, 3, 1, "", "get_selling_order"], [23, 5, 1, "id1", "hold"], [23, 2, 1, "", "orders"], [23, 5, 1, "id2", "quantity"], [23, 2, 1, "", "strategy"], [23, 2, 1, "", "symbol"], [23, 3, 1, "", "to_dict"], [23, 3, 1, "", "value_type"]], "entities.trading_fee": [[24, 1, 1, "", "TradingFee"]], "lumibot.backtesting": [[43, 0, 0, "-", "backtesting_broker"]], "lumibot.backtesting.backtesting_broker": [[43, 1, 1, "", "BacktestingBroker"]], "lumibot.backtesting.backtesting_broker.BacktestingBroker": [[43, 2, 1, "", "IS_BACKTESTING_BROKER"], [43, 3, 1, "", "calculate_trade_cost"], [43, 3, 1, "", "cancel_order"], [43, 3, 1, "", "cash_settle_options_contract"], [43, 5, 1, "", "datetime"], [43, 3, 1, "", "get_historical_account_value"], [43, 3, 1, "", "get_last_bar"], [43, 3, 1, "", "get_time_to_close"], [43, 3, 1, "", "get_time_to_open"], [43, 3, 1, "", "is_market_open"], [43, 3, 1, "", "limit_order"], [43, 3, 1, "", "process_expired_option_contracts"], [43, 3, 1, "", "process_pending_orders"], [43, 3, 1, "", "should_continue"], [43, 3, 1, "", "stop_order"], [43, 3, 1, "", "submit_order"], [43, 3, 1, "", "submit_orders"]], "lumibot.brokers": [[12, 0, 0, "-", "alpaca"]], "lumibot.brokers.alpaca": [[12, 1, 1, "", "Alpaca"], [12, 1, 1, "", "OrderData"]], "lumibot.brokers.alpaca.Alpaca": [[12, 2, 1, "", "ASSET_TYPE_MAP"], [12, 2, 1, "", "api"], [12, 3, 1, "", "cancel_order"], [12, 3, 1, "", "get_historical_account_value"], [12, 3, 1, "id0", "get_time_to_close"], [12, 3, 1, "id1", "get_time_to_open"], [12, 3, 1, "id2", "get_timestamp"], [12, 3, 1, "id3", "is_market_open"], [12, 3, 1, "", "map_asset_type"]], "lumibot.brokers.alpaca.OrderData": [[12, 3, 1, "", "to_request_fields"]], "lumibot": [[44, 0, 0, "-", "data_sources"]], "lumibot.data_sources": [[44, 0, 0, "-", "data_source"], [43, 0, 0, "-", "data_source_backtesting"], [44, 0, 0, "-", "pandas_data"], [44, 0, 0, "-", "yahoo_data"]], "lumibot.data_sources.data_source": [[44, 1, 1, "", "DataSource"]], "lumibot.data_sources.data_source.DataSource": [[44, 2, 1, "", "DEFAULT_PYTZ"], [44, 2, 1, "", "DEFAULT_TIMEZONE"], [44, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "calculate_greeks"], [44, 3, 1, "", "convert_timestep_str_to_timedelta"], [44, 3, 1, "", "get_bars"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_datetime"], [44, 3, 1, "", "get_datetime_range"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_day"], [44, 3, 1, "", "get_last_minute"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_round_day"], [44, 3, 1, "", "get_round_minute"], [44, 3, 1, "", "get_strikes"], [44, 3, 1, "", "get_timestamp"], [44, 3, 1, "", "get_timestep"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "localize_datetime"], [44, 3, 1, "", "query_greeks"], [44, 3, 1, "", "to_default_timezone"]], "lumibot.data_sources.data_source_backtesting": [[43, 1, 1, "", "DataSourceBacktesting"]], "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting": [[43, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [43, 3, 1, "", "get_datetime"], [43, 3, 1, "", "get_datetime_range"]], "lumibot.data_sources.pandas_data": [[44, 1, 1, "", "PandasData"]], "lumibot.data_sources.pandas_data.PandasData": [[44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "clean_trading_times"], [44, 3, 1, "", "find_asset_in_data_store"], [44, 3, 1, "", "get_asset_by_name"], [44, 3, 1, "", "get_asset_by_symbol"], [44, 3, 1, "", "get_assets"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_start_datetime_and_ts_unit"], [44, 3, 1, "", "get_trading_days_pandas"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "load_data"], [44, 3, 1, "", "update_date_index"]], "lumibot.data_sources.yahoo_data": [[44, 1, 1, "", "YahooData"]], "lumibot.data_sources.yahoo_data.YahooData": [[44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_strikes"]], "lumibot.strategies.strategy": [[45, 0, 0, "-", "Strategy"]], "lumibot.strategies.strategy.Strategy": [[66, 6, 1, "", "add_line"], [67, 6, 1, "", "add_marker"], [28, 6, 1, "", "after_market_closes"], [113, 6, 1, "", "await_market_to_close"], [114, 6, 1, "", "await_market_to_open"], [29, 6, 1, "", "before_market_closes"], [30, 6, 1, "", "before_market_opens"], [31, 6, 1, "", "before_starting_trading"], [154, 6, 1, "", "cancel_open_orders"], [155, 6, 1, "", "cancel_order"], [156, 6, 1, "", "cancel_orders"], [71, 6, 1, "", "cancel_realtime_bars"], [182, 5, 1, "", "cash"], [157, 6, 1, "", "create_order"], [183, 5, 1, "", "first_iteration"], [158, 6, 1, "", "get_asset_potential_total"], [55, 6, 1, "", "get_cash"], [133, 6, 1, "", "get_chain"], [134, 6, 1, "", "get_chains"], [92, 6, 1, "", "get_datetime"], [93, 6, 1, "", "get_datetime_range"], [135, 6, 1, "", "get_expiration"], [136, 6, 1, "", "get_greeks"], [72, 6, 1, "", "get_historical_prices"], [73, 6, 1, "", "get_historical_prices_for_assets"], [94, 6, 1, "", "get_last_day"], [95, 6, 1, "", "get_last_minute"], [74, 6, 1, "", "get_last_price"], [75, 6, 1, "", "get_last_prices"], [68, 6, 1, "", "get_lines_df"], [69, 6, 1, "", "get_markers_df"], [137, 6, 1, "", "get_multiplier"], [138, 6, 1, "", "get_next_trading_day"], [139, 6, 1, "", "get_option_expiration_after_date"], [159, 6, 1, "", "get_order"], [160, 6, 1, "", "get_orders"], [115, 6, 1, "", "get_parameters"], [57, 6, 1, "", "get_portfolio_value"], [58, 6, 1, "", "get_position"], [59, 6, 1, "", "get_positions"], [77, 6, 1, "", "get_quote"], [78, 6, 1, "", "get_realtime_bars"], [96, 6, 1, "", "get_round_day"], [97, 6, 1, "", "get_round_minute"], [161, 6, 1, "", "get_selling_order"], [140, 6, 1, "", "get_strikes"], [98, 6, 1, "", "get_timestamp"], [79, 6, 1, "", "get_yesterday_dividend"], [80, 6, 1, "", "get_yesterday_dividends"], [184, 5, 1, "", "initial_budget"], [32, 6, 1, "", "initialize"], [185, 5, 1, "", "is_backtesting"], [186, 5, 1, "", "last_on_trading_iteration_datetime"], [99, 6, 1, "", "localize_datetime"], [116, 6, 1, "", "log_message"], [187, 5, 1, "", "minutes_before_closing"], [188, 5, 1, "", "minutes_before_opening"], [189, 5, 1, "", "name"], [33, 6, 1, "", "on_abrupt_closing"], [34, 6, 1, "", "on_bot_crash"], [35, 6, 1, "", "on_canceled_order"], [36, 6, 1, "", "on_filled_order"], [37, 6, 1, "", "on_new_order"], [38, 6, 1, "", "on_parameters_updated"], [39, 6, 1, "", "on_partially_filled_order"], [40, 6, 1, "", "on_trading_iteration"], [141, 6, 1, "", "options_expiry_to_datetime_date"], [190, 5, 1, "", "portfolio_value"], [191, 5, 1, "", "pytz"], [192, 5, 1, "", "quote_asset"], [1, 6, 1, "", "run_backtest"], [162, 6, 1, "", "sell_all"], [117, 6, 1, "", "set_market"], [60, 6, 1, "", "set_parameters"], [118, 6, 1, "", "sleep"], [193, 5, 1, "", "sleeptime"], [81, 6, 1, "", "start_realtime_bars"], [163, 6, 1, "", "submit_order"], [164, 6, 1, "", "submit_orders"], [194, 5, 1, "", "timezone"], [100, 6, 1, "", "to_default_timezone"], [42, 6, 1, "", "trace_stats"], [195, 5, 1, "", "unspent_money"], [119, 6, 1, "", "update_parameters"], [120, 6, 1, "", "wait_for_order_execution"], [121, 6, 1, "", "wait_for_order_registration"], [122, 6, 1, "", "wait_for_orders_execution"], [123, 6, 1, "", "wait_for_orders_registration"]], "lumibot.traders": [[46, 0, 0, "-", "trader"]], "lumibot.traders.trader": [[46, 1, 1, "", "Trader"]], "lumibot.traders.trader.Trader": [[46, 3, 1, "", "add_strategy"], [46, 5, 1, "", "is_backtest_broker"], [46, 3, 1, "", "run_all"], [46, 3, 1, "", "run_all_async"], [46, 3, 1, "", "stop_all"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:exception", "5": "py:property", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "exception", "Python exception"], "5": ["py", "property", "Python property"], "6": ["py", "function", "Python function"]}, "titleterms": {"backtest": [0, 1, 2, 6, 8, 25, 26, 43], "file": [0, 2, 3, 9], "gener": [0, 2, 17], "from": [0, 2], "content": [0, 11, 18, 26, 27, 44, 47], "function": [1, 61], "how": [2, 196], "To": 2, "instal": [2, 25, 26], "lumibot": [2, 25, 26], "choos": [2, 17], "data": [2, 5, 14, 21, 43, 44, 70], "sourc": [2, 43, 44], "run": [2, 13, 16, 25], "polygon": [2, 6], "io": [2, 6], "tearsheet": [2, 7], "html": [2, 7], "trade": [2, 9, 14, 24, 25, 26], "indic": [2, 3, 26], "conclus": [2, 17], "log": 4, "csv": [4, 5], "panda": [5, 44], "other": 5, "exampl": [5, 13, 14, 16, 17], "datafram": 5, "In": 5, "summari": [5, 41], "thetadata": 8, "yahoo": [10, 44], "broker": [11, 13, 14, 15, 17, 43], "alpaca": [12, 17, 25], "document": [12, 19, 20, 22, 45], "crypto": 13, "us": [13, 14], "ccxt": 13, "configur": [13, 14, 16, 17, 25, 196], "set": 13, "your": [13, 16, 17, 25, 26], "strategi": [13, 14, 16, 17, 25, 26, 45, 47, 166], "full": [13, 16], "interact": [14, 15, 17], "market": 14, "subscript": 14, "two": 14, "factor": 14, "authent": 14, "2fa": 14, "secondari": 14, "usernam": 14, "paper": [14, 25], "account": [14, 25, 48], "setup": 14, "legaci": [15, 17], "tradier": [16, 17], "get": [16, 25, 26], "start": [16, 25, 26], "deploy": 17, "guid": [17, 196], "platform": 17, "deploi": 17, "render": 17, "replit": 17, "secret": 17, "coinbas": 17, "kraken": 17, "environ": 17, "variabl": [17, 196], "final": 17, "step": [17, 25, 26], "entiti": 18, "asset": 19, "bar": 20, "order": [22, 142], "advanc": 22, "type": 22, "With": [22, 25], "leg": 22, "posit": 23, "fee": [24, 25], "what": 25, "i": 25, "lumiwealth": 25, "1": [25, 26], "packag": 25, "2": [25, 26], "import": 25, "follow": 25, "modul": [25, 44], "3": [25, 26], "creat": [25, 26], "an": 25, "4": 25, "api": 25, "kei": 25, "5": 25, "class": 25, "6": 25, "instanti": 25, "trader": [25, 46], "7": 25, "option": [25, 124], "8": 25, "ad": 25, "profil": 25, "improv": 25, "perform": 25, "algorithm": 26, "librari": 26, "take": 26, "bot": 26, "live": 26, "all": 26, "togeth": 26, "addit": 26, "resourc": 26, "need": 26, "extra": 26, "help": 26, "tabl": 26, "lifecycl": 27, "method": [27, 47], "def": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "after_market_clos": 28, "refer": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "before_market_clos": 29, "before_market_open": 30, "before_starting_trad": 31, "initi": 32, "on_abrupt_clos": 33, "on_bot_crash": 34, "on_canceled_ord": 35, "on_filled_ord": 36, "on_new_ord": 37, "on_parameters_upd": 38, "on_partially_filled_ord": 39, "on_trading_iter": 40, "trace_stat": 42, "manag": [48, 142], "self": [49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "get_cash": [49, 55], "get_paramet": [50, 56, 104, 115], "get_portfolio_valu": [51, 57], "get_posit": [52, 53, 58, 59], "set_paramet": [54, 60], "chart": 61, "add_lin": [62, 66], "add_mark": [63, 67], "get_lines_df": [64, 68], "get_markers_df": [65, 69], "cancel_realtime_bar": 71, "get_historical_pric": 72, "get_historical_prices_for_asset": 73, "get_last_pric": [74, 75], "get_next_trading_dai": [76, 130, 138], "get_quot": 77, "get_realtime_bar": 78, "get_yesterday_dividend": [79, 80], "start_realtime_bar": 81, "datetim": 82, "get_datetim": [83, 92], "get_datetime_rang": [84, 93], "get_last_dai": [85, 94], "get_last_minut": [86, 95], "get_round_dai": [87, 96], "get_round_minut": [88, 97], "get_timestamp": [89, 98], "localize_datetim": [90, 99], "to_default_timezon": [91, 100], "miscellan": 101, "await_market_to_clos": [102, 113], "await_market_to_open": [103, 114], "log_messag": [105, 116], "set_market": [106, 117], "sleep": [107, 118], "update_paramet": [108, 119], "wait_for_order_execut": [109, 120], "wait_for_order_registr": [110, 121], "wait_for_orders_execut": [111, 122], "wait_for_orders_registr": [112, 123], "get_chain": [125, 126, 133, 134], "get_expir": [127, 135], "get_greek": [128, 136], "get_multipli": [129, 137], "get_strik": [131, 140], "options_expiry_to_datetime_d": [132, 141], "get_option_expiration_after_d": 139, "cancel_open_ord": [143, 154], "cancel_ord": [144, 145, 155, 156], "create_ord": [146, 157], "get_asset_potential_tot": [147, 158], "get_ord": [148, 149, 159, 160], "get_selling_ord": [150, 161], "sell_al": [151, 162], "submit_ord": [152, 153, 163, 164], "paramet": 165, "properti": 166, "cash": [167, 182], "first_iter": [168, 183], "initial_budget": [169, 184], "is_backtest": [170, 185], "last_on_trading_iteration_datetim": [171, 186], "minutes_before_clos": [172, 187], "minutes_before_open": [173, 188], "name": [174, 189], "portfolio_valu": [175, 190], "pytz": [176, 181, 191], "quote_asset": [177, 192], "sleeptim": [178, 193], "timezon": [179, 194], "unspent_monei": [180, 195], "backup": 196, "restor": 196, "It": 196, "work": 196, "benefit": 196, "var": 196, "usag": 196, "databas": 196, "storag": 196, "structur": 196}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"Backtesting": [[0, "backtesting"], [43, "backtesting"]], "Files Generated from Backtesting": [[0, "files-generated-from-backtesting"], [2, "files-generated-from-backtesting"]], "Contents:": [[0, null], [11, null], [18, null], [27, null], [47, null]], "Backtesting Function": [[1, "backtesting-function"]], "How To Backtest": [[2, "how-to-backtest"]], "Installing LumiBot": [[2, "installing-lumibot"]], "Choosing a Data Source": [[2, "choosing-a-data-source"]], "Running a Backtest with Polygon.io": [[2, "running-a-backtest-with-polygon-io"]], "Tearsheet HTML": [[2, "tearsheet-html"], [7, "tearsheet-html"]], "Trades Files": [[2, "trades-files"], [9, "trades-files"]], "Indicators Files": [[2, "indicators-files"], [3, "indicators-files"]], "Conclusion": [[2, "conclusion"], [17, "conclusion"]], "Logs CSV": [[4, "logs-csv"]], "Pandas (CSV or other data)": [[5, "pandas-csv-or-other-data"]], "Example Dataframe": [[5, "id1"]], "In Summary": [[5, "in-summary"]], "Polygon.io Backtesting": [[6, "polygon-io-backtesting"]], "ThetaData Backtesting": [[8, "thetadata-backtesting"]], "Yahoo": [[10, "yahoo"], [44, "module-lumibot.data_sources.yahoo_data"]], "Brokers": [[11, "brokers"]], "Alpaca": [[12, "alpaca"]], "Documentation": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [22, "module-entities.order"], [45, "module-lumibot.strategies.strategy.Strategy"]], "Crypto Brokers (Using CCXT)": [[13, "crypto-brokers-using-ccxt"]], "Configuration Settings": [[13, "configuration-settings"]], "Running Your Strategy": [[13, "running-your-strategy"], [16, "running-your-strategy"]], "Full Example Strategy": [[13, "full-example-strategy"], [16, "full-example-strategy"]], "Interactive Brokers": [[14, "interactive-brokers"]], "Market Data Subscriptions": [[14, "market-data-subscriptions"]], "Two-Factor Authentication (2FA)": [[14, "two-factor-authentication-2fa"]], "Using a Secondary Username": [[14, "using-a-secondary-username"]], "Using a Paper Trading Account": [[14, "using-a-paper-trading-account"]], "Strategy Setup": [[14, "strategy-setup"]], "Interactive Brokers Configuration": [[14, "id1"], [17, "interactive-brokers-configuration"], [17, "id25"]], "Example Strategy": [[14, "example-strategy"]], "Interactive Brokers Legacy": [[15, "interactive-brokers-legacy"]], "Tradier": [[16, "tradier"]], "Getting Started": [[16, "getting-started"], [26, "getting-started"]], "Configuration": [[16, "configuration"]], "Deployment Guide": [[17, "deployment-guide"]], "Example Strategy for Deployment": [[17, "example-strategy-for-deployment"]], "Choosing Your Deployment Platform": [[17, "id1"]], "Deploying to Render": [[17, "id2"]], "Deploying to Replit": [[17, "id3"]], "Secrets Configuration": [[17, "secrets-configuration"]], "Broker Configuration": [[17, "broker-configuration"]], "Tradier Configuration": [[17, "tradier-configuration"], [17, "id21"]], "Alpaca Configuration": [[17, "alpaca-configuration"], [17, "id22"]], "Coinbase Configuration": [[17, "coinbase-configuration"], [17, "id23"]], "Kraken Configuration": [[17, "kraken-configuration"], [17, "id24"]], "Interactive Brokers-Legacy Configuration": [[17, "interactive-brokers-legacy-configuration"], [17, "id26"]], "General Environment Variables": [[17, "general-environment-variables"], [17, "id27"]], "Final Steps": [[17, "final-steps"]], "Entities": [[18, "entities"]], "Asset": [[19, "asset"]], "Bars": [[20, "bars"]], "Data": [[21, "module-entities.data"], [70, "data"]], "Order": [[22, "order"]], "Advanced Order Types": [[22, "advanced-order-types"]], "Order With Legs": [[22, "order-with-legs"]], "Position": [[23, "module-entities.position"]], "Trading Fee": [[24, "module-entities.trading_fee"]], "What is Lumibot?": [[25, "what-is-lumibot"]], "Lumiwealth": [[25, "id1"]], "Getting Started With Lumibot": [[25, "getting-started-with-lumibot"]], "Step 1: Install the Package": [[25, "step-1-install-the-package"]], "Step 2: Import the Following Modules": [[25, "step-2-import-the-following-modules"]], "Step 3: Create an Alpaca Paper Trading Account": [[25, "step-3-create-an-alpaca-paper-trading-account"]], "Step 4: Configure Your API Keys": [[25, "step-4-configure-your-api-keys"]], "Step 5: Create a Strategy Class": [[25, "step-5-create-a-strategy-class"]], "Step 6: Instantiate the Trader, Alpaca, and Strategy Classes": [[25, "step-6-instantiate-the-trader-alpaca-and-strategy-classes"]], "Step 7: Backtest the Strategy (Optional)": [[25, "step-7-backtest-the-strategy-optional"]], "Step 8: Run the Strategy": [[25, "step-8-run-the-strategy"]], "Adding Trading Fees": [[25, "adding-trading-fees"]], "Profiling to Improve Performance": [[25, "profiling-to-improve-performance"]], "Lumibot: Backtesting and Algorithmic Trading Library": [[26, "lumibot-backtesting-and-algorithmic-trading-library"]], "Step 1: Install Lumibot": [[26, "step-1-install-lumibot"]], "Step 2: Create a Strategy for Backtesting": [[26, "step-2-create-a-strategy-for-backtesting"]], "Step 3: Take Your Bot Live": [[26, "step-3-take-your-bot-live"]], "All Together": [[26, "all-together"]], "Additional Resources": [[26, "additional-resources"]], "Need Extra Help?": [[26, "need-extra-help"]], "Table of Contents": [[26, "table-of-contents"]], "Indices and tables": [[26, "indices-and-tables"]], "Lifecycle Methods": [[27, "lifecycle-methods"]], "def after_market_closes": [[28, "def-after-market-closes"]], "Reference": [[28, "reference"], [29, "reference"], [30, "reference"], [31, "reference"], [32, "reference"], [33, "reference"], [34, "reference"], [35, "reference"], [36, "reference"], [37, "reference"], [38, "reference"], [39, "reference"], [40, "reference"], [42, "reference"]], "def before_market_closes": [[29, "def-before-market-closes"]], "def before_market_opens": [[30, "def-before-market-opens"]], "def before_starting_trading": [[31, "def-before-starting-trading"]], "def initialize": [[32, "def-initialize"]], "def on_abrupt_closing": [[33, "def-on-abrupt-closing"]], "def on_bot_crash": [[34, "def-on-bot-crash"]], "def on_canceled_order": [[35, "def-on-canceled-order"]], "def on_filled_order": [[36, "def-on-filled-order"]], "def on_new_order": [[37, "def-on-new-order"]], "def on_parameters_updated": [[38, "def-on-parameters-updated"]], "def on_partially_filled_order": [[39, "def-on-partially-filled-order"]], "def on_trading_iteration": [[40, "def-on-trading-iteration"]], "Summary": [[41, "summary"]], "def trace_stats": [[42, "def-trace-stats"]], "Backtesting Broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "Data Source Backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "Data Sources": [[44, "data-sources"]], "Data Source": [[44, "module-lumibot.data_sources.data_source"]], "Pandas": [[44, "module-lumibot.data_sources.pandas_data"]], "Module contents": [[44, "module-lumibot.data_sources"]], "Strategies": [[45, "strategies"]], "Traders": [[46, "traders"]], "Trader": [[46, "module-lumibot.traders.trader"]], "Strategy Methods": [[47, "strategy-methods"]], "Account Management": [[48, "account-management"]], "self.get_cash": [[49, "self-get-cash"], [55, "self-get-cash"]], "self.get_parameters": [[50, "self-get-parameters"], [56, "self-get-parameters"], [104, "self-get-parameters"], [115, "self-get-parameters"]], "self.get_portfolio_value": [[51, "self-get-portfolio-value"], [57, "self-get-portfolio-value"]], "self.get_position": [[52, "self-get-position"], [58, "self-get-position"]], "self.get_positions": [[53, "self-get-positions"], [59, "self-get-positions"]], "self.set_parameters": [[54, "self-set-parameters"], [60, "self-set-parameters"]], "Chart Functions": [[61, "chart-functions"]], "self.add_line": [[62, "self-add-line"], [66, "self-add-line"]], "self.add_marker": [[63, "self-add-marker"], [67, "self-add-marker"]], "self.get_lines_df": [[64, "self-get-lines-df"], [68, "self-get-lines-df"]], "self.get_markers_df": [[65, "self-get-markers-df"], [69, "self-get-markers-df"]], "self.cancel_realtime_bars": [[71, "self-cancel-realtime-bars"]], "self.get_historical_prices": [[72, "self-get-historical-prices"]], "self.get_historical_prices_for_assets": [[73, "self-get-historical-prices-for-assets"]], "self.get_last_price": [[74, "self-get-last-price"]], "self.get_last_prices": [[75, "self-get-last-prices"]], "self.get_next_trading_day": [[76, "self-get-next-trading-day"], [130, "self-get-next-trading-day"], [138, "self-get-next-trading-day"]], "self.get_quote": [[77, "self-get-quote"]], "self.get_realtime_bars": [[78, "self-get-realtime-bars"]], "self.get_yesterday_dividend": [[79, "self-get-yesterday-dividend"]], "self.get_yesterday_dividends": [[80, "self-get-yesterday-dividends"]], "self.start_realtime_bars": [[81, "self-start-realtime-bars"]], "DateTime": [[82, "datetime"]], "self.get_datetime": [[83, "self-get-datetime"], [92, "self-get-datetime"]], "self.get_datetime_range": [[84, "self-get-datetime-range"], [93, "self-get-datetime-range"]], "self.get_last_day": [[85, "self-get-last-day"], [94, "self-get-last-day"]], "self.get_last_minute": [[86, "self-get-last-minute"], [95, "self-get-last-minute"]], "self.get_round_day": [[87, "self-get-round-day"], [96, "self-get-round-day"]], "self.get_round_minute": [[88, "self-get-round-minute"], [97, "self-get-round-minute"]], "self.get_timestamp": [[89, "self-get-timestamp"], [98, "self-get-timestamp"]], "self.localize_datetime": [[90, "self-localize-datetime"], [99, "self-localize-datetime"]], "self.to_default_timezone": [[91, "self-to-default-timezone"], [100, "self-to-default-timezone"]], "Miscellaneous": [[101, "miscellaneous"]], "self.await_market_to_close": [[102, "self-await-market-to-close"], [113, "self-await-market-to-close"]], "self.await_market_to_open": [[103, "self-await-market-to-open"], [114, "self-await-market-to-open"]], "self.log_message": [[105, "self-log-message"], [116, "self-log-message"]], "self.set_market": [[106, "self-set-market"], [117, "self-set-market"]], "self.sleep": [[107, "self-sleep"], [118, "self-sleep"]], "self.update_parameters": [[108, "self-update-parameters"], [119, "self-update-parameters"]], "self.wait_for_order_execution": [[109, "self-wait-for-order-execution"], [120, "self-wait-for-order-execution"]], "self.wait_for_order_registration": [[110, "self-wait-for-order-registration"], [121, "self-wait-for-order-registration"]], "self.wait_for_orders_execution": [[111, "self-wait-for-orders-execution"], [122, "self-wait-for-orders-execution"]], "self.wait_for_orders_registration": [[112, "self-wait-for-orders-registration"], [123, "self-wait-for-orders-registration"]], "Options": [[124, "options"]], "self.get_chain": [[125, "self-get-chain"], [133, "self-get-chain"]], "self.get_chains": [[126, "self-get-chains"], [134, "self-get-chains"]], "self.get_expiration": [[127, "self-get-expiration"], [135, "self-get-expiration"]], "self.get_greeks": [[128, "self-get-greeks"], [136, "self-get-greeks"]], "self.get_multiplier": [[129, "self-get-multiplier"], [137, "self-get-multiplier"]], "self.get_strikes": [[131, "self-get-strikes"], [140, "self-get-strikes"]], "self.options_expiry_to_datetime_date": [[132, "self-options-expiry-to-datetime-date"], [141, "self-options-expiry-to-datetime-date"]], "self.get_option_expiration_after_date": [[139, "self-get-option-expiration-after-date"]], "Order Management": [[142, "order-management"]], "self.cancel_open_orders": [[143, "self-cancel-open-orders"], [154, "self-cancel-open-orders"]], "self.cancel_order": [[144, "self-cancel-order"], [155, "self-cancel-order"]], "self.cancel_orders": [[145, "self-cancel-orders"], [156, "self-cancel-orders"]], "self.create_order": [[146, "self-create-order"], [157, "self-create-order"]], "self.get_asset_potential_total": [[147, "self-get-asset-potential-total"], [158, "self-get-asset-potential-total"]], "self.get_order": [[148, "self-get-order"], [159, "self-get-order"]], "self.get_orders": [[149, "self-get-orders"], [160, "self-get-orders"]], "self.get_selling_order": [[150, "self-get-selling-order"], [161, "self-get-selling-order"]], "self.sell_all": [[151, "self-sell-all"], [162, "self-sell-all"]], "self.submit_order": [[152, "self-submit-order"], [163, "self-submit-order"]], "self.submit_orders": [[153, "self-submit-orders"], [164, "self-submit-orders"]], "Parameters": [[165, "parameters"]], "Strategy Properties": [[166, "strategy-properties"]], "self.cash": [[167, "self-cash"], [182, "self-cash"]], "self.first_iteration": [[168, "self-first-iteration"], [183, "self-first-iteration"]], "self.initial_budget": [[169, "self-initial-budget"], [184, "self-initial-budget"]], "self.is_backtesting": [[170, "self-is-backtesting"], [185, "self-is-backtesting"]], "self.last_on_trading_iteration_datetime": [[171, "self-last-on-trading-iteration-datetime"], [186, "self-last-on-trading-iteration-datetime"]], "self.minutes_before_closing": [[172, "self-minutes-before-closing"], [187, "self-minutes-before-closing"]], "self.minutes_before_opening": [[173, "self-minutes-before-opening"], [188, "self-minutes-before-opening"]], "self.name": [[174, "self-name"], [189, "self-name"]], "self.portfolio_value": [[175, "self-portfolio-value"], [190, "self-portfolio-value"]], "self.pytz": [[176, "self-pytz"], [181, "self-pytz"], [191, "self-pytz"]], "self.quote_asset": [[177, "self-quote-asset"], [192, "self-quote-asset"]], "self.sleeptime": [[178, "self-sleeptime"], [193, "self-sleeptime"]], "self.timezone": [[179, "self-timezone"], [194, "self-timezone"]], "self.unspent_money": [[180, "self-unspent-money"], [195, "self-unspent-money"]], "Variable Backup & Restore": [[196, "variable-backup-restore"]], "How It Works": [[196, "how-it-works"]], "Benefits of self.vars": [[196, "benefits-of-self-vars"]], "Usage Guide": [[196, "usage-guide"]], "Database Configuration": [[196, "database-configuration"]], "Database Storage Structure": [[196, "database-storage-structure"]]}, "indexentries": {"run_backtest() (in module lumibot.strategies.strategy.strategy)": [[1, "lumibot.strategies.strategy.Strategy.run_backtest"]], "asset_type_map (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.ASSET_TYPE_MAP"]], "alpaca (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.Alpaca"]], "orderdata (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.OrderData"]], "api (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.api"]], "cancel_order() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.cancel_order"]], "get_historical_account_value() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.get_historical_account_value"]], "get_time_to_close() (lumibot.brokers.alpaca.alpaca method)": [[12, "id0"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_close"]], "get_time_to_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id1"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_open"]], "get_timestamp() (lumibot.brokers.alpaca.alpaca method)": [[12, "id2"], [12, "lumibot.brokers.alpaca.Alpaca.get_timestamp"]], "is_market_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id3"], [12, "lumibot.brokers.alpaca.Alpaca.is_market_open"]], "lumibot.brokers.alpaca": [[12, "module-lumibot.brokers.alpaca"]], "map_asset_type() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.map_asset_type"]], "module": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [21, "module-entities.data"], [22, "module-entities.order"], [23, "module-entities.position"], [24, "module-entities.trading_fee"], [43, "module-lumibot.backtesting.backtesting_broker"], [43, "module-lumibot.data_sources.data_source_backtesting"], [44, "module-lumibot.data_sources"], [44, "module-lumibot.data_sources.data_source"], [44, "module-lumibot.data_sources.pandas_data"], [44, "module-lumibot.data_sources.yahoo_data"], [45, "module-lumibot.strategies.strategy.Strategy"], [46, "module-lumibot.traders.trader"]], "to_request_fields() (lumibot.brokers.alpaca.orderdata method)": [[12, "lumibot.brokers.alpaca.OrderData.to_request_fields"]], "asset (class in entities.asset)": [[19, "entities.asset.Asset"]], "asset.assettype (class in entities.asset)": [[19, "entities.asset.Asset.AssetType"]], "asset.optionright (class in entities.asset)": [[19, "entities.asset.Asset.OptionRight"]], "assetsmapping (class in entities.asset)": [[19, "entities.asset.AssetsMapping"]], "call (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.CALL"]], "crypto (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.CRYPTO"]], "forex (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FOREX"]], "future (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FUTURE"]], "index (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.INDEX"]], "multileg (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.MULTILEG"]], "option (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.OPTION"]], "put (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.PUT"]], "stock (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.STOCK"]], "_asset_types (entities.asset.asset attribute)": [[19, "entities.asset.Asset._asset_types"]], "_right (entities.asset.asset attribute)": [[19, "entities.asset.Asset._right"]], "asset_type (entities.asset.asset attribute)": [[19, "entities.asset.Asset.asset_type"], [19, "id0"]], "asset_type_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.asset_type_must_be_one_of"], [19, "id1"]], "entities.asset": [[19, "module-entities.asset"]], "expiration (entities.asset.asset attribute)": [[19, "entities.asset.Asset.expiration"], [19, "id2"]], "from_dict() (entities.asset.asset class method)": [[19, "entities.asset.Asset.from_dict"]], "is_valid() (entities.asset.asset method)": [[19, "entities.asset.Asset.is_valid"]], "multiplier (entities.asset.asset attribute)": [[19, "entities.asset.Asset.multiplier"], [19, "id3"]], "precision (entities.asset.asset attribute)": [[19, "entities.asset.Asset.precision"], [19, "id4"]], "right (entities.asset.asset attribute)": [[19, "entities.asset.Asset.right"], [19, "id5"]], "right_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.right_must_be_one_of"], [19, "id6"]], "strike (entities.asset.asset attribute)": [[19, "entities.asset.Asset.strike"], [19, "id7"]], "symbol (entities.asset.asset attribute)": [[19, "entities.asset.Asset.symbol"], [19, "id8"]], "symbol2asset() (entities.asset.asset class method)": [[19, "entities.asset.Asset.symbol2asset"]], "to_dict() (entities.asset.asset method)": [[19, "entities.asset.Asset.to_dict"]], "underlying_asset (entities.asset.asset attribute)": [[19, "entities.asset.Asset.underlying_asset"]], "bars (class in entities.bars)": [[20, "entities.bars.Bars"]], "nobardatafound": [[20, "entities.bars.NoBarDataFound"]], "aggregate_bars() (entities.bars.bars method)": [[20, "entities.bars.Bars.aggregate_bars"], [20, "id0"]], "entities.bars": [[20, "module-entities.bars"]], "filter() (entities.bars.bars method)": [[20, "entities.bars.Bars.filter"]], "get_last_dividend() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_dividend"], [20, "id1"]], "get_last_price() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_price"], [20, "id2"]], "get_momentum() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_momentum"], [20, "id3"]], "get_total_dividends() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_dividends"]], "get_total_return() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return"]], "get_total_return_pct() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct"]], "get_total_return_pct_change() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct_change"]], "get_total_stock_splits() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_stock_splits"]], "get_total_volume() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_volume"], [20, "id4"]], "parse_bar_list() (entities.bars.bars class method)": [[20, "entities.bars.Bars.parse_bar_list"]], "split() (entities.bars.bars method)": [[20, "entities.bars.Bars.split"]], "data (class in entities.data)": [[21, "entities.data.Data"]], "min_timestep (entities.data.data attribute)": [[21, "entities.data.Data.MIN_TIMESTEP"]], "timestep_mapping (entities.data.data attribute)": [[21, "entities.data.Data.TIMESTEP_MAPPING"]], "_get_bars_dict() (entities.data.data method)": [[21, "entities.data.Data._get_bars_dict"]], "asset (entities.data.data attribute)": [[21, "entities.data.Data.asset"]], "check_data() (entities.data.data method)": [[21, "entities.data.Data.check_data"], [21, "id0"]], "columns() (entities.data.data method)": [[21, "entities.data.Data.columns"], [21, "id1"]], "datalines (entities.data.data attribute)": [[21, "entities.data.Data.datalines"]], "date_end (entities.data.data attribute)": [[21, "entities.data.Data.date_end"]], "date_start (entities.data.data attribute)": [[21, "entities.data.Data.date_start"]], "df (entities.data.data attribute)": [[21, "entities.data.Data.df"]], "entities.data": [[21, "module-entities.data"]], "get_bars() (entities.data.data method)": [[21, "entities.data.Data.get_bars"], [21, "id2"]], "get_bars_between_dates() (entities.data.data method)": [[21, "entities.data.Data.get_bars_between_dates"]], "get_iter_count() (entities.data.data method)": [[21, "entities.data.Data.get_iter_count"], [21, "id3"]], "get_last_price() (entities.data.data method)": [[21, "entities.data.Data.get_last_price"], [21, "id4"]], "get_quote() (entities.data.data method)": [[21, "entities.data.Data.get_quote"]], "iter_index (entities.data.data attribute)": [[21, "entities.data.Data.iter_index"]], "repair_times_and_fill() (entities.data.data method)": [[21, "entities.data.Data.repair_times_and_fill"], [21, "id5"]], "set_date_format() (entities.data.data method)": [[21, "entities.data.Data.set_date_format"], [21, "id6"]], "set_dates() (entities.data.data method)": [[21, "entities.data.Data.set_dates"], [21, "id7"]], "set_times() (entities.data.data method)": [[21, "entities.data.Data.set_times"], [21, "id8"]], "sybmol (entities.data.data attribute)": [[21, "entities.data.Data.sybmol"]], "timestep (entities.data.data attribute)": [[21, "entities.data.Data.timestep"]], "to_datalines() (entities.data.data method)": [[21, "entities.data.Data.to_datalines"], [21, "id9"]], "trading_hours_end (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_end"]], "trading_hours_start (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_start"]], "trim_data() (entities.data.data method)": [[21, "entities.data.Data.trim_data"], [21, "id10"]], "bracket (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.BRACKET"]], "bracket (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.BRACKET"]], "buy (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY"]], "buy_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_CLOSE"]], "buy_to_cover (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_COVER"]], "buy_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_OPEN"]], "canceled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELED"]], "cancelling (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELLING"]], "cash_settled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CASH_SETTLED"]], "error (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.ERROR"]], "expired (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.EXPIRED"]], "filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.FILLED"]], "limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.LIMIT"]], "market (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.MARKET"]], "multileg (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.MULTILEG"]], "new (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.NEW"]], "oco (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OCO"]], "oco (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OCO"]], "open (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.OPEN"]], "oto (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OTO"]], "oto (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OTO"]], "order (class in entities.order)": [[22, "entities.order.Order"]], "order.orderclass (class in entities.order)": [[22, "entities.order.Order.OrderClass"]], "order.orderside (class in entities.order)": [[22, "entities.order.Order.OrderSide"]], "order.orderstatus (class in entities.order)": [[22, "entities.order.Order.OrderStatus"]], "order.ordertype (class in entities.order)": [[22, "entities.order.Order.OrderType"]], "order.transaction (class in entities.order)": [[22, "entities.order.Order.Transaction"]], "partially_filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.PARTIALLY_FILLED"]], "sell (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL"]], "sell_short (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_SHORT"]], "sell_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_CLOSE"]], "sell_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_OPEN"]], "stop (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP"]], "stop_limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP_LIMIT"]], "submitted (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.SUBMITTED"]], "trail (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.TRAIL"]], "unprocessed (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.UNPROCESSED"]], "add_child_order() (entities.order.order method)": [[22, "entities.order.Order.add_child_order"]], "add_transaction() (entities.order.order method)": [[22, "entities.order.Order.add_transaction"]], "avg_fill_price (entities.order.order property)": [[22, "entities.order.Order.avg_fill_price"]], "cash_pending() (entities.order.order method)": [[22, "entities.order.Order.cash_pending"]], "entities.order": [[22, "module-entities.order"]], "equivalent_status() (entities.order.order method)": [[22, "entities.order.Order.equivalent_status"]], "from_dict() (entities.order.order class method)": [[22, "entities.order.Order.from_dict"]], "get_fill_price() (entities.order.order method)": [[22, "entities.order.Order.get_fill_price"]], "get_increment() (entities.order.order method)": [[22, "entities.order.Order.get_increment"]], "is_active() (entities.order.order method)": [[22, "entities.order.Order.is_active"]], "is_buy_order() (entities.order.order method)": [[22, "entities.order.Order.is_buy_order"]], "is_canceled() (entities.order.order method)": [[22, "entities.order.Order.is_canceled"]], "is_equivalent_status() (entities.order.order class method)": [[22, "entities.order.Order.is_equivalent_status"]], "is_filled() (entities.order.order method)": [[22, "entities.order.Order.is_filled"]], "is_option() (entities.order.order method)": [[22, "entities.order.Order.is_option"]], "is_parent() (entities.order.order method)": [[22, "entities.order.Order.is_parent"]], "is_sell_order() (entities.order.order method)": [[22, "entities.order.Order.is_sell_order"]], "price (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.price"]], "quantity (entities.order.order property)": [[22, "entities.order.Order.quantity"]], "quantity (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.quantity"]], "set_canceled() (entities.order.order method)": [[22, "entities.order.Order.set_canceled"]], "set_error() (entities.order.order method)": [[22, "entities.order.Order.set_error"]], "set_filled() (entities.order.order method)": [[22, "entities.order.Order.set_filled"]], "set_identifier() (entities.order.order method)": [[22, "entities.order.Order.set_identifier"]], "set_new() (entities.order.order method)": [[22, "entities.order.Order.set_new"]], "set_partially_filled() (entities.order.order method)": [[22, "entities.order.Order.set_partially_filled"]], "status (entities.order.order property)": [[22, "entities.order.Order.status"]], "to_dict() (entities.order.order method)": [[22, "entities.order.Order.to_dict"]], "to_position() (entities.order.order method)": [[22, "entities.order.Order.to_position"]], "update_raw() (entities.order.order method)": [[22, "entities.order.Order.update_raw"]], "update_trail_stop_price() (entities.order.order method)": [[22, "entities.order.Order.update_trail_stop_price"]], "wait_to_be_closed() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_closed"]], "wait_to_be_registered() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_registered"]], "was_transmitted() (entities.order.order method)": [[22, "entities.order.Order.was_transmitted"]], "position (class in entities.position)": [[23, "entities.position.Position"]], "add_order() (entities.position.position method)": [[23, "entities.position.Position.add_order"]], "asset (entities.position.position attribute)": [[23, "entities.position.Position.asset"]], "available (entities.position.position attribute)": [[23, "entities.position.Position.available"]], "available (entities.position.position property)": [[23, "id0"]], "avg_fill_price (entities.position.position attribute)": [[23, "entities.position.Position.avg_fill_price"]], "entities.position": [[23, "module-entities.position"]], "from_dict() (entities.position.position class method)": [[23, "entities.position.Position.from_dict"]], "get_selling_order() (entities.position.position method)": [[23, "entities.position.Position.get_selling_order"]], "hold (entities.position.position attribute)": [[23, "entities.position.Position.hold"]], "hold (entities.position.position property)": [[23, "id1"]], "orders (entities.position.position attribute)": [[23, "entities.position.Position.orders"]], "quantity (entities.position.position attribute)": [[23, "entities.position.Position.quantity"]], "quantity (entities.position.position property)": [[23, "id2"]], "strategy (entities.position.position attribute)": [[23, "entities.position.Position.strategy"]], "symbol (entities.position.position attribute)": [[23, "entities.position.Position.symbol"]], "to_dict() (entities.position.position method)": [[23, "entities.position.Position.to_dict"]], "value_type() (entities.position.position method)": [[23, "entities.position.Position.value_type"]], "tradingfee (class in entities.trading_fee)": [[24, "entities.trading_fee.TradingFee"]], "entities.trading_fee": [[24, "module-entities.trading_fee"]], "after_market_closes() (in module lumibot.strategies.strategy.strategy)": [[28, "lumibot.strategies.strategy.Strategy.after_market_closes"]], "before_market_closes() (in module lumibot.strategies.strategy.strategy)": [[29, "lumibot.strategies.strategy.Strategy.before_market_closes"]], "before_market_opens() (in module lumibot.strategies.strategy.strategy)": [[30, "lumibot.strategies.strategy.Strategy.before_market_opens"]], "before_starting_trading() (in module lumibot.strategies.strategy.strategy)": [[31, "lumibot.strategies.strategy.Strategy.before_starting_trading"]], "initialize() (in module lumibot.strategies.strategy.strategy)": [[32, "lumibot.strategies.strategy.Strategy.initialize"]], "on_abrupt_closing() (in module lumibot.strategies.strategy.strategy)": [[33, "lumibot.strategies.strategy.Strategy.on_abrupt_closing"]], "on_bot_crash() (in module lumibot.strategies.strategy.strategy)": [[34, "lumibot.strategies.strategy.Strategy.on_bot_crash"]], "on_canceled_order() (in module lumibot.strategies.strategy.strategy)": [[35, "lumibot.strategies.strategy.Strategy.on_canceled_order"]], "on_filled_order() (in module lumibot.strategies.strategy.strategy)": [[36, "lumibot.strategies.strategy.Strategy.on_filled_order"]], "on_new_order() (in module lumibot.strategies.strategy.strategy)": [[37, "lumibot.strategies.strategy.Strategy.on_new_order"]], "on_parameters_updated() (in module lumibot.strategies.strategy.strategy)": [[38, "lumibot.strategies.strategy.Strategy.on_parameters_updated"]], "on_partially_filled_order() (in module lumibot.strategies.strategy.strategy)": [[39, "lumibot.strategies.strategy.Strategy.on_partially_filled_order"]], "on_trading_iteration() (in module lumibot.strategies.strategy.strategy)": [[40, "lumibot.strategies.strategy.Strategy.on_trading_iteration"]], "trace_stats() (in module lumibot.strategies.strategy.strategy)": [[42, "lumibot.strategies.strategy.Strategy.trace_stats"]], "backtestingbroker (class in lumibot.backtesting.backtesting_broker)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker"]], "datasourcebacktesting (class in lumibot.data_sources.data_source_backtesting)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting"]], "is_backtesting_broker (lumibot.backtesting.backtesting_broker.backtestingbroker attribute)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.IS_BACKTESTING_BROKER"]], "is_backtesting_data_source (lumibot.data_sources.data_source_backtesting.datasourcebacktesting attribute)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.IS_BACKTESTING_DATA_SOURCE"]], "calculate_trade_cost() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.calculate_trade_cost"]], "cancel_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cancel_order"]], "cash_settle_options_contract() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cash_settle_options_contract"]], "datetime (lumibot.backtesting.backtesting_broker.backtestingbroker property)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.datetime"]], "get_datetime() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime_range"]], "get_historical_account_value() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_historical_account_value"]], "get_last_bar() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_last_bar"]], "get_time_to_close() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_close"]], "get_time_to_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_open"]], "is_market_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.is_market_open"]], "limit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.limit_order"]], "lumibot.backtesting.backtesting_broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "lumibot.data_sources.data_source_backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "process_expired_option_contracts() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_expired_option_contracts"]], "process_pending_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_pending_orders"]], "should_continue() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.should_continue"]], "stop_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.stop_order"]], "submit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_order"]], "submit_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_orders"]], "default_pytz (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_PYTZ"]], "default_timezone (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_TIMEZONE"]], "datasource (class in lumibot.data_sources.data_source)": [[44, "lumibot.data_sources.data_source.DataSource"]], "is_backtesting_data_source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.IS_BACKTESTING_DATA_SOURCE"]], "min_timestep (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.MIN_TIMESTEP"]], "min_timestep (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.MIN_TIMESTEP"]], "pandasdata (class in lumibot.data_sources.pandas_data)": [[44, "lumibot.data_sources.pandas_data.PandasData"]], "source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.SOURCE"]], "source (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.SOURCE"]], "source (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.SOURCE"]], "timestep_mapping (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.TIMESTEP_MAPPING"]], "yahoodata (class in lumibot.data_sources.yahoo_data)": [[44, "lumibot.data_sources.yahoo_data.YahooData"]], "calculate_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.calculate_greeks"]], "clean_trading_times() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.clean_trading_times"]], "convert_timestep_str_to_timedelta() (lumibot.data_sources.data_source.datasource static method)": [[44, "lumibot.data_sources.data_source.DataSource.convert_timestep_str_to_timedelta"]], "find_asset_in_data_store() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.find_asset_in_data_store"]], "get_asset_by_name() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_name"]], "get_asset_by_symbol() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_symbol"]], "get_assets() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_assets"]], "get_bars() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_bars"]], "get_chains() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_chains"]], "get_chains() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_chains"]], "get_chains() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_chains"]], "get_datetime() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime_range"]], "get_historical_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_historical_prices"]], "get_last_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_day"]], "get_last_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_minute"]], "get_last_price() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_price"]], "get_last_price() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_price"]], "get_last_price() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_last_price"]], "get_last_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_prices"]], "get_last_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_prices"]], "get_round_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_day"]], "get_round_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_minute"]], "get_start_datetime_and_ts_unit() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_start_datetime_and_ts_unit"]], "get_strikes() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_strikes"]], "get_strikes() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_strikes"]], "get_timestamp() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestamp"]], "get_timestep() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestep"]], "get_trading_days_pandas() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_trading_days_pandas"]], "get_yesterday_dividend() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividend"]], "get_yesterday_dividend() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividend"]], "get_yesterday_dividends() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividends"]], "get_yesterday_dividends() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividends"]], "load_data() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.load_data"]], "localize_datetime() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.localize_datetime"]], "lumibot.data_sources": [[44, "module-lumibot.data_sources"]], "lumibot.data_sources.data_source": [[44, "module-lumibot.data_sources.data_source"]], "lumibot.data_sources.pandas_data": [[44, "module-lumibot.data_sources.pandas_data"]], "lumibot.data_sources.yahoo_data": [[44, "module-lumibot.data_sources.yahoo_data"]], "query_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.query_greeks"]], "to_default_timezone() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.to_default_timezone"]], "update_date_index() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.update_date_index"]], "lumibot.strategies.strategy.strategy": [[45, "module-lumibot.strategies.strategy.Strategy"]], "trader (class in lumibot.traders.trader)": [[46, "lumibot.traders.trader.Trader"]], "add_strategy() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.add_strategy"]], "is_backtest_broker (lumibot.traders.trader.trader property)": [[46, "lumibot.traders.trader.Trader.is_backtest_broker"]], "lumibot.traders.trader": [[46, "module-lumibot.traders.trader"]], "run_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all"]], "run_all_async() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all_async"]], "stop_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.stop_all"]], "get_cash() (in module lumibot.strategies.strategy.strategy)": [[49, "lumibot.strategies.strategy.Strategy.get_cash"], [55, "lumibot.strategies.strategy.Strategy.get_cash"]], "get_parameters() (in module lumibot.strategies.strategy.strategy)": [[50, "lumibot.strategies.strategy.Strategy.get_parameters"], [56, "lumibot.strategies.strategy.Strategy.get_parameters"], [104, "lumibot.strategies.strategy.Strategy.get_parameters"], [115, "lumibot.strategies.strategy.Strategy.get_parameters"]], "get_portfolio_value() (in module lumibot.strategies.strategy.strategy)": [[51, "lumibot.strategies.strategy.Strategy.get_portfolio_value"], [57, "lumibot.strategies.strategy.Strategy.get_portfolio_value"]], "get_position() (in module lumibot.strategies.strategy.strategy)": [[52, "lumibot.strategies.strategy.Strategy.get_position"], [58, "lumibot.strategies.strategy.Strategy.get_position"]], "get_positions() (in module lumibot.strategies.strategy.strategy)": [[53, "lumibot.strategies.strategy.Strategy.get_positions"], [59, "lumibot.strategies.strategy.Strategy.get_positions"]], "set_parameters() (in module lumibot.strategies.strategy.strategy)": [[54, "lumibot.strategies.strategy.Strategy.set_parameters"], [60, "lumibot.strategies.strategy.Strategy.set_parameters"]], "add_line() (in module lumibot.strategies.strategy.strategy)": [[62, "lumibot.strategies.strategy.Strategy.add_line"], [66, "lumibot.strategies.strategy.Strategy.add_line"]], "add_marker() (in module lumibot.strategies.strategy.strategy)": [[63, "lumibot.strategies.strategy.Strategy.add_marker"], [67, "lumibot.strategies.strategy.Strategy.add_marker"]], "get_lines_df() (in module lumibot.strategies.strategy.strategy)": [[64, "lumibot.strategies.strategy.Strategy.get_lines_df"], [68, "lumibot.strategies.strategy.Strategy.get_lines_df"]], "get_markers_df() (in module lumibot.strategies.strategy.strategy)": [[65, "lumibot.strategies.strategy.Strategy.get_markers_df"], [69, "lumibot.strategies.strategy.Strategy.get_markers_df"]], "cancel_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[71, "lumibot.strategies.strategy.Strategy.cancel_realtime_bars"]], "get_historical_prices() (in module lumibot.strategies.strategy.strategy)": [[72, "lumibot.strategies.strategy.Strategy.get_historical_prices"]], "get_historical_prices_for_assets() (in module lumibot.strategies.strategy.strategy)": [[73, "lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets"]], "get_last_price() (in module lumibot.strategies.strategy.strategy)": [[74, "lumibot.strategies.strategy.Strategy.get_last_price"]], "get_last_prices() (in module lumibot.strategies.strategy.strategy)": [[75, "lumibot.strategies.strategy.Strategy.get_last_prices"]], "get_next_trading_day() (in module lumibot.strategies.strategy.strategy)": [[76, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [130, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [138, "lumibot.strategies.strategy.Strategy.get_next_trading_day"]], "get_quote() (in module lumibot.strategies.strategy.strategy)": [[77, "lumibot.strategies.strategy.Strategy.get_quote"]], "get_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[78, "lumibot.strategies.strategy.Strategy.get_realtime_bars"]], "get_yesterday_dividend() (in module lumibot.strategies.strategy.strategy)": [[79, "lumibot.strategies.strategy.Strategy.get_yesterday_dividend"]], "get_yesterday_dividends() (in module lumibot.strategies.strategy.strategy)": [[80, "lumibot.strategies.strategy.Strategy.get_yesterday_dividends"]], "start_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[81, "lumibot.strategies.strategy.Strategy.start_realtime_bars"]], "get_datetime() (in module lumibot.strategies.strategy.strategy)": [[83, "lumibot.strategies.strategy.Strategy.get_datetime"], [92, "lumibot.strategies.strategy.Strategy.get_datetime"]], "get_datetime_range() (in module lumibot.strategies.strategy.strategy)": [[84, "lumibot.strategies.strategy.Strategy.get_datetime_range"], [93, "lumibot.strategies.strategy.Strategy.get_datetime_range"]], "get_last_day() (in module lumibot.strategies.strategy.strategy)": [[85, "lumibot.strategies.strategy.Strategy.get_last_day"], [94, "lumibot.strategies.strategy.Strategy.get_last_day"]], "get_last_minute() (in module lumibot.strategies.strategy.strategy)": [[86, "lumibot.strategies.strategy.Strategy.get_last_minute"], [95, "lumibot.strategies.strategy.Strategy.get_last_minute"]], "get_round_day() (in module lumibot.strategies.strategy.strategy)": [[87, "lumibot.strategies.strategy.Strategy.get_round_day"], [96, "lumibot.strategies.strategy.Strategy.get_round_day"]], "get_round_minute() (in module lumibot.strategies.strategy.strategy)": [[88, "lumibot.strategies.strategy.Strategy.get_round_minute"], [97, "lumibot.strategies.strategy.Strategy.get_round_minute"]], "get_timestamp() (in module lumibot.strategies.strategy.strategy)": [[89, "lumibot.strategies.strategy.Strategy.get_timestamp"], [98, "lumibot.strategies.strategy.Strategy.get_timestamp"]], "localize_datetime() (in module lumibot.strategies.strategy.strategy)": [[90, "lumibot.strategies.strategy.Strategy.localize_datetime"], [99, "lumibot.strategies.strategy.Strategy.localize_datetime"]], "to_default_timezone() (in module lumibot.strategies.strategy.strategy)": [[91, "lumibot.strategies.strategy.Strategy.to_default_timezone"], [100, "lumibot.strategies.strategy.Strategy.to_default_timezone"]], "await_market_to_close() (in module lumibot.strategies.strategy.strategy)": [[102, "lumibot.strategies.strategy.Strategy.await_market_to_close"], [113, "lumibot.strategies.strategy.Strategy.await_market_to_close"]], "await_market_to_open() (in module lumibot.strategies.strategy.strategy)": [[103, "lumibot.strategies.strategy.Strategy.await_market_to_open"], [114, "lumibot.strategies.strategy.Strategy.await_market_to_open"]], "log_message() (in module lumibot.strategies.strategy.strategy)": [[105, "lumibot.strategies.strategy.Strategy.log_message"], [116, "lumibot.strategies.strategy.Strategy.log_message"]], "set_market() (in module lumibot.strategies.strategy.strategy)": [[106, "lumibot.strategies.strategy.Strategy.set_market"], [117, "lumibot.strategies.strategy.Strategy.set_market"]], "sleep() (in module lumibot.strategies.strategy.strategy)": [[107, "lumibot.strategies.strategy.Strategy.sleep"], [118, "lumibot.strategies.strategy.Strategy.sleep"]], "update_parameters() (in module lumibot.strategies.strategy.strategy)": [[108, "lumibot.strategies.strategy.Strategy.update_parameters"], [119, "lumibot.strategies.strategy.Strategy.update_parameters"]], "wait_for_order_execution() (in module lumibot.strategies.strategy.strategy)": [[109, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"], [120, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"]], "wait_for_order_registration() (in module lumibot.strategies.strategy.strategy)": [[110, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"], [121, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"]], "wait_for_orders_execution() (in module lumibot.strategies.strategy.strategy)": [[111, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"], [122, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"]], "wait_for_orders_registration() (in module lumibot.strategies.strategy.strategy)": [[112, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"], [123, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"]], "get_chain() (in module lumibot.strategies.strategy.strategy)": [[125, "lumibot.strategies.strategy.Strategy.get_chain"], [133, "lumibot.strategies.strategy.Strategy.get_chain"]], "get_chains() (in module lumibot.strategies.strategy.strategy)": [[126, "lumibot.strategies.strategy.Strategy.get_chains"], [134, "lumibot.strategies.strategy.Strategy.get_chains"]], "get_expiration() (in module lumibot.strategies.strategy.strategy)": [[127, "lumibot.strategies.strategy.Strategy.get_expiration"], [135, "lumibot.strategies.strategy.Strategy.get_expiration"]], "get_greeks() (in module lumibot.strategies.strategy.strategy)": [[128, "lumibot.strategies.strategy.Strategy.get_greeks"], [136, "lumibot.strategies.strategy.Strategy.get_greeks"]], "get_multiplier() (in module lumibot.strategies.strategy.strategy)": [[129, "lumibot.strategies.strategy.Strategy.get_multiplier"], [137, "lumibot.strategies.strategy.Strategy.get_multiplier"]], "get_strikes() (in module lumibot.strategies.strategy.strategy)": [[131, "lumibot.strategies.strategy.Strategy.get_strikes"], [140, "lumibot.strategies.strategy.Strategy.get_strikes"]], "options_expiry_to_datetime_date() (in module lumibot.strategies.strategy.strategy)": [[132, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"], [141, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"]], "get_option_expiration_after_date() (in module lumibot.strategies.strategy.strategy)": [[139, "lumibot.strategies.strategy.Strategy.get_option_expiration_after_date"]], "cancel_open_orders() (in module lumibot.strategies.strategy.strategy)": [[143, "lumibot.strategies.strategy.Strategy.cancel_open_orders"], [154, "lumibot.strategies.strategy.Strategy.cancel_open_orders"]], "cancel_order() (in module lumibot.strategies.strategy.strategy)": [[144, "lumibot.strategies.strategy.Strategy.cancel_order"], [155, "lumibot.strategies.strategy.Strategy.cancel_order"]], "cancel_orders() (in module lumibot.strategies.strategy.strategy)": [[145, "lumibot.strategies.strategy.Strategy.cancel_orders"], [156, "lumibot.strategies.strategy.Strategy.cancel_orders"]], "create_order() (in module lumibot.strategies.strategy.strategy)": [[146, "lumibot.strategies.strategy.Strategy.create_order"], [157, "lumibot.strategies.strategy.Strategy.create_order"]], "get_asset_potential_total() (in module lumibot.strategies.strategy.strategy)": [[147, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"], [158, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"]], "get_order() (in module lumibot.strategies.strategy.strategy)": [[148, "lumibot.strategies.strategy.Strategy.get_order"], [159, "lumibot.strategies.strategy.Strategy.get_order"]], "get_orders() (in module lumibot.strategies.strategy.strategy)": [[149, "lumibot.strategies.strategy.Strategy.get_orders"], [160, "lumibot.strategies.strategy.Strategy.get_orders"]], "get_selling_order() (in module lumibot.strategies.strategy.strategy)": [[150, "lumibot.strategies.strategy.Strategy.get_selling_order"], [161, "lumibot.strategies.strategy.Strategy.get_selling_order"]], "sell_all() (in module lumibot.strategies.strategy.strategy)": [[151, "lumibot.strategies.strategy.Strategy.sell_all"], [162, "lumibot.strategies.strategy.Strategy.sell_all"]], "submit_order() (in module lumibot.strategies.strategy.strategy)": [[152, "lumibot.strategies.strategy.Strategy.submit_order"], [163, "lumibot.strategies.strategy.Strategy.submit_order"]], "submit_orders() (in module lumibot.strategies.strategy.strategy)": [[153, "lumibot.strategies.strategy.Strategy.submit_orders"], [164, "lumibot.strategies.strategy.Strategy.submit_orders"]], "cash (lumibot.strategies.strategy.strategy property)": [[167, "lumibot.strategies.strategy.Strategy.cash"], [182, "lumibot.strategies.strategy.Strategy.cash"]], "first_iteration (lumibot.strategies.strategy.strategy property)": [[168, "lumibot.strategies.strategy.Strategy.first_iteration"], [183, "lumibot.strategies.strategy.Strategy.first_iteration"]], "initial_budget (lumibot.strategies.strategy.strategy property)": [[169, "lumibot.strategies.strategy.Strategy.initial_budget"], [184, "lumibot.strategies.strategy.Strategy.initial_budget"]], "is_backtesting (lumibot.strategies.strategy.strategy property)": [[170, "lumibot.strategies.strategy.Strategy.is_backtesting"], [185, "lumibot.strategies.strategy.Strategy.is_backtesting"]], "last_on_trading_iteration_datetime (lumibot.strategies.strategy.strategy property)": [[171, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"], [186, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"]], "minutes_before_closing (lumibot.strategies.strategy.strategy property)": [[172, "lumibot.strategies.strategy.Strategy.minutes_before_closing"], [187, "lumibot.strategies.strategy.Strategy.minutes_before_closing"]], "minutes_before_opening (lumibot.strategies.strategy.strategy property)": [[173, "lumibot.strategies.strategy.Strategy.minutes_before_opening"], [188, "lumibot.strategies.strategy.Strategy.minutes_before_opening"]], "name (lumibot.strategies.strategy.strategy property)": [[174, "lumibot.strategies.strategy.Strategy.name"], [189, "lumibot.strategies.strategy.Strategy.name"]], "portfolio_value (lumibot.strategies.strategy.strategy property)": [[175, "lumibot.strategies.strategy.Strategy.portfolio_value"], [190, "lumibot.strategies.strategy.Strategy.portfolio_value"]], "pytz (lumibot.strategies.strategy.strategy property)": [[176, "lumibot.strategies.strategy.Strategy.pytz"], [181, "lumibot.strategies.strategy.Strategy.pytz"], [191, "lumibot.strategies.strategy.Strategy.pytz"]], "quote_asset (lumibot.strategies.strategy.strategy property)": [[177, "lumibot.strategies.strategy.Strategy.quote_asset"], [192, "lumibot.strategies.strategy.Strategy.quote_asset"]], "sleeptime (lumibot.strategies.strategy.strategy property)": [[178, "lumibot.strategies.strategy.Strategy.sleeptime"], [193, "lumibot.strategies.strategy.Strategy.sleeptime"]], "timezone (lumibot.strategies.strategy.strategy property)": [[179, "lumibot.strategies.strategy.Strategy.timezone"], [194, "lumibot.strategies.strategy.Strategy.timezone"]], "unspent_money (lumibot.strategies.strategy.strategy property)": [[180, "lumibot.strategies.strategy.Strategy.unspent_money"], [195, "lumibot.strategies.strategy.Strategy.unspent_money"]]}}) \ No newline at end of file diff --git a/docsrc/_build/doctrees/deployment.doctree b/docsrc/_build/doctrees/deployment.doctree index 3760f78a6..c9bcccd6a 100644 Binary files a/docsrc/_build/doctrees/deployment.doctree and b/docsrc/_build/doctrees/deployment.doctree differ diff --git a/docsrc/_build/doctrees/environment.pickle b/docsrc/_build/doctrees/environment.pickle index 0de9cfb21..2b5ff853e 100644 Binary files a/docsrc/_build/doctrees/environment.pickle and b/docsrc/_build/doctrees/environment.pickle differ diff --git a/docsrc/_build/html/_sources/deployment.rst.txt b/docsrc/_build/html/_sources/deployment.rst.txt index 9c309f114..001ee9759 100644 --- a/docsrc/_build/html/_sources/deployment.rst.txt +++ b/docsrc/_build/html/_sources/deployment.rst.txt @@ -414,6 +414,9 @@ In addition to broker-specific secrets, the following environment variables are * - **Secret** - **Description** - **Example** + * - LUMIWEALTH_API_KEY + - Your API key from the BotSpot.trade website so that you can track your bot's performance. To get this API key, visit the `BotSpot.trade `_ website and add/create a bot. After creating the bot, you will receive an API key. + - 694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2e * - LIVE_CONFIG - Your live config file, only needed for strategies that have multiple configurations (there will be a folder named "configurations" in the src/ folder) and if you are running the strategy live. - paper_1 diff --git a/docsrc/_build/html/deployment.html b/docsrc/_build/html/deployment.html index 855b56621..f9544cca6 100644 --- a/docsrc/_build/html/deployment.html +++ b/docsrc/_build/html/deployment.html @@ -855,35 +855,39 @@

General Environment Variables

LIVE_CONFIG

+

LUMIWEALTH_API_KEY

+

Your API key from the BotSpot.trade website so that you can track your bot’s performance. To get this API key, visit the BotSpot.trade website and add/create a bot. After creating the bot, you will receive an API key.

+

694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2e

+ +

LIVE_CONFIG

Your live config file, only needed for strategies that have multiple configurations (there will be a folder named “configurations” in the src/ folder) and if you are running the strategy live.

paper_1

-

IS_BACKTESTING

+

IS_BACKTESTING

(Optional) Set to “True” to run the strategy in backtesting mode, set to “False” to run the strategy live (defaults to False).

False

-

POLYGON_API_KEY

+

POLYGON_API_KEY

(Optional) Your API key from your Polygon account, only needed if you are backtesting.

a7py0zIdhxde6QkX8OjjKNp7cD87hwKU

-

DISCORD_WEBHOOK_URL

+

DISCORD_WEBHOOK_URL

(Optional) Your Discord webhook URL, only needed if you want to send notifications to Discord. Learn how to get a Discord webhook URL here: Discord Webhooks

https://discord.com/api/webhooks/123456789/

-

DB_CONNECTION_STR

+

DB_CONNECTION_STR

(Optional) Your connection string to your account history database, only needed if you want to save your account history to a database.

sqlite:///account_history.db

-

STRATEGY_NAME

+

STRATEGY_NAME

(Optional) The name of the strategy. This will change the strategy_id in the database and in the Discord messages.

My Strategy

-

MARKET

+

MARKET

(Optional) The market you want the bot to think it is. Eg. “24/7” will make the bot think it is trading in a 24/7 market.

24/7

-

POLYGON_MAX_MEMORY_BYTES

+

POLYGON_MAX_MEMORY_BYTES

(Optional) The maximum memory in bytes that the Polygon API can use. This is useful for limiting memory usage during backtesting.

512000000

diff --git a/docsrc/_build/html/searchindex.js b/docsrc/_build/html/searchindex.js index 42565beb0..ec2cb7cbe 100644 --- a/docsrc/_build/html/searchindex.js +++ b/docsrc/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["backtesting", "backtesting.backtesting_function", "backtesting.how_to_backtest", "backtesting.indicators_files", "backtesting.logs_csv", "backtesting.pandas", "backtesting.polygon", "backtesting.tearsheet_html", "backtesting.thetadata", "backtesting.trades_files", "backtesting.yahoo", "brokers", "brokers.alpaca", "brokers.ccxt", "brokers.interactive_brokers", "brokers.interactive_brokers_legacy", "brokers.tradier", "deployment", "entities", "entities.asset", "entities.bars", "entities.data", "entities.order", "entities.position", "entities.trading_fee", "getting_started", "index", "lifecycle_methods", "lifecycle_methods.after_market_closes", "lifecycle_methods.before_market_closes", "lifecycle_methods.before_market_opens", "lifecycle_methods.before_starting_trading", "lifecycle_methods.initialize", "lifecycle_methods.on_abrupt_closing", "lifecycle_methods.on_bot_crash", "lifecycle_methods.on_canceled_order", "lifecycle_methods.on_filled_order", "lifecycle_methods.on_new_order", "lifecycle_methods.on_parameters_updated", "lifecycle_methods.on_partially_filled_order", "lifecycle_methods.on_trading_iteration", "lifecycle_methods.summary", "lifecycle_methods.trace_stats", "lumibot.backtesting", "lumibot.data_sources", "lumibot.strategies", "lumibot.traders", "strategy_methods", "strategy_methods.account", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_cash", "strategy_methods.account/strategies.strategy.Strategy.get_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/strategies.strategy.Strategy.get_position", "strategy_methods.account/strategies.strategy.Strategy.get_positions", "strategy_methods.account/strategies.strategy.Strategy.set_parameters", "strategy_methods.chart", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df", "strategy_methods.chart/strategies.strategy.Strategy.add_line", "strategy_methods.chart/strategies.strategy.Strategy.add_marker", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df", "strategy_methods.data", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars", "strategy_methods.datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone", "strategy_methods.misc", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/strategies.strategy.Strategy.log_message", "strategy_methods.misc/strategies.strategy.Strategy.set_market", "strategy_methods.misc/strategies.strategy.Strategy.sleep", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.options", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.options/strategies.strategy.Strategy.get_chain", "strategy_methods.options/strategies.strategy.Strategy.get_chains", "strategy_methods.options/strategies.strategy.Strategy.get_expiration", "strategy_methods.options/strategies.strategy.Strategy.get_greeks", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date", "strategy_methods.options/strategies.strategy.Strategy.get_strikes", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/strategies.strategy.Strategy.create_order", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/strategies.strategy.Strategy.get_order", "strategy_methods.orders/strategies.strategy.Strategy.get_orders", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/strategies.strategy.Strategy.sell_all", "strategy_methods.orders/strategies.strategy.Strategy.submit_order", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders", "strategy_methods.parameters", "strategy_properties", "strategy_properties/lumibot.strategies.strategy.Strategy.cash", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/lumibot.strategies.strategy.Strategy.name", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money", "strategy_properties/lumibot.strategies.strategy.pytz", "strategy_properties/strategies.strategy.Strategy.cash", "strategy_properties/strategies.strategy.Strategy.first_iteration", "strategy_properties/strategies.strategy.Strategy.initial_budget", "strategy_properties/strategies.strategy.Strategy.is_backtesting", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/strategies.strategy.Strategy.name", "strategy_properties/strategies.strategy.Strategy.portfolio_value", "strategy_properties/strategies.strategy.Strategy.pytz", "strategy_properties/strategies.strategy.Strategy.quote_asset", "strategy_properties/strategies.strategy.Strategy.sleeptime", "strategy_properties/strategies.strategy.Strategy.timezone", "strategy_properties/strategies.strategy.Strategy.unspent_money", "vars"], "filenames": ["backtesting.rst", "backtesting.backtesting_function.rst", "backtesting.how_to_backtest.rst", "backtesting.indicators_files.rst", "backtesting.logs_csv.rst", "backtesting.pandas.rst", "backtesting.polygon.rst", "backtesting.tearsheet_html.rst", "backtesting.thetadata.rst", "backtesting.trades_files.rst", "backtesting.yahoo.rst", "brokers.rst", "brokers.alpaca.rst", "brokers.ccxt.rst", "brokers.interactive_brokers.rst", "brokers.interactive_brokers_legacy.rst", "brokers.tradier.rst", "deployment.rst", "entities.rst", "entities.asset.rst", "entities.bars.rst", "entities.data.rst", "entities.order.rst", "entities.position.rst", "entities.trading_fee.rst", "getting_started.rst", "index.rst", "lifecycle_methods.rst", "lifecycle_methods.after_market_closes.rst", "lifecycle_methods.before_market_closes.rst", "lifecycle_methods.before_market_opens.rst", "lifecycle_methods.before_starting_trading.rst", "lifecycle_methods.initialize.rst", "lifecycle_methods.on_abrupt_closing.rst", "lifecycle_methods.on_bot_crash.rst", "lifecycle_methods.on_canceled_order.rst", "lifecycle_methods.on_filled_order.rst", "lifecycle_methods.on_new_order.rst", "lifecycle_methods.on_parameters_updated.rst", "lifecycle_methods.on_partially_filled_order.rst", "lifecycle_methods.on_trading_iteration.rst", "lifecycle_methods.summary.rst", "lifecycle_methods.trace_stats.rst", "lumibot.backtesting.rst", "lumibot.data_sources.rst", "lumibot.strategies.rst", "lumibot.traders.rst", "strategy_methods.rst", "strategy_methods.account.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.chart.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.data.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars.rst", "strategy_methods.datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.misc.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.options.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.parameters.rst", "strategy_properties.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.cash.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.name.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money.rst", "strategy_properties/lumibot.strategies.strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.cash.rst", "strategy_properties/strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/strategies.strategy.Strategy.name.rst", "strategy_properties/strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/strategies.strategy.Strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/strategies.strategy.Strategy.timezone.rst", "strategy_properties/strategies.strategy.Strategy.unspent_money.rst", "vars.rst"], "titles": ["Backtesting", "Backtesting Function", "How To Backtest", "Indicators Files", "Logs CSV", "Pandas (CSV or other data)", "Polygon.io Backtesting", "Tearsheet HTML", "ThetaData Backtesting", "Trades Files", "Yahoo", "Brokers", "Alpaca", "Crypto Brokers (Using CCXT)", "Interactive Brokers", "Interactive Brokers Legacy", "Tradier", "Deployment Guide", "Entities", "Asset", "Bars", "Data", "Order", "Position", "Trading Fee", "What is Lumibot?", "Lumibot: Backtesting and Algorithmic Trading Library", "Lifecycle Methods", "def after_market_closes", "def before_market_closes", "def before_market_opens", "def before_starting_trading", "def initialize", "def on_abrupt_closing", "def on_bot_crash", "def on_canceled_order", "def on_filled_order", "def on_new_order", "def on_parameters_updated", "def on_partially_filled_order", "def on_trading_iteration", "Summary", "def trace_stats", "Backtesting", "Data Sources", "Strategies", "Traders", "Strategy Methods", "Account Management", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "Chart Functions", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "Data", "self.cancel_realtime_bars", "self.get_historical_prices", "self.get_historical_prices_for_assets", "self.get_last_price", "self.get_last_prices", "self.get_next_trading_day", "self.get_quote", "self.get_realtime_bars", "self.get_yesterday_dividend", "self.get_yesterday_dividends", "self.start_realtime_bars", "DateTime", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "Miscellaneous", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "Options", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_strikes", "self.options_expiry_to_datetime_date", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_option_expiration_after_date", "self.get_strikes", "self.options_expiry_to_datetime_date", "Order Management", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "Parameters", "Strategy Properties", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "self.pytz", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "Variable Backup & Restore"], "terms": {"lumibot": [0, 1, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 22, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165], "ha": [0, 7, 15, 20, 22, 26, 35, 36, 37, 39, 45, 71, 74, 78, 196], "three": [0, 15, 20, 22], "mode": [0, 15, 17, 43, 170, 185], "yahoo": [0, 1, 2, 5, 20, 26, 72, 73, 106, 117], "daili": [0, 2, 5, 7, 10, 31, 72, 73], "stock": [0, 1, 2, 5, 6, 8, 9, 10, 12, 17, 19, 20, 21, 22, 23, 26, 32, 44, 106, 117, 126, 134, 146, 152, 157, 163], "data": [0, 1, 3, 6, 8, 10, 11, 13, 18, 19, 20, 23, 26, 30, 31, 40, 45, 47, 62, 66, 71, 72, 73, 78, 81, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "panda": [0, 2, 10, 20, 21, 26, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 78, 106, 117], "intra": [0, 5, 10], "dai": [0, 1, 2, 5, 6, 8, 10, 17, 21, 22, 26, 30, 31, 32, 40, 44, 72, 73, 76, 79, 80, 84, 85, 86, 87, 93, 94, 95, 96, 130, 138, 146, 153, 157, 164, 178, 193], "inter": [0, 5], "test": [0, 2, 15, 17], "futur": [0, 5, 12, 14, 17, 19, 20, 26, 43, 44, 74, 146, 147, 152, 157, 158, 163, 180, 195], "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 76, 82, 101, 105, 107, 116, 118, 127, 128, 129, 130, 131, 135, 136, 137, 138, 140, 142, 146, 157, 165, 166, 167, 177, 178, 180, 182, 192, 193, 195, 196], "csv": [0, 2, 3, 9, 21, 26, 44], "suppli": [0, 10, 21], "you": [0, 1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 20, 22, 25, 26, 29, 32, 44, 47, 48, 49, 51, 55, 57, 61, 62, 66, 70, 72, 73, 82, 101, 124, 142, 146, 157, 165, 166, 178, 193], "polygon": [0, 1, 5, 8, 10, 17, 26], "io": [0, 13, 20, 26], "It": [0, 4, 5, 6, 7, 8, 13, 14, 15, 17, 19, 22, 23, 25, 26, 41, 43, 44, 74, 77, 146, 157], "i": [0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 26, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 77, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 102, 103, 106, 113, 114, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 147, 149, 151, 153, 157, 158, 160, 162, 164, 166, 167, 168, 170, 172, 173, 177, 178, 182, 183, 185, 187, 188, 192, 193, 196], "recommend": [0, 15, 17, 25], "option": [0, 2, 6, 8, 9, 12, 14, 16, 17, 19, 20, 22, 26, 32, 36, 39, 41, 43, 44, 47, 72, 74, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 146, 152, 157, 163], "crypto": [0, 1, 5, 7, 11, 17, 19, 20, 23, 26, 49, 51, 55, 57, 72, 74, 106, 117, 146, 152, 153, 157, 163, 164, 167, 175, 182, 190], "forex": [0, 2, 5, 6, 8, 12, 17, 19, 26, 44, 73, 74, 146, 152, 153, 157, 163, 164], "an": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 19, 22, 23, 26, 34, 35, 36, 39, 40, 41, 43, 44, 52, 58, 72, 74, 75, 81, 102, 103, 105, 113, 114, 116, 126, 127, 131, 132, 134, 135, 140, 141, 144, 146, 147, 148, 152, 155, 157, 158, 159, 163, 165, 178, 193, 196], "advanc": [0, 2, 5, 25, 26, 146, 157], "featur": [0, 2, 6, 8, 26], "allow": [0, 2, 4, 5, 6, 8, 14, 17, 20, 22, 25, 26, 81, 146, 157, 165], "ani": [0, 1, 2, 5, 6, 7, 8, 10, 13, 14, 15, 17, 21, 22, 25, 41, 43, 62, 66, 72, 73, 105, 116, 145, 156, 165], "type": [0, 1, 2, 5, 12, 14, 18, 19, 20, 21, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "have": [0, 1, 2, 5, 6, 8, 10, 14, 16, 17, 20, 22, 23, 25, 26, 28, 43, 47, 49, 51, 55, 57, 72, 78], "format": [0, 5, 19, 21, 44, 76, 125, 126, 130, 132, 133, 134, 138, 141], "requir": [0, 1, 2, 10, 13, 14, 15, 17, 19, 22, 74, 75, 146, 153, 157, 164], "more": [0, 2, 3, 11, 13, 14, 16, 17, 18, 20, 25, 26, 43, 44, 47, 70, 72, 101, 124, 128, 136, 142], "work": [0, 2, 5, 11, 15, 17, 25, 26, 72, 73, 77, 166], "setup": [0, 2, 11, 26], "most": [0, 5, 7, 14, 17, 20, 25, 41, 72, 78, 128, 136], "user": [0, 2, 5, 10, 14, 17, 21, 25, 27, 41, 45, 46, 144, 146, 155, 157, 196], "when": [0, 1, 2, 5, 6, 8, 13, 14, 17, 19, 20, 22, 25, 26, 27, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 62, 63, 66, 67, 82, 146, 157, 167, 172, 182, 187, 196], "run": [0, 5, 6, 8, 10, 11, 12, 14, 17, 21, 26, 30, 32, 33, 34, 37, 44, 46, 81, 102, 103, 113, 114, 143, 145, 154, 156, 170, 185], "sever": [0, 2, 10, 11, 45, 165], "import": [0, 1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 26, 41, 42, 44, 45, 63, 67, 73, 80, 146, 152, 153, 157, 163, 164, 165], "ar": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 38, 41, 44, 45, 47, 48, 53, 59, 61, 62, 63, 66, 67, 70, 73, 78, 81, 82, 101, 106, 117, 124, 125, 126, 128, 133, 134, 136, 142, 143, 146, 147, 149, 151, 153, 154, 157, 158, 160, 162, 164, 165, 167, 182, 196], "each": [0, 1, 2, 3, 5, 7, 9, 13, 14, 20, 22, 26, 30, 32, 40, 41, 44, 45, 47, 53, 59, 72, 80, 126, 134, 149, 151, 160, 162, 196], "prefix": [0, 105, 116], "strategi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "name": [0, 1, 5, 10, 14, 17, 19, 21, 25, 26, 32, 44, 46, 62, 63, 66, 67, 74, 105, 116, 165, 196], "date": [0, 1, 2, 5, 6, 8, 10, 19, 21, 26, 32, 44, 74, 76, 82, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 141, 146, 157], "These": [0, 1, 2, 3, 4, 7, 10, 32, 45, 54, 60, 82], "provid": [0, 2, 4, 5, 6, 8, 9, 17, 20, 21, 44, 74, 75, 131, 140, 144, 145, 155, 156], "detail": [0, 2, 3, 4, 9, 14, 17, 19, 72, 148, 159], "insight": [0, 2], "perform": [0, 2, 3, 7, 17, 26, 41], "behavior": [0, 2], "how": [0, 3, 11, 12, 13, 17, 25, 26, 45, 72, 81, 166], "To": [0, 6, 8, 10, 13, 14, 16, 17, 22, 25, 26, 72], "instal": [0, 5, 10, 13, 15, 17], "choos": [0, 15, 26], "sourc": [0, 5, 8, 13, 20, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "tearsheet": [0, 1, 26, 46], "html": [0, 1, 3, 9, 20, 26], "trade": [0, 1, 4, 5, 10, 11, 13, 15, 17, 18, 19, 20, 21, 22, 27, 30, 31, 32, 33, 40, 41, 43, 44, 45, 52, 58, 73, 74, 76, 78, 81, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 126, 130, 134, 138, 146, 157, 171, 186, 196], "indic": [0, 1, 5, 13, 46, 52, 53, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 153, 164], "conclus": [0, 26], "function": [0, 2, 3, 13, 17, 21, 26, 32, 38, 41, 47, 48, 82, 142], "run_backtest": [0, 1, 2, 5, 6, 8, 10, 25], "other": [0, 2, 6, 8, 10, 13, 14, 15, 17, 20, 22, 25, 26, 41, 62, 66, 77, 101, 146, 157, 167, 182, 196], "In": [0, 6, 8, 13, 17, 22, 43, 74, 75, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98], "summari": [0, 6, 8, 26, 27], "thetadata": [0, 2, 26], "log": [0, 1, 2, 7, 10, 14, 15, 16, 17, 19, 26, 42, 101, 105, 116], "here": [1, 2, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 25, 26, 41, 165, 166], "descript": [1, 14, 17], "all": [1, 4, 5, 13, 17, 20, 21, 22, 25, 30, 33, 34, 43, 45, 46, 51, 53, 57, 59, 72, 73, 125, 127, 128, 129, 131, 133, 135, 136, 137, 140, 143, 145, 146, 149, 150, 151, 154, 156, 157, 160, 161, 162, 165, 196], "its": [1, 6, 8, 22, 42], "paramet": [1, 2, 6, 8, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 87, 88, 90, 91, 93, 96, 97, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 161, 162, 163, 164, 172, 187], "thi": [1, 2, 5, 6, 8, 9, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 49, 51, 55, 57, 62, 63, 66, 67, 72, 73, 74, 75, 77, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 107, 118, 146, 153, 157, 164, 167, 168, 177, 178, 182, 183, 192, 193], "true": [1, 5, 12, 13, 16, 17, 22, 24, 25, 26, 32, 43, 44, 46, 72, 73, 74, 105, 116, 151, 162, 168, 170, 183, 185], "kind": [1, 25], "do": [1, 5, 10, 13, 16, 20, 22, 25, 26, 38, 47, 101, 146, 157], "arg": [1, 21, 44], "minutes_before_clos": [1, 26, 29, 32, 40, 102, 113], "5": [1, 2, 5, 6, 8, 17, 26, 32, 44, 72, 73, 106, 107, 117, 118, 146, 157, 165, 172, 178, 187, 193, 196], "minutes_before_open": [1, 26, 30, 103, 114], "60": [1, 20, 173, 188], "sleeptim": [1, 2, 6, 8, 13, 25, 26, 32, 40, 107, 118], "1": [1, 2, 5, 6, 7, 8, 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 31, 44, 72, 73, 84, 90, 91, 93, 99, 100, 128, 136, 139, 146, 152, 153, 157, 163, 164, 178, 193, 196], "stats_fil": [1, 32], "none": [1, 12, 13, 17, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 43, 44, 46, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 81, 84, 93, 102, 103, 105, 106, 107, 108, 113, 114, 116, 117, 118, 119, 128, 131, 136, 140, 143, 144, 145, 146, 148, 150, 151, 154, 155, 156, 157, 159, 161, 162], "risk_free_r": [1, 44, 128, 136], "logfil": [1, 46], "config": [1, 12, 13, 16, 17, 25, 43], "auto_adjust": [1, 44], "fals": [1, 12, 13, 16, 17, 22, 25, 26, 32, 43, 44, 46, 73, 74, 83, 92, 105, 116, 128, 136, 146, 151, 157, 162], "budget": [1, 5, 10, 17, 25, 32, 169, 184], "benchmark_asset": [1, 2, 6, 8, 25], "spy": [1, 2, 5, 6, 8, 19, 22, 25, 30, 31, 32, 36, 40, 44, 71, 72, 73, 74, 75, 79, 80, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 144, 146, 150, 152, 153, 155, 157, 161, 163, 164, 165], "plot_file_html": 1, "trades_fil": 1, "settings_fil": 1, "pandas_data": [1, 5, 25, 43, 44], "quote_asset": [1, 13, 19, 23, 26, 152, 153, 163, 164], "usd": [1, 19, 21, 72, 73, 74, 146, 152, 153, 157, 163, 164], "starting_posit": 1, "show_plot": [1, 46], "tearsheet_fil": 1, "save_tearsheet": [1, 46], "show_tearsheet": [1, 46], "buy_trading_fe": [1, 25], "sell_trading_fe": [1, 25], "api_kei": [1, 12, 25, 26, 43, 44], "polygon_api_kei": [1, 2, 17], "polygon_has_paid_subscript": 1, "indicators_fil": 1, "show_ind": [1, 46], "save_logfil": 1, "kwarg": [1, 12, 19, 21, 43, 44, 153, 164], "datasource_class": 1, "class": [1, 2, 5, 6, 8, 10, 12, 13, 16, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 165, 196], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 27, 28, 34, 35, 36, 37, 38, 39, 41, 43, 44, 45, 49, 50, 51, 54, 55, 56, 57, 60, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 104, 106, 108, 115, 117, 119, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 139, 140, 146, 147, 150, 151, 153, 157, 158, 161, 162, 164, 165, 167, 169, 171, 172, 173, 174, 175, 176, 177, 179, 181, 182, 184, 186, 187, 188, 189, 190, 191, 192, 194], "datasourc": [1, 8, 43, 44], "For": [1, 2, 3, 5, 7, 10, 13, 14, 17, 19, 20, 22, 26, 28, 44, 49, 51, 55, 57, 109, 110, 111, 112, 120, 121, 122, 123, 146, 152, 153, 157, 163, 164, 165], "exampl": [1, 2, 6, 8, 11, 12, 15, 19, 20, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 52, 53, 58, 59, 62, 63, 66, 67, 71, 72, 73, 74, 75, 79, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 105, 106, 107, 109, 110, 111, 112, 113, 114, 116, 117, 118, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 196], "want": [1, 2, 5, 8, 10, 12, 13, 16, 17, 25, 26, 41, 44, 62, 66], "financ": [1, 2, 10, 26], "would": [1, 2, 5, 16, 19, 25, 26, 44, 51, 57, 146, 157, 178, 193], "pass": [1, 2, 5, 8, 10, 18, 22, 28, 36, 40, 41, 45, 102, 103, 113, 114, 128, 136, 146, 157], "yahoodatabacktest": [1, 10, 25, 26, 32], "backtesting_start": [1, 2, 5, 6, 8, 10, 25, 26, 32, 43], "datetim": [1, 2, 5, 6, 8, 10, 13, 19, 20, 21, 25, 26, 32, 43, 44, 47, 62, 63, 66, 67, 72, 76, 78, 81, 83, 84, 90, 91, 92, 93, 99, 100, 127, 130, 132, 135, 138, 139, 141, 146, 157, 171, 186], "start": [1, 2, 5, 6, 7, 8, 10, 11, 13, 17, 20, 21, 30, 32, 44, 72, 73, 78, 81, 102, 113, 173, 188], "period": [1, 2, 5, 7, 13, 21, 81, 196], "backtesting_end": [1, 2, 5, 6, 8, 10, 25, 26, 32], "end": [1, 2, 6, 7, 8, 10, 14, 20, 21, 26, 42], "int": [1, 12, 19, 20, 21, 22, 36, 39, 44, 62, 63, 66, 67, 72, 73, 81, 84, 85, 86, 87, 88, 89, 93, 94, 95, 96, 97, 98, 102, 103, 113, 114, 146, 147, 157, 158, 172, 173, 178, 187, 188, 193], "number": [1, 12, 15, 16, 17, 21, 22, 29, 32, 44, 72, 73, 84, 87, 88, 93, 96, 97, 146, 157, 172, 173, 178, 187, 188, 193], "minut": [1, 5, 13, 17, 20, 21, 25, 26, 29, 30, 32, 40, 43, 44, 72, 73, 84, 86, 88, 93, 95, 97, 102, 103, 113, 114, 172, 173, 178, 187, 188, 193], "befor": [1, 2, 5, 7, 10, 13, 14, 15, 17, 20, 22, 25, 26, 29, 30, 31, 32, 40, 41, 42, 44, 72, 73, 102, 103, 113, 114, 151, 162, 172, 173, 187, 188, 196], "close": [1, 5, 12, 13, 20, 21, 22, 28, 29, 32, 33, 40, 43, 51, 57, 72, 74, 75, 78, 81, 102, 103, 113, 114, 151, 162, 172, 187], "method": [1, 6, 8, 15, 19, 20, 22, 23, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 70, 101, 124, 125, 127, 129, 131, 133, 135, 137, 140, 165, 168, 172, 173, 178, 183, 187, 188, 193, 196], "call": [1, 5, 6, 8, 19, 20, 22, 28, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 72, 74, 75, 125, 126, 128, 133, 134, 136, 152, 163], "open": [1, 2, 5, 12, 17, 20, 21, 22, 25, 29, 30, 31, 40, 43, 63, 67, 72, 78, 81, 102, 103, 113, 114, 143, 144, 145, 149, 151, 154, 155, 156, 160, 162, 173, 188], "second": [1, 12, 22, 32, 40, 43, 73, 81, 101, 107, 118, 178, 193], "sleep": [1, 2, 26, 40, 47, 101, 102, 113, 178, 193], "between": [1, 2, 13, 20, 21, 26, 32, 72, 178, 193], "iter": [1, 2, 6, 8, 13, 21, 32, 40, 41, 168, 171, 183, 186, 196], "str": [1, 19, 20, 21, 22, 23, 44, 52, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 84, 93, 105, 106, 116, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 153, 157, 164, 174, 178, 179, 189, 193, 194], "file": [1, 4, 5, 7, 14, 15, 17, 25, 26, 101, 105, 116, 165, 196], "write": [1, 2, 6, 8], "stat": [1, 28, 42], "float": [1, 5, 19, 20, 22, 23, 36, 39, 43, 44, 49, 51, 55, 57, 62, 63, 66, 67, 74, 75, 79, 80, 102, 103, 107, 113, 114, 118, 128, 131, 136, 140, 146, 147, 153, 157, 158, 164, 167, 169, 175, 182, 184, 190], "risk": [1, 7, 14, 25, 128, 136], "free": [1, 2, 6, 8, 17, 23, 26, 128, 136], "rate": [1, 6, 8, 20, 128, 136], "dict": [1, 21, 38, 42, 44, 46, 50, 54, 56, 60, 77, 104, 108, 115, 119, 146, 157], "set": [1, 2, 6, 8, 11, 14, 15, 16, 17, 19, 20, 21, 22, 25, 26, 29, 32, 43, 44, 54, 60, 72, 73, 78, 106, 117, 125, 133, 146, 157, 165, 166, 172, 173, 178, 187, 188, 193, 196], "up": [1, 2, 5, 6, 11, 14, 15, 17, 19, 25, 26, 63, 67, 196], "broker": [1, 5, 12, 16, 19, 20, 22, 23, 24, 25, 26, 32, 35, 36, 37, 39, 45, 72, 73, 74, 77, 81, 109, 110, 111, 112, 120, 121, 122, 123, 128, 136, 146, 152, 153, 157, 163, 164, 167, 182], "live": [1, 2, 12, 14, 15, 17, 20, 25, 43, 44, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117], "bool": [1, 22, 43, 44, 46, 72, 73, 74, 105, 116, 128, 136, 153, 164, 168, 170, 183, 185], "whether": [1, 17, 22, 44, 46, 72, 82, 128, 136, 146, 157], "automat": [1, 6, 8, 22, 146, 147, 157, 158, 196], "adjust": [1, 7, 14, 20, 21, 44], "initi": [1, 2, 6, 8, 13, 15, 25, 26, 27, 41, 106, 117, 165, 169, 172, 173, 178, 184, 187, 188, 193], "asset": [1, 2, 5, 9, 12, 13, 17, 18, 20, 21, 22, 23, 26, 33, 34, 35, 36, 37, 39, 40, 43, 44, 49, 51, 52, 53, 55, 57, 58, 59, 62, 66, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 147, 152, 153, 157, 158, 163, 164, 167, 177, 182, 192], "benchmark": [1, 2, 7], "compar": [1, 7, 14, 17], "If": [1, 5, 6, 8, 12, 13, 14, 16, 17, 20, 21, 25, 26, 30, 32, 36, 40, 44, 72, 73, 74, 81, 102, 103, 105, 113, 114, 116, 131, 140, 143, 146, 151, 154, 157, 162], "string": [1, 17, 19, 20, 21, 22, 44, 72, 73, 105, 116, 132, 141, 146, 157, 178, 193, 196], "convert": [1, 19, 20, 22, 26, 43, 44, 132, 141, 146, 157], "object": [1, 5, 10, 12, 18, 19, 20, 21, 22, 23, 24, 35, 36, 37, 39, 43, 44, 46, 52, 53, 58, 59, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 109, 110, 111, 112, 120, 121, 122, 123, 126, 131, 134, 140, 144, 145, 146, 147, 148, 149, 152, 153, 155, 156, 157, 158, 159, 160, 163, 164, 176, 181, 191, 196], "plot": [1, 10, 46, 63, 67], "list": [1, 2, 13, 18, 19, 20, 23, 25, 31, 43, 44, 47, 48, 53, 59, 61, 70, 73, 75, 80, 82, 84, 93, 101, 106, 111, 112, 117, 122, 123, 124, 127, 129, 131, 135, 137, 140, 142, 145, 149, 153, 156, 160, 164, 166], "A": [1, 5, 7, 10, 12, 14, 22, 26, 44, 46, 52, 53, 58, 59, 77, 84, 93, 146, 153, 157, 164, 196], "pandasdatabacktest": [1, 5, 25], "contain": [1, 3, 20, 21, 22, 40, 42, 78, 152, 153, 163, 164], "cryptocurr": [1, 2, 6, 8, 13, 17, 20, 72, 73, 74, 75, 146, 157], "get": [1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 17, 18, 20, 21, 22, 30, 31, 33, 38, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 70, 72, 73, 75, 77, 79, 80, 82, 104, 115, 124, 147, 148, 149, 150, 158, 159, 160, 161, 165, 166, 167, 172, 173, 175, 178, 182, 187, 188, 190, 193, 196], "valuat": 1, "measur": [1, 7], "overal": [1, 7], "porfolio": 1, "valu": [1, 3, 5, 9, 12, 13, 14, 17, 19, 20, 21, 23, 28, 43, 45, 46, 48, 49, 51, 55, 57, 61, 62, 63, 66, 67, 72, 73, 128, 136, 153, 164, 175, 190, 196], "usual": [1, 47, 178, 193], "usdt": [1, 19, 49, 51, 55, 57, 72, 74, 146, 157], "usdc": 1, "dictionari": [1, 5, 8, 16, 36, 42, 43, 44, 46, 73, 77, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 157, 165], "posit": [1, 13, 18, 22, 26, 36, 39, 43, 45, 51, 52, 53, 57, 58, 59, 147, 150, 151, 158, 161, 162, 167, 175, 182, 190], "100": [1, 5, 12, 13, 16, 19, 20, 25, 26, 32, 42, 44, 72, 73, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 128, 133, 134, 136, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164], "200": [1, 12, 36, 44, 73, 111, 112, 122, 123, 153, 164], "aapl": [1, 2, 5, 6, 8, 10, 12, 16, 19, 20, 23, 26, 32, 35, 36, 37, 39, 72, 73, 145, 156], "show": [1, 7, 52, 53, 58, 59, 147, 148, 149, 158, 159, 160], "save": [1, 5, 10, 17, 25, 46, 196], "must": [1, 2, 5, 6, 8, 10, 12, 16, 21, 22, 41, 72, 73, 131, 140, 146, 157], "within": [1, 17, 18, 107, 118, 143, 154], "tradingfe": [1, 24, 25, 26], "appli": [1, 17, 44], "bui": [1, 2, 5, 6, 7, 8, 9, 10, 12, 13, 16, 19, 22, 25, 26, 36, 40, 45, 49, 55, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164, 167, 182], "order": [1, 2, 5, 6, 8, 9, 10, 12, 13, 18, 19, 23, 25, 26, 29, 30, 35, 36, 37, 39, 40, 41, 43, 47, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 182], "dure": [1, 2, 4, 7, 17, 45, 73], "sell": [1, 7, 9, 22, 23, 29, 33, 34, 36, 40, 43, 45, 146, 150, 151, 152, 153, 157, 161, 162, 163, 164], "api": [1, 2, 6, 8, 10, 12, 13, 14, 15, 16, 17, 20, 26, 128, 136], "kei": [1, 2, 3, 5, 6, 8, 12, 14, 15, 16, 17, 21, 26, 46, 128, 136, 165, 196], "onli": [1, 5, 10, 13, 14, 15, 17, 19, 20, 21, 22, 23, 25, 26, 32, 41, 43, 44, 46, 72, 73, 74, 77, 81, 128, 136, 143, 153, 154, 164, 172, 187], "polygondatabacktest": [1, 2, 6, 8], "deprec": [1, 15, 146, 157, 180, 195], "pleas": [1, 2, 5, 6, 8, 10, 13, 15, 22, 72, 180, 195], "instead": [1, 5, 17, 20, 43, 107, 118, 128, 136, 180, 195], "paid": [1, 2, 167, 182], "subscript": [1, 11, 26], "default": [1, 5, 10, 17, 19, 20, 21, 32, 34, 44, 45, 54, 60, 62, 63, 66, 67, 72, 73, 74, 76, 91, 100, 106, 117, 125, 127, 128, 129, 130, 133, 135, 136, 137, 138, 146, 151, 153, 157, 162, 164, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194, 196], "return": [1, 7, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "from": [1, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 26, 41, 42, 44, 45, 72, 73, 76, 80, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 140, 146, 152, 153, 157, 163, 164, 196], "simpl": [1, 5, 6, 8, 10, 16, 22, 26, 146, 157], "first": [1, 5, 6, 8, 10, 13, 16, 17, 20, 21, 22, 25, 26, 30, 32, 73, 168, 178, 183, 193, 196], "mystrategi": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 165], "def": [1, 2, 5, 6, 8, 10, 12, 13, 16, 25, 26, 27, 41, 106, 117, 165, 172, 173, 178, 187, 188, 193, 196], "on_trading_iter": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 27, 28, 41, 42, 47, 102, 103, 113, 114, 165, 168, 172, 178, 183, 187, 193, 196], "self": [1, 2, 5, 6, 8, 10, 12, 13, 14, 16, 17, 19, 20, 22, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 47, 165], "first_iter": [1, 2, 5, 6, 8, 10, 26], "create_ord": [1, 2, 5, 6, 8, 10, 12, 13, 19, 22, 25, 26, 40, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 152, 153, 155, 156, 163, 164], "quantiti": [1, 2, 6, 7, 8, 10, 12, 13, 22, 23, 25, 26, 36, 39, 52, 53, 58, 59, 146, 157], "side": [1, 2, 6, 8, 12, 22, 25, 36, 43, 146, 157], "submit_ord": [1, 2, 5, 6, 8, 10, 13, 19, 22, 25, 26, 40, 43, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 146, 150, 155, 156, 157, 161], "creat": [1, 2, 5, 6, 7, 8, 10, 13, 14, 16, 17, 19, 21, 22, 36, 72, 125, 127, 129, 131, 133, 135, 137, 140, 142, 144, 145, 146, 155, 156, 157], "2018": [1, 20], "31": [1, 5, 10, 25, 26, 44, 125, 126, 133, 134], "symbol": [1, 2, 5, 6, 8, 12, 13, 19, 20, 21, 22, 23, 25, 36, 44, 63, 67, 72, 73, 74, 146, 152, 153, 157, 163, 164], "qqq": 1, "asset_typ": [1, 5, 13, 19, 20, 44, 72, 73, 74, 146, 147, 152, 153, 157, 158, 163, 164], "vital": 2, "step": [2, 5, 14], "valid": [2, 19, 21, 22, 44, 125, 126, 133, 134, 146, 157], "your": [2, 5, 6, 7, 8, 10, 11, 12, 14, 15, 18, 20, 22, 40, 41, 47, 48, 49, 51, 55, 57, 61, 70, 82, 101, 146, 157, 165, 166, 178, 193, 196], "histor": [2, 6, 8, 12, 13, 20, 26, 43, 44, 70, 72, 73], "With": [2, 6, 8, 26], "can": [2, 5, 6, 8, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 29, 32, 41, 44, 45, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 82, 101, 124, 128, 136, 142, 146, 157, 165, 166, 178, 193], "across": [2, 17], "variou": [2, 6, 7, 8, 14], "even": [2, 6, 8, 30, 153, 164], "own": [2, 5, 6, 8, 12, 13, 16, 17, 23, 25, 26, 150, 161], "custom": [2, 25, 32, 146, 157, 165], "guid": [2, 13, 16, 25, 26], "walk": [2, 17], "through": [2, 13, 14, 17], "explain": 2, "introduc": 2, "why": [2, 26], "see": [2, 13, 14, 15, 17, 19, 20, 25, 26, 44, 48, 61, 70, 82, 101, 124, 142], "past": [2, 22, 25], "help": [2, 3, 6, 8, 25], "identifi": [2, 13, 19, 22, 148, 159], "weak": 2, "strength": 2, "deploi": [2, 26], "them": [2, 11, 17, 20, 22, 25, 26, 47, 48, 61, 70, 82, 101, 124, 142, 145, 156], "market": [2, 11, 12, 13, 17, 22, 25, 26, 28, 29, 30, 31, 32, 40, 43, 74, 75, 102, 103, 106, 109, 110, 111, 112, 113, 114, 117, 120, 121, 122, 123, 146, 151, 152, 153, 157, 162, 163, 164, 172, 173, 175, 187, 188, 190], "begin": [2, 43], "make": [2, 4, 5, 6, 8, 17, 22, 25, 26, 74, 75], "sure": [2, 6, 8, 25, 26], "machin": 2, "follow": [2, 5, 6, 8, 13, 14, 15, 17, 19, 20, 22, 26, 27, 30, 41, 78, 165, 178, 193], "command": [2, 25, 26], "pip": [2, 5, 10, 13, 25, 26], "upgrad": [2, 5, 10, 25, 26], "latest": [2, 5, 10, 13, 17, 25, 26, 72], "version": [2, 5, 7, 10, 17, 25, 26], "onc": [2, 14, 15, 16, 17, 22, 25, 26, 32, 41, 146, 157, 196], "id": [2, 15, 17, 148, 159, 196], "like": [2, 5, 17, 21, 25, 26, 29, 30, 31, 32, 33, 43, 165], "visual": [2, 3, 7, 25], "studio": 2, "code": [2, 5, 6, 7, 8, 13, 14, 17, 25, 26, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 62, 66, 102, 103, 113, 114, 165], "v": [2, 7, 19], "pycharm": 2, "quick": 2, "download": [2, 5, 6, 8, 25, 26], "offici": 2, "websit": [2, 7, 10, 13, 14, 16, 17], "http": [2, 6, 8, 12, 13, 14, 15, 16, 17, 20, 25, 26], "visualstudio": 2, "com": [2, 7, 15, 16, 17, 25, 26], "python": [2, 5, 25, 105, 116], "extens": 2, "go": [2, 5, 12, 15, 17, 25, 26], "search": [2, 26], "new": [2, 5, 7, 14, 17, 19, 20, 22, 26, 36, 37, 43, 54, 60, 146, 157, 167, 182], "project": [2, 6, 8, 17], "folder": [2, 5, 10, 13, 17], "termin": [2, 13, 25, 26], "re": [2, 11, 14, 17, 26, 82], "readi": [2, 14, 17, 41, 146, 157], "support": [2, 6, 7, 8, 13, 14, 17, 21, 25, 26, 44, 63, 67, 128, 136, 146, 157], "suit": [2, 26], "differ": [2, 3, 5, 7, 11, 13, 14, 17, 20, 25, 26, 45], "need": [2, 6, 8, 13, 14, 16, 17, 25, 27, 41, 43, 72, 73, 77], "": [2, 3, 6, 7, 8, 13, 14, 16, 17, 18, 21, 25, 26, 38, 41, 46, 52, 58, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 128, 136, 147, 158, 165, 178, 193, 196], "overview": 2, "avail": [2, 9, 10, 17, 20, 21, 23, 26, 47, 72, 73, 106, 117, 128, 136, 153, 164, 167, 182], "etf": [2, 10], "suitabl": [2, 17], "longer": 2, "term": 2, "ideal": [2, 17], "intradai": 2, "section": [2, 14, 17, 25, 47], "2": [2, 6, 17, 22, 30, 32, 62, 66, 72, 73, 111, 112, 122, 123, 153, 164, 178, 193], "offer": [2, 7, 14, 17, 26], "two": [2, 3, 11, 19, 22, 25, 26, 73, 145, 156], "year": [2, 6, 8], "plan": [2, 14, 17], "faster": [2, 6, 8], "retriev": [2, 19, 21, 74, 75, 78, 196], "coupon": [2, 6, 8], "lumi10": [2, 6], "10": [2, 6, 8, 13, 17, 19, 20, 32, 40, 44, 63, 67, 82, 127, 135, 152, 153, 163, 164, 165, 172, 173, 178, 187, 188, 193, 196], "off": [2, 6, 8], "3": [2, 12, 17, 146, 157], "design": [2, 17, 25, 27, 41], "look": [2, 5, 15, 26], "price": [2, 6, 8, 9, 13, 16, 17, 19, 20, 21, 22, 23, 31, 36, 39, 43, 44, 45, 47, 62, 63, 66, 67, 70, 72, 73, 74, 75, 78, 128, 136, 146, 152, 153, 157, 163, 164], "secur": [2, 5, 10, 14, 19, 22], "account": [2, 6, 8, 11, 12, 13, 15, 16, 17, 26, 43, 47, 49, 51, 53, 55, 57, 59, 61, 150, 161, 167, 182], "usernam": [2, 8, 11, 17, 26], "password": [2, 8, 13, 14, 17, 196], "net": [2, 8, 51, 57], "lumi": [2, 7, 8], "4": [2, 17, 26, 147, 158], "full": [2, 6, 8, 11, 14, 26, 125, 133], "flexibl": [2, 5, 6, 8, 25], "dataset": 2, "e": [2, 9, 17, 19, 20, 21, 22, 23, 25, 72, 73, 74, 146, 147, 152, 157, 158, 163], "g": [2, 9, 17, 20, 21, 22, 23, 25, 72, 73, 146, 157], "databas": [2, 5, 17, 26], "export": 2, "manual": [2, 14, 17], "configur": [2, 11, 15, 26], "ve": [2, 13, 16, 26], "select": [2, 14, 17], "built": [2, 5, 26], "addit": [2, 14, 17, 19, 22, 146, 157], "specif": [2, 7, 13, 14, 17, 19, 22, 41, 44, 62, 66, 109, 120, 125, 126, 133, 134, 146, 157, 166], "replac": [2, 6, 8, 13], "your_polygon_api_kei": [2, 6], "actual": [2, 13, 22, 41, 43, 175, 190], "1d": [2, 6, 8, 20, 21, 40, 44], "get_last_pric": [2, 6, 8, 10, 13, 16, 20, 21, 26, 44, 47], "qty": [2, 6, 8], "portfolio_valu": [2, 6, 8, 10, 13, 26, 28, 42, 177, 192], "__name__": [2, 6, 8, 13], "__main__": [2, 6, 8, 13], "2023": [2, 6, 8, 44, 125, 126, 133, 134, 196], "result": [2, 5, 6, 8, 10, 25, 26, 42], "inform": [2, 3, 5, 9, 10, 13, 17, 43, 44, 77, 78, 126, 131, 134, 140, 146, 157, 166], "about": [2, 9, 11, 26, 166], "refer": [2, 3, 17, 26, 27], "crucial": [2, 17, 25], "understand": [2, 4, 25], "aspect": 2, "execut": [2, 9, 17, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 102, 103, 107, 109, 111, 113, 114, 118, 120, 122, 143, 152, 154, 163, 172, 173, 178, 187, 188, 193], "statist": 2, "analysi": [2, 4, 13, 46], "tear": 2, "sheet": 2, "includ": [2, 3, 7, 9, 10, 13, 17, 19, 20, 26, 32, 41, 44, 54, 60, 72, 124, 146, 148, 157, 159, 175, 190], "equiti": [2, 14, 51, 57], "curv": 2, "metric": [2, 7], "sharp": [2, 7], "ratio": [2, 7], "drawdown": [2, 7], "comparison": 2, "everi": [2, 25, 32, 40, 43, 47, 81, 196], "which": [2, 6, 7, 8, 9, 13, 14, 17, 20, 21, 22, 32, 41, 49, 51, 55, 57, 74, 75, 76, 77, 128, 130, 136, 138, 178, 193], "wa": [2, 12, 13, 27, 30, 33, 34, 41, 43, 72, 167, 182], "timestamp": [2, 12, 20, 44, 62, 63, 66, 67, 85, 86, 87, 88, 89, 94, 95, 96, 97, 98, 196], "essenti": [2, 17], "review": [2, 14], "potenti": [2, 25, 26, 147, 158], "issu": 2, "optim": [2, 7, 17, 26], "interpret": [2, 178, 193], "technic": [2, 13, 41], "move": [2, 7, 22, 26], "averag": [2, 7, 22, 23], "rsi": [2, 13], "respond": 2, "condit": [2, 22, 40], "base": [2, 7, 12, 13, 19, 20, 21, 22, 23, 24, 26, 40, 43, 44, 46, 72, 73, 74, 146, 157], "power": [2, 6, 8, 17, 25, 26], "framework": [2, 41], "multipl": [2, 17, 143, 154, 196], "By": [2, 17, 26, 34, 128, 136, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194], "quickli": [2, 14, 17, 25], "environ": [2, 14, 26, 196], "confid": 2, "further": [2, 17], "individu": [2, 26], "abov": [2, 15, 19, 20, 32], "uniqu": 3, "becaus": [3, 5, 6, 8, 10, 17, 43], "thei": [3, 5, 11, 17, 20, 26, 41, 81, 128, 136], "add_mark": [3, 26, 47], "add": [3, 5, 13, 14, 17, 19, 22, 25, 32, 43, 46, 62, 63, 66, 67], "marker": [3, 46, 63, 65, 67, 69], "add_lin": [3, 26, 47], "line": [3, 26, 46, 62, 63, 64, 66, 67, 68], "influenc": [3, 27, 41], "decis": [3, 4], "point": [3, 7, 9, 15, 22, 44, 62, 66, 72, 73, 147, 158], "time": [3, 5, 6, 8, 9, 12, 13, 14, 17, 20, 21, 25, 32, 41, 43, 44, 45, 71, 72, 73, 78, 81, 82, 87, 88, 96, 97, 102, 103, 107, 113, 114, 118, 128, 136, 146, 157, 168, 178, 183, 193], "event": [4, 26, 33, 34, 35, 36, 37, 38, 39, 43, 63, 67], "action": [4, 17], "taken": 4, "backtest": [4, 5, 7, 10, 17, 21, 22, 24, 32, 44, 46, 63, 67, 72, 73, 74, 75, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 170, 185], "debug": [4, 46, 196], "process": [4, 6, 8, 14, 17, 25, 37, 39, 152, 153, 163, 164, 196], "collect": [4, 5], "comprehens": [4, 25], "view": [4, 17], "refin": [4, 25], "note": [5, 10, 13, 14, 15, 17, 20, 22, 43, 77, 146, 157], "ensur": [5, 10, 14, 17, 21, 22, 25, 26, 146, 157], "proceed": [5, 10, 14, 25], "been": [5, 10, 15, 22, 23, 35, 36, 37, 39, 43, 74, 78], "some": [5, 10, 14, 25, 26, 44, 45, 74, 146, 157], "major": [5, 10], "chang": [5, 10, 12, 14, 16, 17, 20, 32], "modul": [5, 10, 26], "situat": 5, "much": [5, 6, 8, 12], "easier": [5, 17], "intend": [5, 17], "who": [5, 17, 52, 58, 147, 158], "after": [5, 6, 8, 13, 14, 17, 21, 26, 28, 30, 31, 40, 42, 44, 63, 67, 72, 76, 130, 138, 139, 196], "librari": [5, 7, 13, 16, 17, 25], "strictli": [5, 21], "parquet": 5, "etc": [5, 16, 20, 21, 40, 45, 48, 61, 63, 67, 77, 148, 159], "wish": [5, 26], "accept": [5, 19], "one": [5, 7, 13, 14, 17, 22, 25, 26, 41, 43, 47, 72, 109, 120, 146, 153, 157, 164], "frame": 5, "raw": [5, 20, 22], "addition": [5, 10, 20], "possibl": [5, 14, 32, 44, 62, 63, 66, 67, 153, 164], "contract": [5, 19, 20, 22, 32, 43], "also": [5, 10, 15, 17, 22, 25, 26, 32, 43, 72, 146, 151, 157, 162, 166], "difficult": 5, "backtestingbrok": [5, 6, 8, 10, 43], "next": [5, 6, 8, 12, 17, 26, 40, 76, 130, 138, 139], "normal": [5, 16, 131, 140], "someth": [5, 13], "0000": 5, "hr": [5, 21], "2359": [5, 21], "last": [5, 13, 20, 21, 22, 28, 30, 31, 42, 43, 44, 72, 73, 74, 75, 85, 86, 94, 95, 171, 186, 196], "consid": [5, 20, 177, 192], "zone": [5, 20], "unless": 5, "america": [5, 20, 44, 176, 179, 181, 191, 194], "york": [5, 17], "aka": 5, "est": 5, "receiv": [5, 14], "index": [5, 19, 20, 21, 26, 78], "datetime64": [5, 21], "column": [5, 20, 21, 78, 196], "high": [5, 20, 21, 25, 26, 43, 78, 81], "low": [5, 17, 20, 21, 43, 78, 81], "volum": [5, 20, 21, 78, 81], "should": [5, 10, 14, 16, 20, 22, 27, 40, 43, 45, 74, 107, 118, 128, 136], "2020": [5, 10, 25, 26, 72, 90, 91, 99, 100, 147, 152, 158, 163], "01": [5, 6, 8, 20, 25, 146, 147, 152, 157, 158, 163], "02": [5, 20], "09": 5, "00": [5, 44, 110, 121, 146, 152, 153, 157, 163, 164, 196], "3237": 5, "3234": 5, "75": 5, "3235": 5, "25": [5, 17], "16808": 5, "32": 5, "10439": 5, "33": 5, "50": [5, 22, 32, 146, 157, 178, 193], "3233": 5, "8203": 5, "04": [5, 44], "22": 5, "15": [5, 17, 20, 32, 44, 72, 73], "56": 5, "2800": 5, "2796": 5, "8272": 5, "57": 5, "2794": 5, "7440": 5, "58": 5, "2793": 5, "7569": 5, "yfinanc": [5, 44], "yf": [5, 44], "5d": 5, "interv": 5, "1m": [5, 21, 44], "to_csv": 5, "subsequ": [5, 6, 8], "ad": [5, 11, 13, 17, 19, 26, 72, 73], "One": [5, 17, 19, 22, 44, 146, 157], "load": [5, 18, 21, 63, 67, 196], "mai": [5, 13, 14, 17, 19, 22, 25, 72, 73, 81, 146, 157], "might": [5, 13, 14, 17], "entiti": [5, 13, 19, 20, 21, 22, 23, 24, 25, 26, 72, 73, 80, 146, 152, 153, 157, 163, 164], "assettyp": [5, 13, 19, 146, 152, 153, 157, 163, 164], "pd": [5, 20], "awar": [5, 20], "df": [5, 13, 20, 21, 30, 72, 73], "read_csv": 5, "third": 5, "we": [5, 6, 7, 8, 10, 11, 13, 17, 25, 26, 28, 47, 72, 146, 157], "least": [5, 41], "timestep": [5, 21, 43, 44, 72, 73, 84, 93], "either": [5, 19, 21, 22, 72, 73, 74, 75], "final": [5, 6, 8, 10, 14, 26], "trader": [5, 6, 8, 10, 12, 13, 14, 15, 16, 26, 33], "data_sourc": [5, 12, 43, 44, 72, 73], "datetime_start": [5, 43], "datetime_end": [5, 43], "strat": 5, "100000": 5, "add_strategi": [5, 12, 13, 14, 15, 16, 25, 26, 46], "run_al": [5, 13, 14, 15, 16, 25, 26, 46], "put": [5, 12, 16, 19, 25], "togeth": [5, 22, 25], "Then": [5, 13, 16, 72], "startegi": 5, "read": [5, 15, 25, 44], "same": [5, 14, 17, 22, 26, 73], "directori": [5, 14, 17], "script": 5, "pick": [5, 10, 17, 26], "rang": [5, 13, 17, 20, 21], "link": [6, 8, 14], "give": [6, 8, 13, 131, 140], "u": [6, 7, 8, 13, 14, 21, 26, 175, 190], "credit": [6, 8, 153, 164], "sale": [6, 8], "utm_sourc": 6, "affili": 6, "utm_campaign": 6, "robust": [6, 8], "fetch": [6, 8, 44, 126, 131, 134, 140], "simplifi": [6, 8], "simpli": [6, 8], "polygondatasourc": 6, "get_historical_pric": [6, 8, 13, 20, 26, 31, 44, 47, 73], "As": [6, 8, 17], "pai": [6, 8, 14], "mani": [6, 8, 13, 26, 32, 41, 81], "won": [6, 8], "t": [6, 8, 13, 14, 17, 26], "limit": [6, 8, 13, 14, 17, 22, 43, 72, 73, 81, 110, 121, 146, 152, 153, 157, 163, 164], "cach": [6, 8], "comput": [6, 8, 17, 25, 26], "so": [6, 8, 10, 13, 14, 17, 19, 22, 25, 26, 47, 82, 128, 136], "take": [6, 8, 17, 22, 25, 41, 44, 62, 63, 66, 67, 73, 74, 75, 125, 133], "bit": [6, 8], "obtain": [6, 8, 13, 44, 126, 127, 129, 131, 134, 135, 137, 140], "dashboard": [6, 8, 25], "necessari": [6, 8, 17, 43], "inherit": [6, 8, 45], "defin": [6, 7, 8, 13, 24, 27, 32, 41, 42, 43, 45, 165, 196], "hold": [6, 8, 20, 22, 23, 26, 36], "until": [6, 8, 12, 20, 102, 103, 113, 114, 146, 157], "determin": [6, 7, 8, 12, 22, 43, 106, 117, 146, 157, 166], "05": [6, 8, 146, 157, 196], "form": [6, 21, 81, 106, 117, 127, 129, 135, 137, 167, 182], "tool": [6, 8, 17, 26], "capabl": [6, 8], "easi": [6, 8, 14, 17, 25, 26], "integr": [6, 8], "versatil": [6, 8, 13, 17], "choic": [6, 8, 14, 17], "gener": [7, 10, 13, 16, 26, 151, 162], "quantstat": 7, "varieti": 7, "annual": [7, 25, 26], "yearli": 7, "total": [7, 20, 28, 51, 57, 147, 158, 175, 190], "romad": 7, "over": [7, 19, 20, 25, 26, 62, 63, 66, 67], "maximum": [7, 17], "sortino": 7, "variat": 7, "differenti": 7, "harm": 7, "volatil": [7, 22, 128, 136], "max": [7, 13], "observ": 7, "loss": [7, 22, 43, 62, 63, 66, 67, 146, 152, 153, 157, 163, 164], "peak": 7, "trough": 7, "portfolio": [7, 9, 13, 23, 28, 51, 57, 63, 67, 175, 190], "attain": [7, 146, 157], "longest": 7, "durat": [7, 32, 146, 153, 157, 164, 178, 193], "reach": [7, 25, 26, 43], "accompani": 7, "graph": [7, 62, 63, 66, 67], "cumul": 7, "scale": [7, 196], "better": [7, 22, 146, 157], "exponenti": 7, "growth": 7, "showcas": 7, "tailor": 7, "achiev": [7, 22, 25, 26], "goal": 7, "condor": [7, 17], "martingal": 7, "iron": 7, "delta": [7, 128, 136], "previou": [7, 79, 80], "dte": 7, "expir": [7, 14, 19, 22, 32, 44, 72, 74, 125, 126, 127, 128, 133, 134, 135, 136, 139, 146, 157], "bband": 7, "v2": 7, "bolling": [7, 62, 66], "band": [7, 62, 66], "interest": [7, 13, 128, 136], "implement": [7, 17, 26, 27, 41, 44, 46], "visit": [7, 16, 17, 25, 26], "our": [7, 13, 17, 25, 26, 28], "lumiwealth": [7, 15, 26], "access": [7, 14, 16, 17, 20, 25, 26, 165, 196], "invest": [7, 14, 26], "question": 7, "email": [7, 14], "www": [8, 16], "thetadatabacktest": 8, "altern": 8, "both": [8, 14, 22, 25, 30, 146, 157], "argument": [8, 128, 136], "thetadata_usernam": 8, "thetadata_password": 8, "were": [9, 26, 38], "place": [9, 13, 18, 146, 151, 157, 162], "along": 9, "involv": 9, "strike": [9, 19, 44, 72, 126, 128, 131, 134, 136, 140, 146, 157], "ticker": [9, 19, 20, 32, 44, 81], "cash": [9, 13, 22, 26, 28, 42, 43, 48, 49, 51, 55, 57, 61, 175, 177, 180, 190, 192, 195], "amount": [9, 13, 20, 22, 28, 44, 49, 51, 55, 57, 79, 80, 146, 157], "cannot": 10, "veri": [10, 17, 26], "easili": [10, 26, 32, 45], "modifi": [10, 25, 26], "anyth": 10, "There": [10, 11, 146, 157], "aapl_pric": [10, 26], "alloc": 10, "11": [10, 17, 19, 26], "12": [10, 17, 19, 25, 26, 74], "speak": [11, 41], "learn": [11, 17, 25, 26], "alpaca": [11, 20, 26, 72, 73], "document": [11, 13, 14, 17, 25, 26, 72], "interact": [11, 13, 20, 22, 26, 45, 72, 73, 74, 81], "factor": [11, 26], "authent": [11, 26], "2fa": [11, 26], "secondari": [11, 26], "paper": [11, 12, 15, 16, 17, 26, 44], "legaci": [11, 26], "ccxt": [11, 26], "tradier": [11, 26, 77, 153, 164], "max_work": [12, 43, 44, 73], "20": [12, 13, 22, 32, 43, 165], "chunk_siz": [12, 44, 73], "connect_stream": [12, 43], "connect": [12, 13, 14, 17, 105, 116], "tradeapi": 12, "rest": [12, 14, 17, 41], "get_timestamp": [12, 26, 44, 47], "current": [12, 13, 14, 17, 21, 36, 37, 42, 43, 44, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 77, 78, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 128, 136, 143, 149, 153, 154, 160, 164, 167, 175, 178, 182, 190, 193, 196], "unix": 12, "represent": [12, 21, 22, 44, 72, 73], "is_market_open": [12, 43], "get_time_to_open": [12, 43], "remain": [12, 39, 43, 172, 187], "get_time_to_clos": [12, 43], "alpaca_config": [12, 25, 26], "your_api_kei": [12, 13], "secret": [12, 13, 14, 16, 25, 26], "api_secret": [12, 25, 26], "your_api_secret": 12, "endpoint": 12, "print": [12, 42, 196], "alpacastrategi": 12, "on_trading_inter": [12, 32], "order_typ": [12, 153, 164], "asset_type_map": 12, "us_equ": 12, "cancel_ord": [12, 26, 43, 47, 149, 160], "cancel": [12, 22, 30, 35, 43, 71, 109, 111, 120, 122, 142, 143, 144, 145, 146, 149, 151, 154, 155, 156, 157, 160, 162], "get_historical_account_valu": [12, 43], "1400": 12, "1600": 12, "7": [12, 13, 17, 26, 32, 106, 117], "0830": 12, "0930": 12, "600": 12, "sampl": [12, 26], "1612172730": 12, "000234": 12, "boolean": [12, 151, 153, 162, 164], "map_asset_typ": 12, "orderdata": 12, "to_request_field": 12, "cryoptocurr": 13, "popular": 13, "find": [13, 14, 15, 16, 17, 26, 44, 76, 127, 129, 130, 131, 135, 137, 138, 139, 140], "readthedoc": 13, "en": 13, "enabl": [13, 14, 15], "wide": [13, 17, 63, 67], "coinbas": [13, 26], "pro": 13, "binanc": [13, 26], "kraken": [13, 26, 146, 157], "kucoin": [13, 26], "constantli": [13, 26], "don": [13, 14, 17, 26], "let": 13, "know": [13, 18], "ll": [13, 14, 16, 26], "desir": [13, 14, 21, 81, 128, 136], "credenti": [13, 14, 15], "rememb": [13, 26], "under": [13, 14, 17, 25], "similar": [13, 17, 30], "alwai": [13, 30, 43, 106, 117, 167, 182], "24": [13, 17, 32, 106, 117], "set_market": [13, 26, 32, 47], "few": [13, 17, 26, 101], "common": [13, 14], "coinbase_config": 13, "exchange_id": 13, "apikei": 13, "your_secret_kei": 13, "sandbox": [13, 17], "kraken_config": 13, "margin": [13, 146, 157], "kucoin_config": 13, "your_passphras": 13, "NOT": 13, "your_secret": 13, "coinbasepro_config": 13, "coinbasepro": 13, "instanti": [13, 16, 26, 43], "chosen": [13, 16, 17], "correct": [13, 14, 16], "instanc": [13, 196], "strategy_executor": [13, 16], "complet": [13, 14, 15, 17, 22, 26, 74, 75], "demonstr": 13, "pandas_ta": 13, "error": [13, 17, 22, 34], "importantfunct": 13, "30": [13, 40, 72, 73, 81, 196], "sinc": 13, "those": [13, 17, 166], "hour": [13, 20, 21, 32, 40, 44, 72, 73, 106, 117, 178, 193], "quot": [13, 19, 20, 21, 22, 44, 49, 51, 55, 57, 72, 73, 74, 75, 77, 146, 152, 153, 157, 163, 164, 175, 177, 190, 192], "transact": [13, 22, 167, 182], "btc": [13, 19, 20, 72, 73, 74, 146, 152, 153, 157, 163, 164], "0": [13, 15, 17, 19, 21, 22, 23, 24, 25, 32, 42, 43, 44, 87, 88, 96, 97, 146, 152, 153, 157, 163, 164, 173, 188, 196], "mkt_order": 13, "000": [13, 25, 26], "lmt_order": 13, "limit_pric": [13, 22, 43, 110, 121, 146, 152, 153, 157, 163, 164], "10000": [13, 25], "pair": [13, 20, 22, 44, 74, 75, 125, 126, 133, 134, 146, 157], "bar": [13, 18, 21, 26, 43, 44, 63, 67, 71, 72, 73, 74, 75, 78, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 128, 136], "max_pric": 13, "log_messag": [13, 16, 20, 26, 28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 47, 52, 53, 58, 59, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 147, 148, 149, 158, 159, 160, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 194], "f": [13, 16, 28, 35, 36, 38, 39, 42, 72, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 169, 171, 174, 176, 177, 179, 181, 184, 186, 189, 191, 192, 194, 196], "calcul": [13, 20, 22, 43, 44, 128, 136], "ta": 13, "length": [13, 21, 43, 44, 72, 73, 78, 84, 93], "current_rsi": 13, "iloc": [13, 72], "macd": 13, "current_macd": 13, "55": 13, "ema": 13, "current_ema": 13, "get_posit": [13, 23, 26, 47, 150, 161], "share": [13, 16, 20, 22, 29, 31, 36, 39, 44, 146, 157, 175, 190], "asset_to_get": 13, "outstand": 13, "get_ord": [13, 26, 47], "whatev": 13, "last_pric": [13, 74, 75, 196], "color": [13, 62, 63, 66, 67, 105, 116], "green": [13, 62, 63, 66, 67, 105, 116], "dt": [13, 21, 44, 62, 63, 66, 67, 90, 91, 99, 100, 139], "get_datetim": [13, 26, 43, 44, 47], "check": [13, 17, 22, 26, 40, 43, 47, 72, 148, 149, 159, 160, 168, 170, 183, 185], "certain": [13, 63, 67], "eg": [13, 17, 19, 20, 25, 44, 47, 49, 51, 55, 57, 62, 63, 66, 67, 70, 77, 82, 105, 116, 125, 126, 133, 134, 146, 157, 178, 193], "9": [13, 17, 32], "30am": 13, "entir": 13, "example_strategi": [13, 25, 26], "github": [13, 15, 17, 20, 25, 26], "repositori": [13, 17], "brokerag": [14, 17], "firm": 14, "oper": [14, 17, 32, 41], "countri": 14, "around": [14, 17, 18], "world": [14, 17], "great": [14, 17], "especi": [14, 82, 196], "platform": [14, 26], "fee": [14, 17, 18, 26], "structur": [14, 26], "best": [14, 17], "deal": [14, 26], "real": [14, 16, 17, 25, 71, 78, 81], "subscrib": 14, "appropri": [14, 20], "packag": [14, 26], "depend": [14, 17, 72, 73], "exchang": [14, 21, 22, 44, 72, 73, 74, 75, 76, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 125, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, 140, 146, 157], "snapshot": [14, 42], "bundl": 14, "On": [14, 17], "stream": [14, 71, 78, 81], "nasdaq": [14, 32, 106, 117], "network": 14, "c": 14, "utp": 14, "totalview": 14, "nyse": [14, 32, 76, 106, 117, 130, 138], "cta": 14, "openbook": 14, "ultra": 14, "opra": 14, "top": [14, 17, 26], "relat": [14, 17, 36], "suffic": 14, "login": 14, "ibkr": 14, "client": [14, 15, 17], "portal": 14, "navig": [14, 15, 17], "menu": [14, 26], "click": [14, 17], "prompt": 14, "incur": 14, "cost": [14, 17, 43], "associ": 14, "notif": [14, 17], "ib": [14, 19, 132, 141], "mobil": 14, "app": 14, "approv": 14, "interrupt": [14, 33, 196], "autom": [14, 17], "handl": 14, "solut": 14, "fulli": 14, "doesn": 14, "approach": 14, "conveni": 14, "primari": [14, 196], "maintain": [14, 17], "without": [14, 17, 25, 131, 140], "separ": [14, 17], "control": [14, 178, 193], "twice": 14, "enhanc": [14, 25], "complex": [14, 25], "restrict": 14, "ip": [14, 15, 17], "address": [14, 17], "tw": [14, 17, 20], "ibgatewai": 14, "permiss": [14, 19], "what": [14, 26, 47, 82, 177, 192], "keep": [14, 17, 22, 23, 81, 146, 157], "below": [14, 45, 47, 48, 61, 70, 74, 82, 101, 124, 142], "instruct": [14, 17, 146, 152, 153, 157, 163, 164], "given": [14, 20, 21, 43, 44, 52, 58, 71, 72, 73, 76, 84, 93, 125, 127, 129, 130, 131, 133, 135, 137, 138, 139, 140, 143, 148, 154, 159], "attempt": [14, 175, 190], "while": [14, 17], "disconnect": 14, "caus": 14, "loop": [14, 31, 40, 103, 114, 172, 187], "stop": [14, 22, 25, 32, 33, 40, 43, 62, 63, 66, 67, 102, 103, 113, 114, 146, 152, 153, 157, 163, 164, 172, 187, 196], "tediou": 14, "upper": 14, "right": [14, 17, 19, 28, 63, 67, 72, 152, 163], "corner": [14, 17], "scroll": [14, 17], "down": [14, 17, 25, 33, 63, 67], "plu": [14, 105, 116, 175, 190], "sign": 14, "button": [14, 17], "header": 14, "fill": [14, 17, 21, 22, 23, 36, 39, 43, 146, 157, 167, 182], "out": [14, 26, 43, 47, 52, 58, 74], "field": [14, 20, 22], "page": [14, 16, 17, 26], "At": [14, 25], "confirm": [14, 17], "activ": [14, 17, 22, 26, 74, 75, 78, 152, 153, 163, 164], "back": [14, 196], "enter": [14, 17, 19, 22, 31, 146, 157, 178, 193], "via": 14, "act": 14, "promptli": 14, "ask": [14, 77], "proof": 14, "author": 14, "upload": 14, "request": 14, "eula": 14, "signatur": 14, "block": 14, "submit": [14, 22, 37, 43, 47, 142, 146, 152, 153, 157, 163, 164], "practic": 14, "monei": [14, 16, 17, 25, 49, 51, 55, 57, 167, 182], "avoid": 14, "conflict": [14, 196], "variabl": [14, 26, 31, 42, 166], "env": [14, 17, 196], "ib_usernam": [14, 17], "user123": [14, 17], "ib_password": [14, 17], "password123": [14, 17], "account_id": [14, 17], "subaccount": [14, 17], "u17369206": [14, 17], "ib_api_url": [14, 17], "url": [14, 17], "host": [14, 17], "localhost": [14, 17, 196], "8000": [14, 17], "strangl": [14, 15], "tutori": [15, 26], "workstat": 15, "global": [15, 17, 20, 45], "activex": 15, "socket": [15, 17], "disabl": 15, "port": [15, 17], "7496": 15, "7497": [15, 17], "highli": [15, 26], "thoroughli": 15, "algorithm": [15, 17, 25], "master": 15, "999": 15, "py": [15, 17, 25, 26], "interactive_brokers_config": 15, "socket_port": 15, "client_id": 15, "digit": 15, "127": [15, 17], "entri": [15, 22], "except": [15, 20, 25, 26, 34], "interactivebrok": [15, 20], "interactive_brok": 15, "simple_start_ib": 15, "bot": [15, 17, 25, 32, 34, 45, 196], "blob": [15, 25, 26], "getting_start": 15, "dash": [16, 62, 66], "tradier_config": 16, "access_token": 16, "qtrz3zurd9244ahuw2aoyapgvyra": 16, "account_numb": 16, "va22904793": 16, "your_access_token": 16, "your_account_numb": 16, "That": 16, "now": [16, 25, 44, 74], "abl": 16, "less": [16, 146, 147, 157, 158], "than": [16, 17, 44, 82, 146, 147, 157, 158], "cover": [17, 26], "topic": 17, "decid": [17, 72], "correctli": 17, "applic": [17, 106, 117], "success": 17, "skip": [17, 30], "repl": 17, "eas": 17, "afford": 17, "expens": [17, 128, 136], "browser": [17, 25, 46], "edit": 17, "directli": [17, 43], "tip": 17, "howev": [17, 22, 30, 32, 146, 157], "excel": 17, "develop": [17, 26], "month": [17, 85, 94], "fit": [17, 101], "scalabl": [17, 196], "figur": 17, "blueprint": 17, "worker": 17, "background": 17, "butterfli": 17, "afa": 17, "starter": 17, "itself": 17, "left": [17, 63, 67], "sidebar": 17, "delet": 17, "unnecessari": 17, "trashcan": 17, "mandatori": [17, 19, 45, 146, 157], "ones": [17, 41], "restart": [17, 40], "servic": [17, 105, 116], "commit": 17, "redeploi": 17, "tab": 17, "6": [17, 19, 26], "monitor": 17, "expect": [17, 25, 26, 128, 136], "regularli": 17, "profit": [17, 22, 25, 26, 43, 62, 63, 66, 67], "8": [17, 26], "bottom": 17, "press": 17, "consol": [17, 105, 116], "everyth": [17, 26], "part": [17, 22, 41, 153, 164, 165], "locat": 17, "reserv": 17, "vm": 17, "13": [17, 127, 135], "downgrad": 17, "vcpu": 17, "effect": 17, "reduc": 17, "todai": [17, 74, 82], "wait": [17, 22, 39, 109, 110, 111, 112, 120, 121, 122, 123], "messag": [17, 101, 105, 116], "14": [17, 196], "16": [17, 74], "17": [17, 19, 32], "proper": 17, "discord": [17, 26], "webhook": 17, "live_config": 17, "correspond": [17, 35, 36, 37], "soon": 17, "incred": 17, "commiss": 17, "lot": [17, 166], "engag": 17, "tradier_access_token": 17, "token": 17, "qtrz3zurl9244ahuw4aoyapgvyra": 17, "tradier_account_numb": 17, "va12204793": 17, "tradier_is_pap": 17, "align": 17, "perfectli": 17, "seamlessli": 17, "alpaca_api_kei": 17, "pk7t6yvax6pmh1em20yn": 17, "alpaca_api_secret": 17, "9wgjls3wixq54fcphwwzjcp8jcfjfkuwsryskkma": 17, "alpaca_is_pap": 17, "unit": [17, 44, 146, 157, 178, 193], "state": [17, 166, 196], "typic": [17, 22, 165], "challeng": 17, "friendli": 17, "coinbase_api_kei": 17, "steea9fhiszntmpihqjudeqolitj0javz": 17, "coinbase_api_secret": 17, "nuzcnprsxjxxouxrhqe5k2k1xnqlpckh2xcutifkcw": 17, "coinbase_is_sandbox": 17, "focus": 17, "competit": 17, "kraken_api_kei": 17, "xyz1234567890abcdef": 17, "kraken_api_secret": 17, "abcdef1234567890abcdef1234567890abcdef1234": 17, "intern": [17, 146, 157], "arrai": [17, 21], "cfd": 17, "Their": 17, "presenc": 17, "compat": 17, "purpos": 17, "newer": 17, "interactive_brokers_port": 17, "interactive_brokers_client_id": 17, "123456": 17, "interactive_brokers_ip": 17, "ib_subaccount": 17, "subaccount1": 17, "src": 17, "paper_1": 17, "is_backtest": [17, 26], "a7py0zidhxde6qkx8ojjknp7cd87hwku": 17, "discord_webhook_url": 17, "send": [17, 105, 116], "123456789": 17, "db_connection_str": [17, 196], "histori": 17, "sqlite": 17, "account_histori": 17, "db": 17, "strategy_nam": 17, "strategy_id": [17, 196], "my": [17, 25], "think": [17, 82], "polygon_max_memory_byt": 17, "memori": 17, "byte": 17, "usag": [17, 26], "512000000": 17, "main": [17, 18, 22, 26, 33, 40, 45, 146, 157], "smoothli": 17, "verifi": 17, "behav": 17, "ey": 17, "straightforward": 17, "happi": 17, "assist": 17, "repres": [19, 22, 44, 45, 72, 73, 126, 134], "attribut": [19, 196], "track": [19, 23, 26, 52, 53, 58, 59, 148, 149, 159, 160], "underli": [19, 21, 128, 131, 136, 140], "ibm": [19, 145, 156], "just": [19, 26, 32, 36, 43, 146, 157], "corpor": 19, "printout": 19, "multipli": [19, 20, 36, 39, 44, 125, 126, 129, 131, 133, 134, 137, 140, 152, 163], "nexpir": 19, "expiri": [19, 127, 132, 135, 141], "june": 19, "2021": [19, 32, 128, 136, 139], "18": 19, "currenc": [19, 72, 146, 157, 167, 175, 177, 182, 190, 192], "eur": [19, 72, 73, 146, 152, 153, 157, 163, 164], "convers": [19, 178, 193], "gbp": [19, 152, 163], "behind": 19, "scene": 19, "anytim": 19, "due": 19, "precis": [19, 128, 136], "underlying_asset": 19, "case": [19, 21, 22], "yyyymmdd": [19, 132, 141], "yyyymm": 19, "multileg": [19, 22, 153, 164], "leverag": [19, 146, 157], "_asset_typ": 19, "_right": 19, "asset_type_must_be_one_of": 19, "right_must_be_one_of": 19, "26": 19, "155": 19, "base_asset": [19, 152, 153, 163, 164], "optionright": 19, "classmethod": [19, 20, 22, 23, 44], "from_dict": [19, 22, 23], "is_valid": 19, "symbol2asset": 19, "particularli": 19, "to_dict": [19, 22, 23], "assetsmap": 19, "map": 19, "userdict": 19, "datafram": [20, 21, 44, 64, 65, 68, 69, 72, 78, 81], "dividend": [20, 44, 79, 80, 128, 136, 167, 182], "stock_split": 20, "local": [20, 21, 42, 44, 90, 91, 99, 100, 128, 136], "timezon": [20, 21, 26, 44, 90, 91, 99, 100, 176, 181, 191], "new_york": [20, 44, 176, 179, 181, 191, 194], "helper": [20, 22, 45], "row": [20, 42, 72, 73, 81], "get_last_dividend": 20, "per": [20, 44], "get_momentum": 20, "momentum": 20, "aggregate_bar": 20, "frequenc": [20, 21], "Will": [20, 25, 62, 63, 66, 67, 74, 75, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 151, 162, 176, 179, 181, 191, 194], "timefram": 20, "min": 20, "15min": 20, "1h": [20, 40], "specifi": [20, 22, 44, 72, 73, 146, 157, 196], "filter": 20, "daterang": 20, "get_total_volum": 20, "sum": [20, 51, 57], "themselv": 20, "supplier": 20, "exce": 20, "pace": 20, "throttl": 20, "respect": 20, "mention": 20, "tick": 20, "frequent": 20, "accur": [20, 44], "updat": [20, 22, 26, 36, 38, 108, 119, 146, 157, 167, 182], "rule": 20, "historical_limit": 20, "financi": [20, 25], "ohlcv": [20, 21, 43], "split": [20, 45], "instrument": 20, "yield": 20, "coin": [20, 146, 157], "eth": [20, 73, 146, 153, 157, 164], "num_period": 20, "get_total_dividend": 20, "get_total_stock_split": 20, "get_total_return": 20, "get_total_return_pct": 20, "percentag": [20, 25], "get_total_return_pct_chang": 20, "recent": [20, 72, 78], "get_bar": [20, 21, 44], "ethereum": 20, "bitcoin": 20, "grouper_kwarg": 20, "bars_agg": 20, "inclus": 20, "parse_bar_list": 20, "bar_list": 20, "singl": [20, 144, 155], "nobardatafound": 20, "date_start": 21, "date_end": 21, "trading_hours_start": 21, "trading_hours_end": 21, "23": 21, "59": 21, "input": [21, 102, 103, 113, 114], "manag": [21, 22, 26, 47, 61, 124], "attach": 21, "0001": 21, "localize_timezon": 21, "tz_local": 21, "eastern": 21, "utc": 21, "sybmol": 21, "datalin": 21, "numpi": 21, "iter_index": 21, "count": [21, 32, 78, 81, 196], "seri": 21, "set_tim": 21, "repair_times_and_fil": 21, "merg": 21, "reindex": 21, "nan": 21, "lower": 21, "set_date_format": 21, "set_dat": 21, "trim_data": 21, "trim": 21, "match": [21, 44], "to_datalin": 21, "exist": [21, 54, 60], "get_iter_count": 21, "len": 21, "check_data": 21, "wrapper": 21, "timeshift": [21, 43, 44, 72, 73, 84, 87, 88, 93, 96, 97], "_get_bars_dict": 21, "min_timestep": [21, 44], "timestep_map": [21, 44], "shift": [21, 44, 72, 73, 84, 87, 88, 93, 96, 97], "get_bars_between_d": 21, "start_dat": 21, "end_dat": 21, "get_quot": [21, 26, 47], "idx": 21, "belong": 22, "construct": 22, "goog": [22, 42, 72, 73], "googl": 22, "to_posit": 22, "get_incr": 22, "wait_to_be_regist": 22, "regist": [22, 110, 112, 121, 123], "wait_to_be_clos": 22, "keyword": 22, "my_limit_pric": 22, "500": [22, 36], "particular": [22, 125, 127, 129, 133, 135, 137], "higher": 22, "probabl": 22, "predetermin": 22, "exit": 22, "stop_pric": [22, 43, 146, 152, 153, 157, 163, 164], "my_stop_pric": 22, "400": 22, "stop_limit": [22, 146, 157], "combin": 22, "405": 22, "trail": [22, 146, 152, 157, 163], "continu": [22, 146, 157], "threshold": [22, 146, 157], "movement": [22, 146, 157], "trailing_stop": [22, 146, 157], "trail_pric": [22, 146, 157], "trail_perc": [22, 146, 157], "my_trail_pric": 22, "order_1": 22, "my_trail_perc": 22, "order_2": 22, "bracket": [22, 146, 157], "chain": [22, 44, 124, 125, 126, 127, 129, 131, 133, 134, 135, 137, 140], "long": 22, "short": [22, 106, 117], "importantli": 22, "extrem": 22, "fast": [22, 25, 26], "occur": 22, "take_profit_pric": [22, 146, 152, 157, 163], "stop_loss_pric": [22, 146, 152, 157, 163], "stop_loss_limit_pric": [22, 146, 157], "my_take_profit_pric": 22, "420": 22, "my_stop_loss_pric": 22, "parent": 22, "oto": [22, 146, 157], "trigger": [22, 146, 157], "variant": 22, "oco": [22, 146, 152, 157, 163], "word": [22, 167, 182], "where": [22, 25, 42, 146, 157], "alreadi": [22, 30, 36, 41], "submiss": 22, "position_fil": [22, 146, 157], "time_in_forc": [22, 146, 157], "good_till_d": [22, 146, 157], "date_cr": 22, "order_class": 22, "trade_cost": 22, "custom_param": [22, 146, 157], "avg_fill_pric": [22, 23], "error_messag": 22, "child_ord": 22, "tag": [22, 153, 164], "statu": [22, 148, 149, 159, 160], "unprocess": 22, "orderclass": 22, "ordersid": 22, "buy_to_clos": 22, "buy_to_cov": 22, "buy_to_open": 22, "sell_short": 22, "sell_to_clos": 22, "sell_to_open": 22, "orderstatu": 22, "cash_settl": 22, "partially_fil": 22, "partial_fil": 22, "ordertyp": 22, "tupl": [22, 73], "alia": 22, "add_child_ord": 22, "o": 22, "child": [22, 43], "add_transact": 22, "properti": [22, 23, 26, 43, 45, 46, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195], "cash_pend": 22, "equivalent_statu": 22, "equival": 22, "order_dict": 22, "get_fill_pric": 22, "weight": 22, "often": 22, "encount": 22, "partial": [22, 39], "pnl": 22, "yet": [22, 46], "is_act": 22, "otherwis": [22, 36], "rtype": [22, 44], "is_buy_ord": 22, "is_cancel": 22, "is_equivalent_statu": 22, "status1": 22, "status2": 22, "status": 22, "is_fil": 22, "is_opt": 22, "is_par": 22, "settlement": 22, "balanc": 22, "is_sell_ord": 22, "set_cancel": 22, "set_error": 22, "set_fil": 22, "set_identifi": 22, "set_new": 22, "set_partially_fil": 22, "update_raw": 22, "update_trail_stop_pric": 22, "was_transmit": 22, "retreiv": 23, "appl": 23, "add_ord": 23, "decim": [23, 74, 75, 146, 147, 157, 158], "get_selling_ord": [23, 26, 47], "value_typ": 23, "trading_fe": 24, "flat_fe": [24, 25], "percent_fe": [24, 25], "maker": 24, "taker": 24, "made": [25, 70, 82], "beginn": 25, "join": [25, 26], "commun": [25, 26], "cours": [25, 26], "shown": [25, 26], "discov": [25, 26], "skill": 25, "expert": [25, 26], "guidanc": 25, "resourc": 25, "welcom": 25, "hope": 25, "enjoi": 25, "easiest": 25, "comfort": 25, "copi": 25, "your_alpaca_api_kei": [25, 26], "your_alpaca_secret": [25, 26], "180": 25, "180m": 25, "carri": 25, "familiar": 25, "And": [25, 72, 73], "try": [25, 146, 157], "Or": [25, 26, 165], "dev": [25, 26], "simple_start_single_fil": [25, 26], "flat": 25, "trading_fee_1": 25, "trading_fee_2": 25, "sometim": 25, "spend": 25, "yappi": 25, "machinelearninglongshort": 25, "tqqq": 25, "get_func_stat": 25, "print_al": 25, "get_thread_stat": 25, "prof": 25, "pstat": 25, "snakeviz": 25, "web": [25, 46], "slow": 25, "robot": 26, "well": 26, "found": 26, "super": 26, "being": [26, 35, 36, 37, 38, 39, 44, 46, 72, 126, 134, 146, 157, 168, 183], "bug": 26, "fix": [26, 81], "fortun": 26, "against": 26, "switch": 26, "industri": 26, "tradest": 26, "build": [26, 27, 45], "analy": 26, "box": 26, "analyt": 26, "analyz": 26, "chart": [26, 47, 62, 63, 64, 65, 66, 67, 68, 69], "engin": [26, 41], "complic": 26, "confus": 26, "vector": 26, "math": 26, "mac": 26, "powershel": 26, "window": 26, "notic": 26, "exactli": 26, "suggest": 26, "lifecycl": [26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 47, 168, 172, 173, 178, 183, 187, 188, 193], "describ": [26, 45], "sub": 26, "tree": 26, "good": [26, 146, 157], "luck": 26, "forget": 26, "swim": 26, "gain": 26, "wealth": 26, "expertis": 26, "level": [26, 63, 67, 105, 116], "proven": 26, "record": 26, "home": 26, "pre": [26, 153, 164], "deploy": 26, "render": 26, "replit": 26, "profil": 26, "improv": 26, "before_market_open": [26, 27, 173, 188], "before_starting_trad": [26, 27, 30], "before_market_clos": [26, 27], "after_market_clos": [26, 27], "on_abrupt_clos": [26, 27, 34], "on_bot_crash": [26, 27], "trace_stat": [26, 27, 178, 193], "on_new_ord": [26, 27], "on_partially_filled_ord": [26, 27], "on_filled_ord": [26, 27], "on_canceled_ord": [26, 27], "on_parameters_upd": [26, 27], "backup": 26, "restor": 26, "benefit": 26, "var": 26, "storag": 26, "cancel_open_ord": [26, 30, 47, 151, 162], "sell_al": [26, 29, 33, 34, 47], "get_asset_potential_tot": [26, 47], "get_portfolio_valu": [26, 47], "get_cash": [26, 47], "get_historical_prices_for_asset": [26, 30, 47], "get_yesterday_dividend": [26, 44, 47], "get_next_trading_dai": [26, 47], "get_markers_df": [26, 47], "get_lines_df": [26, 47], "get_paramet": [26, 47, 165], "set_paramet": [26, 47, 165], "get_chain": [26, 44, 47, 127, 129, 131, 135, 137, 140], "get_greek": [26, 47], "get_strik": [26, 44, 47], "get_expir": [26, 47], "get_multipli": [26, 47], "options_expiry_to_datetime_d": [26, 47], "get_round_minut": [26, 44, 47], "get_last_minut": [26, 44, 47], "get_round_dai": [26, 44, 47], "get_last_dai": [26, 44, 47], "get_datetime_rang": [26, 43, 44, 47], "localize_datetim": [26, 44, 47], "to_default_timezon": [26, 44, 47], "miscellan": [26, 47], "update_paramet": [26, 38, 47], "await_market_to_clos": [26, 47], "await_market_to_open": [26, 47], "wait_for_order_registr": [26, 47], "wait_for_order_execut": [26, 47], "wait_for_orders_registr": [26, 47], "wait_for_orders_execut": [26, 47], "initial_budget": 26, "last_on_trading_iteration_datetim": 26, "pytz": 26, "unspent_monei": 26, "leg": 26, "abstract": [27, 41, 43, 44, 45], "pattern": [27, 41], "greatli": [27, 41], "react": [27, 41], "j": [27, 41], "compon": [27, 41, 196], "overload": [27, 34, 41, 43], "logic": [27, 29, 30, 40, 41, 43, 45], "dump": [28, 42], "report": 28, "busi": [29, 30], "execud": [29, 30], "unlik": 30, "launch": 30, "tlt": [30, 52, 58, 73, 75, 80, 111, 112, 122, 123, 146, 147, 153, 157, 158, 164], "bars_list": 30, "asset_bar": 30, "reiniti": 31, "reset": 31, "blacklist": 31, "my_custom_paramet": 32, "5m": [32, 178, 193], "d": [32, 178, 193], "constructor": 32, "later": 32, "strategy_1": 32, "my_other_paramet": 32, "strategy_2": 32, "my_last_paramet": 32, "asset_symbol": 32, "mnq": 32, "calendar": [32, 76, 130, 138], "marketcalendar": [32, 106, 117], "asx": [32, 106, 117], "bmf": [32, 106, 117], "cfe": [32, 106, 117], "bat": [32, 106, 117], "cme_equ": [32, 106, 117], "cbot_equ": [32, 106, 117], "cme_agricultur": [32, 106, 117], "cbot_agricultur": [32, 106, 117], "comex_agricultur": [32, 106, 117], "nymex_agricultur": [32, 106, 117], "cme_rat": [32, 106, 117], "cbot_rat": [32, 106, 117], "cme_interestr": [32, 106, 117], "cbot_interestr": [32, 106, 117], "cme_bond": [32, 106, 117], "cbot_bond": [32, 106, 117], "eurex": [32, 106, 117], "hkex": [32, 106, 117], "ic": [32, 106, 117], "iceu": [32, 106, 117], "nyfe": [32, 106, 117], "jpx": [32, 106, 117], "lse": [32, 106, 117], "os": [32, 106, 117], "six": [32, 106, 117], "sse": [32, 106, 117], "tsx": [32, 106, 117], "tsxv": [32, 106, 117], "bse": [32, 106, 117], "tase": [32, 106, 117], "tradingcalendar": [32, 106, 117], "asex": [32, 106, 117], "bvmf": [32, 106, 117], "cme": [32, 74, 106, 117], "iepa": [32, 106, 117], "xam": [32, 106, 117], "xasx": [32, 106, 117], "xbkk": [32, 106, 117], "xbog": [32, 106, 117], "xbom": [32, 106, 117], "xbru": [32, 106, 117], "xbud": [32, 106, 117], "xbue": [32, 106, 117], "xcbf": [32, 106, 117], "xcse": [32, 106, 117], "xdub": [32, 106, 117], "xfra": [32, 106, 117], "xetr": [32, 106, 117], "xhel": [32, 106, 117], "xhkg": [32, 106, 117], "xice": [32, 106, 117], "xidx": [32, 106, 117], "xist": [32, 106, 117], "xjse": [32, 106, 117], "xkar": [32, 106, 117], "xkl": [32, 106, 117], "xkrx": [32, 106, 117], "xlim": [32, 106, 117], "xli": [32, 106, 117], "xlon": [32, 106, 117], "xmad": [32, 106, 117], "xmex": [32, 106, 117], "xmil": [32, 106, 117], "xmo": [32, 106, 117], "xny": [32, 106, 117], "xnze": [32, 106, 117], "xosl": [32, 106, 117], "xpar": [32, 106, 117], "xph": [32, 106, 117], "xpra": [32, 106, 117], "xse": [32, 106, 117], "xsgo": [32, 106, 117], "xshg": [32, 106, 117], "xsto": [32, 106, 117], "xswx": [32, 106, 117], "xtae": [32, 106, 117], "xtai": [32, 106, 117], "xtk": [32, 106, 117], "xtse": [32, 106, 117], "xwar": [32, 106, 117], "xwbo": [32, 106, 117], "us_futur": [32, 106, 117], "max_bar": 32, "10m": [32, 178, 193], "20h": 32, "48": 32, "2d": [32, 178, 193], "gracefulli": 33, "shut": 33, "keybord": 33, "interupt": [33, 40], "abrupt": 33, "crash": [34, 40, 196], "rais": 34, "successfulli": [35, 36, 37], "300": [36, 178, 193], "sold": [36, 51, 57, 146, 157], "elif": 36, "bought": [36, 146, 157], "r": 37, "miss": 39, "again": [40, 103, 114], "pull": [40, 72], "hello": 40, "task": 41, "core": 41, "perspect": 41, "care": 41, "he": 41, "illustr": 41, "context": 42, "scope": 42, "random": 42, "google_symbol": 42, "snapshot_befor": 42, "random_numb": 42, "randint": 42, "my_custom_stat": 42, "trace": 42, "my_stat": 42, "my_other_stat": 42, "backtesting_brok": 43, "is_backtesting_brok": 43, "calculate_trade_cost": 43, "cash_settle_options_contract": 43, "settl": 43, "todo": [43, 74], "docstr": 43, "get_last_bar": 43, "els": 43, "limit_ord": [43, 146, 157], "open_": 43, "process_expired_option_contract": 43, "expri": 43, "process_pending_ord": 43, "evalu": 43, "mostli": 43, "should_continu": 43, "product": 43, "stop_ord": 43, "data_source_backtest": 43, "datasourcebacktest": [43, 44], "abc": [43, 44], "doe": [43, 44, 77, 146, 157], "pandasdata": [43, 44], "is_backtesting_data_sourc": [43, 44], "adjust_for_delai": [43, 44, 83, 92], "Not": [43, 106, 117], "delai": 44, "default_pytz": 44, "dsttzinfo": 44, "lmt": 44, "19": 44, "std": 44, "default_timezon": 44, "calculate_greek": 44, "asset_pric": [44, 128, 136], "underlying_pric": [44, 128, 136], "greek": [44, 124, 128, 136], "static": 44, "convert_timestep_str_to_timedelta": 44, "timedelta": [44, 72, 73, 102, 103, 113, 114], "1minut": 44, "1hour": 44, "1dai": 44, "include_after_hour": [44, 72, 73], "info": [44, 105, 116, 125, 126, 133, 134], "guarente": [44, 125, 126, 133, 134], "exp_dat": [44, 125, 126, 133, 134], "strike1": [44, 125, 126, 133, 134], "strike2": [44, 125, 126, 133, 134], "07": [44, 125, 126, 133, 134], "ago": [44, 72], "known": [44, 74, 75], "round": [44, 87, 88, 96, 97], "param": 44, "get_timestep": 44, "query_greek": [44, 128, 136], "queri": [44, 128, 136], "clean_trading_tim": 44, "dt_index": 44, "pcal": 44, "find_asset_in_data_stor": 44, "get_asset_by_nam": 44, "get_asset_by_symbol": 44, "get_asset": 44, "whose": [44, 126, 134], "smart": [44, 125, 127, 129, 133, 135, 137, 146, 157], "strke": [44, 125, 133], "stike": [44, 125, 133], "get_start_datetime_and_ts_unit": 44, "start_dt": 44, "start_buff": 44, "get_trading_days_panda": 44, "load_data": 44, "update_date_index": 44, "yahoo_data": 44, "yahoodata": 44, "15m": 44, "becuas": 44, "chain_data": 44, "option_chain": 44, "categori": [45, 101], "flow": 45, "is_backtest_brok": 46, "async_": 46, "async": 46, "asynchron": 46, "displi": 46, "displai": [46, 62, 63, 66, 67], "run_all_async": 46, "stop_al": 46, "insid": [47, 166, 172, 187], "thing": 47, "divid": 47, "sens": 47, "preced": 47, "seek": [52, 58, 144, 155], "sought": [52, 58, 147, 158], "assset": [52, 58], "empti": [53, 59], "overwrit": [54, 60], "style": [62, 66], "solid": [62, 66], "width": [62, 66, 72, 73], "detail_text": [62, 63, 66, 67], "overbought": [62, 63, 66, 67], "oversold": [62, 63, 66, 67], "red": [62, 63, 66, 67, 105, 116], "blue": [62, 63, 66, 67], "yellow": [62, 63, 66, 67], "orang": [62, 63, 66, 67], "purpl": [62, 63, 66, 67], "pink": [62, 63, 66, 67], "brown": [62, 63, 66, 67], "black": [62, 63, 66, 67], "white": [62, 63, 66, 67], "grai": [62, 66], "lightgrai": [62, 66], "darkgrai": [62, 66], "lightblu": [62, 66], "darkblu": [62, 66], "lightgreen": [62, 66], "darkgreen": [62, 66], "lightr": [62, 66], "darkr": [62, 66], "hex": [62, 66], "dot": [62, 63, 66, 67], "text": [62, 63, 66, 67], "hover": [62, 63, 66, 67], "add_chart_lin": [62, 66], "80": [62, 66], "circl": [63, 67], "size": [63, 67, 81], "mark": [63, 67], "cross": [63, 67], "resist": [63, 67], "squar": [63, 67], "diamond": [63, 67], "x": [63, 67], "triangl": [63, 67], "ne": [63, 67], "se": [63, 67], "sw": [63, 67], "nw": [63, 67], "pentagon": [63, 67], "hexagon": [63, 67], "hexagon2": [63, 67], "octagon": [63, 67], "star": [63, 67], "hexagram": [63, 67], "tall": [63, 67], "hourglass": [63, 67], "bowti": [63, 67], "thin": [63, 67], "asterisk": [63, 67], "hash": [63, 67], "y": [63, 67], "ew": [63, 67], "n": [63, 67], "arrow": [63, 67], "add_chart_mark": [63, 67], "get_symbol_bar": 70, "create_asset": [71, 72, 79], "backward": [72, 73], "week": [72, 73], "1month": [72, 73], "present": [72, 73, 128, 136], "integ": [72, 73, 178, 193], "extract": 72, "24h": 72, "last_ohlc": 72, "asset_bas": [72, 73, 152, 163], "asset_quot": [72, 73, 152, 153, 163, 164], "regular": 73, "eurusd": 73, "should_use_last_clos": 74, "depric": 74, "comment": 74, "2022": [74, 127, 135], "yyyi": [76, 130, 138], "mm": [76, 130, 138], "dd": [76, 130, 138], "next_trading_dai": [76, 130, 138], "backtets": 77, "bid": 77, "vwap": [78, 81], "intial": 78, "keep_bar": 81, "arriv": 81, "extend": 81, "kept": 81, "datatim": 82, "regardless": 82, "accord": [82, 83, 89, 92, 98], "1990": 82, "tell": 82, "jan": 82, "1991": 82, "rather": 82, "last_dai": [85, 94], "last_minut": [86, 95], "nearest": [87, 88, 96, 97], "round_dai": [87, 96], "round_minut": [88, 97], "paus": [102, 103, 107, 113, 114, 118, 178, 193], "overrid": [102, 103, 113, 114], "infinit": [103, 114], "await": [103, 114, 143, 154], "broadcast": [105, 116], "goe": [105, 116], "origin": [105, 116], "program": [107, 118, 165, 178, 193], "order1": [111, 112, 122, 123, 145, 153, 156, 164], "order2": [111, 112, 122, 123, 145, 153, 156, 164], "meant": 124, "cboe": [125, 127, 129, 133, 135, 137], "sort": [127, 129, 131, 135, 137, 140], "expiry_d": [127, 132, 135, 141], "could": [128, 136], "theoret": [128, 136], "implied_volatil": [128, 136], "impli": [128, 136], "option_pric": [128, 136], "pv_dividend": [128, 136], "gamma": [128, 136], "vega": [128, 136], "theta": [128, 136], "opt_asset": [128, 136], "option_typ": [128, 136], "20221013": [129, 137], "20200101": [132, 141], "next_option_expir": 139, "get_next_option_expir": 139, "gtc": [146, 153, 157, 164], "still": [146, 157], "restric": [146, 157], "compound": [146, 157], "suffici": [146, 157], "213": [146, 157], "obect": [146, 157], "favor": [146, 157], "guarante": [146, 157], "penetr": [146, 157], "forc": [146, 157], "remaind": [146, 157], "gtd": [146, 157], "though": [146, 157], "dollar": [146, 157, 175, 190], "percent": [146, 157], "stop_loss": [146, 152, 157, 163], "stop_loss_limit": [146, 157], "2019": [146, 157], "chf": [146, 157], "aset": [146, 152, 153, 157, 163, 164], "41000": [146, 157], "expiration_d": [147, 152, 158, 163], "order_id": [148, 159], "get_tracked_ord": [149, 160], "system": [151, 162], "leav": [151, 162], "strike_pric": [152, 163], "trailing_stop_pric": [152, 163], "41250": [152, 163], "41325": [152, 163], "41300": [152, 163], "is_multileg": [153, 164], "debit": [153, 164], "post": [153, 164], "asset_btc": [153, 164], "asset_eth": [153, 164], "my_paramet": 165, "main_tick": 165, "ema_threshold": 165, "whenev": [167, 182], "therefor": [167, 182], "zero": [167, 182], "excut": [168, 183], "happen": [171, 186], "equal": [172, 173, 178, 187, 188, 193], "resov": [175, 190], "held": [175, 190], "speed": [178, 193], "m": [178, 193], "h": [178, 193], "2h": [178, 193], "remov": [180, 195], "store": 196, "runtim": 196, "persist": 196, "resum": 196, "namespac": 196, "prevent": 196, "effici": 196, "assign": 196, "notat": 196, "trade_count": 196, "current_count": 196, "all_vari": 196, "output": 196, "102": 196, "postgresql": 196, "5432": 196, "database_nam": 196, "tabl": 196, "backup_table_nam": 196, "vars_backup": 196, "last_upd": 196, "json": 196, "550e8400": 196, "var1": 196, "var2": 196, "optionscondormartingal": 196}, "objects": {"entities": [[19, 0, 0, "-", "asset"], [20, 0, 0, "-", "bars"], [21, 0, 0, "-", "data"], [22, 0, 0, "-", "order"], [23, 0, 0, "-", "position"], [24, 0, 0, "-", "trading_fee"]], "entities.asset": [[19, 1, 1, "", "Asset"], [19, 1, 1, "", "AssetsMapping"]], "entities.asset.Asset": [[19, 1, 1, "", "AssetType"], [19, 1, 1, "", "OptionRight"], [19, 2, 1, "", "_asset_types"], [19, 2, 1, "", "_right"], [19, 2, 1, "id0", "asset_type"], [19, 3, 1, "id1", "asset_type_must_be_one_of"], [19, 2, 1, "id2", "expiration"], [19, 3, 1, "", "from_dict"], [19, 3, 1, "", "is_valid"], [19, 2, 1, "id3", "multiplier"], [19, 2, 1, "id4", "precision"], [19, 2, 1, "id5", "right"], [19, 3, 1, "id6", "right_must_be_one_of"], [19, 2, 1, "id7", "strike"], [19, 2, 1, "id8", "symbol"], [19, 3, 1, "", "symbol2asset"], [19, 3, 1, "", "to_dict"], [19, 2, 1, "", "underlying_asset"]], "entities.asset.Asset.AssetType": [[19, 2, 1, "", "CRYPTO"], [19, 2, 1, "", "FOREX"], [19, 2, 1, "", "FUTURE"], [19, 2, 1, "", "INDEX"], [19, 2, 1, "", "MULTILEG"], [19, 2, 1, "", "OPTION"], [19, 2, 1, "", "STOCK"]], "entities.asset.Asset.OptionRight": [[19, 2, 1, "", "CALL"], [19, 2, 1, "", "PUT"]], "entities.bars": [[20, 1, 1, "", "Bars"], [20, 4, 1, "", "NoBarDataFound"]], "entities.bars.Bars": [[20, 3, 1, "id0", "aggregate_bars"], [20, 3, 1, "", "filter"], [20, 3, 1, "id1", "get_last_dividend"], [20, 3, 1, "id2", "get_last_price"], [20, 3, 1, "id3", "get_momentum"], [20, 3, 1, "", "get_total_dividends"], [20, 3, 1, "", "get_total_return"], [20, 3, 1, "", "get_total_return_pct"], [20, 3, 1, "", "get_total_return_pct_change"], [20, 3, 1, "", "get_total_stock_splits"], [20, 3, 1, "id4", "get_total_volume"], [20, 3, 1, "", "parse_bar_list"], [20, 3, 1, "", "split"]], "entities.data": [[21, 1, 1, "", "Data"]], "entities.data.Data": [[21, 2, 1, "", "MIN_TIMESTEP"], [21, 2, 1, "", "TIMESTEP_MAPPING"], [21, 3, 1, "", "_get_bars_dict"], [21, 2, 1, "", "asset"], [21, 3, 1, "id0", "check_data"], [21, 3, 1, "id1", "columns"], [21, 2, 1, "", "datalines"], [21, 2, 1, "", "date_end"], [21, 2, 1, "", "date_start"], [21, 2, 1, "", "df"], [21, 3, 1, "id2", "get_bars"], [21, 3, 1, "", "get_bars_between_dates"], [21, 3, 1, "id3", "get_iter_count"], [21, 3, 1, "id4", "get_last_price"], [21, 3, 1, "", "get_quote"], [21, 2, 1, "", "iter_index"], [21, 3, 1, "id5", "repair_times_and_fill"], [21, 3, 1, "id6", "set_date_format"], [21, 3, 1, "id7", "set_dates"], [21, 3, 1, "id8", "set_times"], [21, 2, 1, "", "sybmol"], [21, 2, 1, "", "timestep"], [21, 3, 1, "id9", "to_datalines"], [21, 2, 1, "", "trading_hours_end"], [21, 2, 1, "", "trading_hours_start"], [21, 3, 1, "id10", "trim_data"]], "entities.order": [[22, 1, 1, "", "Order"]], "entities.order.Order": [[22, 1, 1, "", "OrderClass"], [22, 1, 1, "", "OrderSide"], [22, 1, 1, "", "OrderStatus"], [22, 1, 1, "", "OrderType"], [22, 1, 1, "", "Transaction"], [22, 3, 1, "", "add_child_order"], [22, 3, 1, "", "add_transaction"], [22, 5, 1, "", "avg_fill_price"], [22, 3, 1, "", "cash_pending"], [22, 3, 1, "", "equivalent_status"], [22, 3, 1, "", "from_dict"], [22, 3, 1, "", "get_fill_price"], [22, 3, 1, "", "get_increment"], [22, 3, 1, "", "is_active"], [22, 3, 1, "", "is_buy_order"], [22, 3, 1, "", "is_canceled"], [22, 3, 1, "", "is_equivalent_status"], [22, 3, 1, "", "is_filled"], [22, 3, 1, "", "is_option"], [22, 3, 1, "", "is_parent"], [22, 3, 1, "", "is_sell_order"], [22, 5, 1, "", "quantity"], [22, 3, 1, "", "set_canceled"], [22, 3, 1, "", "set_error"], [22, 3, 1, "", "set_filled"], [22, 3, 1, "", "set_identifier"], [22, 3, 1, "", "set_new"], [22, 3, 1, "", "set_partially_filled"], [22, 5, 1, "", "status"], [22, 3, 1, "", "to_dict"], [22, 3, 1, "", "to_position"], [22, 3, 1, "", "update_raw"], [22, 3, 1, "", "update_trail_stop_price"], [22, 3, 1, "", "wait_to_be_closed"], [22, 3, 1, "", "wait_to_be_registered"], [22, 3, 1, "", "was_transmitted"]], "entities.order.Order.OrderClass": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "MULTILEG"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"]], "entities.order.Order.OrderSide": [[22, 2, 1, "", "BUY"], [22, 2, 1, "", "BUY_TO_CLOSE"], [22, 2, 1, "", "BUY_TO_COVER"], [22, 2, 1, "", "BUY_TO_OPEN"], [22, 2, 1, "", "SELL"], [22, 2, 1, "", "SELL_SHORT"], [22, 2, 1, "", "SELL_TO_CLOSE"], [22, 2, 1, "", "SELL_TO_OPEN"]], "entities.order.Order.OrderStatus": [[22, 2, 1, "", "CANCELED"], [22, 2, 1, "", "CANCELLING"], [22, 2, 1, "", "CASH_SETTLED"], [22, 2, 1, "", "ERROR"], [22, 2, 1, "", "EXPIRED"], [22, 2, 1, "", "FILLED"], [22, 2, 1, "", "NEW"], [22, 2, 1, "", "OPEN"], [22, 2, 1, "", "PARTIALLY_FILLED"], [22, 2, 1, "", "SUBMITTED"], [22, 2, 1, "", "UNPROCESSED"]], "entities.order.Order.OrderType": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "LIMIT"], [22, 2, 1, "", "MARKET"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"], [22, 2, 1, "", "STOP"], [22, 2, 1, "", "STOP_LIMIT"], [22, 2, 1, "", "TRAIL"]], "entities.order.Order.Transaction": [[22, 2, 1, "", "price"], [22, 2, 1, "", "quantity"]], "entities.position": [[23, 1, 1, "", "Position"]], "entities.position.Position": [[23, 3, 1, "", "add_order"], [23, 2, 1, "", "asset"], [23, 5, 1, "id0", "available"], [23, 2, 1, "", "avg_fill_price"], [23, 3, 1, "", "from_dict"], [23, 3, 1, "", "get_selling_order"], [23, 5, 1, "id1", "hold"], [23, 2, 1, "", "orders"], [23, 5, 1, "id2", "quantity"], [23, 2, 1, "", "strategy"], [23, 2, 1, "", "symbol"], [23, 3, 1, "", "to_dict"], [23, 3, 1, "", "value_type"]], "entities.trading_fee": [[24, 1, 1, "", "TradingFee"]], "lumibot.backtesting": [[43, 0, 0, "-", "backtesting_broker"]], "lumibot.backtesting.backtesting_broker": [[43, 1, 1, "", "BacktestingBroker"]], "lumibot.backtesting.backtesting_broker.BacktestingBroker": [[43, 2, 1, "", "IS_BACKTESTING_BROKER"], [43, 3, 1, "", "calculate_trade_cost"], [43, 3, 1, "", "cancel_order"], [43, 3, 1, "", "cash_settle_options_contract"], [43, 5, 1, "", "datetime"], [43, 3, 1, "", "get_historical_account_value"], [43, 3, 1, "", "get_last_bar"], [43, 3, 1, "", "get_time_to_close"], [43, 3, 1, "", "get_time_to_open"], [43, 3, 1, "", "is_market_open"], [43, 3, 1, "", "limit_order"], [43, 3, 1, "", "process_expired_option_contracts"], [43, 3, 1, "", "process_pending_orders"], [43, 3, 1, "", "should_continue"], [43, 3, 1, "", "stop_order"], [43, 3, 1, "", "submit_order"], [43, 3, 1, "", "submit_orders"]], "lumibot.brokers": [[12, 0, 0, "-", "alpaca"]], "lumibot.brokers.alpaca": [[12, 1, 1, "", "Alpaca"], [12, 1, 1, "", "OrderData"]], "lumibot.brokers.alpaca.Alpaca": [[12, 2, 1, "", "ASSET_TYPE_MAP"], [12, 2, 1, "", "api"], [12, 3, 1, "", "cancel_order"], [12, 3, 1, "", "get_historical_account_value"], [12, 3, 1, "id0", "get_time_to_close"], [12, 3, 1, "id1", "get_time_to_open"], [12, 3, 1, "id2", "get_timestamp"], [12, 3, 1, "id3", "is_market_open"], [12, 3, 1, "", "map_asset_type"]], "lumibot.brokers.alpaca.OrderData": [[12, 3, 1, "", "to_request_fields"]], "lumibot": [[44, 0, 0, "-", "data_sources"]], "lumibot.data_sources": [[44, 0, 0, "-", "data_source"], [43, 0, 0, "-", "data_source_backtesting"], [44, 0, 0, "-", "pandas_data"], [44, 0, 0, "-", "yahoo_data"]], "lumibot.data_sources.data_source": [[44, 1, 1, "", "DataSource"]], "lumibot.data_sources.data_source.DataSource": [[44, 2, 1, "", "DEFAULT_PYTZ"], [44, 2, 1, "", "DEFAULT_TIMEZONE"], [44, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "calculate_greeks"], [44, 3, 1, "", "convert_timestep_str_to_timedelta"], [44, 3, 1, "", "get_bars"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_datetime"], [44, 3, 1, "", "get_datetime_range"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_day"], [44, 3, 1, "", "get_last_minute"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_round_day"], [44, 3, 1, "", "get_round_minute"], [44, 3, 1, "", "get_strikes"], [44, 3, 1, "", "get_timestamp"], [44, 3, 1, "", "get_timestep"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "localize_datetime"], [44, 3, 1, "", "query_greeks"], [44, 3, 1, "", "to_default_timezone"]], "lumibot.data_sources.data_source_backtesting": [[43, 1, 1, "", "DataSourceBacktesting"]], "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting": [[43, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [43, 3, 1, "", "get_datetime"], [43, 3, 1, "", "get_datetime_range"]], "lumibot.data_sources.pandas_data": [[44, 1, 1, "", "PandasData"]], "lumibot.data_sources.pandas_data.PandasData": [[44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "clean_trading_times"], [44, 3, 1, "", "find_asset_in_data_store"], [44, 3, 1, "", "get_asset_by_name"], [44, 3, 1, "", "get_asset_by_symbol"], [44, 3, 1, "", "get_assets"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_start_datetime_and_ts_unit"], [44, 3, 1, "", "get_trading_days_pandas"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "load_data"], [44, 3, 1, "", "update_date_index"]], "lumibot.data_sources.yahoo_data": [[44, 1, 1, "", "YahooData"]], "lumibot.data_sources.yahoo_data.YahooData": [[44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_strikes"]], "lumibot.strategies.strategy": [[45, 0, 0, "-", "Strategy"]], "lumibot.strategies.strategy.Strategy": [[66, 6, 1, "", "add_line"], [67, 6, 1, "", "add_marker"], [28, 6, 1, "", "after_market_closes"], [113, 6, 1, "", "await_market_to_close"], [114, 6, 1, "", "await_market_to_open"], [29, 6, 1, "", "before_market_closes"], [30, 6, 1, "", "before_market_opens"], [31, 6, 1, "", "before_starting_trading"], [154, 6, 1, "", "cancel_open_orders"], [155, 6, 1, "", "cancel_order"], [156, 6, 1, "", "cancel_orders"], [71, 6, 1, "", "cancel_realtime_bars"], [182, 5, 1, "", "cash"], [157, 6, 1, "", "create_order"], [183, 5, 1, "", "first_iteration"], [158, 6, 1, "", "get_asset_potential_total"], [55, 6, 1, "", "get_cash"], [133, 6, 1, "", "get_chain"], [134, 6, 1, "", "get_chains"], [92, 6, 1, "", "get_datetime"], [93, 6, 1, "", "get_datetime_range"], [135, 6, 1, "", "get_expiration"], [136, 6, 1, "", "get_greeks"], [72, 6, 1, "", "get_historical_prices"], [73, 6, 1, "", "get_historical_prices_for_assets"], [94, 6, 1, "", "get_last_day"], [95, 6, 1, "", "get_last_minute"], [74, 6, 1, "", "get_last_price"], [75, 6, 1, "", "get_last_prices"], [68, 6, 1, "", "get_lines_df"], [69, 6, 1, "", "get_markers_df"], [137, 6, 1, "", "get_multiplier"], [138, 6, 1, "", "get_next_trading_day"], [139, 6, 1, "", "get_option_expiration_after_date"], [159, 6, 1, "", "get_order"], [160, 6, 1, "", "get_orders"], [115, 6, 1, "", "get_parameters"], [57, 6, 1, "", "get_portfolio_value"], [58, 6, 1, "", "get_position"], [59, 6, 1, "", "get_positions"], [77, 6, 1, "", "get_quote"], [78, 6, 1, "", "get_realtime_bars"], [96, 6, 1, "", "get_round_day"], [97, 6, 1, "", "get_round_minute"], [161, 6, 1, "", "get_selling_order"], [140, 6, 1, "", "get_strikes"], [98, 6, 1, "", "get_timestamp"], [79, 6, 1, "", "get_yesterday_dividend"], [80, 6, 1, "", "get_yesterday_dividends"], [184, 5, 1, "", "initial_budget"], [32, 6, 1, "", "initialize"], [185, 5, 1, "", "is_backtesting"], [186, 5, 1, "", "last_on_trading_iteration_datetime"], [99, 6, 1, "", "localize_datetime"], [116, 6, 1, "", "log_message"], [187, 5, 1, "", "minutes_before_closing"], [188, 5, 1, "", "minutes_before_opening"], [189, 5, 1, "", "name"], [33, 6, 1, "", "on_abrupt_closing"], [34, 6, 1, "", "on_bot_crash"], [35, 6, 1, "", "on_canceled_order"], [36, 6, 1, "", "on_filled_order"], [37, 6, 1, "", "on_new_order"], [38, 6, 1, "", "on_parameters_updated"], [39, 6, 1, "", "on_partially_filled_order"], [40, 6, 1, "", "on_trading_iteration"], [141, 6, 1, "", "options_expiry_to_datetime_date"], [190, 5, 1, "", "portfolio_value"], [191, 5, 1, "", "pytz"], [192, 5, 1, "", "quote_asset"], [1, 6, 1, "", "run_backtest"], [162, 6, 1, "", "sell_all"], [117, 6, 1, "", "set_market"], [60, 6, 1, "", "set_parameters"], [118, 6, 1, "", "sleep"], [193, 5, 1, "", "sleeptime"], [81, 6, 1, "", "start_realtime_bars"], [163, 6, 1, "", "submit_order"], [164, 6, 1, "", "submit_orders"], [194, 5, 1, "", "timezone"], [100, 6, 1, "", "to_default_timezone"], [42, 6, 1, "", "trace_stats"], [195, 5, 1, "", "unspent_money"], [119, 6, 1, "", "update_parameters"], [120, 6, 1, "", "wait_for_order_execution"], [121, 6, 1, "", "wait_for_order_registration"], [122, 6, 1, "", "wait_for_orders_execution"], [123, 6, 1, "", "wait_for_orders_registration"]], "lumibot.traders": [[46, 0, 0, "-", "trader"]], "lumibot.traders.trader": [[46, 1, 1, "", "Trader"]], "lumibot.traders.trader.Trader": [[46, 3, 1, "", "add_strategy"], [46, 5, 1, "", "is_backtest_broker"], [46, 3, 1, "", "run_all"], [46, 3, 1, "", "run_all_async"], [46, 3, 1, "", "stop_all"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:exception", "5": "py:property", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "exception", "Python exception"], "5": ["py", "property", "Python property"], "6": ["py", "function", "Python function"]}, "titleterms": {"backtest": [0, 1, 2, 6, 8, 25, 26, 43], "file": [0, 2, 3, 9], "gener": [0, 2, 17], "from": [0, 2], "content": [0, 11, 18, 26, 27, 44, 47], "function": [1, 61], "how": [2, 196], "To": 2, "instal": [2, 25, 26], "lumibot": [2, 25, 26], "choos": [2, 17], "data": [2, 5, 14, 21, 43, 44, 70], "sourc": [2, 43, 44], "run": [2, 13, 16, 25], "polygon": [2, 6], "io": [2, 6], "tearsheet": [2, 7], "html": [2, 7], "trade": [2, 9, 14, 24, 25, 26], "indic": [2, 3, 26], "conclus": [2, 17], "log": 4, "csv": [4, 5], "panda": [5, 44], "other": 5, "exampl": [5, 13, 14, 16, 17], "datafram": 5, "In": 5, "summari": [5, 41], "thetadata": 8, "yahoo": [10, 44], "broker": [11, 13, 14, 15, 17, 43], "alpaca": [12, 17, 25], "document": [12, 19, 20, 22, 45], "crypto": 13, "us": [13, 14], "ccxt": 13, "configur": [13, 14, 16, 17, 25, 196], "set": 13, "your": [13, 16, 17, 25, 26], "strategi": [13, 14, 16, 17, 25, 26, 45, 47, 166], "full": [13, 16], "interact": [14, 15, 17], "market": 14, "subscript": 14, "two": 14, "factor": 14, "authent": 14, "2fa": 14, "secondari": 14, "usernam": 14, "paper": [14, 25], "account": [14, 25, 48], "setup": 14, "legaci": [15, 17], "tradier": [16, 17], "get": [16, 25, 26], "start": [16, 25, 26], "deploy": 17, "guid": [17, 196], "platform": 17, "deploi": 17, "render": 17, "replit": 17, "secret": 17, "coinbas": 17, "kraken": 17, "environ": 17, "variabl": [17, 196], "final": 17, "step": [17, 25, 26], "entiti": 18, "asset": 19, "bar": 20, "order": [22, 142], "advanc": 22, "type": 22, "With": [22, 25], "leg": 22, "posit": 23, "fee": [24, 25], "what": 25, "i": 25, "lumiwealth": 25, "1": [25, 26], "packag": 25, "2": [25, 26], "import": 25, "follow": 25, "modul": [25, 44], "3": [25, 26], "creat": [25, 26], "an": 25, "4": 25, "api": 25, "kei": 25, "5": 25, "class": 25, "6": 25, "instanti": 25, "trader": [25, 46], "7": 25, "option": [25, 124], "8": 25, "ad": 25, "profil": 25, "improv": 25, "perform": 25, "algorithm": 26, "librari": 26, "take": 26, "bot": 26, "live": 26, "all": 26, "togeth": 26, "addit": 26, "resourc": 26, "need": 26, "extra": 26, "help": 26, "tabl": 26, "lifecycl": 27, "method": [27, 47], "def": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "after_market_clos": 28, "refer": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "before_market_clos": 29, "before_market_open": 30, "before_starting_trad": 31, "initi": 32, "on_abrupt_clos": 33, "on_bot_crash": 34, "on_canceled_ord": 35, "on_filled_ord": 36, "on_new_ord": 37, "on_parameters_upd": 38, "on_partially_filled_ord": 39, "on_trading_iter": 40, "trace_stat": 42, "manag": [48, 142], "self": [49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "get_cash": [49, 55], "get_paramet": [50, 56, 104, 115], "get_portfolio_valu": [51, 57], "get_posit": [52, 53, 58, 59], "set_paramet": [54, 60], "chart": 61, "add_lin": [62, 66], "add_mark": [63, 67], "get_lines_df": [64, 68], "get_markers_df": [65, 69], "cancel_realtime_bar": 71, "get_historical_pric": 72, "get_historical_prices_for_asset": 73, "get_last_pric": [74, 75], "get_next_trading_dai": [76, 130, 138], "get_quot": 77, "get_realtime_bar": 78, "get_yesterday_dividend": [79, 80], "start_realtime_bar": 81, "datetim": 82, "get_datetim": [83, 92], "get_datetime_rang": [84, 93], "get_last_dai": [85, 94], "get_last_minut": [86, 95], "get_round_dai": [87, 96], "get_round_minut": [88, 97], "get_timestamp": [89, 98], "localize_datetim": [90, 99], "to_default_timezon": [91, 100], "miscellan": 101, "await_market_to_clos": [102, 113], "await_market_to_open": [103, 114], "log_messag": [105, 116], "set_market": [106, 117], "sleep": [107, 118], "update_paramet": [108, 119], "wait_for_order_execut": [109, 120], "wait_for_order_registr": [110, 121], "wait_for_orders_execut": [111, 122], "wait_for_orders_registr": [112, 123], "get_chain": [125, 126, 133, 134], "get_expir": [127, 135], "get_greek": [128, 136], "get_multipli": [129, 137], "get_strik": [131, 140], "options_expiry_to_datetime_d": [132, 141], "get_option_expiration_after_d": 139, "cancel_open_ord": [143, 154], "cancel_ord": [144, 145, 155, 156], "create_ord": [146, 157], "get_asset_potential_tot": [147, 158], "get_ord": [148, 149, 159, 160], "get_selling_ord": [150, 161], "sell_al": [151, 162], "submit_ord": [152, 153, 163, 164], "paramet": 165, "properti": 166, "cash": [167, 182], "first_iter": [168, 183], "initial_budget": [169, 184], "is_backtest": [170, 185], "last_on_trading_iteration_datetim": [171, 186], "minutes_before_clos": [172, 187], "minutes_before_open": [173, 188], "name": [174, 189], "portfolio_valu": [175, 190], "pytz": [176, 181, 191], "quote_asset": [177, 192], "sleeptim": [178, 193], "timezon": [179, 194], "unspent_monei": [180, 195], "backup": 196, "restor": 196, "It": 196, "work": 196, "benefit": 196, "var": 196, "usag": 196, "databas": 196, "storag": 196, "structur": 196}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"Backtesting": [[0, "backtesting"], [43, "backtesting"]], "Files Generated from Backtesting": [[0, "files-generated-from-backtesting"], [2, "files-generated-from-backtesting"]], "Contents:": [[0, null], [11, null], [18, null], [27, null], [47, null]], "Backtesting Function": [[1, "backtesting-function"]], "How To Backtest": [[2, "how-to-backtest"]], "Installing LumiBot": [[2, "installing-lumibot"]], "Choosing a Data Source": [[2, "choosing-a-data-source"]], "Running a Backtest with Polygon.io": [[2, "running-a-backtest-with-polygon-io"]], "Tearsheet HTML": [[2, "tearsheet-html"], [7, "tearsheet-html"]], "Trades Files": [[2, "trades-files"], [9, "trades-files"]], "Indicators Files": [[2, "indicators-files"], [3, "indicators-files"]], "Conclusion": [[2, "conclusion"], [17, "conclusion"]], "Logs CSV": [[4, "logs-csv"]], "Pandas (CSV or other data)": [[5, "pandas-csv-or-other-data"]], "Example Dataframe": [[5, "id1"]], "In Summary": [[5, "in-summary"]], "Polygon.io Backtesting": [[6, "polygon-io-backtesting"]], "ThetaData Backtesting": [[8, "thetadata-backtesting"]], "Yahoo": [[10, "yahoo"], [44, "module-lumibot.data_sources.yahoo_data"]], "Brokers": [[11, "brokers"]], "Alpaca": [[12, "alpaca"]], "Documentation": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [22, "module-entities.order"], [45, "module-lumibot.strategies.strategy.Strategy"]], "Crypto Brokers (Using CCXT)": [[13, "crypto-brokers-using-ccxt"]], "Configuration Settings": [[13, "configuration-settings"]], "Running Your Strategy": [[13, "running-your-strategy"], [16, "running-your-strategy"]], "Full Example Strategy": [[13, "full-example-strategy"], [16, "full-example-strategy"]], "Interactive Brokers": [[14, "interactive-brokers"]], "Market Data Subscriptions": [[14, "market-data-subscriptions"]], "Two-Factor Authentication (2FA)": [[14, "two-factor-authentication-2fa"]], "Using a Secondary Username": [[14, "using-a-secondary-username"]], "Using a Paper Trading Account": [[14, "using-a-paper-trading-account"]], "Strategy Setup": [[14, "strategy-setup"]], "Interactive Brokers Configuration": [[14, "id1"], [17, "interactive-brokers-configuration"], [17, "id25"]], "Example Strategy": [[14, "example-strategy"]], "Interactive Brokers Legacy": [[15, "interactive-brokers-legacy"]], "Tradier": [[16, "tradier"]], "Getting Started": [[16, "getting-started"], [26, "getting-started"]], "Configuration": [[16, "configuration"]], "Deployment Guide": [[17, "deployment-guide"]], "Example Strategy for Deployment": [[17, "example-strategy-for-deployment"]], "Choosing Your Deployment Platform": [[17, "id1"]], "Deploying to Render": [[17, "id2"]], "Deploying to Replit": [[17, "id3"]], "Secrets Configuration": [[17, "secrets-configuration"]], "Broker Configuration": [[17, "broker-configuration"]], "Tradier Configuration": [[17, "tradier-configuration"], [17, "id21"]], "Alpaca Configuration": [[17, "alpaca-configuration"], [17, "id22"]], "Coinbase Configuration": [[17, "coinbase-configuration"], [17, "id23"]], "Kraken Configuration": [[17, "kraken-configuration"], [17, "id24"]], "Interactive Brokers-Legacy Configuration": [[17, "interactive-brokers-legacy-configuration"], [17, "id26"]], "General Environment Variables": [[17, "general-environment-variables"], [17, "id27"]], "Final Steps": [[17, "final-steps"]], "Entities": [[18, "entities"]], "Asset": [[19, "asset"]], "Bars": [[20, "bars"]], "Data": [[21, "module-entities.data"], [70, "data"]], "Order": [[22, "order"]], "Advanced Order Types": [[22, "advanced-order-types"]], "Order With Legs": [[22, "order-with-legs"]], "Position": [[23, "module-entities.position"]], "Trading Fee": [[24, "module-entities.trading_fee"]], "What is Lumibot?": [[25, "what-is-lumibot"]], "Lumiwealth": [[25, "id1"]], "Getting Started With Lumibot": [[25, "getting-started-with-lumibot"]], "Step 1: Install the Package": [[25, "step-1-install-the-package"]], "Step 2: Import the Following Modules": [[25, "step-2-import-the-following-modules"]], "Step 3: Create an Alpaca Paper Trading Account": [[25, "step-3-create-an-alpaca-paper-trading-account"]], "Step 4: Configure Your API Keys": [[25, "step-4-configure-your-api-keys"]], "Step 5: Create a Strategy Class": [[25, "step-5-create-a-strategy-class"]], "Step 6: Instantiate the Trader, Alpaca, and Strategy Classes": [[25, "step-6-instantiate-the-trader-alpaca-and-strategy-classes"]], "Step 7: Backtest the Strategy (Optional)": [[25, "step-7-backtest-the-strategy-optional"]], "Step 8: Run the Strategy": [[25, "step-8-run-the-strategy"]], "Adding Trading Fees": [[25, "adding-trading-fees"]], "Profiling to Improve Performance": [[25, "profiling-to-improve-performance"]], "Lumibot: Backtesting and Algorithmic Trading Library": [[26, "lumibot-backtesting-and-algorithmic-trading-library"]], "Step 1: Install Lumibot": [[26, "step-1-install-lumibot"]], "Step 2: Create a Strategy for Backtesting": [[26, "step-2-create-a-strategy-for-backtesting"]], "Step 3: Take Your Bot Live": [[26, "step-3-take-your-bot-live"]], "All Together": [[26, "all-together"]], "Additional Resources": [[26, "additional-resources"]], "Need Extra Help?": [[26, "need-extra-help"]], "Table of Contents": [[26, "table-of-contents"]], "Indices and tables": [[26, "indices-and-tables"]], "Lifecycle Methods": [[27, "lifecycle-methods"]], "def after_market_closes": [[28, "def-after-market-closes"]], "Reference": [[28, "reference"], [29, "reference"], [30, "reference"], [31, "reference"], [32, "reference"], [33, "reference"], [34, "reference"], [35, "reference"], [36, "reference"], [37, "reference"], [38, "reference"], [39, "reference"], [40, "reference"], [42, "reference"]], "def before_market_closes": [[29, "def-before-market-closes"]], "def before_market_opens": [[30, "def-before-market-opens"]], "def before_starting_trading": [[31, "def-before-starting-trading"]], "def initialize": [[32, "def-initialize"]], "def on_abrupt_closing": [[33, "def-on-abrupt-closing"]], "def on_bot_crash": [[34, "def-on-bot-crash"]], "def on_canceled_order": [[35, "def-on-canceled-order"]], "def on_filled_order": [[36, "def-on-filled-order"]], "def on_new_order": [[37, "def-on-new-order"]], "def on_parameters_updated": [[38, "def-on-parameters-updated"]], "def on_partially_filled_order": [[39, "def-on-partially-filled-order"]], "def on_trading_iteration": [[40, "def-on-trading-iteration"]], "Summary": [[41, "summary"]], "def trace_stats": [[42, "def-trace-stats"]], "Backtesting Broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "Data Source Backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "Data Sources": [[44, "data-sources"]], "Data Source": [[44, "module-lumibot.data_sources.data_source"]], "Pandas": [[44, "module-lumibot.data_sources.pandas_data"]], "Module contents": [[44, "module-lumibot.data_sources"]], "Strategies": [[45, "strategies"]], "Traders": [[46, "traders"]], "Trader": [[46, "module-lumibot.traders.trader"]], "Strategy Methods": [[47, "strategy-methods"]], "Account Management": [[48, "account-management"]], "self.get_cash": [[49, "self-get-cash"], [55, "self-get-cash"]], "self.get_parameters": [[50, "self-get-parameters"], [56, "self-get-parameters"], [104, "self-get-parameters"], [115, "self-get-parameters"]], "self.get_portfolio_value": [[51, "self-get-portfolio-value"], [57, "self-get-portfolio-value"]], "self.get_position": [[52, "self-get-position"], [58, "self-get-position"]], "self.get_positions": [[53, "self-get-positions"], [59, "self-get-positions"]], "self.set_parameters": [[54, "self-set-parameters"], [60, "self-set-parameters"]], "Chart Functions": [[61, "chart-functions"]], "self.add_line": [[62, "self-add-line"], [66, "self-add-line"]], "self.add_marker": [[63, "self-add-marker"], [67, "self-add-marker"]], "self.get_lines_df": [[64, "self-get-lines-df"], [68, "self-get-lines-df"]], "self.get_markers_df": [[65, "self-get-markers-df"], [69, "self-get-markers-df"]], "self.cancel_realtime_bars": [[71, "self-cancel-realtime-bars"]], "self.get_historical_prices": [[72, "self-get-historical-prices"]], "self.get_historical_prices_for_assets": [[73, "self-get-historical-prices-for-assets"]], "self.get_last_price": [[74, "self-get-last-price"]], "self.get_last_prices": [[75, "self-get-last-prices"]], "self.get_next_trading_day": [[76, "self-get-next-trading-day"], [130, "self-get-next-trading-day"], [138, "self-get-next-trading-day"]], "self.get_quote": [[77, "self-get-quote"]], "self.get_realtime_bars": [[78, "self-get-realtime-bars"]], "self.get_yesterday_dividend": [[79, "self-get-yesterday-dividend"]], "self.get_yesterday_dividends": [[80, "self-get-yesterday-dividends"]], "self.start_realtime_bars": [[81, "self-start-realtime-bars"]], "DateTime": [[82, "datetime"]], "self.get_datetime": [[83, "self-get-datetime"], [92, "self-get-datetime"]], "self.get_datetime_range": [[84, "self-get-datetime-range"], [93, "self-get-datetime-range"]], "self.get_last_day": [[85, "self-get-last-day"], [94, "self-get-last-day"]], "self.get_last_minute": [[86, "self-get-last-minute"], [95, "self-get-last-minute"]], "self.get_round_day": [[87, "self-get-round-day"], [96, "self-get-round-day"]], "self.get_round_minute": [[88, "self-get-round-minute"], [97, "self-get-round-minute"]], "self.get_timestamp": [[89, "self-get-timestamp"], [98, "self-get-timestamp"]], "self.localize_datetime": [[90, "self-localize-datetime"], [99, "self-localize-datetime"]], "self.to_default_timezone": [[91, "self-to-default-timezone"], [100, "self-to-default-timezone"]], "Miscellaneous": [[101, "miscellaneous"]], "self.await_market_to_close": [[102, "self-await-market-to-close"], [113, "self-await-market-to-close"]], "self.await_market_to_open": [[103, "self-await-market-to-open"], [114, "self-await-market-to-open"]], "self.log_message": [[105, "self-log-message"], [116, "self-log-message"]], "self.set_market": [[106, "self-set-market"], [117, "self-set-market"]], "self.sleep": [[107, "self-sleep"], [118, "self-sleep"]], "self.update_parameters": [[108, "self-update-parameters"], [119, "self-update-parameters"]], "self.wait_for_order_execution": [[109, "self-wait-for-order-execution"], [120, "self-wait-for-order-execution"]], "self.wait_for_order_registration": [[110, "self-wait-for-order-registration"], [121, "self-wait-for-order-registration"]], "self.wait_for_orders_execution": [[111, "self-wait-for-orders-execution"], [122, "self-wait-for-orders-execution"]], "self.wait_for_orders_registration": [[112, "self-wait-for-orders-registration"], [123, "self-wait-for-orders-registration"]], "Options": [[124, "options"]], "self.get_chain": [[125, "self-get-chain"], [133, "self-get-chain"]], "self.get_chains": [[126, "self-get-chains"], [134, "self-get-chains"]], "self.get_expiration": [[127, "self-get-expiration"], [135, "self-get-expiration"]], "self.get_greeks": [[128, "self-get-greeks"], [136, "self-get-greeks"]], "self.get_multiplier": [[129, "self-get-multiplier"], [137, "self-get-multiplier"]], "self.get_strikes": [[131, "self-get-strikes"], [140, "self-get-strikes"]], "self.options_expiry_to_datetime_date": [[132, "self-options-expiry-to-datetime-date"], [141, "self-options-expiry-to-datetime-date"]], "self.get_option_expiration_after_date": [[139, "self-get-option-expiration-after-date"]], "Order Management": [[142, "order-management"]], "self.cancel_open_orders": [[143, "self-cancel-open-orders"], [154, "self-cancel-open-orders"]], "self.cancel_order": [[144, "self-cancel-order"], [155, "self-cancel-order"]], "self.cancel_orders": [[145, "self-cancel-orders"], [156, "self-cancel-orders"]], "self.create_order": [[146, "self-create-order"], [157, "self-create-order"]], "self.get_asset_potential_total": [[147, "self-get-asset-potential-total"], [158, "self-get-asset-potential-total"]], "self.get_order": [[148, "self-get-order"], [159, "self-get-order"]], "self.get_orders": [[149, "self-get-orders"], [160, "self-get-orders"]], "self.get_selling_order": [[150, "self-get-selling-order"], [161, "self-get-selling-order"]], "self.sell_all": [[151, "self-sell-all"], [162, "self-sell-all"]], "self.submit_order": [[152, "self-submit-order"], [163, "self-submit-order"]], "self.submit_orders": [[153, "self-submit-orders"], [164, "self-submit-orders"]], "Parameters": [[165, "parameters"]], "Strategy Properties": [[166, "strategy-properties"]], "self.cash": [[167, "self-cash"], [182, "self-cash"]], "self.first_iteration": [[168, "self-first-iteration"], [183, "self-first-iteration"]], "self.initial_budget": [[169, "self-initial-budget"], [184, "self-initial-budget"]], "self.is_backtesting": [[170, "self-is-backtesting"], [185, "self-is-backtesting"]], "self.last_on_trading_iteration_datetime": [[171, "self-last-on-trading-iteration-datetime"], [186, "self-last-on-trading-iteration-datetime"]], "self.minutes_before_closing": [[172, "self-minutes-before-closing"], [187, "self-minutes-before-closing"]], "self.minutes_before_opening": [[173, "self-minutes-before-opening"], [188, "self-minutes-before-opening"]], "self.name": [[174, "self-name"], [189, "self-name"]], "self.portfolio_value": [[175, "self-portfolio-value"], [190, "self-portfolio-value"]], "self.pytz": [[176, "self-pytz"], [181, "self-pytz"], [191, "self-pytz"]], "self.quote_asset": [[177, "self-quote-asset"], [192, "self-quote-asset"]], "self.sleeptime": [[178, "self-sleeptime"], [193, "self-sleeptime"]], "self.timezone": [[179, "self-timezone"], [194, "self-timezone"]], "self.unspent_money": [[180, "self-unspent-money"], [195, "self-unspent-money"]], "Variable Backup & Restore": [[196, "variable-backup-restore"]], "How It Works": [[196, "how-it-works"]], "Benefits of self.vars": [[196, "benefits-of-self-vars"]], "Usage Guide": [[196, "usage-guide"]], "Database Configuration": [[196, "database-configuration"]], "Database Storage Structure": [[196, "database-storage-structure"]]}, "indexentries": {"run_backtest() (in module lumibot.strategies.strategy.strategy)": [[1, "lumibot.strategies.strategy.Strategy.run_backtest"]], "asset_type_map (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.ASSET_TYPE_MAP"]], "alpaca (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.Alpaca"]], "orderdata (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.OrderData"]], "api (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.api"]], "cancel_order() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.cancel_order"]], "get_historical_account_value() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.get_historical_account_value"]], "get_time_to_close() (lumibot.brokers.alpaca.alpaca method)": [[12, "id0"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_close"]], "get_time_to_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id1"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_open"]], "get_timestamp() (lumibot.brokers.alpaca.alpaca method)": [[12, "id2"], [12, "lumibot.brokers.alpaca.Alpaca.get_timestamp"]], "is_market_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id3"], [12, "lumibot.brokers.alpaca.Alpaca.is_market_open"]], "lumibot.brokers.alpaca": [[12, "module-lumibot.brokers.alpaca"]], "map_asset_type() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.map_asset_type"]], "module": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [21, "module-entities.data"], [22, "module-entities.order"], [23, "module-entities.position"], [24, "module-entities.trading_fee"], [43, "module-lumibot.backtesting.backtesting_broker"], [43, "module-lumibot.data_sources.data_source_backtesting"], [44, "module-lumibot.data_sources"], [44, "module-lumibot.data_sources.data_source"], [44, "module-lumibot.data_sources.pandas_data"], [44, "module-lumibot.data_sources.yahoo_data"], [45, "module-lumibot.strategies.strategy.Strategy"], [46, "module-lumibot.traders.trader"]], "to_request_fields() (lumibot.brokers.alpaca.orderdata method)": [[12, "lumibot.brokers.alpaca.OrderData.to_request_fields"]], "asset (class in entities.asset)": [[19, "entities.asset.Asset"]], "asset.assettype (class in entities.asset)": [[19, "entities.asset.Asset.AssetType"]], "asset.optionright (class in entities.asset)": [[19, "entities.asset.Asset.OptionRight"]], "assetsmapping (class in entities.asset)": [[19, "entities.asset.AssetsMapping"]], "call (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.CALL"]], "crypto (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.CRYPTO"]], "forex (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FOREX"]], "future (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FUTURE"]], "index (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.INDEX"]], "multileg (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.MULTILEG"]], "option (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.OPTION"]], "put (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.PUT"]], "stock (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.STOCK"]], "_asset_types (entities.asset.asset attribute)": [[19, "entities.asset.Asset._asset_types"]], "_right (entities.asset.asset attribute)": [[19, "entities.asset.Asset._right"]], "asset_type (entities.asset.asset attribute)": [[19, "entities.asset.Asset.asset_type"], [19, "id0"]], "asset_type_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.asset_type_must_be_one_of"], [19, "id1"]], "entities.asset": [[19, "module-entities.asset"]], "expiration (entities.asset.asset attribute)": [[19, "entities.asset.Asset.expiration"], [19, "id2"]], "from_dict() (entities.asset.asset class method)": [[19, "entities.asset.Asset.from_dict"]], "is_valid() (entities.asset.asset method)": [[19, "entities.asset.Asset.is_valid"]], "multiplier (entities.asset.asset attribute)": [[19, "entities.asset.Asset.multiplier"], [19, "id3"]], "precision (entities.asset.asset attribute)": [[19, "entities.asset.Asset.precision"], [19, "id4"]], "right (entities.asset.asset attribute)": [[19, "entities.asset.Asset.right"], [19, "id5"]], "right_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.right_must_be_one_of"], [19, "id6"]], "strike (entities.asset.asset attribute)": [[19, "entities.asset.Asset.strike"], [19, "id7"]], "symbol (entities.asset.asset attribute)": [[19, "entities.asset.Asset.symbol"], [19, "id8"]], "symbol2asset() (entities.asset.asset class method)": [[19, "entities.asset.Asset.symbol2asset"]], "to_dict() (entities.asset.asset method)": [[19, "entities.asset.Asset.to_dict"]], "underlying_asset (entities.asset.asset attribute)": [[19, "entities.asset.Asset.underlying_asset"]], "bars (class in entities.bars)": [[20, "entities.bars.Bars"]], "nobardatafound": [[20, "entities.bars.NoBarDataFound"]], "aggregate_bars() (entities.bars.bars method)": [[20, "entities.bars.Bars.aggregate_bars"], [20, "id0"]], "entities.bars": [[20, "module-entities.bars"]], "filter() (entities.bars.bars method)": [[20, "entities.bars.Bars.filter"]], "get_last_dividend() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_dividend"], [20, "id1"]], "get_last_price() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_price"], [20, "id2"]], "get_momentum() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_momentum"], [20, "id3"]], "get_total_dividends() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_dividends"]], "get_total_return() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return"]], "get_total_return_pct() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct"]], "get_total_return_pct_change() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct_change"]], "get_total_stock_splits() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_stock_splits"]], "get_total_volume() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_volume"], [20, "id4"]], "parse_bar_list() (entities.bars.bars class method)": [[20, "entities.bars.Bars.parse_bar_list"]], "split() (entities.bars.bars method)": [[20, "entities.bars.Bars.split"]], "data (class in entities.data)": [[21, "entities.data.Data"]], "min_timestep (entities.data.data attribute)": [[21, "entities.data.Data.MIN_TIMESTEP"]], "timestep_mapping (entities.data.data attribute)": [[21, "entities.data.Data.TIMESTEP_MAPPING"]], "_get_bars_dict() (entities.data.data method)": [[21, "entities.data.Data._get_bars_dict"]], "asset (entities.data.data attribute)": [[21, "entities.data.Data.asset"]], "check_data() (entities.data.data method)": [[21, "entities.data.Data.check_data"], [21, "id0"]], "columns() (entities.data.data method)": [[21, "entities.data.Data.columns"], [21, "id1"]], "datalines (entities.data.data attribute)": [[21, "entities.data.Data.datalines"]], "date_end (entities.data.data attribute)": [[21, "entities.data.Data.date_end"]], "date_start (entities.data.data attribute)": [[21, "entities.data.Data.date_start"]], "df (entities.data.data attribute)": [[21, "entities.data.Data.df"]], "entities.data": [[21, "module-entities.data"]], "get_bars() (entities.data.data method)": [[21, "entities.data.Data.get_bars"], [21, "id2"]], "get_bars_between_dates() (entities.data.data method)": [[21, "entities.data.Data.get_bars_between_dates"]], "get_iter_count() (entities.data.data method)": [[21, "entities.data.Data.get_iter_count"], [21, "id3"]], "get_last_price() (entities.data.data method)": [[21, "entities.data.Data.get_last_price"], [21, "id4"]], "get_quote() (entities.data.data method)": [[21, "entities.data.Data.get_quote"]], "iter_index (entities.data.data attribute)": [[21, "entities.data.Data.iter_index"]], "repair_times_and_fill() (entities.data.data method)": [[21, "entities.data.Data.repair_times_and_fill"], [21, "id5"]], "set_date_format() (entities.data.data method)": [[21, "entities.data.Data.set_date_format"], [21, "id6"]], "set_dates() (entities.data.data method)": [[21, "entities.data.Data.set_dates"], [21, "id7"]], "set_times() (entities.data.data method)": [[21, "entities.data.Data.set_times"], [21, "id8"]], "sybmol (entities.data.data attribute)": [[21, "entities.data.Data.sybmol"]], "timestep (entities.data.data attribute)": [[21, "entities.data.Data.timestep"]], "to_datalines() (entities.data.data method)": [[21, "entities.data.Data.to_datalines"], [21, "id9"]], "trading_hours_end (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_end"]], "trading_hours_start (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_start"]], "trim_data() (entities.data.data method)": [[21, "entities.data.Data.trim_data"], [21, "id10"]], "bracket (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.BRACKET"]], "bracket (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.BRACKET"]], "buy (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY"]], "buy_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_CLOSE"]], "buy_to_cover (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_COVER"]], "buy_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_OPEN"]], "canceled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELED"]], "cancelling (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELLING"]], "cash_settled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CASH_SETTLED"]], "error (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.ERROR"]], "expired (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.EXPIRED"]], "filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.FILLED"]], "limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.LIMIT"]], "market (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.MARKET"]], "multileg (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.MULTILEG"]], "new (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.NEW"]], "oco (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OCO"]], "oco (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OCO"]], "open (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.OPEN"]], "oto (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OTO"]], "oto (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OTO"]], "order (class in entities.order)": [[22, "entities.order.Order"]], "order.orderclass (class in entities.order)": [[22, "entities.order.Order.OrderClass"]], "order.orderside (class in entities.order)": [[22, "entities.order.Order.OrderSide"]], "order.orderstatus (class in entities.order)": [[22, "entities.order.Order.OrderStatus"]], "order.ordertype (class in entities.order)": [[22, "entities.order.Order.OrderType"]], "order.transaction (class in entities.order)": [[22, "entities.order.Order.Transaction"]], "partially_filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.PARTIALLY_FILLED"]], "sell (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL"]], "sell_short (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_SHORT"]], "sell_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_CLOSE"]], "sell_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_OPEN"]], "stop (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP"]], "stop_limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP_LIMIT"]], "submitted (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.SUBMITTED"]], "trail (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.TRAIL"]], "unprocessed (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.UNPROCESSED"]], "add_child_order() (entities.order.order method)": [[22, "entities.order.Order.add_child_order"]], "add_transaction() (entities.order.order method)": [[22, "entities.order.Order.add_transaction"]], "avg_fill_price (entities.order.order property)": [[22, "entities.order.Order.avg_fill_price"]], "cash_pending() (entities.order.order method)": [[22, "entities.order.Order.cash_pending"]], "entities.order": [[22, "module-entities.order"]], "equivalent_status() (entities.order.order method)": [[22, "entities.order.Order.equivalent_status"]], "from_dict() (entities.order.order class method)": [[22, "entities.order.Order.from_dict"]], "get_fill_price() (entities.order.order method)": [[22, "entities.order.Order.get_fill_price"]], "get_increment() (entities.order.order method)": [[22, "entities.order.Order.get_increment"]], "is_active() (entities.order.order method)": [[22, "entities.order.Order.is_active"]], "is_buy_order() (entities.order.order method)": [[22, "entities.order.Order.is_buy_order"]], "is_canceled() (entities.order.order method)": [[22, "entities.order.Order.is_canceled"]], "is_equivalent_status() (entities.order.order class method)": [[22, "entities.order.Order.is_equivalent_status"]], "is_filled() (entities.order.order method)": [[22, "entities.order.Order.is_filled"]], "is_option() (entities.order.order method)": [[22, "entities.order.Order.is_option"]], "is_parent() (entities.order.order method)": [[22, "entities.order.Order.is_parent"]], "is_sell_order() (entities.order.order method)": [[22, "entities.order.Order.is_sell_order"]], "price (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.price"]], "quantity (entities.order.order property)": [[22, "entities.order.Order.quantity"]], "quantity (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.quantity"]], "set_canceled() (entities.order.order method)": [[22, "entities.order.Order.set_canceled"]], "set_error() (entities.order.order method)": [[22, "entities.order.Order.set_error"]], "set_filled() (entities.order.order method)": [[22, "entities.order.Order.set_filled"]], "set_identifier() (entities.order.order method)": [[22, "entities.order.Order.set_identifier"]], "set_new() (entities.order.order method)": [[22, "entities.order.Order.set_new"]], "set_partially_filled() (entities.order.order method)": [[22, "entities.order.Order.set_partially_filled"]], "status (entities.order.order property)": [[22, "entities.order.Order.status"]], "to_dict() (entities.order.order method)": [[22, "entities.order.Order.to_dict"]], "to_position() (entities.order.order method)": [[22, "entities.order.Order.to_position"]], "update_raw() (entities.order.order method)": [[22, "entities.order.Order.update_raw"]], "update_trail_stop_price() (entities.order.order method)": [[22, "entities.order.Order.update_trail_stop_price"]], "wait_to_be_closed() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_closed"]], "wait_to_be_registered() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_registered"]], "was_transmitted() (entities.order.order method)": [[22, "entities.order.Order.was_transmitted"]], "position (class in entities.position)": [[23, "entities.position.Position"]], "add_order() (entities.position.position method)": [[23, "entities.position.Position.add_order"]], "asset (entities.position.position attribute)": [[23, "entities.position.Position.asset"]], "available (entities.position.position attribute)": [[23, "entities.position.Position.available"]], "available (entities.position.position property)": [[23, "id0"]], "avg_fill_price (entities.position.position attribute)": [[23, "entities.position.Position.avg_fill_price"]], "entities.position": [[23, "module-entities.position"]], "from_dict() (entities.position.position class method)": [[23, "entities.position.Position.from_dict"]], "get_selling_order() (entities.position.position method)": [[23, "entities.position.Position.get_selling_order"]], "hold (entities.position.position attribute)": [[23, "entities.position.Position.hold"]], "hold (entities.position.position property)": [[23, "id1"]], "orders (entities.position.position attribute)": [[23, "entities.position.Position.orders"]], "quantity (entities.position.position attribute)": [[23, "entities.position.Position.quantity"]], "quantity (entities.position.position property)": [[23, "id2"]], "strategy (entities.position.position attribute)": [[23, "entities.position.Position.strategy"]], "symbol (entities.position.position attribute)": [[23, "entities.position.Position.symbol"]], "to_dict() (entities.position.position method)": [[23, "entities.position.Position.to_dict"]], "value_type() (entities.position.position method)": [[23, "entities.position.Position.value_type"]], "tradingfee (class in entities.trading_fee)": [[24, "entities.trading_fee.TradingFee"]], "entities.trading_fee": [[24, "module-entities.trading_fee"]], "after_market_closes() (in module lumibot.strategies.strategy.strategy)": [[28, "lumibot.strategies.strategy.Strategy.after_market_closes"]], "before_market_closes() (in module lumibot.strategies.strategy.strategy)": [[29, "lumibot.strategies.strategy.Strategy.before_market_closes"]], "before_market_opens() (in module lumibot.strategies.strategy.strategy)": [[30, "lumibot.strategies.strategy.Strategy.before_market_opens"]], "before_starting_trading() (in module lumibot.strategies.strategy.strategy)": [[31, "lumibot.strategies.strategy.Strategy.before_starting_trading"]], "initialize() (in module lumibot.strategies.strategy.strategy)": [[32, "lumibot.strategies.strategy.Strategy.initialize"]], "on_abrupt_closing() (in module lumibot.strategies.strategy.strategy)": [[33, "lumibot.strategies.strategy.Strategy.on_abrupt_closing"]], "on_bot_crash() (in module lumibot.strategies.strategy.strategy)": [[34, "lumibot.strategies.strategy.Strategy.on_bot_crash"]], "on_canceled_order() (in module lumibot.strategies.strategy.strategy)": [[35, "lumibot.strategies.strategy.Strategy.on_canceled_order"]], "on_filled_order() (in module lumibot.strategies.strategy.strategy)": [[36, "lumibot.strategies.strategy.Strategy.on_filled_order"]], "on_new_order() (in module lumibot.strategies.strategy.strategy)": [[37, "lumibot.strategies.strategy.Strategy.on_new_order"]], "on_parameters_updated() (in module lumibot.strategies.strategy.strategy)": [[38, "lumibot.strategies.strategy.Strategy.on_parameters_updated"]], "on_partially_filled_order() (in module lumibot.strategies.strategy.strategy)": [[39, "lumibot.strategies.strategy.Strategy.on_partially_filled_order"]], "on_trading_iteration() (in module lumibot.strategies.strategy.strategy)": [[40, "lumibot.strategies.strategy.Strategy.on_trading_iteration"]], "trace_stats() (in module lumibot.strategies.strategy.strategy)": [[42, "lumibot.strategies.strategy.Strategy.trace_stats"]], "backtestingbroker (class in lumibot.backtesting.backtesting_broker)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker"]], "datasourcebacktesting (class in lumibot.data_sources.data_source_backtesting)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting"]], "is_backtesting_broker (lumibot.backtesting.backtesting_broker.backtestingbroker attribute)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.IS_BACKTESTING_BROKER"]], "is_backtesting_data_source (lumibot.data_sources.data_source_backtesting.datasourcebacktesting attribute)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.IS_BACKTESTING_DATA_SOURCE"]], "calculate_trade_cost() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.calculate_trade_cost"]], "cancel_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cancel_order"]], "cash_settle_options_contract() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cash_settle_options_contract"]], "datetime (lumibot.backtesting.backtesting_broker.backtestingbroker property)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.datetime"]], "get_datetime() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime_range"]], "get_historical_account_value() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_historical_account_value"]], "get_last_bar() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_last_bar"]], "get_time_to_close() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_close"]], "get_time_to_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_open"]], "is_market_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.is_market_open"]], "limit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.limit_order"]], "lumibot.backtesting.backtesting_broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "lumibot.data_sources.data_source_backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "process_expired_option_contracts() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_expired_option_contracts"]], "process_pending_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_pending_orders"]], "should_continue() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.should_continue"]], "stop_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.stop_order"]], "submit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_order"]], "submit_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_orders"]], "default_pytz (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_PYTZ"]], "default_timezone (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_TIMEZONE"]], "datasource (class in lumibot.data_sources.data_source)": [[44, "lumibot.data_sources.data_source.DataSource"]], "is_backtesting_data_source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.IS_BACKTESTING_DATA_SOURCE"]], "min_timestep (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.MIN_TIMESTEP"]], "min_timestep (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.MIN_TIMESTEP"]], "pandasdata (class in lumibot.data_sources.pandas_data)": [[44, "lumibot.data_sources.pandas_data.PandasData"]], "source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.SOURCE"]], "source (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.SOURCE"]], "source (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.SOURCE"]], "timestep_mapping (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.TIMESTEP_MAPPING"]], "yahoodata (class in lumibot.data_sources.yahoo_data)": [[44, "lumibot.data_sources.yahoo_data.YahooData"]], "calculate_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.calculate_greeks"]], "clean_trading_times() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.clean_trading_times"]], "convert_timestep_str_to_timedelta() (lumibot.data_sources.data_source.datasource static method)": [[44, "lumibot.data_sources.data_source.DataSource.convert_timestep_str_to_timedelta"]], "find_asset_in_data_store() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.find_asset_in_data_store"]], "get_asset_by_name() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_name"]], "get_asset_by_symbol() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_symbol"]], "get_assets() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_assets"]], "get_bars() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_bars"]], "get_chains() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_chains"]], "get_chains() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_chains"]], "get_chains() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_chains"]], "get_datetime() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime_range"]], "get_historical_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_historical_prices"]], "get_last_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_day"]], "get_last_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_minute"]], "get_last_price() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_price"]], "get_last_price() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_price"]], "get_last_price() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_last_price"]], "get_last_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_prices"]], "get_last_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_prices"]], "get_round_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_day"]], "get_round_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_minute"]], "get_start_datetime_and_ts_unit() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_start_datetime_and_ts_unit"]], "get_strikes() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_strikes"]], "get_strikes() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_strikes"]], "get_timestamp() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestamp"]], "get_timestep() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestep"]], "get_trading_days_pandas() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_trading_days_pandas"]], "get_yesterday_dividend() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividend"]], "get_yesterday_dividend() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividend"]], "get_yesterday_dividends() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividends"]], "get_yesterday_dividends() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividends"]], "load_data() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.load_data"]], "localize_datetime() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.localize_datetime"]], "lumibot.data_sources": [[44, "module-lumibot.data_sources"]], "lumibot.data_sources.data_source": [[44, "module-lumibot.data_sources.data_source"]], "lumibot.data_sources.pandas_data": [[44, "module-lumibot.data_sources.pandas_data"]], "lumibot.data_sources.yahoo_data": [[44, "module-lumibot.data_sources.yahoo_data"]], "query_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.query_greeks"]], "to_default_timezone() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.to_default_timezone"]], "update_date_index() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.update_date_index"]], "lumibot.strategies.strategy.strategy": [[45, "module-lumibot.strategies.strategy.Strategy"]], "trader (class in lumibot.traders.trader)": [[46, "lumibot.traders.trader.Trader"]], "add_strategy() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.add_strategy"]], "is_backtest_broker (lumibot.traders.trader.trader property)": [[46, "lumibot.traders.trader.Trader.is_backtest_broker"]], "lumibot.traders.trader": [[46, "module-lumibot.traders.trader"]], "run_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all"]], "run_all_async() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all_async"]], "stop_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.stop_all"]], "get_cash() (in module lumibot.strategies.strategy.strategy)": [[49, "lumibot.strategies.strategy.Strategy.get_cash"], [55, "lumibot.strategies.strategy.Strategy.get_cash"]], "get_parameters() (in module lumibot.strategies.strategy.strategy)": [[50, "lumibot.strategies.strategy.Strategy.get_parameters"], [56, "lumibot.strategies.strategy.Strategy.get_parameters"], [104, "lumibot.strategies.strategy.Strategy.get_parameters"], [115, "lumibot.strategies.strategy.Strategy.get_parameters"]], "get_portfolio_value() (in module lumibot.strategies.strategy.strategy)": [[51, "lumibot.strategies.strategy.Strategy.get_portfolio_value"], [57, "lumibot.strategies.strategy.Strategy.get_portfolio_value"]], "get_position() (in module lumibot.strategies.strategy.strategy)": [[52, "lumibot.strategies.strategy.Strategy.get_position"], [58, "lumibot.strategies.strategy.Strategy.get_position"]], "get_positions() (in module lumibot.strategies.strategy.strategy)": [[53, "lumibot.strategies.strategy.Strategy.get_positions"], [59, "lumibot.strategies.strategy.Strategy.get_positions"]], "set_parameters() (in module lumibot.strategies.strategy.strategy)": [[54, "lumibot.strategies.strategy.Strategy.set_parameters"], [60, "lumibot.strategies.strategy.Strategy.set_parameters"]], "add_line() (in module lumibot.strategies.strategy.strategy)": [[62, "lumibot.strategies.strategy.Strategy.add_line"], [66, "lumibot.strategies.strategy.Strategy.add_line"]], "add_marker() (in module lumibot.strategies.strategy.strategy)": [[63, "lumibot.strategies.strategy.Strategy.add_marker"], [67, "lumibot.strategies.strategy.Strategy.add_marker"]], "get_lines_df() (in module lumibot.strategies.strategy.strategy)": [[64, "lumibot.strategies.strategy.Strategy.get_lines_df"], [68, "lumibot.strategies.strategy.Strategy.get_lines_df"]], "get_markers_df() (in module lumibot.strategies.strategy.strategy)": [[65, "lumibot.strategies.strategy.Strategy.get_markers_df"], [69, "lumibot.strategies.strategy.Strategy.get_markers_df"]], "cancel_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[71, "lumibot.strategies.strategy.Strategy.cancel_realtime_bars"]], "get_historical_prices() (in module lumibot.strategies.strategy.strategy)": [[72, "lumibot.strategies.strategy.Strategy.get_historical_prices"]], "get_historical_prices_for_assets() (in module lumibot.strategies.strategy.strategy)": [[73, "lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets"]], "get_last_price() (in module lumibot.strategies.strategy.strategy)": [[74, "lumibot.strategies.strategy.Strategy.get_last_price"]], "get_last_prices() (in module lumibot.strategies.strategy.strategy)": [[75, "lumibot.strategies.strategy.Strategy.get_last_prices"]], "get_next_trading_day() (in module lumibot.strategies.strategy.strategy)": [[76, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [130, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [138, "lumibot.strategies.strategy.Strategy.get_next_trading_day"]], "get_quote() (in module lumibot.strategies.strategy.strategy)": [[77, "lumibot.strategies.strategy.Strategy.get_quote"]], "get_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[78, "lumibot.strategies.strategy.Strategy.get_realtime_bars"]], "get_yesterday_dividend() (in module lumibot.strategies.strategy.strategy)": [[79, "lumibot.strategies.strategy.Strategy.get_yesterday_dividend"]], "get_yesterday_dividends() (in module lumibot.strategies.strategy.strategy)": [[80, "lumibot.strategies.strategy.Strategy.get_yesterday_dividends"]], "start_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[81, "lumibot.strategies.strategy.Strategy.start_realtime_bars"]], "get_datetime() (in module lumibot.strategies.strategy.strategy)": [[83, "lumibot.strategies.strategy.Strategy.get_datetime"], [92, "lumibot.strategies.strategy.Strategy.get_datetime"]], "get_datetime_range() (in module lumibot.strategies.strategy.strategy)": [[84, "lumibot.strategies.strategy.Strategy.get_datetime_range"], [93, "lumibot.strategies.strategy.Strategy.get_datetime_range"]], "get_last_day() (in module lumibot.strategies.strategy.strategy)": [[85, "lumibot.strategies.strategy.Strategy.get_last_day"], [94, "lumibot.strategies.strategy.Strategy.get_last_day"]], "get_last_minute() (in module lumibot.strategies.strategy.strategy)": [[86, "lumibot.strategies.strategy.Strategy.get_last_minute"], [95, "lumibot.strategies.strategy.Strategy.get_last_minute"]], "get_round_day() (in module lumibot.strategies.strategy.strategy)": [[87, "lumibot.strategies.strategy.Strategy.get_round_day"], [96, "lumibot.strategies.strategy.Strategy.get_round_day"]], "get_round_minute() (in module lumibot.strategies.strategy.strategy)": [[88, "lumibot.strategies.strategy.Strategy.get_round_minute"], [97, "lumibot.strategies.strategy.Strategy.get_round_minute"]], "get_timestamp() (in module lumibot.strategies.strategy.strategy)": [[89, "lumibot.strategies.strategy.Strategy.get_timestamp"], [98, "lumibot.strategies.strategy.Strategy.get_timestamp"]], "localize_datetime() (in module lumibot.strategies.strategy.strategy)": [[90, "lumibot.strategies.strategy.Strategy.localize_datetime"], [99, "lumibot.strategies.strategy.Strategy.localize_datetime"]], "to_default_timezone() (in module lumibot.strategies.strategy.strategy)": [[91, "lumibot.strategies.strategy.Strategy.to_default_timezone"], [100, "lumibot.strategies.strategy.Strategy.to_default_timezone"]], "await_market_to_close() (in module lumibot.strategies.strategy.strategy)": [[102, "lumibot.strategies.strategy.Strategy.await_market_to_close"], [113, "lumibot.strategies.strategy.Strategy.await_market_to_close"]], "await_market_to_open() (in module lumibot.strategies.strategy.strategy)": [[103, "lumibot.strategies.strategy.Strategy.await_market_to_open"], [114, "lumibot.strategies.strategy.Strategy.await_market_to_open"]], "log_message() (in module lumibot.strategies.strategy.strategy)": [[105, "lumibot.strategies.strategy.Strategy.log_message"], [116, "lumibot.strategies.strategy.Strategy.log_message"]], "set_market() (in module lumibot.strategies.strategy.strategy)": [[106, "lumibot.strategies.strategy.Strategy.set_market"], [117, "lumibot.strategies.strategy.Strategy.set_market"]], "sleep() (in module lumibot.strategies.strategy.strategy)": [[107, "lumibot.strategies.strategy.Strategy.sleep"], [118, "lumibot.strategies.strategy.Strategy.sleep"]], "update_parameters() (in module lumibot.strategies.strategy.strategy)": [[108, "lumibot.strategies.strategy.Strategy.update_parameters"], [119, "lumibot.strategies.strategy.Strategy.update_parameters"]], "wait_for_order_execution() (in module lumibot.strategies.strategy.strategy)": [[109, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"], [120, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"]], "wait_for_order_registration() (in module lumibot.strategies.strategy.strategy)": [[110, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"], [121, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"]], "wait_for_orders_execution() (in module lumibot.strategies.strategy.strategy)": [[111, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"], [122, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"]], "wait_for_orders_registration() (in module lumibot.strategies.strategy.strategy)": [[112, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"], [123, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"]], "get_chain() (in module lumibot.strategies.strategy.strategy)": [[125, "lumibot.strategies.strategy.Strategy.get_chain"], [133, "lumibot.strategies.strategy.Strategy.get_chain"]], "get_chains() (in module lumibot.strategies.strategy.strategy)": [[126, "lumibot.strategies.strategy.Strategy.get_chains"], [134, "lumibot.strategies.strategy.Strategy.get_chains"]], "get_expiration() (in module lumibot.strategies.strategy.strategy)": [[127, "lumibot.strategies.strategy.Strategy.get_expiration"], [135, "lumibot.strategies.strategy.Strategy.get_expiration"]], "get_greeks() (in module lumibot.strategies.strategy.strategy)": [[128, "lumibot.strategies.strategy.Strategy.get_greeks"], [136, "lumibot.strategies.strategy.Strategy.get_greeks"]], "get_multiplier() (in module lumibot.strategies.strategy.strategy)": [[129, "lumibot.strategies.strategy.Strategy.get_multiplier"], [137, "lumibot.strategies.strategy.Strategy.get_multiplier"]], "get_strikes() (in module lumibot.strategies.strategy.strategy)": [[131, "lumibot.strategies.strategy.Strategy.get_strikes"], [140, "lumibot.strategies.strategy.Strategy.get_strikes"]], "options_expiry_to_datetime_date() (in module lumibot.strategies.strategy.strategy)": [[132, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"], [141, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"]], "get_option_expiration_after_date() (in module lumibot.strategies.strategy.strategy)": [[139, "lumibot.strategies.strategy.Strategy.get_option_expiration_after_date"]], "cancel_open_orders() (in module lumibot.strategies.strategy.strategy)": [[143, "lumibot.strategies.strategy.Strategy.cancel_open_orders"], [154, "lumibot.strategies.strategy.Strategy.cancel_open_orders"]], "cancel_order() (in module lumibot.strategies.strategy.strategy)": [[144, "lumibot.strategies.strategy.Strategy.cancel_order"], [155, "lumibot.strategies.strategy.Strategy.cancel_order"]], "cancel_orders() (in module lumibot.strategies.strategy.strategy)": [[145, "lumibot.strategies.strategy.Strategy.cancel_orders"], [156, "lumibot.strategies.strategy.Strategy.cancel_orders"]], "create_order() (in module lumibot.strategies.strategy.strategy)": [[146, "lumibot.strategies.strategy.Strategy.create_order"], [157, "lumibot.strategies.strategy.Strategy.create_order"]], "get_asset_potential_total() (in module lumibot.strategies.strategy.strategy)": [[147, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"], [158, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"]], "get_order() (in module lumibot.strategies.strategy.strategy)": [[148, "lumibot.strategies.strategy.Strategy.get_order"], [159, "lumibot.strategies.strategy.Strategy.get_order"]], "get_orders() (in module lumibot.strategies.strategy.strategy)": [[149, "lumibot.strategies.strategy.Strategy.get_orders"], [160, "lumibot.strategies.strategy.Strategy.get_orders"]], "get_selling_order() (in module lumibot.strategies.strategy.strategy)": [[150, "lumibot.strategies.strategy.Strategy.get_selling_order"], [161, "lumibot.strategies.strategy.Strategy.get_selling_order"]], "sell_all() (in module lumibot.strategies.strategy.strategy)": [[151, "lumibot.strategies.strategy.Strategy.sell_all"], [162, "lumibot.strategies.strategy.Strategy.sell_all"]], "submit_order() (in module lumibot.strategies.strategy.strategy)": [[152, "lumibot.strategies.strategy.Strategy.submit_order"], [163, "lumibot.strategies.strategy.Strategy.submit_order"]], "submit_orders() (in module lumibot.strategies.strategy.strategy)": [[153, "lumibot.strategies.strategy.Strategy.submit_orders"], [164, "lumibot.strategies.strategy.Strategy.submit_orders"]], "cash (lumibot.strategies.strategy.strategy property)": [[167, "lumibot.strategies.strategy.Strategy.cash"], [182, "lumibot.strategies.strategy.Strategy.cash"]], "first_iteration (lumibot.strategies.strategy.strategy property)": [[168, "lumibot.strategies.strategy.Strategy.first_iteration"], [183, "lumibot.strategies.strategy.Strategy.first_iteration"]], "initial_budget (lumibot.strategies.strategy.strategy property)": [[169, "lumibot.strategies.strategy.Strategy.initial_budget"], [184, "lumibot.strategies.strategy.Strategy.initial_budget"]], "is_backtesting (lumibot.strategies.strategy.strategy property)": [[170, "lumibot.strategies.strategy.Strategy.is_backtesting"], [185, "lumibot.strategies.strategy.Strategy.is_backtesting"]], "last_on_trading_iteration_datetime (lumibot.strategies.strategy.strategy property)": [[171, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"], [186, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"]], "minutes_before_closing (lumibot.strategies.strategy.strategy property)": [[172, "lumibot.strategies.strategy.Strategy.minutes_before_closing"], [187, "lumibot.strategies.strategy.Strategy.minutes_before_closing"]], "minutes_before_opening (lumibot.strategies.strategy.strategy property)": [[173, "lumibot.strategies.strategy.Strategy.minutes_before_opening"], [188, "lumibot.strategies.strategy.Strategy.minutes_before_opening"]], "name (lumibot.strategies.strategy.strategy property)": [[174, "lumibot.strategies.strategy.Strategy.name"], [189, "lumibot.strategies.strategy.Strategy.name"]], "portfolio_value (lumibot.strategies.strategy.strategy property)": [[175, "lumibot.strategies.strategy.Strategy.portfolio_value"], [190, "lumibot.strategies.strategy.Strategy.portfolio_value"]], "pytz (lumibot.strategies.strategy.strategy property)": [[176, "lumibot.strategies.strategy.Strategy.pytz"], [181, "lumibot.strategies.strategy.Strategy.pytz"], [191, "lumibot.strategies.strategy.Strategy.pytz"]], "quote_asset (lumibot.strategies.strategy.strategy property)": [[177, "lumibot.strategies.strategy.Strategy.quote_asset"], [192, "lumibot.strategies.strategy.Strategy.quote_asset"]], "sleeptime (lumibot.strategies.strategy.strategy property)": [[178, "lumibot.strategies.strategy.Strategy.sleeptime"], [193, "lumibot.strategies.strategy.Strategy.sleeptime"]], "timezone (lumibot.strategies.strategy.strategy property)": [[179, "lumibot.strategies.strategy.Strategy.timezone"], [194, "lumibot.strategies.strategy.Strategy.timezone"]], "unspent_money (lumibot.strategies.strategy.strategy property)": [[180, "lumibot.strategies.strategy.Strategy.unspent_money"], [195, "lumibot.strategies.strategy.Strategy.unspent_money"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["backtesting", "backtesting.backtesting_function", "backtesting.how_to_backtest", "backtesting.indicators_files", "backtesting.logs_csv", "backtesting.pandas", "backtesting.polygon", "backtesting.tearsheet_html", "backtesting.thetadata", "backtesting.trades_files", "backtesting.yahoo", "brokers", "brokers.alpaca", "brokers.ccxt", "brokers.interactive_brokers", "brokers.interactive_brokers_legacy", "brokers.tradier", "deployment", "entities", "entities.asset", "entities.bars", "entities.data", "entities.order", "entities.position", "entities.trading_fee", "getting_started", "index", "lifecycle_methods", "lifecycle_methods.after_market_closes", "lifecycle_methods.before_market_closes", "lifecycle_methods.before_market_opens", "lifecycle_methods.before_starting_trading", "lifecycle_methods.initialize", "lifecycle_methods.on_abrupt_closing", "lifecycle_methods.on_bot_crash", "lifecycle_methods.on_canceled_order", "lifecycle_methods.on_filled_order", "lifecycle_methods.on_new_order", "lifecycle_methods.on_parameters_updated", "lifecycle_methods.on_partially_filled_order", "lifecycle_methods.on_trading_iteration", "lifecycle_methods.summary", "lifecycle_methods.trace_stats", "lumibot.backtesting", "lumibot.data_sources", "lumibot.strategies", "lumibot.traders", "strategy_methods", "strategy_methods.account", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_cash", "strategy_methods.account/strategies.strategy.Strategy.get_parameters", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value", "strategy_methods.account/strategies.strategy.Strategy.get_position", "strategy_methods.account/strategies.strategy.Strategy.get_positions", "strategy_methods.account/strategies.strategy.Strategy.set_parameters", "strategy_methods.chart", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df", "strategy_methods.chart/strategies.strategy.Strategy.add_line", "strategy_methods.chart/strategies.strategy.Strategy.add_marker", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df", "strategy_methods.data", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars", "strategy_methods.datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone", "strategy_methods.misc", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters", "strategy_methods.misc/strategies.strategy.Strategy.log_message", "strategy_methods.misc/strategies.strategy.Strategy.set_market", "strategy_methods.misc/strategies.strategy.Strategy.sleep", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration", "strategy_methods.options", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.options/strategies.strategy.Strategy.get_chain", "strategy_methods.options/strategies.strategy.Strategy.get_chains", "strategy_methods.options/strategies.strategy.Strategy.get_expiration", "strategy_methods.options/strategies.strategy.Strategy.get_greeks", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date", "strategy_methods.options/strategies.strategy.Strategy.get_strikes", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date", "strategy_methods.orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders", "strategy_methods.orders/strategies.strategy.Strategy.create_order", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total", "strategy_methods.orders/strategies.strategy.Strategy.get_order", "strategy_methods.orders/strategies.strategy.Strategy.get_orders", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order", "strategy_methods.orders/strategies.strategy.Strategy.sell_all", "strategy_methods.orders/strategies.strategy.Strategy.submit_order", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders", "strategy_methods.parameters", "strategy_properties", "strategy_properties/lumibot.strategies.strategy.Strategy.cash", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/lumibot.strategies.strategy.Strategy.name", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money", "strategy_properties/lumibot.strategies.strategy.pytz", "strategy_properties/strategies.strategy.Strategy.cash", "strategy_properties/strategies.strategy.Strategy.first_iteration", "strategy_properties/strategies.strategy.Strategy.initial_budget", "strategy_properties/strategies.strategy.Strategy.is_backtesting", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening", "strategy_properties/strategies.strategy.Strategy.name", "strategy_properties/strategies.strategy.Strategy.portfolio_value", "strategy_properties/strategies.strategy.Strategy.pytz", "strategy_properties/strategies.strategy.Strategy.quote_asset", "strategy_properties/strategies.strategy.Strategy.sleeptime", "strategy_properties/strategies.strategy.Strategy.timezone", "strategy_properties/strategies.strategy.Strategy.unspent_money", "vars"], "filenames": ["backtesting.rst", "backtesting.backtesting_function.rst", "backtesting.how_to_backtest.rst", "backtesting.indicators_files.rst", "backtesting.logs_csv.rst", "backtesting.pandas.rst", "backtesting.polygon.rst", "backtesting.tearsheet_html.rst", "backtesting.thetadata.rst", "backtesting.trades_files.rst", "backtesting.yahoo.rst", "brokers.rst", "brokers.alpaca.rst", "brokers.ccxt.rst", "brokers.interactive_brokers.rst", "brokers.interactive_brokers_legacy.rst", "brokers.tradier.rst", "deployment.rst", "entities.rst", "entities.asset.rst", "entities.bars.rst", "entities.data.rst", "entities.order.rst", "entities.position.rst", "entities.trading_fee.rst", "getting_started.rst", "index.rst", "lifecycle_methods.rst", "lifecycle_methods.after_market_closes.rst", "lifecycle_methods.before_market_closes.rst", "lifecycle_methods.before_market_opens.rst", "lifecycle_methods.before_starting_trading.rst", "lifecycle_methods.initialize.rst", "lifecycle_methods.on_abrupt_closing.rst", "lifecycle_methods.on_bot_crash.rst", "lifecycle_methods.on_canceled_order.rst", "lifecycle_methods.on_filled_order.rst", "lifecycle_methods.on_new_order.rst", "lifecycle_methods.on_parameters_updated.rst", "lifecycle_methods.on_partially_filled_order.rst", "lifecycle_methods.on_trading_iteration.rst", "lifecycle_methods.summary.rst", "lifecycle_methods.trace_stats.rst", "lumibot.backtesting.rst", "lumibot.data_sources.rst", "lumibot.strategies.rst", "lumibot.traders.rst", "strategy_methods.rst", "strategy_methods.account.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/lumibot.strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_cash.rst", "strategy_methods.account/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.account/strategies.strategy.Strategy.get_portfolio_value.rst", "strategy_methods.account/strategies.strategy.Strategy.get_position.rst", "strategy_methods.account/strategies.strategy.Strategy.get_positions.rst", "strategy_methods.account/strategies.strategy.Strategy.set_parameters.rst", "strategy_methods.chart.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/lumibot.strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_line.rst", "strategy_methods.chart/strategies.strategy.Strategy.add_marker.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_lines_df.rst", "strategy_methods.chart/strategies.strategy.Strategy.get_markers_df.rst", "strategy_methods.data.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.cancel_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_price.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_last_prices.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_quote.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_realtime_bars.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividend.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.get_yesterday_dividends.rst", "strategy_methods.data/lumibot.strategies.strategy.Strategy.start_realtime_bars.rst", "strategy_methods.datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/lumibot.strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_datetime_range.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_last_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_day.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_round_minute.rst", "strategy_methods.datetime/strategies.strategy.Strategy.get_timestamp.rst", "strategy_methods.datetime/strategies.strategy.Strategy.localize_datetime.rst", "strategy_methods.datetime/strategies.strategy.Strategy.to_default_timezone.rst", "strategy_methods.misc.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/lumibot.strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_close.rst", "strategy_methods.misc/strategies.strategy.Strategy.await_market_to_open.rst", "strategy_methods.misc/strategies.strategy.Strategy.get_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.log_message.rst", "strategy_methods.misc/strategies.strategy.Strategy.set_market.rst", "strategy_methods.misc/strategies.strategy.Strategy.sleep.rst", "strategy_methods.misc/strategies.strategy.Strategy.update_parameters.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_order_registration.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_execution.rst", "strategy_methods.misc/strategies.strategy.Strategy.wait_for_orders_registration.rst", "strategy_methods.options.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chain.rst", "strategy_methods.options/strategies.strategy.Strategy.get_chains.rst", "strategy_methods.options/strategies.strategy.Strategy.get_expiration.rst", "strategy_methods.options/strategies.strategy.Strategy.get_greeks.rst", "strategy_methods.options/strategies.strategy.Strategy.get_multiplier.rst", "strategy_methods.options/strategies.strategy.Strategy.get_next_trading_day.rst", "strategy_methods.options/strategies.strategy.Strategy.get_option_expiration_after_date.rst", "strategy_methods.options/strategies.strategy.Strategy.get_strikes.rst", "strategy_methods.options/strategies.strategy.Strategy.options_expiry_to_datetime_date.rst", "strategy_methods.orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/lumibot.strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_open_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.cancel_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.create_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_asset_potential_total.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_orders.rst", "strategy_methods.orders/strategies.strategy.Strategy.get_selling_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.sell_all.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_order.rst", "strategy_methods.orders/strategies.strategy.Strategy.submit_orders.rst", "strategy_methods.parameters.rst", "strategy_properties.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.cash.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.name.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.pytz.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.timezone.rst", "strategy_properties/lumibot.strategies.strategy.Strategy.unspent_money.rst", "strategy_properties/lumibot.strategies.strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.cash.rst", "strategy_properties/strategies.strategy.Strategy.first_iteration.rst", "strategy_properties/strategies.strategy.Strategy.initial_budget.rst", "strategy_properties/strategies.strategy.Strategy.is_backtesting.rst", "strategy_properties/strategies.strategy.Strategy.last_on_trading_iteration_datetime.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_closing.rst", "strategy_properties/strategies.strategy.Strategy.minutes_before_opening.rst", "strategy_properties/strategies.strategy.Strategy.name.rst", "strategy_properties/strategies.strategy.Strategy.portfolio_value.rst", "strategy_properties/strategies.strategy.Strategy.pytz.rst", "strategy_properties/strategies.strategy.Strategy.quote_asset.rst", "strategy_properties/strategies.strategy.Strategy.sleeptime.rst", "strategy_properties/strategies.strategy.Strategy.timezone.rst", "strategy_properties/strategies.strategy.Strategy.unspent_money.rst", "vars.rst"], "titles": ["Backtesting", "Backtesting Function", "How To Backtest", "Indicators Files", "Logs CSV", "Pandas (CSV or other data)", "Polygon.io Backtesting", "Tearsheet HTML", "ThetaData Backtesting", "Trades Files", "Yahoo", "Brokers", "Alpaca", "Crypto Brokers (Using CCXT)", "Interactive Brokers", "Interactive Brokers Legacy", "Tradier", "Deployment Guide", "Entities", "Asset", "Bars", "Data", "Order", "Position", "Trading Fee", "What is Lumibot?", "Lumibot: Backtesting and Algorithmic Trading Library", "Lifecycle Methods", "def after_market_closes", "def before_market_closes", "def before_market_opens", "def before_starting_trading", "def initialize", "def on_abrupt_closing", "def on_bot_crash", "def on_canceled_order", "def on_filled_order", "def on_new_order", "def on_parameters_updated", "def on_partially_filled_order", "def on_trading_iteration", "Summary", "def trace_stats", "Backtesting", "Data Sources", "Strategies", "Traders", "Strategy Methods", "Account Management", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "self.get_cash", "self.get_parameters", "self.get_portfolio_value", "self.get_position", "self.get_positions", "self.set_parameters", "Chart Functions", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "self.add_line", "self.add_marker", "self.get_lines_df", "self.get_markers_df", "Data", "self.cancel_realtime_bars", "self.get_historical_prices", "self.get_historical_prices_for_assets", "self.get_last_price", "self.get_last_prices", "self.get_next_trading_day", "self.get_quote", "self.get_realtime_bars", "self.get_yesterday_dividend", "self.get_yesterday_dividends", "self.start_realtime_bars", "DateTime", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "self.get_datetime", "self.get_datetime_range", "self.get_last_day", "self.get_last_minute", "self.get_round_day", "self.get_round_minute", "self.get_timestamp", "self.localize_datetime", "self.to_default_timezone", "Miscellaneous", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "self.await_market_to_close", "self.await_market_to_open", "self.get_parameters", "self.log_message", "self.set_market", "self.sleep", "self.update_parameters", "self.wait_for_order_execution", "self.wait_for_order_registration", "self.wait_for_orders_execution", "self.wait_for_orders_registration", "Options", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_strikes", "self.options_expiry_to_datetime_date", "self.get_chain", "self.get_chains", "self.get_expiration", "self.get_greeks", "self.get_multiplier", "self.get_next_trading_day", "self.get_option_expiration_after_date", "self.get_strikes", "self.options_expiry_to_datetime_date", "Order Management", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "self.cancel_open_orders", "self.cancel_order", "self.cancel_orders", "self.create_order", "self.get_asset_potential_total", "self.get_order", "self.get_orders", "self.get_selling_order", "self.sell_all", "self.submit_order", "self.submit_orders", "Parameters", "Strategy Properties", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "self.pytz", "self.cash", "self.first_iteration", "self.initial_budget", "self.is_backtesting", "self.last_on_trading_iteration_datetime", "self.minutes_before_closing", "self.minutes_before_opening", "self.name", "self.portfolio_value", "self.pytz", "self.quote_asset", "self.sleeptime", "self.timezone", "self.unspent_money", "Variable Backup & Restore"], "terms": {"lumibot": [0, 1, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 22, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165], "ha": [0, 7, 15, 20, 22, 26, 35, 36, 37, 39, 45, 71, 74, 78, 196], "three": [0, 15, 20, 22], "mode": [0, 15, 17, 43, 170, 185], "yahoo": [0, 1, 2, 5, 20, 26, 72, 73, 106, 117], "daili": [0, 2, 5, 7, 10, 31, 72, 73], "stock": [0, 1, 2, 5, 6, 8, 9, 10, 12, 17, 19, 20, 21, 22, 23, 26, 32, 44, 106, 117, 126, 134, 146, 152, 157, 163], "data": [0, 1, 3, 6, 8, 10, 11, 13, 18, 19, 20, 23, 26, 30, 31, 40, 45, 47, 62, 66, 71, 72, 73, 78, 81, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "panda": [0, 2, 10, 20, 21, 26, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 78, 106, 117], "intra": [0, 5, 10], "dai": [0, 1, 2, 5, 6, 8, 10, 17, 21, 22, 26, 30, 31, 32, 40, 44, 72, 73, 76, 79, 80, 84, 85, 86, 87, 93, 94, 95, 96, 130, 138, 146, 153, 157, 164, 178, 193], "inter": [0, 5], "test": [0, 2, 15, 17], "futur": [0, 5, 12, 14, 17, 19, 20, 26, 43, 44, 74, 146, 147, 152, 157, 158, 163, 180, 195], "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 76, 82, 101, 105, 107, 116, 118, 127, 128, 129, 130, 131, 135, 136, 137, 138, 140, 142, 146, 157, 165, 166, 167, 177, 178, 180, 182, 192, 193, 195, 196], "csv": [0, 2, 3, 9, 21, 26, 44], "suppli": [0, 10, 21], "you": [0, 1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 20, 22, 25, 26, 29, 32, 44, 47, 48, 49, 51, 55, 57, 61, 62, 66, 70, 72, 73, 82, 101, 124, 142, 146, 157, 165, 166, 178, 193], "polygon": [0, 1, 5, 8, 10, 17, 26], "io": [0, 13, 20, 26], "It": [0, 4, 5, 6, 7, 8, 13, 14, 15, 17, 19, 22, 23, 25, 26, 41, 43, 44, 74, 77, 146, 157], "i": [0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 26, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 77, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 102, 103, 106, 113, 114, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 147, 149, 151, 153, 157, 158, 160, 162, 164, 166, 167, 168, 170, 172, 173, 177, 178, 182, 183, 185, 187, 188, 192, 193, 196], "recommend": [0, 15, 17, 25], "option": [0, 2, 6, 8, 9, 12, 14, 16, 17, 19, 20, 22, 26, 32, 36, 39, 41, 43, 44, 47, 72, 74, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 146, 152, 157, 163], "crypto": [0, 1, 5, 7, 11, 17, 19, 20, 23, 26, 49, 51, 55, 57, 72, 74, 106, 117, 146, 152, 153, 157, 163, 164, 167, 175, 182, 190], "forex": [0, 2, 5, 6, 8, 12, 17, 19, 26, 44, 73, 74, 146, 152, 153, 157, 163, 164], "an": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 16, 17, 19, 22, 23, 26, 34, 35, 36, 39, 40, 41, 43, 44, 52, 58, 72, 74, 75, 81, 102, 103, 105, 113, 114, 116, 126, 127, 131, 132, 134, 135, 140, 141, 144, 146, 147, 148, 152, 155, 157, 158, 159, 163, 165, 178, 193, 196], "advanc": [0, 2, 5, 25, 26, 146, 157], "featur": [0, 2, 6, 8, 26], "allow": [0, 2, 4, 5, 6, 8, 14, 17, 20, 22, 25, 26, 81, 146, 157, 165], "ani": [0, 1, 2, 5, 6, 7, 8, 10, 13, 14, 15, 17, 21, 22, 25, 41, 43, 62, 66, 72, 73, 105, 116, 145, 156, 165], "type": [0, 1, 2, 5, 12, 14, 18, 19, 20, 21, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "have": [0, 1, 2, 5, 6, 8, 10, 14, 16, 17, 20, 22, 23, 25, 26, 28, 43, 47, 49, 51, 55, 57, 72, 78], "format": [0, 5, 19, 21, 44, 76, 125, 126, 130, 132, 133, 134, 138, 141], "requir": [0, 1, 2, 10, 13, 14, 15, 17, 19, 22, 74, 75, 146, 153, 157, 164], "more": [0, 2, 3, 11, 13, 14, 16, 17, 18, 20, 25, 26, 43, 44, 47, 70, 72, 101, 124, 128, 136, 142], "work": [0, 2, 5, 11, 15, 17, 25, 26, 72, 73, 77, 166], "setup": [0, 2, 11, 26], "most": [0, 5, 7, 14, 17, 20, 25, 41, 72, 78, 128, 136], "user": [0, 2, 5, 10, 14, 17, 21, 25, 27, 41, 45, 46, 144, 146, 155, 157, 196], "when": [0, 1, 2, 5, 6, 8, 13, 14, 17, 19, 20, 22, 25, 26, 27, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 62, 63, 66, 67, 82, 146, 157, 167, 172, 182, 187, 196], "run": [0, 5, 6, 8, 10, 11, 12, 14, 17, 21, 26, 30, 32, 33, 34, 37, 44, 46, 81, 102, 103, 113, 114, 143, 145, 154, 156, 170, 185], "sever": [0, 2, 10, 11, 45, 165], "import": [0, 1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 26, 41, 42, 44, 45, 63, 67, 73, 80, 146, 152, 153, 157, 163, 164, 165], "ar": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 38, 41, 44, 45, 47, 48, 53, 59, 61, 62, 63, 66, 67, 70, 73, 78, 81, 82, 101, 106, 117, 124, 125, 126, 128, 133, 134, 136, 142, 143, 146, 147, 149, 151, 153, 154, 157, 158, 160, 162, 164, 165, 167, 182, 196], "each": [0, 1, 2, 3, 5, 7, 9, 13, 14, 20, 22, 26, 30, 32, 40, 41, 44, 45, 47, 53, 59, 72, 80, 126, 134, 149, 151, 160, 162, 196], "prefix": [0, 105, 116], "strategi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "name": [0, 1, 5, 10, 14, 17, 19, 21, 25, 26, 32, 44, 46, 62, 63, 66, 67, 74, 105, 116, 165, 196], "date": [0, 1, 2, 5, 6, 8, 10, 19, 21, 26, 32, 44, 74, 76, 82, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 141, 146, 157], "These": [0, 1, 2, 3, 4, 7, 10, 32, 45, 54, 60, 82], "provid": [0, 2, 4, 5, 6, 8, 9, 17, 20, 21, 44, 74, 75, 131, 140, 144, 145, 155, 156], "detail": [0, 2, 3, 4, 9, 14, 17, 19, 72, 148, 159], "insight": [0, 2], "perform": [0, 2, 3, 7, 17, 26, 41], "behavior": [0, 2], "how": [0, 3, 11, 12, 13, 17, 25, 26, 45, 72, 81, 166], "To": [0, 6, 8, 10, 13, 14, 16, 17, 22, 25, 26, 72], "instal": [0, 5, 10, 13, 15, 17], "choos": [0, 15, 26], "sourc": [0, 5, 8, 13, 20, 83, 89, 90, 91, 92, 98, 99, 100, 176, 179, 181, 191, 194], "tearsheet": [0, 1, 26, 46], "html": [0, 1, 3, 9, 20, 26], "trade": [0, 1, 4, 5, 10, 11, 13, 15, 17, 18, 19, 20, 21, 22, 27, 30, 31, 32, 33, 40, 41, 43, 44, 45, 52, 58, 73, 74, 76, 78, 81, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 126, 130, 134, 138, 146, 157, 171, 186, 196], "indic": [0, 1, 5, 13, 46, 52, 53, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 153, 164], "conclus": [0, 26], "function": [0, 2, 3, 13, 17, 21, 26, 32, 38, 41, 47, 48, 82, 142], "run_backtest": [0, 1, 2, 5, 6, 8, 10, 25], "other": [0, 2, 6, 8, 10, 13, 14, 15, 17, 20, 22, 25, 26, 41, 62, 66, 77, 101, 146, 157, 167, 182, 196], "In": [0, 6, 8, 13, 17, 22, 43, 74, 75, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98], "summari": [0, 6, 8, 26, 27], "thetadata": [0, 2, 26], "log": [0, 1, 2, 7, 10, 14, 15, 16, 17, 19, 26, 42, 101, 105, 116], "here": [1, 2, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 25, 26, 41, 165, 166], "descript": [1, 14, 17], "all": [1, 4, 5, 13, 17, 20, 21, 22, 25, 30, 33, 34, 43, 45, 46, 51, 53, 57, 59, 72, 73, 125, 127, 128, 129, 131, 133, 135, 136, 137, 140, 143, 145, 146, 149, 150, 151, 154, 156, 157, 160, 161, 162, 165, 196], "its": [1, 6, 8, 22, 42], "paramet": [1, 2, 6, 8, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 84, 87, 88, 90, 91, 93, 96, 97, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 150, 151, 152, 153, 154, 155, 156, 157, 158, 161, 162, 163, 164, 172, 187], "thi": [1, 2, 5, 6, 8, 9, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 49, 51, 55, 57, 62, 63, 66, 67, 72, 73, 74, 75, 77, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 107, 118, 146, 153, 157, 164, 167, 168, 177, 178, 182, 183, 192, 193], "true": [1, 5, 12, 13, 16, 17, 22, 24, 25, 26, 32, 43, 44, 46, 72, 73, 74, 105, 116, 151, 162, 168, 170, 183, 185], "kind": [1, 25], "do": [1, 5, 10, 13, 16, 20, 22, 25, 26, 38, 47, 101, 146, 157], "arg": [1, 21, 44], "minutes_before_clos": [1, 26, 29, 32, 40, 102, 113], "5": [1, 2, 5, 6, 8, 17, 26, 32, 44, 72, 73, 106, 107, 117, 118, 146, 157, 165, 172, 178, 187, 193, 196], "minutes_before_open": [1, 26, 30, 103, 114], "60": [1, 20, 173, 188], "sleeptim": [1, 2, 6, 8, 13, 25, 26, 32, 40, 107, 118], "1": [1, 2, 5, 6, 7, 8, 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 31, 44, 72, 73, 84, 90, 91, 93, 99, 100, 128, 136, 139, 146, 152, 153, 157, 163, 164, 178, 193, 196], "stats_fil": [1, 32], "none": [1, 12, 13, 17, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 43, 44, 46, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 66, 67, 71, 72, 73, 74, 75, 81, 84, 93, 102, 103, 105, 106, 107, 108, 113, 114, 116, 117, 118, 119, 128, 131, 136, 140, 143, 144, 145, 146, 148, 150, 151, 154, 155, 156, 157, 159, 161, 162], "risk_free_r": [1, 44, 128, 136], "logfil": [1, 46], "config": [1, 12, 13, 16, 17, 25, 43], "auto_adjust": [1, 44], "fals": [1, 12, 13, 16, 17, 22, 25, 26, 32, 43, 44, 46, 73, 74, 83, 92, 105, 116, 128, 136, 146, 151, 157, 162], "budget": [1, 5, 10, 17, 25, 32, 169, 184], "benchmark_asset": [1, 2, 6, 8, 25], "spy": [1, 2, 5, 6, 8, 19, 22, 25, 30, 31, 32, 36, 40, 44, 71, 72, 73, 74, 75, 79, 80, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 144, 146, 150, 152, 153, 155, 157, 161, 163, 164, 165], "plot_file_html": 1, "trades_fil": 1, "settings_fil": 1, "pandas_data": [1, 5, 25, 43, 44], "quote_asset": [1, 13, 19, 23, 26, 152, 153, 163, 164], "usd": [1, 19, 21, 72, 73, 74, 146, 152, 153, 157, 163, 164], "starting_posit": 1, "show_plot": [1, 46], "tearsheet_fil": 1, "save_tearsheet": [1, 46], "show_tearsheet": [1, 46], "buy_trading_fe": [1, 25], "sell_trading_fe": [1, 25], "api_kei": [1, 12, 25, 26, 43, 44], "polygon_api_kei": [1, 2, 17], "polygon_has_paid_subscript": 1, "indicators_fil": 1, "show_ind": [1, 46], "save_logfil": 1, "kwarg": [1, 12, 19, 21, 43, 44, 153, 164], "datasource_class": 1, "class": [1, 2, 5, 6, 8, 10, 12, 13, 16, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 165, 196], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 27, 28, 34, 35, 36, 37, 38, 39, 41, 43, 44, 45, 49, 50, 51, 54, 55, 56, 57, 60, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 104, 106, 108, 115, 117, 119, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 139, 140, 146, 147, 150, 151, 153, 157, 158, 161, 162, 164, 165, 167, 169, 171, 172, 173, 174, 175, 176, 177, 179, 181, 182, 184, 186, 187, 188, 189, 190, 191, 192, 194], "datasourc": [1, 8, 43, 44], "For": [1, 2, 3, 5, 7, 10, 13, 14, 17, 19, 20, 22, 26, 28, 44, 49, 51, 55, 57, 109, 110, 111, 112, 120, 121, 122, 123, 146, 152, 153, 157, 163, 164, 165], "exampl": [1, 2, 6, 8, 11, 12, 15, 19, 20, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 52, 53, 58, 59, 62, 63, 66, 67, 71, 72, 73, 74, 75, 79, 80, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 105, 106, 107, 109, 110, 111, 112, 113, 114, 116, 117, 118, 120, 121, 122, 123, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 196], "want": [1, 2, 5, 8, 10, 12, 13, 16, 17, 25, 26, 41, 44, 62, 66], "financ": [1, 2, 10, 26], "would": [1, 2, 5, 16, 19, 25, 26, 44, 51, 57, 146, 157, 178, 193], "pass": [1, 2, 5, 8, 10, 18, 22, 28, 36, 40, 41, 45, 102, 103, 113, 114, 128, 136, 146, 157], "yahoodatabacktest": [1, 10, 25, 26, 32], "backtesting_start": [1, 2, 5, 6, 8, 10, 25, 26, 32, 43], "datetim": [1, 2, 5, 6, 8, 10, 13, 19, 20, 21, 25, 26, 32, 43, 44, 47, 62, 63, 66, 67, 72, 76, 78, 81, 83, 84, 90, 91, 92, 93, 99, 100, 127, 130, 132, 135, 138, 139, 141, 146, 157, 171, 186], "start": [1, 2, 5, 6, 7, 8, 10, 11, 13, 17, 20, 21, 30, 32, 44, 72, 73, 78, 81, 102, 113, 173, 188], "period": [1, 2, 5, 7, 13, 21, 81, 196], "backtesting_end": [1, 2, 5, 6, 8, 10, 25, 26, 32], "end": [1, 2, 6, 7, 8, 10, 14, 20, 21, 26, 42], "int": [1, 12, 19, 20, 21, 22, 36, 39, 44, 62, 63, 66, 67, 72, 73, 81, 84, 85, 86, 87, 88, 89, 93, 94, 95, 96, 97, 98, 102, 103, 113, 114, 146, 147, 157, 158, 172, 173, 178, 187, 188, 193], "number": [1, 12, 15, 16, 17, 21, 22, 29, 32, 44, 72, 73, 84, 87, 88, 93, 96, 97, 146, 157, 172, 173, 178, 187, 188, 193], "minut": [1, 5, 13, 17, 20, 21, 25, 26, 29, 30, 32, 40, 43, 44, 72, 73, 84, 86, 88, 93, 95, 97, 102, 103, 113, 114, 172, 173, 178, 187, 188, 193], "befor": [1, 2, 5, 7, 10, 13, 14, 15, 17, 20, 22, 25, 26, 29, 30, 31, 32, 40, 41, 42, 44, 72, 73, 102, 103, 113, 114, 151, 162, 172, 173, 187, 188, 196], "close": [1, 5, 12, 13, 20, 21, 22, 28, 29, 32, 33, 40, 43, 51, 57, 72, 74, 75, 78, 81, 102, 103, 113, 114, 151, 162, 172, 187], "method": [1, 6, 8, 15, 19, 20, 22, 23, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 70, 101, 124, 125, 127, 129, 131, 133, 135, 137, 140, 165, 168, 172, 173, 178, 183, 187, 188, 193, 196], "call": [1, 5, 6, 8, 19, 20, 22, 28, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 72, 74, 75, 125, 126, 128, 133, 134, 136, 152, 163], "open": [1, 2, 5, 12, 17, 20, 21, 22, 25, 29, 30, 31, 40, 43, 63, 67, 72, 78, 81, 102, 103, 113, 114, 143, 144, 145, 149, 151, 154, 155, 156, 160, 162, 173, 188], "second": [1, 12, 22, 32, 40, 43, 73, 81, 101, 107, 118, 178, 193], "sleep": [1, 2, 26, 40, 47, 101, 102, 113, 178, 193], "between": [1, 2, 13, 20, 21, 26, 32, 72, 178, 193], "iter": [1, 2, 6, 8, 13, 21, 32, 40, 41, 168, 171, 183, 186, 196], "str": [1, 19, 20, 21, 22, 23, 44, 52, 58, 62, 63, 66, 67, 72, 73, 74, 75, 76, 84, 93, 105, 106, 116, 117, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 141, 146, 153, 157, 164, 174, 178, 179, 189, 193, 194], "file": [1, 4, 5, 7, 14, 15, 17, 25, 26, 101, 105, 116, 165, 196], "write": [1, 2, 6, 8], "stat": [1, 28, 42], "float": [1, 5, 19, 20, 22, 23, 36, 39, 43, 44, 49, 51, 55, 57, 62, 63, 66, 67, 74, 75, 79, 80, 102, 103, 107, 113, 114, 118, 128, 131, 136, 140, 146, 147, 153, 157, 158, 164, 167, 169, 175, 182, 184, 190], "risk": [1, 7, 14, 25, 128, 136], "free": [1, 2, 6, 8, 17, 23, 26, 128, 136], "rate": [1, 6, 8, 20, 128, 136], "dict": [1, 21, 38, 42, 44, 46, 50, 54, 56, 60, 77, 104, 108, 115, 119, 146, 157], "set": [1, 2, 6, 8, 11, 14, 15, 16, 17, 19, 20, 21, 22, 25, 26, 29, 32, 43, 44, 54, 60, 72, 73, 78, 106, 117, 125, 133, 146, 157, 165, 166, 172, 173, 178, 187, 188, 193, 196], "up": [1, 2, 5, 6, 11, 14, 15, 17, 19, 25, 26, 63, 67, 196], "broker": [1, 5, 12, 16, 19, 20, 22, 23, 24, 25, 26, 32, 35, 36, 37, 39, 45, 72, 73, 74, 77, 81, 109, 110, 111, 112, 120, 121, 122, 123, 128, 136, 146, 152, 153, 157, 163, 164, 167, 182], "live": [1, 2, 12, 14, 15, 17, 20, 25, 43, 44, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117], "bool": [1, 22, 43, 44, 46, 72, 73, 74, 105, 116, 128, 136, 153, 164, 168, 170, 183, 185], "whether": [1, 17, 22, 44, 46, 72, 82, 128, 136, 146, 157], "automat": [1, 6, 8, 22, 146, 147, 157, 158, 196], "adjust": [1, 7, 14, 20, 21, 44], "initi": [1, 2, 6, 8, 13, 15, 25, 26, 27, 41, 106, 117, 165, 169, 172, 173, 178, 184, 187, 188, 193], "asset": [1, 2, 5, 9, 12, 13, 17, 18, 20, 21, 22, 23, 26, 33, 34, 35, 36, 37, 39, 40, 43, 44, 49, 51, 52, 53, 55, 57, 58, 59, 62, 66, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 147, 152, 153, 157, 158, 163, 164, 167, 177, 182, 192], "benchmark": [1, 2, 7], "compar": [1, 7, 14, 17], "If": [1, 5, 6, 8, 12, 13, 14, 16, 17, 20, 21, 25, 26, 30, 32, 36, 40, 44, 72, 73, 74, 81, 102, 103, 105, 113, 114, 116, 131, 140, 143, 146, 151, 154, 157, 162], "string": [1, 17, 19, 20, 21, 22, 44, 72, 73, 105, 116, 132, 141, 146, 157, 178, 193, 196], "convert": [1, 19, 20, 22, 26, 43, 44, 132, 141, 146, 157], "object": [1, 5, 10, 12, 18, 19, 20, 21, 22, 23, 24, 35, 36, 37, 39, 43, 44, 46, 52, 53, 58, 59, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 109, 110, 111, 112, 120, 121, 122, 123, 126, 131, 134, 140, 144, 145, 146, 147, 148, 149, 152, 153, 155, 156, 157, 158, 159, 160, 163, 164, 176, 181, 191, 196], "plot": [1, 10, 46, 63, 67], "list": [1, 2, 13, 18, 19, 20, 23, 25, 31, 43, 44, 47, 48, 53, 59, 61, 70, 73, 75, 80, 82, 84, 93, 101, 106, 111, 112, 117, 122, 123, 124, 127, 129, 131, 135, 137, 140, 142, 145, 149, 153, 156, 160, 164, 166], "A": [1, 5, 7, 10, 12, 14, 22, 26, 44, 46, 52, 53, 58, 59, 77, 84, 93, 146, 153, 157, 164, 196], "pandasdatabacktest": [1, 5, 25], "contain": [1, 3, 20, 21, 22, 40, 42, 78, 152, 153, 163, 164], "cryptocurr": [1, 2, 6, 8, 13, 17, 20, 72, 73, 74, 75, 146, 157], "get": [1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 17, 18, 20, 21, 22, 30, 31, 33, 38, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 70, 72, 73, 75, 77, 79, 80, 82, 104, 115, 124, 147, 148, 149, 150, 158, 159, 160, 161, 165, 166, 167, 172, 173, 175, 178, 182, 187, 188, 190, 193, 196], "valuat": 1, "measur": [1, 7], "overal": [1, 7], "porfolio": 1, "valu": [1, 3, 5, 9, 12, 13, 14, 17, 19, 20, 21, 23, 28, 43, 45, 46, 48, 49, 51, 55, 57, 61, 62, 63, 66, 67, 72, 73, 128, 136, 153, 164, 175, 190, 196], "usual": [1, 47, 178, 193], "usdt": [1, 19, 49, 51, 55, 57, 72, 74, 146, 157], "usdc": 1, "dictionari": [1, 5, 8, 16, 36, 42, 43, 44, 46, 73, 77, 125, 126, 127, 128, 129, 131, 133, 134, 135, 136, 137, 140, 146, 157, 165], "posit": [1, 13, 18, 22, 26, 36, 39, 43, 45, 51, 52, 53, 57, 58, 59, 147, 150, 151, 158, 161, 162, 167, 175, 182, 190], "100": [1, 5, 12, 13, 16, 19, 20, 25, 26, 32, 42, 44, 72, 73, 109, 110, 111, 112, 120, 121, 122, 123, 125, 126, 128, 133, 134, 136, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164], "200": [1, 12, 36, 44, 73, 111, 112, 122, 123, 153, 164], "aapl": [1, 2, 5, 6, 8, 10, 12, 16, 19, 20, 23, 26, 32, 35, 36, 37, 39, 72, 73, 145, 156], "show": [1, 7, 52, 53, 58, 59, 147, 148, 149, 158, 159, 160], "save": [1, 5, 10, 17, 25, 46, 196], "must": [1, 2, 5, 6, 8, 10, 12, 16, 21, 22, 41, 72, 73, 131, 140, 146, 157], "within": [1, 17, 18, 107, 118, 143, 154], "tradingfe": [1, 24, 25, 26], "appli": [1, 17, 44], "bui": [1, 2, 5, 6, 7, 8, 9, 10, 12, 13, 16, 19, 22, 25, 26, 36, 40, 45, 49, 55, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 144, 145, 146, 152, 153, 155, 156, 157, 163, 164, 167, 182], "order": [1, 2, 5, 6, 8, 9, 10, 12, 13, 18, 19, 23, 25, 26, 29, 30, 35, 36, 37, 39, 40, 41, 43, 47, 105, 109, 110, 111, 112, 116, 120, 121, 122, 123, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 182], "dure": [1, 2, 4, 7, 17, 45, 73], "sell": [1, 7, 9, 22, 23, 29, 33, 34, 36, 40, 43, 45, 146, 150, 151, 152, 153, 157, 161, 162, 163, 164], "api": [1, 2, 6, 8, 10, 12, 13, 14, 15, 16, 17, 20, 26, 128, 136], "kei": [1, 2, 3, 5, 6, 8, 12, 14, 15, 16, 17, 21, 26, 46, 128, 136, 165, 196], "onli": [1, 5, 10, 13, 14, 15, 17, 19, 20, 21, 22, 23, 25, 26, 32, 41, 43, 44, 46, 72, 73, 74, 77, 81, 128, 136, 143, 153, 154, 164, 172, 187], "polygondatabacktest": [1, 2, 6, 8], "deprec": [1, 15, 146, 157, 180, 195], "pleas": [1, 2, 5, 6, 8, 10, 13, 15, 22, 72, 180, 195], "instead": [1, 5, 17, 20, 43, 107, 118, 128, 136, 180, 195], "paid": [1, 2, 167, 182], "subscript": [1, 11, 26], "default": [1, 5, 10, 17, 19, 20, 21, 32, 34, 44, 45, 54, 60, 62, 63, 66, 67, 72, 73, 74, 76, 91, 100, 106, 117, 125, 127, 128, 129, 130, 133, 135, 136, 137, 138, 146, 151, 153, 157, 162, 164, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194, 196], "return": [1, 7, 12, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194], "from": [1, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 25, 26, 41, 42, 44, 45, 72, 73, 76, 80, 125, 126, 127, 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, 140, 146, 152, 153, 157, 163, 164, 196], "simpl": [1, 5, 6, 8, 10, 16, 22, 26, 146, 157], "first": [1, 5, 6, 8, 10, 13, 16, 17, 20, 21, 22, 25, 26, 30, 32, 73, 168, 178, 183, 193, 196], "mystrategi": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 165], "def": [1, 2, 5, 6, 8, 10, 12, 13, 16, 25, 26, 27, 41, 106, 117, 165, 172, 173, 178, 187, 188, 193, 196], "on_trading_iter": [1, 2, 5, 6, 8, 10, 13, 16, 25, 26, 27, 28, 41, 42, 47, 102, 103, 113, 114, 165, 168, 172, 178, 183, 187, 193, 196], "self": [1, 2, 5, 6, 8, 10, 12, 13, 14, 16, 17, 19, 20, 22, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 47, 165], "first_iter": [1, 2, 5, 6, 8, 10, 26], "create_ord": [1, 2, 5, 6, 8, 10, 12, 13, 19, 22, 25, 26, 40, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 152, 153, 155, 156, 163, 164], "quantiti": [1, 2, 6, 7, 8, 10, 12, 13, 22, 23, 25, 26, 36, 39, 52, 53, 58, 59, 146, 157], "side": [1, 2, 6, 8, 12, 22, 25, 36, 43, 146, 157], "submit_ord": [1, 2, 5, 6, 8, 10, 13, 19, 22, 25, 26, 40, 43, 47, 109, 110, 111, 112, 120, 121, 122, 123, 144, 145, 146, 150, 155, 156, 157, 161], "creat": [1, 2, 5, 6, 7, 8, 10, 13, 14, 16, 17, 19, 21, 22, 36, 72, 125, 127, 129, 131, 133, 135, 137, 140, 142, 144, 145, 146, 155, 156, 157], "2018": [1, 20], "31": [1, 5, 10, 25, 26, 44, 125, 126, 133, 134], "symbol": [1, 2, 5, 6, 8, 12, 13, 19, 20, 21, 22, 23, 25, 36, 44, 63, 67, 72, 73, 74, 146, 152, 153, 157, 163, 164], "qqq": 1, "asset_typ": [1, 5, 13, 19, 20, 44, 72, 73, 74, 146, 147, 152, 153, 157, 158, 163, 164], "vital": 2, "step": [2, 5, 14], "valid": [2, 19, 21, 22, 44, 125, 126, 133, 134, 146, 157], "your": [2, 5, 6, 7, 8, 10, 11, 12, 14, 15, 18, 20, 22, 40, 41, 47, 48, 49, 51, 55, 57, 61, 70, 82, 101, 146, 157, 165, 166, 178, 193, 196], "histor": [2, 6, 8, 12, 13, 20, 26, 43, 44, 70, 72, 73], "With": [2, 6, 8, 26], "can": [2, 5, 6, 8, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 29, 32, 41, 44, 45, 48, 49, 55, 61, 62, 63, 66, 67, 70, 72, 73, 82, 101, 124, 128, 136, 142, 146, 157, 165, 166, 178, 193], "across": [2, 17], "variou": [2, 6, 7, 8, 14], "even": [2, 6, 8, 30, 153, 164], "own": [2, 5, 6, 8, 12, 13, 16, 17, 23, 25, 26, 150, 161], "custom": [2, 25, 32, 146, 157, 165], "guid": [2, 13, 16, 25, 26], "walk": [2, 17], "through": [2, 13, 14, 17], "explain": 2, "introduc": 2, "why": [2, 26], "see": [2, 13, 14, 15, 17, 19, 20, 25, 26, 44, 48, 61, 70, 82, 101, 124, 142], "past": [2, 22, 25], "help": [2, 3, 6, 8, 25], "identifi": [2, 13, 19, 22, 148, 159], "weak": 2, "strength": 2, "deploi": [2, 26], "them": [2, 11, 17, 20, 22, 25, 26, 47, 48, 61, 70, 82, 101, 124, 142, 145, 156], "market": [2, 11, 12, 13, 17, 22, 25, 26, 28, 29, 30, 31, 32, 40, 43, 74, 75, 102, 103, 106, 109, 110, 111, 112, 113, 114, 117, 120, 121, 122, 123, 146, 151, 152, 153, 157, 162, 163, 164, 172, 173, 175, 187, 188, 190], "begin": [2, 43], "make": [2, 4, 5, 6, 8, 17, 22, 25, 26, 74, 75], "sure": [2, 6, 8, 25, 26], "machin": 2, "follow": [2, 5, 6, 8, 13, 14, 15, 17, 19, 20, 22, 26, 27, 30, 41, 78, 165, 178, 193], "command": [2, 25, 26], "pip": [2, 5, 10, 13, 25, 26], "upgrad": [2, 5, 10, 25, 26], "latest": [2, 5, 10, 13, 17, 25, 26, 72], "version": [2, 5, 7, 10, 17, 25, 26], "onc": [2, 14, 15, 16, 17, 22, 25, 26, 32, 41, 146, 157, 196], "id": [2, 15, 17, 148, 159, 196], "like": [2, 5, 17, 21, 25, 26, 29, 30, 31, 32, 33, 43, 165], "visual": [2, 3, 7, 25], "studio": 2, "code": [2, 5, 6, 7, 8, 13, 14, 17, 25, 26, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 62, 66, 102, 103, 113, 114, 165], "v": [2, 7, 19], "pycharm": 2, "quick": 2, "download": [2, 5, 6, 8, 25, 26], "offici": 2, "websit": [2, 7, 10, 13, 14, 16, 17], "http": [2, 6, 8, 12, 13, 14, 15, 16, 17, 20, 25, 26], "visualstudio": 2, "com": [2, 7, 15, 16, 17, 25, 26], "python": [2, 5, 25, 105, 116], "extens": 2, "go": [2, 5, 12, 15, 17, 25, 26], "search": [2, 26], "new": [2, 5, 7, 14, 17, 19, 20, 22, 26, 36, 37, 43, 54, 60, 146, 157, 167, 182], "project": [2, 6, 8, 17], "folder": [2, 5, 10, 13, 17], "termin": [2, 13, 25, 26], "re": [2, 11, 14, 17, 26, 82], "readi": [2, 14, 17, 41, 146, 157], "support": [2, 6, 7, 8, 13, 14, 17, 21, 25, 26, 44, 63, 67, 128, 136, 146, 157], "suit": [2, 26], "differ": [2, 3, 5, 7, 11, 13, 14, 17, 20, 25, 26, 45], "need": [2, 6, 8, 13, 14, 16, 17, 25, 27, 41, 43, 72, 73, 77], "": [2, 3, 6, 7, 8, 13, 14, 16, 17, 18, 21, 25, 26, 38, 41, 46, 52, 58, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 128, 136, 147, 158, 165, 178, 193, 196], "overview": 2, "avail": [2, 9, 10, 17, 20, 21, 23, 26, 47, 72, 73, 106, 117, 128, 136, 153, 164, 167, 182], "etf": [2, 10], "suitabl": [2, 17], "longer": 2, "term": 2, "ideal": [2, 17], "intradai": 2, "section": [2, 14, 17, 25, 47], "2": [2, 6, 17, 22, 30, 32, 62, 66, 72, 73, 111, 112, 122, 123, 153, 164, 178, 193], "offer": [2, 7, 14, 17, 26], "two": [2, 3, 11, 19, 22, 25, 26, 73, 145, 156], "year": [2, 6, 8], "plan": [2, 14, 17], "faster": [2, 6, 8], "retriev": [2, 19, 21, 74, 75, 78, 196], "coupon": [2, 6, 8], "lumi10": [2, 6], "10": [2, 6, 8, 13, 17, 19, 20, 32, 40, 44, 63, 67, 82, 127, 135, 152, 153, 163, 164, 165, 172, 173, 178, 187, 188, 193, 196], "off": [2, 6, 8], "3": [2, 12, 17, 146, 157], "design": [2, 17, 25, 27, 41], "look": [2, 5, 15, 26], "price": [2, 6, 8, 9, 13, 16, 17, 19, 20, 21, 22, 23, 31, 36, 39, 43, 44, 45, 47, 62, 63, 66, 67, 70, 72, 73, 74, 75, 78, 128, 136, 146, 152, 153, 157, 163, 164], "secur": [2, 5, 10, 14, 19, 22], "account": [2, 6, 8, 11, 12, 13, 15, 16, 17, 26, 43, 47, 49, 51, 53, 55, 57, 59, 61, 150, 161, 167, 182], "usernam": [2, 8, 11, 17, 26], "password": [2, 8, 13, 14, 17, 196], "net": [2, 8, 51, 57], "lumi": [2, 7, 8], "4": [2, 17, 26, 147, 158], "full": [2, 6, 8, 11, 14, 26, 125, 133], "flexibl": [2, 5, 6, 8, 25], "dataset": 2, "e": [2, 9, 17, 19, 20, 21, 22, 23, 25, 72, 73, 74, 146, 147, 152, 157, 158, 163], "g": [2, 9, 17, 20, 21, 22, 23, 25, 72, 73, 146, 157], "databas": [2, 5, 17, 26], "export": 2, "manual": [2, 14, 17], "configur": [2, 11, 15, 26], "ve": [2, 13, 16, 26], "select": [2, 14, 17], "built": [2, 5, 26], "addit": [2, 14, 17, 19, 22, 146, 157], "specif": [2, 7, 13, 14, 17, 19, 22, 41, 44, 62, 66, 109, 120, 125, 126, 133, 134, 146, 157, 166], "replac": [2, 6, 8, 13], "your_polygon_api_kei": [2, 6], "actual": [2, 13, 22, 41, 43, 175, 190], "1d": [2, 6, 8, 20, 21, 40, 44], "get_last_pric": [2, 6, 8, 10, 13, 16, 20, 21, 26, 44, 47], "qty": [2, 6, 8], "portfolio_valu": [2, 6, 8, 10, 13, 26, 28, 42, 177, 192], "__name__": [2, 6, 8, 13], "__main__": [2, 6, 8, 13], "2023": [2, 6, 8, 44, 125, 126, 133, 134, 196], "result": [2, 5, 6, 8, 10, 25, 26, 42], "inform": [2, 3, 5, 9, 10, 13, 17, 43, 44, 77, 78, 126, 131, 134, 140, 146, 157, 166], "about": [2, 9, 11, 26, 166], "refer": [2, 3, 17, 26, 27], "crucial": [2, 17, 25], "understand": [2, 4, 25], "aspect": 2, "execut": [2, 9, 17, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 102, 103, 107, 109, 111, 113, 114, 118, 120, 122, 143, 152, 154, 163, 172, 173, 178, 187, 188, 193], "statist": 2, "analysi": [2, 4, 13, 46], "tear": 2, "sheet": 2, "includ": [2, 3, 7, 9, 10, 13, 17, 19, 20, 26, 32, 41, 44, 54, 60, 72, 124, 146, 148, 157, 159, 175, 190], "equiti": [2, 14, 51, 57], "curv": 2, "metric": [2, 7], "sharp": [2, 7], "ratio": [2, 7], "drawdown": [2, 7], "comparison": 2, "everi": [2, 25, 32, 40, 43, 47, 81, 196], "which": [2, 6, 7, 8, 9, 13, 14, 17, 20, 21, 22, 32, 41, 49, 51, 55, 57, 74, 75, 76, 77, 128, 130, 136, 138, 178, 193], "wa": [2, 12, 13, 27, 30, 33, 34, 41, 43, 72, 167, 182], "timestamp": [2, 12, 20, 44, 62, 63, 66, 67, 85, 86, 87, 88, 89, 94, 95, 96, 97, 98, 196], "essenti": [2, 17], "review": [2, 14], "potenti": [2, 25, 26, 147, 158], "issu": 2, "optim": [2, 7, 17, 26], "interpret": [2, 178, 193], "technic": [2, 13, 41], "move": [2, 7, 22, 26], "averag": [2, 7, 22, 23], "rsi": [2, 13], "respond": 2, "condit": [2, 22, 40], "base": [2, 7, 12, 13, 19, 20, 21, 22, 23, 24, 26, 40, 43, 44, 46, 72, 73, 74, 146, 157], "power": [2, 6, 8, 17, 25, 26], "framework": [2, 41], "multipl": [2, 17, 143, 154, 196], "By": [2, 17, 26, 34, 128, 136, 172, 173, 176, 178, 179, 181, 187, 188, 191, 193, 194], "quickli": [2, 14, 17, 25], "environ": [2, 14, 26, 196], "confid": 2, "further": [2, 17], "individu": [2, 26], "abov": [2, 15, 19, 20, 32], "uniqu": 3, "becaus": [3, 5, 6, 8, 10, 17, 43], "thei": [3, 5, 11, 17, 20, 26, 41, 81, 128, 136], "add_mark": [3, 26, 47], "add": [3, 5, 13, 14, 17, 19, 22, 25, 32, 43, 46, 62, 63, 66, 67], "marker": [3, 46, 63, 65, 67, 69], "add_lin": [3, 26, 47], "line": [3, 26, 46, 62, 63, 64, 66, 67, 68], "influenc": [3, 27, 41], "decis": [3, 4], "point": [3, 7, 9, 15, 22, 44, 62, 66, 72, 73, 147, 158], "time": [3, 5, 6, 8, 9, 12, 13, 14, 17, 20, 21, 25, 32, 41, 43, 44, 45, 71, 72, 73, 78, 81, 82, 87, 88, 96, 97, 102, 103, 107, 113, 114, 118, 128, 136, 146, 157, 168, 178, 183, 193], "event": [4, 26, 33, 34, 35, 36, 37, 38, 39, 43, 63, 67], "action": [4, 17], "taken": 4, "backtest": [4, 5, 7, 10, 17, 21, 22, 24, 32, 44, 46, 63, 67, 72, 73, 74, 75, 82, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 106, 117, 170, 185], "debug": [4, 46, 196], "process": [4, 6, 8, 14, 17, 25, 37, 39, 152, 153, 163, 164, 196], "collect": [4, 5], "comprehens": [4, 25], "view": [4, 17], "refin": [4, 25], "note": [5, 10, 13, 14, 15, 17, 20, 22, 43, 77, 146, 157], "ensur": [5, 10, 14, 17, 21, 22, 25, 26, 146, 157], "proceed": [5, 10, 14, 25], "been": [5, 10, 15, 22, 23, 35, 36, 37, 39, 43, 74, 78], "some": [5, 10, 14, 25, 26, 44, 45, 74, 146, 157], "major": [5, 10], "chang": [5, 10, 12, 14, 16, 17, 20, 32], "modul": [5, 10, 26], "situat": 5, "much": [5, 6, 8, 12], "easier": [5, 17], "intend": [5, 17], "who": [5, 17, 52, 58, 147, 158], "after": [5, 6, 8, 13, 14, 17, 21, 26, 28, 30, 31, 40, 42, 44, 63, 67, 72, 76, 130, 138, 139, 196], "librari": [5, 7, 13, 16, 17, 25], "strictli": [5, 21], "parquet": 5, "etc": [5, 16, 20, 21, 40, 45, 48, 61, 63, 67, 77, 148, 159], "wish": [5, 26], "accept": [5, 19], "one": [5, 7, 13, 14, 17, 22, 25, 26, 41, 43, 47, 72, 109, 120, 146, 153, 157, 164], "frame": 5, "raw": [5, 20, 22], "addition": [5, 10, 20], "possibl": [5, 14, 32, 44, 62, 63, 66, 67, 153, 164], "contract": [5, 19, 20, 22, 32, 43], "also": [5, 10, 15, 17, 22, 25, 26, 32, 43, 72, 146, 151, 157, 162, 166], "difficult": 5, "backtestingbrok": [5, 6, 8, 10, 43], "next": [5, 6, 8, 12, 17, 26, 40, 76, 130, 138, 139], "normal": [5, 16, 131, 140], "someth": [5, 13], "0000": 5, "hr": [5, 21], "2359": [5, 21], "last": [5, 13, 20, 21, 22, 28, 30, 31, 42, 43, 44, 72, 73, 74, 75, 85, 86, 94, 95, 171, 186, 196], "consid": [5, 20, 177, 192], "zone": [5, 20], "unless": 5, "america": [5, 20, 44, 176, 179, 181, 191, 194], "york": [5, 17], "aka": 5, "est": 5, "receiv": [5, 14, 17], "index": [5, 19, 20, 21, 26, 78], "datetime64": [5, 21], "column": [5, 20, 21, 78, 196], "high": [5, 20, 21, 25, 26, 43, 78, 81], "low": [5, 17, 20, 21, 43, 78, 81], "volum": [5, 20, 21, 78, 81], "should": [5, 10, 14, 16, 20, 22, 27, 40, 43, 45, 74, 107, 118, 128, 136], "2020": [5, 10, 25, 26, 72, 90, 91, 99, 100, 147, 152, 158, 163], "01": [5, 6, 8, 20, 25, 146, 147, 152, 157, 158, 163], "02": [5, 20], "09": 5, "00": [5, 44, 110, 121, 146, 152, 153, 157, 163, 164, 196], "3237": 5, "3234": 5, "75": 5, "3235": 5, "25": [5, 17], "16808": 5, "32": 5, "10439": 5, "33": 5, "50": [5, 22, 32, 146, 157, 178, 193], "3233": 5, "8203": 5, "04": [5, 44], "22": 5, "15": [5, 17, 20, 32, 44, 72, 73], "56": 5, "2800": 5, "2796": 5, "8272": 5, "57": 5, "2794": 5, "7440": 5, "58": 5, "2793": 5, "7569": 5, "yfinanc": [5, 44], "yf": [5, 44], "5d": 5, "interv": 5, "1m": [5, 21, 44], "to_csv": 5, "subsequ": [5, 6, 8], "ad": [5, 11, 13, 17, 19, 26, 72, 73], "One": [5, 17, 19, 22, 44, 146, 157], "load": [5, 18, 21, 63, 67, 196], "mai": [5, 13, 14, 17, 19, 22, 25, 72, 73, 81, 146, 157], "might": [5, 13, 14, 17], "entiti": [5, 13, 19, 20, 21, 22, 23, 24, 25, 26, 72, 73, 80, 146, 152, 153, 157, 163, 164], "assettyp": [5, 13, 19, 146, 152, 153, 157, 163, 164], "pd": [5, 20], "awar": [5, 20], "df": [5, 13, 20, 21, 30, 72, 73], "read_csv": 5, "third": 5, "we": [5, 6, 7, 8, 10, 11, 13, 17, 25, 26, 28, 47, 72, 146, 157], "least": [5, 41], "timestep": [5, 21, 43, 44, 72, 73, 84, 93], "either": [5, 19, 21, 22, 72, 73, 74, 75], "final": [5, 6, 8, 10, 14, 26], "trader": [5, 6, 8, 10, 12, 13, 14, 15, 16, 26, 33], "data_sourc": [5, 12, 43, 44, 72, 73], "datetime_start": [5, 43], "datetime_end": [5, 43], "strat": 5, "100000": 5, "add_strategi": [5, 12, 13, 14, 15, 16, 25, 26, 46], "run_al": [5, 13, 14, 15, 16, 25, 26, 46], "put": [5, 12, 16, 19, 25], "togeth": [5, 22, 25], "Then": [5, 13, 16, 72], "startegi": 5, "read": [5, 15, 25, 44], "same": [5, 14, 17, 22, 26, 73], "directori": [5, 14, 17], "script": 5, "pick": [5, 10, 17, 26], "rang": [5, 13, 17, 20, 21], "link": [6, 8, 14], "give": [6, 8, 13, 131, 140], "u": [6, 7, 8, 13, 14, 21, 26, 175, 190], "credit": [6, 8, 153, 164], "sale": [6, 8], "utm_sourc": 6, "affili": 6, "utm_campaign": 6, "robust": [6, 8], "fetch": [6, 8, 44, 126, 131, 134, 140], "simplifi": [6, 8], "simpli": [6, 8], "polygondatasourc": 6, "get_historical_pric": [6, 8, 13, 20, 26, 31, 44, 47, 73], "As": [6, 8, 17], "pai": [6, 8, 14], "mani": [6, 8, 13, 26, 32, 41, 81], "won": [6, 8], "t": [6, 8, 13, 14, 17, 26], "limit": [6, 8, 13, 14, 17, 22, 43, 72, 73, 81, 110, 121, 146, 152, 153, 157, 163, 164], "cach": [6, 8], "comput": [6, 8, 17, 25, 26], "so": [6, 8, 10, 13, 14, 17, 19, 22, 25, 26, 47, 82, 128, 136], "take": [6, 8, 17, 22, 25, 41, 44, 62, 63, 66, 67, 73, 74, 75, 125, 133], "bit": [6, 8], "obtain": [6, 8, 13, 44, 126, 127, 129, 131, 134, 135, 137, 140], "dashboard": [6, 8, 25], "necessari": [6, 8, 17, 43], "inherit": [6, 8, 45], "defin": [6, 7, 8, 13, 24, 27, 32, 41, 42, 43, 45, 165, 196], "hold": [6, 8, 20, 22, 23, 26, 36], "until": [6, 8, 12, 20, 102, 103, 113, 114, 146, 157], "determin": [6, 7, 8, 12, 22, 43, 106, 117, 146, 157, 166], "05": [6, 8, 146, 157, 196], "form": [6, 21, 81, 106, 117, 127, 129, 135, 137, 167, 182], "tool": [6, 8, 17, 26], "capabl": [6, 8], "easi": [6, 8, 14, 17, 25, 26], "integr": [6, 8], "versatil": [6, 8, 13, 17], "choic": [6, 8, 14, 17], "gener": [7, 10, 13, 16, 26, 151, 162], "quantstat": 7, "varieti": 7, "annual": [7, 25, 26], "yearli": 7, "total": [7, 20, 28, 51, 57, 147, 158, 175, 190], "romad": 7, "over": [7, 19, 20, 25, 26, 62, 63, 66, 67], "maximum": [7, 17], "sortino": 7, "variat": 7, "differenti": 7, "harm": 7, "volatil": [7, 22, 128, 136], "max": [7, 13], "observ": 7, "loss": [7, 22, 43, 62, 63, 66, 67, 146, 152, 153, 157, 163, 164], "peak": 7, "trough": 7, "portfolio": [7, 9, 13, 23, 28, 51, 57, 63, 67, 175, 190], "attain": [7, 146, 157], "longest": 7, "durat": [7, 32, 146, 153, 157, 164, 178, 193], "reach": [7, 25, 26, 43], "accompani": 7, "graph": [7, 62, 63, 66, 67], "cumul": 7, "scale": [7, 196], "better": [7, 22, 146, 157], "exponenti": 7, "growth": 7, "showcas": 7, "tailor": 7, "achiev": [7, 22, 25, 26], "goal": 7, "condor": [7, 17], "martingal": 7, "iron": 7, "delta": [7, 128, 136], "previou": [7, 79, 80], "dte": 7, "expir": [7, 14, 19, 22, 32, 44, 72, 74, 125, 126, 127, 128, 133, 134, 135, 136, 139, 146, 157], "bband": 7, "v2": 7, "bolling": [7, 62, 66], "band": [7, 62, 66], "interest": [7, 13, 128, 136], "implement": [7, 17, 26, 27, 41, 44, 46], "visit": [7, 16, 17, 25, 26], "our": [7, 13, 17, 25, 26, 28], "lumiwealth": [7, 15, 26], "access": [7, 14, 16, 17, 20, 25, 26, 165, 196], "invest": [7, 14, 26], "question": 7, "email": [7, 14], "www": [8, 16], "thetadatabacktest": 8, "altern": 8, "both": [8, 14, 22, 25, 30, 146, 157], "argument": [8, 128, 136], "thetadata_usernam": 8, "thetadata_password": 8, "were": [9, 26, 38], "place": [9, 13, 18, 146, 151, 157, 162], "along": 9, "involv": 9, "strike": [9, 19, 44, 72, 126, 128, 131, 134, 136, 140, 146, 157], "ticker": [9, 19, 20, 32, 44, 81], "cash": [9, 13, 22, 26, 28, 42, 43, 48, 49, 51, 55, 57, 61, 175, 177, 180, 190, 192, 195], "amount": [9, 13, 20, 22, 28, 44, 49, 51, 55, 57, 79, 80, 146, 157], "cannot": 10, "veri": [10, 17, 26], "easili": [10, 26, 32, 45], "modifi": [10, 25, 26], "anyth": 10, "There": [10, 11, 146, 157], "aapl_pric": [10, 26], "alloc": 10, "11": [10, 17, 19, 26], "12": [10, 17, 19, 25, 26, 74], "speak": [11, 41], "learn": [11, 17, 25, 26], "alpaca": [11, 20, 26, 72, 73], "document": [11, 13, 14, 17, 25, 26, 72], "interact": [11, 13, 20, 22, 26, 45, 72, 73, 74, 81], "factor": [11, 26], "authent": [11, 26], "2fa": [11, 26], "secondari": [11, 26], "paper": [11, 12, 15, 16, 17, 26, 44], "legaci": [11, 26], "ccxt": [11, 26], "tradier": [11, 26, 77, 153, 164], "max_work": [12, 43, 44, 73], "20": [12, 13, 22, 32, 43, 165], "chunk_siz": [12, 44, 73], "connect_stream": [12, 43], "connect": [12, 13, 14, 17, 105, 116], "tradeapi": 12, "rest": [12, 14, 17, 41], "get_timestamp": [12, 26, 44, 47], "current": [12, 13, 14, 17, 21, 36, 37, 42, 43, 44, 49, 51, 52, 55, 57, 58, 62, 63, 66, 67, 72, 73, 77, 78, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 128, 136, 143, 149, 153, 154, 160, 164, 167, 175, 178, 182, 190, 193, 196], "unix": 12, "represent": [12, 21, 22, 44, 72, 73], "is_market_open": [12, 43], "get_time_to_open": [12, 43], "remain": [12, 39, 43, 172, 187], "get_time_to_clos": [12, 43], "alpaca_config": [12, 25, 26], "your_api_kei": [12, 13], "secret": [12, 13, 14, 16, 25, 26], "api_secret": [12, 25, 26], "your_api_secret": 12, "endpoint": 12, "print": [12, 42, 196], "alpacastrategi": 12, "on_trading_inter": [12, 32], "order_typ": [12, 153, 164], "asset_type_map": 12, "us_equ": 12, "cancel_ord": [12, 26, 43, 47, 149, 160], "cancel": [12, 22, 30, 35, 43, 71, 109, 111, 120, 122, 142, 143, 144, 145, 146, 149, 151, 154, 155, 156, 157, 160, 162], "get_historical_account_valu": [12, 43], "1400": 12, "1600": 12, "7": [12, 13, 17, 26, 32, 106, 117], "0830": 12, "0930": 12, "600": 12, "sampl": [12, 26], "1612172730": 12, "000234": 12, "boolean": [12, 151, 153, 162, 164], "map_asset_typ": 12, "orderdata": 12, "to_request_field": 12, "cryoptocurr": 13, "popular": 13, "find": [13, 14, 15, 16, 17, 26, 44, 76, 127, 129, 130, 131, 135, 137, 138, 139, 140], "readthedoc": 13, "en": 13, "enabl": [13, 14, 15], "wide": [13, 17, 63, 67], "coinbas": [13, 26], "pro": 13, "binanc": [13, 26], "kraken": [13, 26, 146, 157], "kucoin": [13, 26], "constantli": [13, 26], "don": [13, 14, 17, 26], "let": 13, "know": [13, 18], "ll": [13, 14, 16, 26], "desir": [13, 14, 21, 81, 128, 136], "credenti": [13, 14, 15], "rememb": [13, 26], "under": [13, 14, 17, 25], "similar": [13, 17, 30], "alwai": [13, 30, 43, 106, 117, 167, 182], "24": [13, 17, 32, 106, 117], "set_market": [13, 26, 32, 47], "few": [13, 17, 26, 101], "common": [13, 14], "coinbase_config": 13, "exchange_id": 13, "apikei": 13, "your_secret_kei": 13, "sandbox": [13, 17], "kraken_config": 13, "margin": [13, 146, 157], "kucoin_config": 13, "your_passphras": 13, "NOT": 13, "your_secret": 13, "coinbasepro_config": 13, "coinbasepro": 13, "instanti": [13, 16, 26, 43], "chosen": [13, 16, 17], "correct": [13, 14, 16], "instanc": [13, 196], "strategy_executor": [13, 16], "complet": [13, 14, 15, 17, 22, 26, 74, 75], "demonstr": 13, "pandas_ta": 13, "error": [13, 17, 22, 34], "importantfunct": 13, "30": [13, 40, 72, 73, 81, 196], "sinc": 13, "those": [13, 17, 166], "hour": [13, 20, 21, 32, 40, 44, 72, 73, 106, 117, 178, 193], "quot": [13, 19, 20, 21, 22, 44, 49, 51, 55, 57, 72, 73, 74, 75, 77, 146, 152, 153, 157, 163, 164, 175, 177, 190, 192], "transact": [13, 22, 167, 182], "btc": [13, 19, 20, 72, 73, 74, 146, 152, 153, 157, 163, 164], "0": [13, 15, 17, 19, 21, 22, 23, 24, 25, 32, 42, 43, 44, 87, 88, 96, 97, 146, 152, 153, 157, 163, 164, 173, 188, 196], "mkt_order": 13, "000": [13, 25, 26], "lmt_order": 13, "limit_pric": [13, 22, 43, 110, 121, 146, 152, 153, 157, 163, 164], "10000": [13, 25], "pair": [13, 20, 22, 44, 74, 75, 125, 126, 133, 134, 146, 157], "bar": [13, 18, 21, 26, 43, 44, 63, 67, 71, 72, 73, 74, 75, 78, 81, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 128, 136], "max_pric": 13, "log_messag": [13, 16, 20, 26, 28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 47, 52, 53, 58, 59, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 147, 148, 149, 158, 159, 160, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 179, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 194], "f": [13, 16, 28, 35, 36, 38, 39, 42, 72, 74, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 132, 141, 169, 171, 174, 176, 177, 179, 181, 184, 186, 189, 191, 192, 194, 196], "calcul": [13, 20, 22, 43, 44, 128, 136], "ta": 13, "length": [13, 21, 43, 44, 72, 73, 78, 84, 93], "current_rsi": 13, "iloc": [13, 72], "macd": 13, "current_macd": 13, "55": 13, "ema": 13, "current_ema": 13, "get_posit": [13, 23, 26, 47, 150, 161], "share": [13, 16, 20, 22, 29, 31, 36, 39, 44, 146, 157, 175, 190], "asset_to_get": 13, "outstand": 13, "get_ord": [13, 26, 47], "whatev": 13, "last_pric": [13, 74, 75, 196], "color": [13, 62, 63, 66, 67, 105, 116], "green": [13, 62, 63, 66, 67, 105, 116], "dt": [13, 21, 44, 62, 63, 66, 67, 90, 91, 99, 100, 139], "get_datetim": [13, 26, 43, 44, 47], "check": [13, 17, 22, 26, 40, 43, 47, 72, 148, 149, 159, 160, 168, 170, 183, 185], "certain": [13, 63, 67], "eg": [13, 17, 19, 20, 25, 44, 47, 49, 51, 55, 57, 62, 63, 66, 67, 70, 77, 82, 105, 116, 125, 126, 133, 134, 146, 157, 178, 193], "9": [13, 17, 32], "30am": 13, "entir": 13, "example_strategi": [13, 25, 26], "github": [13, 15, 17, 20, 25, 26], "repositori": [13, 17], "brokerag": [14, 17], "firm": 14, "oper": [14, 17, 32, 41], "countri": 14, "around": [14, 17, 18], "world": [14, 17], "great": [14, 17], "especi": [14, 82, 196], "platform": [14, 26], "fee": [14, 17, 18, 26], "structur": [14, 26], "best": [14, 17], "deal": [14, 26], "real": [14, 16, 17, 25, 71, 78, 81], "subscrib": 14, "appropri": [14, 20], "packag": [14, 26], "depend": [14, 17, 72, 73], "exchang": [14, 21, 22, 44, 72, 73, 74, 75, 76, 83, 85, 86, 87, 88, 89, 92, 94, 95, 96, 97, 98, 125, 126, 127, 129, 130, 131, 133, 134, 135, 137, 138, 140, 146, 157], "snapshot": [14, 42], "bundl": 14, "On": [14, 17], "stream": [14, 71, 78, 81], "nasdaq": [14, 32, 106, 117], "network": 14, "c": 14, "utp": 14, "totalview": 14, "nyse": [14, 32, 76, 106, 117, 130, 138], "cta": 14, "openbook": 14, "ultra": 14, "opra": 14, "top": [14, 17, 26], "relat": [14, 17, 36], "suffic": 14, "login": 14, "ibkr": 14, "client": [14, 15, 17], "portal": 14, "navig": [14, 15, 17], "menu": [14, 26], "click": [14, 17], "prompt": 14, "incur": 14, "cost": [14, 17, 43], "associ": 14, "notif": [14, 17], "ib": [14, 19, 132, 141], "mobil": 14, "app": 14, "approv": 14, "interrupt": [14, 33, 196], "autom": [14, 17], "handl": 14, "solut": 14, "fulli": 14, "doesn": 14, "approach": 14, "conveni": 14, "primari": [14, 196], "maintain": [14, 17], "without": [14, 17, 25, 131, 140], "separ": [14, 17], "control": [14, 178, 193], "twice": 14, "enhanc": [14, 25], "complex": [14, 25], "restrict": 14, "ip": [14, 15, 17], "address": [14, 17], "tw": [14, 17, 20], "ibgatewai": 14, "permiss": [14, 19], "what": [14, 26, 47, 82, 177, 192], "keep": [14, 17, 22, 23, 81, 146, 157], "below": [14, 45, 47, 48, 61, 70, 74, 82, 101, 124, 142], "instruct": [14, 17, 146, 152, 153, 157, 163, 164], "given": [14, 20, 21, 43, 44, 52, 58, 71, 72, 73, 76, 84, 93, 125, 127, 129, 130, 131, 133, 135, 137, 138, 139, 140, 143, 148, 154, 159], "attempt": [14, 175, 190], "while": [14, 17], "disconnect": 14, "caus": 14, "loop": [14, 31, 40, 103, 114, 172, 187], "stop": [14, 22, 25, 32, 33, 40, 43, 62, 63, 66, 67, 102, 103, 113, 114, 146, 152, 153, 157, 163, 164, 172, 187, 196], "tediou": 14, "upper": 14, "right": [14, 17, 19, 28, 63, 67, 72, 152, 163], "corner": [14, 17], "scroll": [14, 17], "down": [14, 17, 25, 33, 63, 67], "plu": [14, 105, 116, 175, 190], "sign": 14, "button": [14, 17], "header": 14, "fill": [14, 17, 21, 22, 23, 36, 39, 43, 146, 157, 167, 182], "out": [14, 26, 43, 47, 52, 58, 74], "field": [14, 20, 22], "page": [14, 16, 17, 26], "At": [14, 25], "confirm": [14, 17], "activ": [14, 17, 22, 26, 74, 75, 78, 152, 153, 163, 164], "back": [14, 196], "enter": [14, 17, 19, 22, 31, 146, 157, 178, 193], "via": 14, "act": 14, "promptli": 14, "ask": [14, 77], "proof": 14, "author": 14, "upload": 14, "request": 14, "eula": 14, "signatur": 14, "block": 14, "submit": [14, 22, 37, 43, 47, 142, 146, 152, 153, 157, 163, 164], "practic": 14, "monei": [14, 16, 17, 25, 49, 51, 55, 57, 167, 182], "avoid": 14, "conflict": [14, 196], "variabl": [14, 26, 31, 42, 166], "env": [14, 17, 196], "ib_usernam": [14, 17], "user123": [14, 17], "ib_password": [14, 17], "password123": [14, 17], "account_id": [14, 17], "subaccount": [14, 17], "u17369206": [14, 17], "ib_api_url": [14, 17], "url": [14, 17], "host": [14, 17], "localhost": [14, 17, 196], "8000": [14, 17], "strangl": [14, 15], "tutori": [15, 26], "workstat": 15, "global": [15, 17, 20, 45], "activex": 15, "socket": [15, 17], "disabl": 15, "port": [15, 17], "7496": 15, "7497": [15, 17], "highli": [15, 26], "thoroughli": 15, "algorithm": [15, 17, 25], "master": 15, "999": 15, "py": [15, 17, 25, 26], "interactive_brokers_config": 15, "socket_port": 15, "client_id": 15, "digit": 15, "127": [15, 17], "entri": [15, 22], "except": [15, 20, 25, 26, 34], "interactivebrok": [15, 20], "interactive_brok": 15, "simple_start_ib": 15, "bot": [15, 17, 25, 32, 34, 45, 196], "blob": [15, 25, 26], "getting_start": 15, "dash": [16, 62, 66], "tradier_config": 16, "access_token": 16, "qtrz3zurd9244ahuw2aoyapgvyra": 16, "account_numb": 16, "va22904793": 16, "your_access_token": 16, "your_account_numb": 16, "That": 16, "now": [16, 25, 44, 74], "abl": 16, "less": [16, 146, 147, 157, 158], "than": [16, 17, 44, 82, 146, 147, 157, 158], "cover": [17, 26], "topic": 17, "decid": [17, 72], "correctli": 17, "applic": [17, 106, 117], "success": 17, "skip": [17, 30], "repl": 17, "eas": 17, "afford": 17, "expens": [17, 128, 136], "browser": [17, 25, 46], "edit": 17, "directli": [17, 43], "tip": 17, "howev": [17, 22, 30, 32, 146, 157], "excel": 17, "develop": [17, 26], "month": [17, 85, 94], "fit": [17, 101], "scalabl": [17, 196], "figur": 17, "blueprint": 17, "worker": 17, "background": 17, "butterfli": 17, "afa": 17, "starter": 17, "itself": 17, "left": [17, 63, 67], "sidebar": 17, "delet": 17, "unnecessari": 17, "trashcan": 17, "mandatori": [17, 19, 45, 146, 157], "ones": [17, 41], "restart": [17, 40], "servic": [17, 105, 116], "commit": 17, "redeploi": 17, "tab": 17, "6": [17, 19, 26], "monitor": 17, "expect": [17, 25, 26, 128, 136], "regularli": 17, "profit": [17, 22, 25, 26, 43, 62, 63, 66, 67], "8": [17, 26], "bottom": 17, "press": 17, "consol": [17, 105, 116], "everyth": [17, 26], "part": [17, 22, 41, 153, 164, 165], "locat": 17, "reserv": 17, "vm": 17, "13": [17, 127, 135], "downgrad": 17, "vcpu": 17, "effect": 17, "reduc": 17, "todai": [17, 74, 82], "wait": [17, 22, 39, 109, 110, 111, 112, 120, 121, 122, 123], "messag": [17, 101, 105, 116], "14": [17, 196], "16": [17, 74], "17": [17, 19, 32], "proper": 17, "discord": [17, 26], "webhook": 17, "live_config": 17, "correspond": [17, 35, 36, 37], "soon": 17, "incred": 17, "commiss": 17, "lot": [17, 166], "engag": 17, "tradier_access_token": 17, "token": 17, "qtrz3zurl9244ahuw4aoyapgvyra": 17, "tradier_account_numb": 17, "va12204793": 17, "tradier_is_pap": 17, "align": 17, "perfectli": 17, "seamlessli": 17, "alpaca_api_kei": 17, "pk7t6yvax6pmh1em20yn": 17, "alpaca_api_secret": 17, "9wgjls3wixq54fcphwwzjcp8jcfjfkuwsryskkma": 17, "alpaca_is_pap": 17, "unit": [17, 44, 146, 157, 178, 193], "state": [17, 166, 196], "typic": [17, 22, 165], "challeng": 17, "friendli": 17, "coinbase_api_kei": 17, "steea9fhiszntmpihqjudeqolitj0javz": 17, "coinbase_api_secret": 17, "nuzcnprsxjxxouxrhqe5k2k1xnqlpckh2xcutifkcw": 17, "coinbase_is_sandbox": 17, "focus": 17, "competit": 17, "kraken_api_kei": 17, "xyz1234567890abcdef": 17, "kraken_api_secret": 17, "abcdef1234567890abcdef1234567890abcdef1234": 17, "intern": [17, 146, 157], "arrai": [17, 21], "cfd": 17, "Their": 17, "presenc": 17, "compat": 17, "purpos": 17, "newer": 17, "interactive_brokers_port": 17, "interactive_brokers_client_id": 17, "123456": 17, "interactive_brokers_ip": 17, "ib_subaccount": 17, "subaccount1": 17, "src": 17, "paper_1": 17, "is_backtest": [17, 26], "a7py0zidhxde6qkx8ojjknp7cd87hwku": 17, "discord_webhook_url": 17, "send": [17, 105, 116], "123456789": 17, "db_connection_str": [17, 196], "histori": 17, "sqlite": 17, "account_histori": 17, "db": 17, "strategy_nam": 17, "strategy_id": [17, 196], "my": [17, 25], "think": [17, 82], "polygon_max_memory_byt": 17, "memori": 17, "byte": 17, "usag": [17, 26], "512000000": 17, "main": [17, 18, 22, 26, 33, 40, 45, 146, 157], "smoothli": 17, "verifi": 17, "behav": 17, "ey": 17, "straightforward": 17, "happi": 17, "assist": 17, "repres": [19, 22, 44, 45, 72, 73, 126, 134], "attribut": [19, 196], "track": [17, 19, 23, 26, 52, 53, 58, 59, 148, 149, 159, 160], "underli": [19, 21, 128, 131, 136, 140], "ibm": [19, 145, 156], "just": [19, 26, 32, 36, 43, 146, 157], "corpor": 19, "printout": 19, "multipli": [19, 20, 36, 39, 44, 125, 126, 129, 131, 133, 134, 137, 140, 152, 163], "nexpir": 19, "expiri": [19, 127, 132, 135, 141], "june": 19, "2021": [19, 32, 128, 136, 139], "18": 19, "currenc": [19, 72, 146, 157, 167, 175, 177, 182, 190, 192], "eur": [19, 72, 73, 146, 152, 153, 157, 163, 164], "convers": [19, 178, 193], "gbp": [19, 152, 163], "behind": 19, "scene": 19, "anytim": 19, "due": 19, "precis": [19, 128, 136], "underlying_asset": 19, "case": [19, 21, 22], "yyyymmdd": [19, 132, 141], "yyyymm": 19, "multileg": [19, 22, 153, 164], "leverag": [19, 146, 157], "_asset_typ": 19, "_right": 19, "asset_type_must_be_one_of": 19, "right_must_be_one_of": 19, "26": 19, "155": 19, "base_asset": [19, 152, 153, 163, 164], "optionright": 19, "classmethod": [19, 20, 22, 23, 44], "from_dict": [19, 22, 23], "is_valid": 19, "symbol2asset": 19, "particularli": 19, "to_dict": [19, 22, 23], "assetsmap": 19, "map": 19, "userdict": 19, "datafram": [20, 21, 44, 64, 65, 68, 69, 72, 78, 81], "dividend": [20, 44, 79, 80, 128, 136, 167, 182], "stock_split": 20, "local": [20, 21, 42, 44, 90, 91, 99, 100, 128, 136], "timezon": [20, 21, 26, 44, 90, 91, 99, 100, 176, 181, 191], "new_york": [20, 44, 176, 179, 181, 191, 194], "helper": [20, 22, 45], "row": [20, 42, 72, 73, 81], "get_last_dividend": 20, "per": [20, 44], "get_momentum": 20, "momentum": 20, "aggregate_bar": 20, "frequenc": [20, 21], "Will": [20, 25, 62, 63, 66, 67, 74, 75, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 151, 162, 176, 179, 181, 191, 194], "timefram": 20, "min": 20, "15min": 20, "1h": [20, 40], "specifi": [20, 22, 44, 72, 73, 146, 157, 196], "filter": 20, "daterang": 20, "get_total_volum": 20, "sum": [20, 51, 57], "themselv": 20, "supplier": 20, "exce": 20, "pace": 20, "throttl": 20, "respect": 20, "mention": 20, "tick": 20, "frequent": 20, "accur": [20, 44], "updat": [20, 22, 26, 36, 38, 108, 119, 146, 157, 167, 182], "rule": 20, "historical_limit": 20, "financi": [20, 25], "ohlcv": [20, 21, 43], "split": [20, 45], "instrument": 20, "yield": 20, "coin": [20, 146, 157], "eth": [20, 73, 146, 153, 157, 164], "num_period": 20, "get_total_dividend": 20, "get_total_stock_split": 20, "get_total_return": 20, "get_total_return_pct": 20, "percentag": [20, 25], "get_total_return_pct_chang": 20, "recent": [20, 72, 78], "get_bar": [20, 21, 44], "ethereum": 20, "bitcoin": 20, "grouper_kwarg": 20, "bars_agg": 20, "inclus": 20, "parse_bar_list": 20, "bar_list": 20, "singl": [20, 144, 155], "nobardatafound": 20, "date_start": 21, "date_end": 21, "trading_hours_start": 21, "trading_hours_end": 21, "23": 21, "59": 21, "input": [21, 102, 103, 113, 114], "manag": [21, 22, 26, 47, 61, 124], "attach": 21, "0001": 21, "localize_timezon": 21, "tz_local": 21, "eastern": 21, "utc": 21, "sybmol": 21, "datalin": 21, "numpi": 21, "iter_index": 21, "count": [21, 32, 78, 81, 196], "seri": 21, "set_tim": 21, "repair_times_and_fil": 21, "merg": 21, "reindex": 21, "nan": 21, "lower": 21, "set_date_format": 21, "set_dat": 21, "trim_data": 21, "trim": 21, "match": [21, 44], "to_datalin": 21, "exist": [21, 54, 60], "get_iter_count": 21, "len": 21, "check_data": 21, "wrapper": 21, "timeshift": [21, 43, 44, 72, 73, 84, 87, 88, 93, 96, 97], "_get_bars_dict": 21, "min_timestep": [21, 44], "timestep_map": [21, 44], "shift": [21, 44, 72, 73, 84, 87, 88, 93, 96, 97], "get_bars_between_d": 21, "start_dat": 21, "end_dat": 21, "get_quot": [21, 26, 47], "idx": 21, "belong": 22, "construct": 22, "goog": [22, 42, 72, 73], "googl": 22, "to_posit": 22, "get_incr": 22, "wait_to_be_regist": 22, "regist": [22, 110, 112, 121, 123], "wait_to_be_clos": 22, "keyword": 22, "my_limit_pric": 22, "500": [22, 36], "particular": [22, 125, 127, 129, 133, 135, 137], "higher": 22, "probabl": 22, "predetermin": 22, "exit": 22, "stop_pric": [22, 43, 146, 152, 153, 157, 163, 164], "my_stop_pric": 22, "400": 22, "stop_limit": [22, 146, 157], "combin": 22, "405": 22, "trail": [22, 146, 152, 157, 163], "continu": [22, 146, 157], "threshold": [22, 146, 157], "movement": [22, 146, 157], "trailing_stop": [22, 146, 157], "trail_pric": [22, 146, 157], "trail_perc": [22, 146, 157], "my_trail_pric": 22, "order_1": 22, "my_trail_perc": 22, "order_2": 22, "bracket": [22, 146, 157], "chain": [22, 44, 124, 125, 126, 127, 129, 131, 133, 134, 135, 137, 140], "long": 22, "short": [22, 106, 117], "importantli": 22, "extrem": 22, "fast": [22, 25, 26], "occur": 22, "take_profit_pric": [22, 146, 152, 157, 163], "stop_loss_pric": [22, 146, 152, 157, 163], "stop_loss_limit_pric": [22, 146, 157], "my_take_profit_pric": 22, "420": 22, "my_stop_loss_pric": 22, "parent": 22, "oto": [22, 146, 157], "trigger": [22, 146, 157], "variant": 22, "oco": [22, 146, 152, 157, 163], "word": [22, 167, 182], "where": [22, 25, 42, 146, 157], "alreadi": [22, 30, 36, 41], "submiss": 22, "position_fil": [22, 146, 157], "time_in_forc": [22, 146, 157], "good_till_d": [22, 146, 157], "date_cr": 22, "order_class": 22, "trade_cost": 22, "custom_param": [22, 146, 157], "avg_fill_pric": [22, 23], "error_messag": 22, "child_ord": 22, "tag": [22, 153, 164], "statu": [22, 148, 149, 159, 160], "unprocess": 22, "orderclass": 22, "ordersid": 22, "buy_to_clos": 22, "buy_to_cov": 22, "buy_to_open": 22, "sell_short": 22, "sell_to_clos": 22, "sell_to_open": 22, "orderstatu": 22, "cash_settl": 22, "partially_fil": 22, "partial_fil": 22, "ordertyp": 22, "tupl": [22, 73], "alia": 22, "add_child_ord": 22, "o": 22, "child": [22, 43], "add_transact": 22, "properti": [22, 23, 26, 43, 45, 46, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195], "cash_pend": 22, "equivalent_statu": 22, "equival": 22, "order_dict": 22, "get_fill_pric": 22, "weight": 22, "often": 22, "encount": 22, "partial": [22, 39], "pnl": 22, "yet": [22, 46], "is_act": 22, "otherwis": [22, 36], "rtype": [22, 44], "is_buy_ord": 22, "is_cancel": 22, "is_equivalent_statu": 22, "status1": 22, "status2": 22, "status": 22, "is_fil": 22, "is_opt": 22, "is_par": 22, "settlement": 22, "balanc": 22, "is_sell_ord": 22, "set_cancel": 22, "set_error": 22, "set_fil": 22, "set_identifi": 22, "set_new": 22, "set_partially_fil": 22, "update_raw": 22, "update_trail_stop_pric": 22, "was_transmit": 22, "retreiv": 23, "appl": 23, "add_ord": 23, "decim": [23, 74, 75, 146, 147, 157, 158], "get_selling_ord": [23, 26, 47], "value_typ": 23, "trading_fe": 24, "flat_fe": [24, 25], "percent_fe": [24, 25], "maker": 24, "taker": 24, "made": [25, 70, 82], "beginn": 25, "join": [25, 26], "commun": [25, 26], "cours": [25, 26], "shown": [25, 26], "discov": [25, 26], "skill": 25, "expert": [25, 26], "guidanc": 25, "resourc": 25, "welcom": 25, "hope": 25, "enjoi": 25, "easiest": 25, "comfort": 25, "copi": 25, "your_alpaca_api_kei": [25, 26], "your_alpaca_secret": [25, 26], "180": 25, "180m": 25, "carri": 25, "familiar": 25, "And": [25, 72, 73], "try": [25, 146, 157], "Or": [25, 26, 165], "dev": [25, 26], "simple_start_single_fil": [25, 26], "flat": 25, "trading_fee_1": 25, "trading_fee_2": 25, "sometim": 25, "spend": 25, "yappi": 25, "machinelearninglongshort": 25, "tqqq": 25, "get_func_stat": 25, "print_al": 25, "get_thread_stat": 25, "prof": 25, "pstat": 25, "snakeviz": 25, "web": [25, 46], "slow": 25, "robot": 26, "well": 26, "found": 26, "super": 26, "being": [26, 35, 36, 37, 38, 39, 44, 46, 72, 126, 134, 146, 157, 168, 183], "bug": 26, "fix": [26, 81], "fortun": 26, "against": 26, "switch": 26, "industri": 26, "tradest": 26, "build": [26, 27, 45], "analy": 26, "box": 26, "analyt": 26, "analyz": 26, "chart": [26, 47, 62, 63, 64, 65, 66, 67, 68, 69], "engin": [26, 41], "complic": 26, "confus": 26, "vector": 26, "math": 26, "mac": 26, "powershel": 26, "window": 26, "notic": 26, "exactli": 26, "suggest": 26, "lifecycl": [26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 47, 168, 172, 173, 178, 183, 187, 188, 193], "describ": [26, 45], "sub": 26, "tree": 26, "good": [26, 146, 157], "luck": 26, "forget": 26, "swim": 26, "gain": 26, "wealth": 26, "expertis": 26, "level": [26, 63, 67, 105, 116], "proven": 26, "record": 26, "home": 26, "pre": [26, 153, 164], "deploy": 26, "render": 26, "replit": 26, "profil": 26, "improv": 26, "before_market_open": [26, 27, 173, 188], "before_starting_trad": [26, 27, 30], "before_market_clos": [26, 27], "after_market_clos": [26, 27], "on_abrupt_clos": [26, 27, 34], "on_bot_crash": [26, 27], "trace_stat": [26, 27, 178, 193], "on_new_ord": [26, 27], "on_partially_filled_ord": [26, 27], "on_filled_ord": [26, 27], "on_canceled_ord": [26, 27], "on_parameters_upd": [26, 27], "backup": 26, "restor": 26, "benefit": 26, "var": 26, "storag": 26, "cancel_open_ord": [26, 30, 47, 151, 162], "sell_al": [26, 29, 33, 34, 47], "get_asset_potential_tot": [26, 47], "get_portfolio_valu": [26, 47], "get_cash": [26, 47], "get_historical_prices_for_asset": [26, 30, 47], "get_yesterday_dividend": [26, 44, 47], "get_next_trading_dai": [26, 47], "get_markers_df": [26, 47], "get_lines_df": [26, 47], "get_paramet": [26, 47, 165], "set_paramet": [26, 47, 165], "get_chain": [26, 44, 47, 127, 129, 131, 135, 137, 140], "get_greek": [26, 47], "get_strik": [26, 44, 47], "get_expir": [26, 47], "get_multipli": [26, 47], "options_expiry_to_datetime_d": [26, 47], "get_round_minut": [26, 44, 47], "get_last_minut": [26, 44, 47], "get_round_dai": [26, 44, 47], "get_last_dai": [26, 44, 47], "get_datetime_rang": [26, 43, 44, 47], "localize_datetim": [26, 44, 47], "to_default_timezon": [26, 44, 47], "miscellan": [26, 47], "update_paramet": [26, 38, 47], "await_market_to_clos": [26, 47], "await_market_to_open": [26, 47], "wait_for_order_registr": [26, 47], "wait_for_order_execut": [26, 47], "wait_for_orders_registr": [26, 47], "wait_for_orders_execut": [26, 47], "initial_budget": 26, "last_on_trading_iteration_datetim": 26, "pytz": 26, "unspent_monei": 26, "leg": 26, "abstract": [27, 41, 43, 44, 45], "pattern": [27, 41], "greatli": [27, 41], "react": [27, 41], "j": [27, 41], "compon": [27, 41, 196], "overload": [27, 34, 41, 43], "logic": [27, 29, 30, 40, 41, 43, 45], "dump": [28, 42], "report": 28, "busi": [29, 30], "execud": [29, 30], "unlik": 30, "launch": 30, "tlt": [30, 52, 58, 73, 75, 80, 111, 112, 122, 123, 146, 147, 153, 157, 158, 164], "bars_list": 30, "asset_bar": 30, "reiniti": 31, "reset": 31, "blacklist": 31, "my_custom_paramet": 32, "5m": [32, 178, 193], "d": [32, 178, 193], "constructor": 32, "later": 32, "strategy_1": 32, "my_other_paramet": 32, "strategy_2": 32, "my_last_paramet": 32, "asset_symbol": 32, "mnq": 32, "calendar": [32, 76, 130, 138], "marketcalendar": [32, 106, 117], "asx": [32, 106, 117], "bmf": [32, 106, 117], "cfe": [32, 106, 117], "bat": [32, 106, 117], "cme_equ": [32, 106, 117], "cbot_equ": [32, 106, 117], "cme_agricultur": [32, 106, 117], "cbot_agricultur": [32, 106, 117], "comex_agricultur": [32, 106, 117], "nymex_agricultur": [32, 106, 117], "cme_rat": [32, 106, 117], "cbot_rat": [32, 106, 117], "cme_interestr": [32, 106, 117], "cbot_interestr": [32, 106, 117], "cme_bond": [32, 106, 117], "cbot_bond": [32, 106, 117], "eurex": [32, 106, 117], "hkex": [32, 106, 117], "ic": [32, 106, 117], "iceu": [32, 106, 117], "nyfe": [32, 106, 117], "jpx": [32, 106, 117], "lse": [32, 106, 117], "os": [32, 106, 117], "six": [32, 106, 117], "sse": [32, 106, 117], "tsx": [32, 106, 117], "tsxv": [32, 106, 117], "bse": [32, 106, 117], "tase": [32, 106, 117], "tradingcalendar": [32, 106, 117], "asex": [32, 106, 117], "bvmf": [32, 106, 117], "cme": [32, 74, 106, 117], "iepa": [32, 106, 117], "xam": [32, 106, 117], "xasx": [32, 106, 117], "xbkk": [32, 106, 117], "xbog": [32, 106, 117], "xbom": [32, 106, 117], "xbru": [32, 106, 117], "xbud": [32, 106, 117], "xbue": [32, 106, 117], "xcbf": [32, 106, 117], "xcse": [32, 106, 117], "xdub": [32, 106, 117], "xfra": [32, 106, 117], "xetr": [32, 106, 117], "xhel": [32, 106, 117], "xhkg": [32, 106, 117], "xice": [32, 106, 117], "xidx": [32, 106, 117], "xist": [32, 106, 117], "xjse": [32, 106, 117], "xkar": [32, 106, 117], "xkl": [32, 106, 117], "xkrx": [32, 106, 117], "xlim": [32, 106, 117], "xli": [32, 106, 117], "xlon": [32, 106, 117], "xmad": [32, 106, 117], "xmex": [32, 106, 117], "xmil": [32, 106, 117], "xmo": [32, 106, 117], "xny": [32, 106, 117], "xnze": [32, 106, 117], "xosl": [32, 106, 117], "xpar": [32, 106, 117], "xph": [32, 106, 117], "xpra": [32, 106, 117], "xse": [32, 106, 117], "xsgo": [32, 106, 117], "xshg": [32, 106, 117], "xsto": [32, 106, 117], "xswx": [32, 106, 117], "xtae": [32, 106, 117], "xtai": [32, 106, 117], "xtk": [32, 106, 117], "xtse": [32, 106, 117], "xwar": [32, 106, 117], "xwbo": [32, 106, 117], "us_futur": [32, 106, 117], "max_bar": 32, "10m": [32, 178, 193], "20h": 32, "48": 32, "2d": [32, 178, 193], "gracefulli": 33, "shut": 33, "keybord": 33, "interupt": [33, 40], "abrupt": 33, "crash": [34, 40, 196], "rais": 34, "successfulli": [35, 36, 37], "300": [36, 178, 193], "sold": [36, 51, 57, 146, 157], "elif": 36, "bought": [36, 146, 157], "r": 37, "miss": 39, "again": [40, 103, 114], "pull": [40, 72], "hello": 40, "task": 41, "core": 41, "perspect": 41, "care": 41, "he": 41, "illustr": 41, "context": 42, "scope": 42, "random": 42, "google_symbol": 42, "snapshot_befor": 42, "random_numb": 42, "randint": 42, "my_custom_stat": 42, "trace": 42, "my_stat": 42, "my_other_stat": 42, "backtesting_brok": 43, "is_backtesting_brok": 43, "calculate_trade_cost": 43, "cash_settle_options_contract": 43, "settl": 43, "todo": [43, 74], "docstr": 43, "get_last_bar": 43, "els": 43, "limit_ord": [43, 146, 157], "open_": 43, "process_expired_option_contract": 43, "expri": 43, "process_pending_ord": 43, "evalu": 43, "mostli": 43, "should_continu": 43, "product": 43, "stop_ord": 43, "data_source_backtest": 43, "datasourcebacktest": [43, 44], "abc": [43, 44], "doe": [43, 44, 77, 146, 157], "pandasdata": [43, 44], "is_backtesting_data_sourc": [43, 44], "adjust_for_delai": [43, 44, 83, 92], "Not": [43, 106, 117], "delai": 44, "default_pytz": 44, "dsttzinfo": 44, "lmt": 44, "19": 44, "std": 44, "default_timezon": 44, "calculate_greek": 44, "asset_pric": [44, 128, 136], "underlying_pric": [44, 128, 136], "greek": [44, 124, 128, 136], "static": 44, "convert_timestep_str_to_timedelta": 44, "timedelta": [44, 72, 73, 102, 103, 113, 114], "1minut": 44, "1hour": 44, "1dai": 44, "include_after_hour": [44, 72, 73], "info": [44, 105, 116, 125, 126, 133, 134], "guarente": [44, 125, 126, 133, 134], "exp_dat": [44, 125, 126, 133, 134], "strike1": [44, 125, 126, 133, 134], "strike2": [44, 125, 126, 133, 134], "07": [44, 125, 126, 133, 134], "ago": [44, 72], "known": [44, 74, 75], "round": [44, 87, 88, 96, 97], "param": 44, "get_timestep": 44, "query_greek": [44, 128, 136], "queri": [44, 128, 136], "clean_trading_tim": 44, "dt_index": 44, "pcal": 44, "find_asset_in_data_stor": 44, "get_asset_by_nam": 44, "get_asset_by_symbol": 44, "get_asset": 44, "whose": [44, 126, 134], "smart": [44, 125, 127, 129, 133, 135, 137, 146, 157], "strke": [44, 125, 133], "stike": [44, 125, 133], "get_start_datetime_and_ts_unit": 44, "start_dt": 44, "start_buff": 44, "get_trading_days_panda": 44, "load_data": 44, "update_date_index": 44, "yahoo_data": 44, "yahoodata": 44, "15m": 44, "becuas": 44, "chain_data": 44, "option_chain": 44, "categori": [45, 101], "flow": 45, "is_backtest_brok": 46, "async_": 46, "async": 46, "asynchron": 46, "displi": 46, "displai": [46, 62, 63, 66, 67], "run_all_async": 46, "stop_al": 46, "insid": [47, 166, 172, 187], "thing": 47, "divid": 47, "sens": 47, "preced": 47, "seek": [52, 58, 144, 155], "sought": [52, 58, 147, 158], "assset": [52, 58], "empti": [53, 59], "overwrit": [54, 60], "style": [62, 66], "solid": [62, 66], "width": [62, 66, 72, 73], "detail_text": [62, 63, 66, 67], "overbought": [62, 63, 66, 67], "oversold": [62, 63, 66, 67], "red": [62, 63, 66, 67, 105, 116], "blue": [62, 63, 66, 67], "yellow": [62, 63, 66, 67], "orang": [62, 63, 66, 67], "purpl": [62, 63, 66, 67], "pink": [62, 63, 66, 67], "brown": [62, 63, 66, 67], "black": [62, 63, 66, 67], "white": [62, 63, 66, 67], "grai": [62, 66], "lightgrai": [62, 66], "darkgrai": [62, 66], "lightblu": [62, 66], "darkblu": [62, 66], "lightgreen": [62, 66], "darkgreen": [62, 66], "lightr": [62, 66], "darkr": [62, 66], "hex": [62, 66], "dot": [62, 63, 66, 67], "text": [62, 63, 66, 67], "hover": [62, 63, 66, 67], "add_chart_lin": [62, 66], "80": [62, 66], "circl": [63, 67], "size": [63, 67, 81], "mark": [63, 67], "cross": [63, 67], "resist": [63, 67], "squar": [63, 67], "diamond": [63, 67], "x": [63, 67], "triangl": [63, 67], "ne": [63, 67], "se": [63, 67], "sw": [63, 67], "nw": [63, 67], "pentagon": [63, 67], "hexagon": [63, 67], "hexagon2": [63, 67], "octagon": [63, 67], "star": [63, 67], "hexagram": [63, 67], "tall": [63, 67], "hourglass": [63, 67], "bowti": [63, 67], "thin": [63, 67], "asterisk": [63, 67], "hash": [63, 67], "y": [63, 67], "ew": [63, 67], "n": [63, 67], "arrow": [63, 67], "add_chart_mark": [63, 67], "get_symbol_bar": 70, "create_asset": [71, 72, 79], "backward": [72, 73], "week": [72, 73], "1month": [72, 73], "present": [72, 73, 128, 136], "integ": [72, 73, 178, 193], "extract": 72, "24h": 72, "last_ohlc": 72, "asset_bas": [72, 73, 152, 163], "asset_quot": [72, 73, 152, 153, 163, 164], "regular": 73, "eurusd": 73, "should_use_last_clos": 74, "depric": 74, "comment": 74, "2022": [74, 127, 135], "yyyi": [76, 130, 138], "mm": [76, 130, 138], "dd": [76, 130, 138], "next_trading_dai": [76, 130, 138], "backtets": 77, "bid": 77, "vwap": [78, 81], "intial": 78, "keep_bar": 81, "arriv": 81, "extend": 81, "kept": 81, "datatim": 82, "regardless": 82, "accord": [82, 83, 89, 92, 98], "1990": 82, "tell": 82, "jan": 82, "1991": 82, "rather": 82, "last_dai": [85, 94], "last_minut": [86, 95], "nearest": [87, 88, 96, 97], "round_dai": [87, 96], "round_minut": [88, 97], "paus": [102, 103, 107, 113, 114, 118, 178, 193], "overrid": [102, 103, 113, 114], "infinit": [103, 114], "await": [103, 114, 143, 154], "broadcast": [105, 116], "goe": [105, 116], "origin": [105, 116], "program": [107, 118, 165, 178, 193], "order1": [111, 112, 122, 123, 145, 153, 156, 164], "order2": [111, 112, 122, 123, 145, 153, 156, 164], "meant": 124, "cboe": [125, 127, 129, 133, 135, 137], "sort": [127, 129, 131, 135, 137, 140], "expiry_d": [127, 132, 135, 141], "could": [128, 136], "theoret": [128, 136], "implied_volatil": [128, 136], "impli": [128, 136], "option_pric": [128, 136], "pv_dividend": [128, 136], "gamma": [128, 136], "vega": [128, 136], "theta": [128, 136], "opt_asset": [128, 136], "option_typ": [128, 136], "20221013": [129, 137], "20200101": [132, 141], "next_option_expir": 139, "get_next_option_expir": 139, "gtc": [146, 153, 157, 164], "still": [146, 157], "restric": [146, 157], "compound": [146, 157], "suffici": [146, 157], "213": [146, 157], "obect": [146, 157], "favor": [146, 157], "guarante": [146, 157], "penetr": [146, 157], "forc": [146, 157], "remaind": [146, 157], "gtd": [146, 157], "though": [146, 157], "dollar": [146, 157, 175, 190], "percent": [146, 157], "stop_loss": [146, 152, 157, 163], "stop_loss_limit": [146, 157], "2019": [146, 157], "chf": [146, 157], "aset": [146, 152, 153, 157, 163, 164], "41000": [146, 157], "expiration_d": [147, 152, 158, 163], "order_id": [148, 159], "get_tracked_ord": [149, 160], "system": [151, 162], "leav": [151, 162], "strike_pric": [152, 163], "trailing_stop_pric": [152, 163], "41250": [152, 163], "41325": [152, 163], "41300": [152, 163], "is_multileg": [153, 164], "debit": [153, 164], "post": [153, 164], "asset_btc": [153, 164], "asset_eth": [153, 164], "my_paramet": 165, "main_tick": 165, "ema_threshold": 165, "whenev": [167, 182], "therefor": [167, 182], "zero": [167, 182], "excut": [168, 183], "happen": [171, 186], "equal": [172, 173, 178, 187, 188, 193], "resov": [175, 190], "held": [175, 190], "speed": [178, 193], "m": [178, 193], "h": [178, 193], "2h": [178, 193], "remov": [180, 195], "store": 196, "runtim": 196, "persist": 196, "resum": 196, "namespac": 196, "prevent": 196, "effici": 196, "assign": 196, "notat": 196, "trade_count": 196, "current_count": 196, "all_vari": 196, "output": 196, "102": 196, "postgresql": 196, "5432": 196, "database_nam": 196, "tabl": 196, "backup_table_nam": 196, "vars_backup": 196, "last_upd": 196, "json": 196, "550e8400": 196, "var1": 196, "var2": 196, "optionscondormartingal": 196, "lumiwealth_api_kei": 17, "botspot": 17, "694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2": 17}, "objects": {"entities": [[19, 0, 0, "-", "asset"], [20, 0, 0, "-", "bars"], [21, 0, 0, "-", "data"], [22, 0, 0, "-", "order"], [23, 0, 0, "-", "position"], [24, 0, 0, "-", "trading_fee"]], "entities.asset": [[19, 1, 1, "", "Asset"], [19, 1, 1, "", "AssetsMapping"]], "entities.asset.Asset": [[19, 1, 1, "", "AssetType"], [19, 1, 1, "", "OptionRight"], [19, 2, 1, "", "_asset_types"], [19, 2, 1, "", "_right"], [19, 2, 1, "id0", "asset_type"], [19, 3, 1, "id1", "asset_type_must_be_one_of"], [19, 2, 1, "id2", "expiration"], [19, 3, 1, "", "from_dict"], [19, 3, 1, "", "is_valid"], [19, 2, 1, "id3", "multiplier"], [19, 2, 1, "id4", "precision"], [19, 2, 1, "id5", "right"], [19, 3, 1, "id6", "right_must_be_one_of"], [19, 2, 1, "id7", "strike"], [19, 2, 1, "id8", "symbol"], [19, 3, 1, "", "symbol2asset"], [19, 3, 1, "", "to_dict"], [19, 2, 1, "", "underlying_asset"]], "entities.asset.Asset.AssetType": [[19, 2, 1, "", "CRYPTO"], [19, 2, 1, "", "FOREX"], [19, 2, 1, "", "FUTURE"], [19, 2, 1, "", "INDEX"], [19, 2, 1, "", "MULTILEG"], [19, 2, 1, "", "OPTION"], [19, 2, 1, "", "STOCK"]], "entities.asset.Asset.OptionRight": [[19, 2, 1, "", "CALL"], [19, 2, 1, "", "PUT"]], "entities.bars": [[20, 1, 1, "", "Bars"], [20, 4, 1, "", "NoBarDataFound"]], "entities.bars.Bars": [[20, 3, 1, "id0", "aggregate_bars"], [20, 3, 1, "", "filter"], [20, 3, 1, "id1", "get_last_dividend"], [20, 3, 1, "id2", "get_last_price"], [20, 3, 1, "id3", "get_momentum"], [20, 3, 1, "", "get_total_dividends"], [20, 3, 1, "", "get_total_return"], [20, 3, 1, "", "get_total_return_pct"], [20, 3, 1, "", "get_total_return_pct_change"], [20, 3, 1, "", "get_total_stock_splits"], [20, 3, 1, "id4", "get_total_volume"], [20, 3, 1, "", "parse_bar_list"], [20, 3, 1, "", "split"]], "entities.data": [[21, 1, 1, "", "Data"]], "entities.data.Data": [[21, 2, 1, "", "MIN_TIMESTEP"], [21, 2, 1, "", "TIMESTEP_MAPPING"], [21, 3, 1, "", "_get_bars_dict"], [21, 2, 1, "", "asset"], [21, 3, 1, "id0", "check_data"], [21, 3, 1, "id1", "columns"], [21, 2, 1, "", "datalines"], [21, 2, 1, "", "date_end"], [21, 2, 1, "", "date_start"], [21, 2, 1, "", "df"], [21, 3, 1, "id2", "get_bars"], [21, 3, 1, "", "get_bars_between_dates"], [21, 3, 1, "id3", "get_iter_count"], [21, 3, 1, "id4", "get_last_price"], [21, 3, 1, "", "get_quote"], [21, 2, 1, "", "iter_index"], [21, 3, 1, "id5", "repair_times_and_fill"], [21, 3, 1, "id6", "set_date_format"], [21, 3, 1, "id7", "set_dates"], [21, 3, 1, "id8", "set_times"], [21, 2, 1, "", "sybmol"], [21, 2, 1, "", "timestep"], [21, 3, 1, "id9", "to_datalines"], [21, 2, 1, "", "trading_hours_end"], [21, 2, 1, "", "trading_hours_start"], [21, 3, 1, "id10", "trim_data"]], "entities.order": [[22, 1, 1, "", "Order"]], "entities.order.Order": [[22, 1, 1, "", "OrderClass"], [22, 1, 1, "", "OrderSide"], [22, 1, 1, "", "OrderStatus"], [22, 1, 1, "", "OrderType"], [22, 1, 1, "", "Transaction"], [22, 3, 1, "", "add_child_order"], [22, 3, 1, "", "add_transaction"], [22, 5, 1, "", "avg_fill_price"], [22, 3, 1, "", "cash_pending"], [22, 3, 1, "", "equivalent_status"], [22, 3, 1, "", "from_dict"], [22, 3, 1, "", "get_fill_price"], [22, 3, 1, "", "get_increment"], [22, 3, 1, "", "is_active"], [22, 3, 1, "", "is_buy_order"], [22, 3, 1, "", "is_canceled"], [22, 3, 1, "", "is_equivalent_status"], [22, 3, 1, "", "is_filled"], [22, 3, 1, "", "is_option"], [22, 3, 1, "", "is_parent"], [22, 3, 1, "", "is_sell_order"], [22, 5, 1, "", "quantity"], [22, 3, 1, "", "set_canceled"], [22, 3, 1, "", "set_error"], [22, 3, 1, "", "set_filled"], [22, 3, 1, "", "set_identifier"], [22, 3, 1, "", "set_new"], [22, 3, 1, "", "set_partially_filled"], [22, 5, 1, "", "status"], [22, 3, 1, "", "to_dict"], [22, 3, 1, "", "to_position"], [22, 3, 1, "", "update_raw"], [22, 3, 1, "", "update_trail_stop_price"], [22, 3, 1, "", "wait_to_be_closed"], [22, 3, 1, "", "wait_to_be_registered"], [22, 3, 1, "", "was_transmitted"]], "entities.order.Order.OrderClass": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "MULTILEG"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"]], "entities.order.Order.OrderSide": [[22, 2, 1, "", "BUY"], [22, 2, 1, "", "BUY_TO_CLOSE"], [22, 2, 1, "", "BUY_TO_COVER"], [22, 2, 1, "", "BUY_TO_OPEN"], [22, 2, 1, "", "SELL"], [22, 2, 1, "", "SELL_SHORT"], [22, 2, 1, "", "SELL_TO_CLOSE"], [22, 2, 1, "", "SELL_TO_OPEN"]], "entities.order.Order.OrderStatus": [[22, 2, 1, "", "CANCELED"], [22, 2, 1, "", "CANCELLING"], [22, 2, 1, "", "CASH_SETTLED"], [22, 2, 1, "", "ERROR"], [22, 2, 1, "", "EXPIRED"], [22, 2, 1, "", "FILLED"], [22, 2, 1, "", "NEW"], [22, 2, 1, "", "OPEN"], [22, 2, 1, "", "PARTIALLY_FILLED"], [22, 2, 1, "", "SUBMITTED"], [22, 2, 1, "", "UNPROCESSED"]], "entities.order.Order.OrderType": [[22, 2, 1, "", "BRACKET"], [22, 2, 1, "", "LIMIT"], [22, 2, 1, "", "MARKET"], [22, 2, 1, "", "OCO"], [22, 2, 1, "", "OTO"], [22, 2, 1, "", "STOP"], [22, 2, 1, "", "STOP_LIMIT"], [22, 2, 1, "", "TRAIL"]], "entities.order.Order.Transaction": [[22, 2, 1, "", "price"], [22, 2, 1, "", "quantity"]], "entities.position": [[23, 1, 1, "", "Position"]], "entities.position.Position": [[23, 3, 1, "", "add_order"], [23, 2, 1, "", "asset"], [23, 5, 1, "id0", "available"], [23, 2, 1, "", "avg_fill_price"], [23, 3, 1, "", "from_dict"], [23, 3, 1, "", "get_selling_order"], [23, 5, 1, "id1", "hold"], [23, 2, 1, "", "orders"], [23, 5, 1, "id2", "quantity"], [23, 2, 1, "", "strategy"], [23, 2, 1, "", "symbol"], [23, 3, 1, "", "to_dict"], [23, 3, 1, "", "value_type"]], "entities.trading_fee": [[24, 1, 1, "", "TradingFee"]], "lumibot.backtesting": [[43, 0, 0, "-", "backtesting_broker"]], "lumibot.backtesting.backtesting_broker": [[43, 1, 1, "", "BacktestingBroker"]], "lumibot.backtesting.backtesting_broker.BacktestingBroker": [[43, 2, 1, "", "IS_BACKTESTING_BROKER"], [43, 3, 1, "", "calculate_trade_cost"], [43, 3, 1, "", "cancel_order"], [43, 3, 1, "", "cash_settle_options_contract"], [43, 5, 1, "", "datetime"], [43, 3, 1, "", "get_historical_account_value"], [43, 3, 1, "", "get_last_bar"], [43, 3, 1, "", "get_time_to_close"], [43, 3, 1, "", "get_time_to_open"], [43, 3, 1, "", "is_market_open"], [43, 3, 1, "", "limit_order"], [43, 3, 1, "", "process_expired_option_contracts"], [43, 3, 1, "", "process_pending_orders"], [43, 3, 1, "", "should_continue"], [43, 3, 1, "", "stop_order"], [43, 3, 1, "", "submit_order"], [43, 3, 1, "", "submit_orders"]], "lumibot.brokers": [[12, 0, 0, "-", "alpaca"]], "lumibot.brokers.alpaca": [[12, 1, 1, "", "Alpaca"], [12, 1, 1, "", "OrderData"]], "lumibot.brokers.alpaca.Alpaca": [[12, 2, 1, "", "ASSET_TYPE_MAP"], [12, 2, 1, "", "api"], [12, 3, 1, "", "cancel_order"], [12, 3, 1, "", "get_historical_account_value"], [12, 3, 1, "id0", "get_time_to_close"], [12, 3, 1, "id1", "get_time_to_open"], [12, 3, 1, "id2", "get_timestamp"], [12, 3, 1, "id3", "is_market_open"], [12, 3, 1, "", "map_asset_type"]], "lumibot.brokers.alpaca.OrderData": [[12, 3, 1, "", "to_request_fields"]], "lumibot": [[44, 0, 0, "-", "data_sources"]], "lumibot.data_sources": [[44, 0, 0, "-", "data_source"], [43, 0, 0, "-", "data_source_backtesting"], [44, 0, 0, "-", "pandas_data"], [44, 0, 0, "-", "yahoo_data"]], "lumibot.data_sources.data_source": [[44, 1, 1, "", "DataSource"]], "lumibot.data_sources.data_source.DataSource": [[44, 2, 1, "", "DEFAULT_PYTZ"], [44, 2, 1, "", "DEFAULT_TIMEZONE"], [44, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "calculate_greeks"], [44, 3, 1, "", "convert_timestep_str_to_timedelta"], [44, 3, 1, "", "get_bars"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_datetime"], [44, 3, 1, "", "get_datetime_range"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_day"], [44, 3, 1, "", "get_last_minute"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_round_day"], [44, 3, 1, "", "get_round_minute"], [44, 3, 1, "", "get_strikes"], [44, 3, 1, "", "get_timestamp"], [44, 3, 1, "", "get_timestep"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "localize_datetime"], [44, 3, 1, "", "query_greeks"], [44, 3, 1, "", "to_default_timezone"]], "lumibot.data_sources.data_source_backtesting": [[43, 1, 1, "", "DataSourceBacktesting"]], "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting": [[43, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [43, 3, 1, "", "get_datetime"], [43, 3, 1, "", "get_datetime_range"]], "lumibot.data_sources.pandas_data": [[44, 1, 1, "", "PandasData"]], "lumibot.data_sources.pandas_data.PandasData": [[44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "clean_trading_times"], [44, 3, 1, "", "find_asset_in_data_store"], [44, 3, 1, "", "get_asset_by_name"], [44, 3, 1, "", "get_asset_by_symbol"], [44, 3, 1, "", "get_assets"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_last_prices"], [44, 3, 1, "", "get_start_datetime_and_ts_unit"], [44, 3, 1, "", "get_trading_days_pandas"], [44, 3, 1, "", "get_yesterday_dividend"], [44, 3, 1, "", "get_yesterday_dividends"], [44, 3, 1, "", "load_data"], [44, 3, 1, "", "update_date_index"]], "lumibot.data_sources.yahoo_data": [[44, 1, 1, "", "YahooData"]], "lumibot.data_sources.yahoo_data.YahooData": [[44, 2, 1, "", "MIN_TIMESTEP"], [44, 2, 1, "", "SOURCE"], [44, 2, 1, "", "TIMESTEP_MAPPING"], [44, 3, 1, "", "get_chains"], [44, 3, 1, "", "get_historical_prices"], [44, 3, 1, "", "get_last_price"], [44, 3, 1, "", "get_strikes"]], "lumibot.strategies.strategy": [[45, 0, 0, "-", "Strategy"]], "lumibot.strategies.strategy.Strategy": [[66, 6, 1, "", "add_line"], [67, 6, 1, "", "add_marker"], [28, 6, 1, "", "after_market_closes"], [113, 6, 1, "", "await_market_to_close"], [114, 6, 1, "", "await_market_to_open"], [29, 6, 1, "", "before_market_closes"], [30, 6, 1, "", "before_market_opens"], [31, 6, 1, "", "before_starting_trading"], [154, 6, 1, "", "cancel_open_orders"], [155, 6, 1, "", "cancel_order"], [156, 6, 1, "", "cancel_orders"], [71, 6, 1, "", "cancel_realtime_bars"], [182, 5, 1, "", "cash"], [157, 6, 1, "", "create_order"], [183, 5, 1, "", "first_iteration"], [158, 6, 1, "", "get_asset_potential_total"], [55, 6, 1, "", "get_cash"], [133, 6, 1, "", "get_chain"], [134, 6, 1, "", "get_chains"], [92, 6, 1, "", "get_datetime"], [93, 6, 1, "", "get_datetime_range"], [135, 6, 1, "", "get_expiration"], [136, 6, 1, "", "get_greeks"], [72, 6, 1, "", "get_historical_prices"], [73, 6, 1, "", "get_historical_prices_for_assets"], [94, 6, 1, "", "get_last_day"], [95, 6, 1, "", "get_last_minute"], [74, 6, 1, "", "get_last_price"], [75, 6, 1, "", "get_last_prices"], [68, 6, 1, "", "get_lines_df"], [69, 6, 1, "", "get_markers_df"], [137, 6, 1, "", "get_multiplier"], [138, 6, 1, "", "get_next_trading_day"], [139, 6, 1, "", "get_option_expiration_after_date"], [159, 6, 1, "", "get_order"], [160, 6, 1, "", "get_orders"], [115, 6, 1, "", "get_parameters"], [57, 6, 1, "", "get_portfolio_value"], [58, 6, 1, "", "get_position"], [59, 6, 1, "", "get_positions"], [77, 6, 1, "", "get_quote"], [78, 6, 1, "", "get_realtime_bars"], [96, 6, 1, "", "get_round_day"], [97, 6, 1, "", "get_round_minute"], [161, 6, 1, "", "get_selling_order"], [140, 6, 1, "", "get_strikes"], [98, 6, 1, "", "get_timestamp"], [79, 6, 1, "", "get_yesterday_dividend"], [80, 6, 1, "", "get_yesterday_dividends"], [184, 5, 1, "", "initial_budget"], [32, 6, 1, "", "initialize"], [185, 5, 1, "", "is_backtesting"], [186, 5, 1, "", "last_on_trading_iteration_datetime"], [99, 6, 1, "", "localize_datetime"], [116, 6, 1, "", "log_message"], [187, 5, 1, "", "minutes_before_closing"], [188, 5, 1, "", "minutes_before_opening"], [189, 5, 1, "", "name"], [33, 6, 1, "", "on_abrupt_closing"], [34, 6, 1, "", "on_bot_crash"], [35, 6, 1, "", "on_canceled_order"], [36, 6, 1, "", "on_filled_order"], [37, 6, 1, "", "on_new_order"], [38, 6, 1, "", "on_parameters_updated"], [39, 6, 1, "", "on_partially_filled_order"], [40, 6, 1, "", "on_trading_iteration"], [141, 6, 1, "", "options_expiry_to_datetime_date"], [190, 5, 1, "", "portfolio_value"], [191, 5, 1, "", "pytz"], [192, 5, 1, "", "quote_asset"], [1, 6, 1, "", "run_backtest"], [162, 6, 1, "", "sell_all"], [117, 6, 1, "", "set_market"], [60, 6, 1, "", "set_parameters"], [118, 6, 1, "", "sleep"], [193, 5, 1, "", "sleeptime"], [81, 6, 1, "", "start_realtime_bars"], [163, 6, 1, "", "submit_order"], [164, 6, 1, "", "submit_orders"], [194, 5, 1, "", "timezone"], [100, 6, 1, "", "to_default_timezone"], [42, 6, 1, "", "trace_stats"], [195, 5, 1, "", "unspent_money"], [119, 6, 1, "", "update_parameters"], [120, 6, 1, "", "wait_for_order_execution"], [121, 6, 1, "", "wait_for_order_registration"], [122, 6, 1, "", "wait_for_orders_execution"], [123, 6, 1, "", "wait_for_orders_registration"]], "lumibot.traders": [[46, 0, 0, "-", "trader"]], "lumibot.traders.trader": [[46, 1, 1, "", "Trader"]], "lumibot.traders.trader.Trader": [[46, 3, 1, "", "add_strategy"], [46, 5, 1, "", "is_backtest_broker"], [46, 3, 1, "", "run_all"], [46, 3, 1, "", "run_all_async"], [46, 3, 1, "", "stop_all"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:exception", "5": "py:property", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "exception", "Python exception"], "5": ["py", "property", "Python property"], "6": ["py", "function", "Python function"]}, "titleterms": {"backtest": [0, 1, 2, 6, 8, 25, 26, 43], "file": [0, 2, 3, 9], "gener": [0, 2, 17], "from": [0, 2], "content": [0, 11, 18, 26, 27, 44, 47], "function": [1, 61], "how": [2, 196], "To": 2, "instal": [2, 25, 26], "lumibot": [2, 25, 26], "choos": [2, 17], "data": [2, 5, 14, 21, 43, 44, 70], "sourc": [2, 43, 44], "run": [2, 13, 16, 25], "polygon": [2, 6], "io": [2, 6], "tearsheet": [2, 7], "html": [2, 7], "trade": [2, 9, 14, 24, 25, 26], "indic": [2, 3, 26], "conclus": [2, 17], "log": 4, "csv": [4, 5], "panda": [5, 44], "other": 5, "exampl": [5, 13, 14, 16, 17], "datafram": 5, "In": 5, "summari": [5, 41], "thetadata": 8, "yahoo": [10, 44], "broker": [11, 13, 14, 15, 17, 43], "alpaca": [12, 17, 25], "document": [12, 19, 20, 22, 45], "crypto": 13, "us": [13, 14], "ccxt": 13, "configur": [13, 14, 16, 17, 25, 196], "set": 13, "your": [13, 16, 17, 25, 26], "strategi": [13, 14, 16, 17, 25, 26, 45, 47, 166], "full": [13, 16], "interact": [14, 15, 17], "market": 14, "subscript": 14, "two": 14, "factor": 14, "authent": 14, "2fa": 14, "secondari": 14, "usernam": 14, "paper": [14, 25], "account": [14, 25, 48], "setup": 14, "legaci": [15, 17], "tradier": [16, 17], "get": [16, 25, 26], "start": [16, 25, 26], "deploy": 17, "guid": [17, 196], "platform": 17, "deploi": 17, "render": 17, "replit": 17, "secret": 17, "coinbas": 17, "kraken": 17, "environ": 17, "variabl": [17, 196], "final": 17, "step": [17, 25, 26], "entiti": 18, "asset": 19, "bar": 20, "order": [22, 142], "advanc": 22, "type": 22, "With": [22, 25], "leg": 22, "posit": 23, "fee": [24, 25], "what": 25, "i": 25, "lumiwealth": 25, "1": [25, 26], "packag": 25, "2": [25, 26], "import": 25, "follow": 25, "modul": [25, 44], "3": [25, 26], "creat": [25, 26], "an": 25, "4": 25, "api": 25, "kei": 25, "5": 25, "class": 25, "6": 25, "instanti": 25, "trader": [25, 46], "7": 25, "option": [25, 124], "8": 25, "ad": 25, "profil": 25, "improv": 25, "perform": 25, "algorithm": 26, "librari": 26, "take": 26, "bot": 26, "live": 26, "all": 26, "togeth": 26, "addit": 26, "resourc": 26, "need": 26, "extra": 26, "help": 26, "tabl": 26, "lifecycl": 27, "method": [27, 47], "def": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "after_market_clos": 28, "refer": [28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42], "before_market_clos": 29, "before_market_open": 30, "before_starting_trad": 31, "initi": 32, "on_abrupt_clos": 33, "on_bot_crash": 34, "on_canceled_ord": 35, "on_filled_ord": 36, "on_new_ord": 37, "on_parameters_upd": 38, "on_partially_filled_ord": 39, "on_trading_iter": 40, "trace_stat": 42, "manag": [48, 142], "self": [49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196], "get_cash": [49, 55], "get_paramet": [50, 56, 104, 115], "get_portfolio_valu": [51, 57], "get_posit": [52, 53, 58, 59], "set_paramet": [54, 60], "chart": 61, "add_lin": [62, 66], "add_mark": [63, 67], "get_lines_df": [64, 68], "get_markers_df": [65, 69], "cancel_realtime_bar": 71, "get_historical_pric": 72, "get_historical_prices_for_asset": 73, "get_last_pric": [74, 75], "get_next_trading_dai": [76, 130, 138], "get_quot": 77, "get_realtime_bar": 78, "get_yesterday_dividend": [79, 80], "start_realtime_bar": 81, "datetim": 82, "get_datetim": [83, 92], "get_datetime_rang": [84, 93], "get_last_dai": [85, 94], "get_last_minut": [86, 95], "get_round_dai": [87, 96], "get_round_minut": [88, 97], "get_timestamp": [89, 98], "localize_datetim": [90, 99], "to_default_timezon": [91, 100], "miscellan": 101, "await_market_to_clos": [102, 113], "await_market_to_open": [103, 114], "log_messag": [105, 116], "set_market": [106, 117], "sleep": [107, 118], "update_paramet": [108, 119], "wait_for_order_execut": [109, 120], "wait_for_order_registr": [110, 121], "wait_for_orders_execut": [111, 122], "wait_for_orders_registr": [112, 123], "get_chain": [125, 126, 133, 134], "get_expir": [127, 135], "get_greek": [128, 136], "get_multipli": [129, 137], "get_strik": [131, 140], "options_expiry_to_datetime_d": [132, 141], "get_option_expiration_after_d": 139, "cancel_open_ord": [143, 154], "cancel_ord": [144, 145, 155, 156], "create_ord": [146, 157], "get_asset_potential_tot": [147, 158], "get_ord": [148, 149, 159, 160], "get_selling_ord": [150, 161], "sell_al": [151, 162], "submit_ord": [152, 153, 163, 164], "paramet": 165, "properti": 166, "cash": [167, 182], "first_iter": [168, 183], "initial_budget": [169, 184], "is_backtest": [170, 185], "last_on_trading_iteration_datetim": [171, 186], "minutes_before_clos": [172, 187], "minutes_before_open": [173, 188], "name": [174, 189], "portfolio_valu": [175, 190], "pytz": [176, 181, 191], "quote_asset": [177, 192], "sleeptim": [178, 193], "timezon": [179, 194], "unspent_monei": [180, 195], "backup": 196, "restor": 196, "It": 196, "work": 196, "benefit": 196, "var": 196, "usag": 196, "databas": 196, "storag": 196, "structur": 196}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"Backtesting": [[0, "backtesting"], [43, "backtesting"]], "Files Generated from Backtesting": [[0, "files-generated-from-backtesting"], [2, "files-generated-from-backtesting"]], "Contents:": [[0, null], [11, null], [18, null], [27, null], [47, null]], "Backtesting Function": [[1, "backtesting-function"]], "How To Backtest": [[2, "how-to-backtest"]], "Installing LumiBot": [[2, "installing-lumibot"]], "Choosing a Data Source": [[2, "choosing-a-data-source"]], "Running a Backtest with Polygon.io": [[2, "running-a-backtest-with-polygon-io"]], "Tearsheet HTML": [[2, "tearsheet-html"], [7, "tearsheet-html"]], "Trades Files": [[2, "trades-files"], [9, "trades-files"]], "Indicators Files": [[2, "indicators-files"], [3, "indicators-files"]], "Conclusion": [[2, "conclusion"], [17, "conclusion"]], "Logs CSV": [[4, "logs-csv"]], "Pandas (CSV or other data)": [[5, "pandas-csv-or-other-data"]], "Example Dataframe": [[5, "id1"]], "In Summary": [[5, "in-summary"]], "Polygon.io Backtesting": [[6, "polygon-io-backtesting"]], "ThetaData Backtesting": [[8, "thetadata-backtesting"]], "Yahoo": [[10, "yahoo"], [44, "module-lumibot.data_sources.yahoo_data"]], "Brokers": [[11, "brokers"]], "Alpaca": [[12, "alpaca"]], "Documentation": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [22, "module-entities.order"], [45, "module-lumibot.strategies.strategy.Strategy"]], "Crypto Brokers (Using CCXT)": [[13, "crypto-brokers-using-ccxt"]], "Configuration Settings": [[13, "configuration-settings"]], "Running Your Strategy": [[13, "running-your-strategy"], [16, "running-your-strategy"]], "Full Example Strategy": [[13, "full-example-strategy"], [16, "full-example-strategy"]], "Interactive Brokers": [[14, "interactive-brokers"]], "Market Data Subscriptions": [[14, "market-data-subscriptions"]], "Two-Factor Authentication (2FA)": [[14, "two-factor-authentication-2fa"]], "Using a Secondary Username": [[14, "using-a-secondary-username"]], "Using a Paper Trading Account": [[14, "using-a-paper-trading-account"]], "Strategy Setup": [[14, "strategy-setup"]], "Interactive Brokers Configuration": [[14, "id1"], [17, "interactive-brokers-configuration"], [17, "id25"]], "Example Strategy": [[14, "example-strategy"]], "Interactive Brokers Legacy": [[15, "interactive-brokers-legacy"]], "Tradier": [[16, "tradier"]], "Getting Started": [[16, "getting-started"], [26, "getting-started"]], "Configuration": [[16, "configuration"]], "Deployment Guide": [[17, "deployment-guide"]], "Example Strategy for Deployment": [[17, "example-strategy-for-deployment"]], "Choosing Your Deployment Platform": [[17, "id1"]], "Deploying to Render": [[17, "id2"]], "Deploying to Replit": [[17, "id3"]], "Secrets Configuration": [[17, "secrets-configuration"]], "Broker Configuration": [[17, "broker-configuration"]], "Tradier Configuration": [[17, "tradier-configuration"], [17, "id21"]], "Alpaca Configuration": [[17, "alpaca-configuration"], [17, "id22"]], "Coinbase Configuration": [[17, "coinbase-configuration"], [17, "id23"]], "Kraken Configuration": [[17, "kraken-configuration"], [17, "id24"]], "Interactive Brokers-Legacy Configuration": [[17, "interactive-brokers-legacy-configuration"], [17, "id26"]], "General Environment Variables": [[17, "general-environment-variables"], [17, "id27"]], "Final Steps": [[17, "final-steps"]], "Entities": [[18, "entities"]], "Asset": [[19, "asset"]], "Bars": [[20, "bars"]], "Data": [[21, "module-entities.data"], [70, "data"]], "Order": [[22, "order"]], "Advanced Order Types": [[22, "advanced-order-types"]], "Order With Legs": [[22, "order-with-legs"]], "Position": [[23, "module-entities.position"]], "Trading Fee": [[24, "module-entities.trading_fee"]], "What is Lumibot?": [[25, "what-is-lumibot"]], "Lumiwealth": [[25, "id1"]], "Getting Started With Lumibot": [[25, "getting-started-with-lumibot"]], "Step 1: Install the Package": [[25, "step-1-install-the-package"]], "Step 2: Import the Following Modules": [[25, "step-2-import-the-following-modules"]], "Step 3: Create an Alpaca Paper Trading Account": [[25, "step-3-create-an-alpaca-paper-trading-account"]], "Step 4: Configure Your API Keys": [[25, "step-4-configure-your-api-keys"]], "Step 5: Create a Strategy Class": [[25, "step-5-create-a-strategy-class"]], "Step 6: Instantiate the Trader, Alpaca, and Strategy Classes": [[25, "step-6-instantiate-the-trader-alpaca-and-strategy-classes"]], "Step 7: Backtest the Strategy (Optional)": [[25, "step-7-backtest-the-strategy-optional"]], "Step 8: Run the Strategy": [[25, "step-8-run-the-strategy"]], "Adding Trading Fees": [[25, "adding-trading-fees"]], "Profiling to Improve Performance": [[25, "profiling-to-improve-performance"]], "Lumibot: Backtesting and Algorithmic Trading Library": [[26, "lumibot-backtesting-and-algorithmic-trading-library"]], "Step 1: Install Lumibot": [[26, "step-1-install-lumibot"]], "Step 2: Create a Strategy for Backtesting": [[26, "step-2-create-a-strategy-for-backtesting"]], "Step 3: Take Your Bot Live": [[26, "step-3-take-your-bot-live"]], "All Together": [[26, "all-together"]], "Additional Resources": [[26, "additional-resources"]], "Need Extra Help?": [[26, "need-extra-help"]], "Table of Contents": [[26, "table-of-contents"]], "Indices and tables": [[26, "indices-and-tables"]], "Lifecycle Methods": [[27, "lifecycle-methods"]], "def after_market_closes": [[28, "def-after-market-closes"]], "Reference": [[28, "reference"], [29, "reference"], [30, "reference"], [31, "reference"], [32, "reference"], [33, "reference"], [34, "reference"], [35, "reference"], [36, "reference"], [37, "reference"], [38, "reference"], [39, "reference"], [40, "reference"], [42, "reference"]], "def before_market_closes": [[29, "def-before-market-closes"]], "def before_market_opens": [[30, "def-before-market-opens"]], "def before_starting_trading": [[31, "def-before-starting-trading"]], "def initialize": [[32, "def-initialize"]], "def on_abrupt_closing": [[33, "def-on-abrupt-closing"]], "def on_bot_crash": [[34, "def-on-bot-crash"]], "def on_canceled_order": [[35, "def-on-canceled-order"]], "def on_filled_order": [[36, "def-on-filled-order"]], "def on_new_order": [[37, "def-on-new-order"]], "def on_parameters_updated": [[38, "def-on-parameters-updated"]], "def on_partially_filled_order": [[39, "def-on-partially-filled-order"]], "def on_trading_iteration": [[40, "def-on-trading-iteration"]], "Summary": [[41, "summary"]], "def trace_stats": [[42, "def-trace-stats"]], "Backtesting Broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "Data Source Backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "Data Sources": [[44, "data-sources"]], "Data Source": [[44, "module-lumibot.data_sources.data_source"]], "Pandas": [[44, "module-lumibot.data_sources.pandas_data"]], "Module contents": [[44, "module-lumibot.data_sources"]], "Strategies": [[45, "strategies"]], "Traders": [[46, "traders"]], "Trader": [[46, "module-lumibot.traders.trader"]], "Strategy Methods": [[47, "strategy-methods"]], "Account Management": [[48, "account-management"]], "self.get_cash": [[49, "self-get-cash"], [55, "self-get-cash"]], "self.get_parameters": [[50, "self-get-parameters"], [56, "self-get-parameters"], [104, "self-get-parameters"], [115, "self-get-parameters"]], "self.get_portfolio_value": [[51, "self-get-portfolio-value"], [57, "self-get-portfolio-value"]], "self.get_position": [[52, "self-get-position"], [58, "self-get-position"]], "self.get_positions": [[53, "self-get-positions"], [59, "self-get-positions"]], "self.set_parameters": [[54, "self-set-parameters"], [60, "self-set-parameters"]], "Chart Functions": [[61, "chart-functions"]], "self.add_line": [[62, "self-add-line"], [66, "self-add-line"]], "self.add_marker": [[63, "self-add-marker"], [67, "self-add-marker"]], "self.get_lines_df": [[64, "self-get-lines-df"], [68, "self-get-lines-df"]], "self.get_markers_df": [[65, "self-get-markers-df"], [69, "self-get-markers-df"]], "self.cancel_realtime_bars": [[71, "self-cancel-realtime-bars"]], "self.get_historical_prices": [[72, "self-get-historical-prices"]], "self.get_historical_prices_for_assets": [[73, "self-get-historical-prices-for-assets"]], "self.get_last_price": [[74, "self-get-last-price"]], "self.get_last_prices": [[75, "self-get-last-prices"]], "self.get_next_trading_day": [[76, "self-get-next-trading-day"], [130, "self-get-next-trading-day"], [138, "self-get-next-trading-day"]], "self.get_quote": [[77, "self-get-quote"]], "self.get_realtime_bars": [[78, "self-get-realtime-bars"]], "self.get_yesterday_dividend": [[79, "self-get-yesterday-dividend"]], "self.get_yesterday_dividends": [[80, "self-get-yesterday-dividends"]], "self.start_realtime_bars": [[81, "self-start-realtime-bars"]], "DateTime": [[82, "datetime"]], "self.get_datetime": [[83, "self-get-datetime"], [92, "self-get-datetime"]], "self.get_datetime_range": [[84, "self-get-datetime-range"], [93, "self-get-datetime-range"]], "self.get_last_day": [[85, "self-get-last-day"], [94, "self-get-last-day"]], "self.get_last_minute": [[86, "self-get-last-minute"], [95, "self-get-last-minute"]], "self.get_round_day": [[87, "self-get-round-day"], [96, "self-get-round-day"]], "self.get_round_minute": [[88, "self-get-round-minute"], [97, "self-get-round-minute"]], "self.get_timestamp": [[89, "self-get-timestamp"], [98, "self-get-timestamp"]], "self.localize_datetime": [[90, "self-localize-datetime"], [99, "self-localize-datetime"]], "self.to_default_timezone": [[91, "self-to-default-timezone"], [100, "self-to-default-timezone"]], "Miscellaneous": [[101, "miscellaneous"]], "self.await_market_to_close": [[102, "self-await-market-to-close"], [113, "self-await-market-to-close"]], "self.await_market_to_open": [[103, "self-await-market-to-open"], [114, "self-await-market-to-open"]], "self.log_message": [[105, "self-log-message"], [116, "self-log-message"]], "self.set_market": [[106, "self-set-market"], [117, "self-set-market"]], "self.sleep": [[107, "self-sleep"], [118, "self-sleep"]], "self.update_parameters": [[108, "self-update-parameters"], [119, "self-update-parameters"]], "self.wait_for_order_execution": [[109, "self-wait-for-order-execution"], [120, "self-wait-for-order-execution"]], "self.wait_for_order_registration": [[110, "self-wait-for-order-registration"], [121, "self-wait-for-order-registration"]], "self.wait_for_orders_execution": [[111, "self-wait-for-orders-execution"], [122, "self-wait-for-orders-execution"]], "self.wait_for_orders_registration": [[112, "self-wait-for-orders-registration"], [123, "self-wait-for-orders-registration"]], "Options": [[124, "options"]], "self.get_chain": [[125, "self-get-chain"], [133, "self-get-chain"]], "self.get_chains": [[126, "self-get-chains"], [134, "self-get-chains"]], "self.get_expiration": [[127, "self-get-expiration"], [135, "self-get-expiration"]], "self.get_greeks": [[128, "self-get-greeks"], [136, "self-get-greeks"]], "self.get_multiplier": [[129, "self-get-multiplier"], [137, "self-get-multiplier"]], "self.get_strikes": [[131, "self-get-strikes"], [140, "self-get-strikes"]], "self.options_expiry_to_datetime_date": [[132, "self-options-expiry-to-datetime-date"], [141, "self-options-expiry-to-datetime-date"]], "self.get_option_expiration_after_date": [[139, "self-get-option-expiration-after-date"]], "Order Management": [[142, "order-management"]], "self.cancel_open_orders": [[143, "self-cancel-open-orders"], [154, "self-cancel-open-orders"]], "self.cancel_order": [[144, "self-cancel-order"], [155, "self-cancel-order"]], "self.cancel_orders": [[145, "self-cancel-orders"], [156, "self-cancel-orders"]], "self.create_order": [[146, "self-create-order"], [157, "self-create-order"]], "self.get_asset_potential_total": [[147, "self-get-asset-potential-total"], [158, "self-get-asset-potential-total"]], "self.get_order": [[148, "self-get-order"], [159, "self-get-order"]], "self.get_orders": [[149, "self-get-orders"], [160, "self-get-orders"]], "self.get_selling_order": [[150, "self-get-selling-order"], [161, "self-get-selling-order"]], "self.sell_all": [[151, "self-sell-all"], [162, "self-sell-all"]], "self.submit_order": [[152, "self-submit-order"], [163, "self-submit-order"]], "self.submit_orders": [[153, "self-submit-orders"], [164, "self-submit-orders"]], "Parameters": [[165, "parameters"]], "Strategy Properties": [[166, "strategy-properties"]], "self.cash": [[167, "self-cash"], [182, "self-cash"]], "self.first_iteration": [[168, "self-first-iteration"], [183, "self-first-iteration"]], "self.initial_budget": [[169, "self-initial-budget"], [184, "self-initial-budget"]], "self.is_backtesting": [[170, "self-is-backtesting"], [185, "self-is-backtesting"]], "self.last_on_trading_iteration_datetime": [[171, "self-last-on-trading-iteration-datetime"], [186, "self-last-on-trading-iteration-datetime"]], "self.minutes_before_closing": [[172, "self-minutes-before-closing"], [187, "self-minutes-before-closing"]], "self.minutes_before_opening": [[173, "self-minutes-before-opening"], [188, "self-minutes-before-opening"]], "self.name": [[174, "self-name"], [189, "self-name"]], "self.portfolio_value": [[175, "self-portfolio-value"], [190, "self-portfolio-value"]], "self.pytz": [[176, "self-pytz"], [181, "self-pytz"], [191, "self-pytz"]], "self.quote_asset": [[177, "self-quote-asset"], [192, "self-quote-asset"]], "self.sleeptime": [[178, "self-sleeptime"], [193, "self-sleeptime"]], "self.timezone": [[179, "self-timezone"], [194, "self-timezone"]], "self.unspent_money": [[180, "self-unspent-money"], [195, "self-unspent-money"]], "Variable Backup & Restore": [[196, "variable-backup-restore"]], "How It Works": [[196, "how-it-works"]], "Benefits of self.vars": [[196, "benefits-of-self-vars"]], "Usage Guide": [[196, "usage-guide"]], "Database Configuration": [[196, "database-configuration"]], "Database Storage Structure": [[196, "database-storage-structure"]]}, "indexentries": {"run_backtest() (in module lumibot.strategies.strategy.strategy)": [[1, "lumibot.strategies.strategy.Strategy.run_backtest"]], "asset_type_map (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.ASSET_TYPE_MAP"]], "alpaca (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.Alpaca"]], "orderdata (class in lumibot.brokers.alpaca)": [[12, "lumibot.brokers.alpaca.OrderData"]], "api (lumibot.brokers.alpaca.alpaca attribute)": [[12, "lumibot.brokers.alpaca.Alpaca.api"]], "cancel_order() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.cancel_order"]], "get_historical_account_value() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.get_historical_account_value"]], "get_time_to_close() (lumibot.brokers.alpaca.alpaca method)": [[12, "id0"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_close"]], "get_time_to_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id1"], [12, "lumibot.brokers.alpaca.Alpaca.get_time_to_open"]], "get_timestamp() (lumibot.brokers.alpaca.alpaca method)": [[12, "id2"], [12, "lumibot.brokers.alpaca.Alpaca.get_timestamp"]], "is_market_open() (lumibot.brokers.alpaca.alpaca method)": [[12, "id3"], [12, "lumibot.brokers.alpaca.Alpaca.is_market_open"]], "lumibot.brokers.alpaca": [[12, "module-lumibot.brokers.alpaca"]], "map_asset_type() (lumibot.brokers.alpaca.alpaca method)": [[12, "lumibot.brokers.alpaca.Alpaca.map_asset_type"]], "module": [[12, "module-lumibot.brokers.alpaca"], [19, "module-entities.asset"], [20, "module-entities.bars"], [21, "module-entities.data"], [22, "module-entities.order"], [23, "module-entities.position"], [24, "module-entities.trading_fee"], [43, "module-lumibot.backtesting.backtesting_broker"], [43, "module-lumibot.data_sources.data_source_backtesting"], [44, "module-lumibot.data_sources"], [44, "module-lumibot.data_sources.data_source"], [44, "module-lumibot.data_sources.pandas_data"], [44, "module-lumibot.data_sources.yahoo_data"], [45, "module-lumibot.strategies.strategy.Strategy"], [46, "module-lumibot.traders.trader"]], "to_request_fields() (lumibot.brokers.alpaca.orderdata method)": [[12, "lumibot.brokers.alpaca.OrderData.to_request_fields"]], "asset (class in entities.asset)": [[19, "entities.asset.Asset"]], "asset.assettype (class in entities.asset)": [[19, "entities.asset.Asset.AssetType"]], "asset.optionright (class in entities.asset)": [[19, "entities.asset.Asset.OptionRight"]], "assetsmapping (class in entities.asset)": [[19, "entities.asset.AssetsMapping"]], "call (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.CALL"]], "crypto (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.CRYPTO"]], "forex (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FOREX"]], "future (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.FUTURE"]], "index (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.INDEX"]], "multileg (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.MULTILEG"]], "option (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.OPTION"]], "put (entities.asset.asset.optionright attribute)": [[19, "entities.asset.Asset.OptionRight.PUT"]], "stock (entities.asset.asset.assettype attribute)": [[19, "entities.asset.Asset.AssetType.STOCK"]], "_asset_types (entities.asset.asset attribute)": [[19, "entities.asset.Asset._asset_types"]], "_right (entities.asset.asset attribute)": [[19, "entities.asset.Asset._right"]], "asset_type (entities.asset.asset attribute)": [[19, "entities.asset.Asset.asset_type"], [19, "id0"]], "asset_type_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.asset_type_must_be_one_of"], [19, "id1"]], "entities.asset": [[19, "module-entities.asset"]], "expiration (entities.asset.asset attribute)": [[19, "entities.asset.Asset.expiration"], [19, "id2"]], "from_dict() (entities.asset.asset class method)": [[19, "entities.asset.Asset.from_dict"]], "is_valid() (entities.asset.asset method)": [[19, "entities.asset.Asset.is_valid"]], "multiplier (entities.asset.asset attribute)": [[19, "entities.asset.Asset.multiplier"], [19, "id3"]], "precision (entities.asset.asset attribute)": [[19, "entities.asset.Asset.precision"], [19, "id4"]], "right (entities.asset.asset attribute)": [[19, "entities.asset.Asset.right"], [19, "id5"]], "right_must_be_one_of() (entities.asset.asset method)": [[19, "entities.asset.Asset.right_must_be_one_of"], [19, "id6"]], "strike (entities.asset.asset attribute)": [[19, "entities.asset.Asset.strike"], [19, "id7"]], "symbol (entities.asset.asset attribute)": [[19, "entities.asset.Asset.symbol"], [19, "id8"]], "symbol2asset() (entities.asset.asset class method)": [[19, "entities.asset.Asset.symbol2asset"]], "to_dict() (entities.asset.asset method)": [[19, "entities.asset.Asset.to_dict"]], "underlying_asset (entities.asset.asset attribute)": [[19, "entities.asset.Asset.underlying_asset"]], "bars (class in entities.bars)": [[20, "entities.bars.Bars"]], "nobardatafound": [[20, "entities.bars.NoBarDataFound"]], "aggregate_bars() (entities.bars.bars method)": [[20, "entities.bars.Bars.aggregate_bars"], [20, "id0"]], "entities.bars": [[20, "module-entities.bars"]], "filter() (entities.bars.bars method)": [[20, "entities.bars.Bars.filter"]], "get_last_dividend() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_dividend"], [20, "id1"]], "get_last_price() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_last_price"], [20, "id2"]], "get_momentum() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_momentum"], [20, "id3"]], "get_total_dividends() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_dividends"]], "get_total_return() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return"]], "get_total_return_pct() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct"]], "get_total_return_pct_change() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_return_pct_change"]], "get_total_stock_splits() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_stock_splits"]], "get_total_volume() (entities.bars.bars method)": [[20, "entities.bars.Bars.get_total_volume"], [20, "id4"]], "parse_bar_list() (entities.bars.bars class method)": [[20, "entities.bars.Bars.parse_bar_list"]], "split() (entities.bars.bars method)": [[20, "entities.bars.Bars.split"]], "data (class in entities.data)": [[21, "entities.data.Data"]], "min_timestep (entities.data.data attribute)": [[21, "entities.data.Data.MIN_TIMESTEP"]], "timestep_mapping (entities.data.data attribute)": [[21, "entities.data.Data.TIMESTEP_MAPPING"]], "_get_bars_dict() (entities.data.data method)": [[21, "entities.data.Data._get_bars_dict"]], "asset (entities.data.data attribute)": [[21, "entities.data.Data.asset"]], "check_data() (entities.data.data method)": [[21, "entities.data.Data.check_data"], [21, "id0"]], "columns() (entities.data.data method)": [[21, "entities.data.Data.columns"], [21, "id1"]], "datalines (entities.data.data attribute)": [[21, "entities.data.Data.datalines"]], "date_end (entities.data.data attribute)": [[21, "entities.data.Data.date_end"]], "date_start (entities.data.data attribute)": [[21, "entities.data.Data.date_start"]], "df (entities.data.data attribute)": [[21, "entities.data.Data.df"]], "entities.data": [[21, "module-entities.data"]], "get_bars() (entities.data.data method)": [[21, "entities.data.Data.get_bars"], [21, "id2"]], "get_bars_between_dates() (entities.data.data method)": [[21, "entities.data.Data.get_bars_between_dates"]], "get_iter_count() (entities.data.data method)": [[21, "entities.data.Data.get_iter_count"], [21, "id3"]], "get_last_price() (entities.data.data method)": [[21, "entities.data.Data.get_last_price"], [21, "id4"]], "get_quote() (entities.data.data method)": [[21, "entities.data.Data.get_quote"]], "iter_index (entities.data.data attribute)": [[21, "entities.data.Data.iter_index"]], "repair_times_and_fill() (entities.data.data method)": [[21, "entities.data.Data.repair_times_and_fill"], [21, "id5"]], "set_date_format() (entities.data.data method)": [[21, "entities.data.Data.set_date_format"], [21, "id6"]], "set_dates() (entities.data.data method)": [[21, "entities.data.Data.set_dates"], [21, "id7"]], "set_times() (entities.data.data method)": [[21, "entities.data.Data.set_times"], [21, "id8"]], "sybmol (entities.data.data attribute)": [[21, "entities.data.Data.sybmol"]], "timestep (entities.data.data attribute)": [[21, "entities.data.Data.timestep"]], "to_datalines() (entities.data.data method)": [[21, "entities.data.Data.to_datalines"], [21, "id9"]], "trading_hours_end (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_end"]], "trading_hours_start (entities.data.data attribute)": [[21, "entities.data.Data.trading_hours_start"]], "trim_data() (entities.data.data method)": [[21, "entities.data.Data.trim_data"], [21, "id10"]], "bracket (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.BRACKET"]], "bracket (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.BRACKET"]], "buy (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY"]], "buy_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_CLOSE"]], "buy_to_cover (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_COVER"]], "buy_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.BUY_TO_OPEN"]], "canceled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELED"]], "cancelling (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CANCELLING"]], "cash_settled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.CASH_SETTLED"]], "error (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.ERROR"]], "expired (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.EXPIRED"]], "filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.FILLED"]], "limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.LIMIT"]], "market (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.MARKET"]], "multileg (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.MULTILEG"]], "new (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.NEW"]], "oco (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OCO"]], "oco (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OCO"]], "open (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.OPEN"]], "oto (entities.order.order.orderclass attribute)": [[22, "entities.order.Order.OrderClass.OTO"]], "oto (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.OTO"]], "order (class in entities.order)": [[22, "entities.order.Order"]], "order.orderclass (class in entities.order)": [[22, "entities.order.Order.OrderClass"]], "order.orderside (class in entities.order)": [[22, "entities.order.Order.OrderSide"]], "order.orderstatus (class in entities.order)": [[22, "entities.order.Order.OrderStatus"]], "order.ordertype (class in entities.order)": [[22, "entities.order.Order.OrderType"]], "order.transaction (class in entities.order)": [[22, "entities.order.Order.Transaction"]], "partially_filled (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.PARTIALLY_FILLED"]], "sell (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL"]], "sell_short (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_SHORT"]], "sell_to_close (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_CLOSE"]], "sell_to_open (entities.order.order.orderside attribute)": [[22, "entities.order.Order.OrderSide.SELL_TO_OPEN"]], "stop (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP"]], "stop_limit (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.STOP_LIMIT"]], "submitted (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.SUBMITTED"]], "trail (entities.order.order.ordertype attribute)": [[22, "entities.order.Order.OrderType.TRAIL"]], "unprocessed (entities.order.order.orderstatus attribute)": [[22, "entities.order.Order.OrderStatus.UNPROCESSED"]], "add_child_order() (entities.order.order method)": [[22, "entities.order.Order.add_child_order"]], "add_transaction() (entities.order.order method)": [[22, "entities.order.Order.add_transaction"]], "avg_fill_price (entities.order.order property)": [[22, "entities.order.Order.avg_fill_price"]], "cash_pending() (entities.order.order method)": [[22, "entities.order.Order.cash_pending"]], "entities.order": [[22, "module-entities.order"]], "equivalent_status() (entities.order.order method)": [[22, "entities.order.Order.equivalent_status"]], "from_dict() (entities.order.order class method)": [[22, "entities.order.Order.from_dict"]], "get_fill_price() (entities.order.order method)": [[22, "entities.order.Order.get_fill_price"]], "get_increment() (entities.order.order method)": [[22, "entities.order.Order.get_increment"]], "is_active() (entities.order.order method)": [[22, "entities.order.Order.is_active"]], "is_buy_order() (entities.order.order method)": [[22, "entities.order.Order.is_buy_order"]], "is_canceled() (entities.order.order method)": [[22, "entities.order.Order.is_canceled"]], "is_equivalent_status() (entities.order.order class method)": [[22, "entities.order.Order.is_equivalent_status"]], "is_filled() (entities.order.order method)": [[22, "entities.order.Order.is_filled"]], "is_option() (entities.order.order method)": [[22, "entities.order.Order.is_option"]], "is_parent() (entities.order.order method)": [[22, "entities.order.Order.is_parent"]], "is_sell_order() (entities.order.order method)": [[22, "entities.order.Order.is_sell_order"]], "price (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.price"]], "quantity (entities.order.order property)": [[22, "entities.order.Order.quantity"]], "quantity (entities.order.order.transaction attribute)": [[22, "entities.order.Order.Transaction.quantity"]], "set_canceled() (entities.order.order method)": [[22, "entities.order.Order.set_canceled"]], "set_error() (entities.order.order method)": [[22, "entities.order.Order.set_error"]], "set_filled() (entities.order.order method)": [[22, "entities.order.Order.set_filled"]], "set_identifier() (entities.order.order method)": [[22, "entities.order.Order.set_identifier"]], "set_new() (entities.order.order method)": [[22, "entities.order.Order.set_new"]], "set_partially_filled() (entities.order.order method)": [[22, "entities.order.Order.set_partially_filled"]], "status (entities.order.order property)": [[22, "entities.order.Order.status"]], "to_dict() (entities.order.order method)": [[22, "entities.order.Order.to_dict"]], "to_position() (entities.order.order method)": [[22, "entities.order.Order.to_position"]], "update_raw() (entities.order.order method)": [[22, "entities.order.Order.update_raw"]], "update_trail_stop_price() (entities.order.order method)": [[22, "entities.order.Order.update_trail_stop_price"]], "wait_to_be_closed() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_closed"]], "wait_to_be_registered() (entities.order.order method)": [[22, "entities.order.Order.wait_to_be_registered"]], "was_transmitted() (entities.order.order method)": [[22, "entities.order.Order.was_transmitted"]], "position (class in entities.position)": [[23, "entities.position.Position"]], "add_order() (entities.position.position method)": [[23, "entities.position.Position.add_order"]], "asset (entities.position.position attribute)": [[23, "entities.position.Position.asset"]], "available (entities.position.position attribute)": [[23, "entities.position.Position.available"]], "available (entities.position.position property)": [[23, "id0"]], "avg_fill_price (entities.position.position attribute)": [[23, "entities.position.Position.avg_fill_price"]], "entities.position": [[23, "module-entities.position"]], "from_dict() (entities.position.position class method)": [[23, "entities.position.Position.from_dict"]], "get_selling_order() (entities.position.position method)": [[23, "entities.position.Position.get_selling_order"]], "hold (entities.position.position attribute)": [[23, "entities.position.Position.hold"]], "hold (entities.position.position property)": [[23, "id1"]], "orders (entities.position.position attribute)": [[23, "entities.position.Position.orders"]], "quantity (entities.position.position attribute)": [[23, "entities.position.Position.quantity"]], "quantity (entities.position.position property)": [[23, "id2"]], "strategy (entities.position.position attribute)": [[23, "entities.position.Position.strategy"]], "symbol (entities.position.position attribute)": [[23, "entities.position.Position.symbol"]], "to_dict() (entities.position.position method)": [[23, "entities.position.Position.to_dict"]], "value_type() (entities.position.position method)": [[23, "entities.position.Position.value_type"]], "tradingfee (class in entities.trading_fee)": [[24, "entities.trading_fee.TradingFee"]], "entities.trading_fee": [[24, "module-entities.trading_fee"]], "after_market_closes() (in module lumibot.strategies.strategy.strategy)": [[28, "lumibot.strategies.strategy.Strategy.after_market_closes"]], "before_market_closes() (in module lumibot.strategies.strategy.strategy)": [[29, "lumibot.strategies.strategy.Strategy.before_market_closes"]], "before_market_opens() (in module lumibot.strategies.strategy.strategy)": [[30, "lumibot.strategies.strategy.Strategy.before_market_opens"]], "before_starting_trading() (in module lumibot.strategies.strategy.strategy)": [[31, "lumibot.strategies.strategy.Strategy.before_starting_trading"]], "initialize() (in module lumibot.strategies.strategy.strategy)": [[32, "lumibot.strategies.strategy.Strategy.initialize"]], "on_abrupt_closing() (in module lumibot.strategies.strategy.strategy)": [[33, "lumibot.strategies.strategy.Strategy.on_abrupt_closing"]], "on_bot_crash() (in module lumibot.strategies.strategy.strategy)": [[34, "lumibot.strategies.strategy.Strategy.on_bot_crash"]], "on_canceled_order() (in module lumibot.strategies.strategy.strategy)": [[35, "lumibot.strategies.strategy.Strategy.on_canceled_order"]], "on_filled_order() (in module lumibot.strategies.strategy.strategy)": [[36, "lumibot.strategies.strategy.Strategy.on_filled_order"]], "on_new_order() (in module lumibot.strategies.strategy.strategy)": [[37, "lumibot.strategies.strategy.Strategy.on_new_order"]], "on_parameters_updated() (in module lumibot.strategies.strategy.strategy)": [[38, "lumibot.strategies.strategy.Strategy.on_parameters_updated"]], "on_partially_filled_order() (in module lumibot.strategies.strategy.strategy)": [[39, "lumibot.strategies.strategy.Strategy.on_partially_filled_order"]], "on_trading_iteration() (in module lumibot.strategies.strategy.strategy)": [[40, "lumibot.strategies.strategy.Strategy.on_trading_iteration"]], "trace_stats() (in module lumibot.strategies.strategy.strategy)": [[42, "lumibot.strategies.strategy.Strategy.trace_stats"]], "backtestingbroker (class in lumibot.backtesting.backtesting_broker)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker"]], "datasourcebacktesting (class in lumibot.data_sources.data_source_backtesting)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting"]], "is_backtesting_broker (lumibot.backtesting.backtesting_broker.backtestingbroker attribute)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.IS_BACKTESTING_BROKER"]], "is_backtesting_data_source (lumibot.data_sources.data_source_backtesting.datasourcebacktesting attribute)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.IS_BACKTESTING_DATA_SOURCE"]], "calculate_trade_cost() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.calculate_trade_cost"]], "cancel_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cancel_order"]], "cash_settle_options_contract() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cash_settle_options_contract"]], "datetime (lumibot.backtesting.backtesting_broker.backtestingbroker property)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.datetime"]], "get_datetime() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[43, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime_range"]], "get_historical_account_value() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_historical_account_value"]], "get_last_bar() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_last_bar"]], "get_time_to_close() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_close"]], "get_time_to_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_open"]], "is_market_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.is_market_open"]], "limit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.limit_order"]], "lumibot.backtesting.backtesting_broker": [[43, "module-lumibot.backtesting.backtesting_broker"]], "lumibot.data_sources.data_source_backtesting": [[43, "module-lumibot.data_sources.data_source_backtesting"]], "process_expired_option_contracts() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_expired_option_contracts"]], "process_pending_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_pending_orders"]], "should_continue() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.should_continue"]], "stop_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.stop_order"]], "submit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_order"]], "submit_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[43, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_orders"]], "default_pytz (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_PYTZ"]], "default_timezone (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.DEFAULT_TIMEZONE"]], "datasource (class in lumibot.data_sources.data_source)": [[44, "lumibot.data_sources.data_source.DataSource"]], "is_backtesting_data_source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.IS_BACKTESTING_DATA_SOURCE"]], "min_timestep (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.MIN_TIMESTEP"]], "min_timestep (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.MIN_TIMESTEP"]], "pandasdata (class in lumibot.data_sources.pandas_data)": [[44, "lumibot.data_sources.pandas_data.PandasData"]], "source (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.SOURCE"]], "source (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.SOURCE"]], "source (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.SOURCE"]], "timestep_mapping (lumibot.data_sources.data_source.datasource attribute)": [[44, "lumibot.data_sources.data_source.DataSource.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.pandas_data.pandasdata attribute)": [[44, "lumibot.data_sources.pandas_data.PandasData.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[44, "lumibot.data_sources.yahoo_data.YahooData.TIMESTEP_MAPPING"]], "yahoodata (class in lumibot.data_sources.yahoo_data)": [[44, "lumibot.data_sources.yahoo_data.YahooData"]], "calculate_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.calculate_greeks"]], "clean_trading_times() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.clean_trading_times"]], "convert_timestep_str_to_timedelta() (lumibot.data_sources.data_source.datasource static method)": [[44, "lumibot.data_sources.data_source.DataSource.convert_timestep_str_to_timedelta"]], "find_asset_in_data_store() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.find_asset_in_data_store"]], "get_asset_by_name() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_name"]], "get_asset_by_symbol() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_symbol"]], "get_assets() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_assets"]], "get_bars() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_bars"]], "get_chains() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_chains"]], "get_chains() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_chains"]], "get_chains() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_chains"]], "get_datetime() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_datetime_range"]], "get_historical_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_historical_prices"]], "get_last_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_day"]], "get_last_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_minute"]], "get_last_price() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_price"]], "get_last_price() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_price"]], "get_last_price() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_last_price"]], "get_last_prices() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_last_prices"]], "get_last_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_last_prices"]], "get_round_day() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_day"]], "get_round_minute() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_round_minute"]], "get_start_datetime_and_ts_unit() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_start_datetime_and_ts_unit"]], "get_strikes() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_strikes"]], "get_strikes() (lumibot.data_sources.yahoo_data.yahoodata method)": [[44, "lumibot.data_sources.yahoo_data.YahooData.get_strikes"]], "get_timestamp() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestamp"]], "get_timestep() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_timestep"]], "get_trading_days_pandas() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_trading_days_pandas"]], "get_yesterday_dividend() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividend"]], "get_yesterday_dividend() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividend"]], "get_yesterday_dividends() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividends"]], "get_yesterday_dividends() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividends"]], "load_data() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.load_data"]], "localize_datetime() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.localize_datetime"]], "lumibot.data_sources": [[44, "module-lumibot.data_sources"]], "lumibot.data_sources.data_source": [[44, "module-lumibot.data_sources.data_source"]], "lumibot.data_sources.pandas_data": [[44, "module-lumibot.data_sources.pandas_data"]], "lumibot.data_sources.yahoo_data": [[44, "module-lumibot.data_sources.yahoo_data"]], "query_greeks() (lumibot.data_sources.data_source.datasource method)": [[44, "lumibot.data_sources.data_source.DataSource.query_greeks"]], "to_default_timezone() (lumibot.data_sources.data_source.datasource class method)": [[44, "lumibot.data_sources.data_source.DataSource.to_default_timezone"]], "update_date_index() (lumibot.data_sources.pandas_data.pandasdata method)": [[44, "lumibot.data_sources.pandas_data.PandasData.update_date_index"]], "lumibot.strategies.strategy.strategy": [[45, "module-lumibot.strategies.strategy.Strategy"]], "trader (class in lumibot.traders.trader)": [[46, "lumibot.traders.trader.Trader"]], "add_strategy() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.add_strategy"]], "is_backtest_broker (lumibot.traders.trader.trader property)": [[46, "lumibot.traders.trader.Trader.is_backtest_broker"]], "lumibot.traders.trader": [[46, "module-lumibot.traders.trader"]], "run_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all"]], "run_all_async() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.run_all_async"]], "stop_all() (lumibot.traders.trader.trader method)": [[46, "lumibot.traders.trader.Trader.stop_all"]], "get_cash() (in module lumibot.strategies.strategy.strategy)": [[49, "lumibot.strategies.strategy.Strategy.get_cash"], [55, "lumibot.strategies.strategy.Strategy.get_cash"]], "get_parameters() (in module lumibot.strategies.strategy.strategy)": [[50, "lumibot.strategies.strategy.Strategy.get_parameters"], [56, "lumibot.strategies.strategy.Strategy.get_parameters"], [104, "lumibot.strategies.strategy.Strategy.get_parameters"], [115, "lumibot.strategies.strategy.Strategy.get_parameters"]], "get_portfolio_value() (in module lumibot.strategies.strategy.strategy)": [[51, "lumibot.strategies.strategy.Strategy.get_portfolio_value"], [57, "lumibot.strategies.strategy.Strategy.get_portfolio_value"]], "get_position() (in module lumibot.strategies.strategy.strategy)": [[52, "lumibot.strategies.strategy.Strategy.get_position"], [58, "lumibot.strategies.strategy.Strategy.get_position"]], "get_positions() (in module lumibot.strategies.strategy.strategy)": [[53, "lumibot.strategies.strategy.Strategy.get_positions"], [59, "lumibot.strategies.strategy.Strategy.get_positions"]], "set_parameters() (in module lumibot.strategies.strategy.strategy)": [[54, "lumibot.strategies.strategy.Strategy.set_parameters"], [60, "lumibot.strategies.strategy.Strategy.set_parameters"]], "add_line() (in module lumibot.strategies.strategy.strategy)": [[62, "lumibot.strategies.strategy.Strategy.add_line"], [66, "lumibot.strategies.strategy.Strategy.add_line"]], "add_marker() (in module lumibot.strategies.strategy.strategy)": [[63, "lumibot.strategies.strategy.Strategy.add_marker"], [67, "lumibot.strategies.strategy.Strategy.add_marker"]], "get_lines_df() (in module lumibot.strategies.strategy.strategy)": [[64, "lumibot.strategies.strategy.Strategy.get_lines_df"], [68, "lumibot.strategies.strategy.Strategy.get_lines_df"]], "get_markers_df() (in module lumibot.strategies.strategy.strategy)": [[65, "lumibot.strategies.strategy.Strategy.get_markers_df"], [69, "lumibot.strategies.strategy.Strategy.get_markers_df"]], "cancel_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[71, "lumibot.strategies.strategy.Strategy.cancel_realtime_bars"]], "get_historical_prices() (in module lumibot.strategies.strategy.strategy)": [[72, "lumibot.strategies.strategy.Strategy.get_historical_prices"]], "get_historical_prices_for_assets() (in module lumibot.strategies.strategy.strategy)": [[73, "lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets"]], "get_last_price() (in module lumibot.strategies.strategy.strategy)": [[74, "lumibot.strategies.strategy.Strategy.get_last_price"]], "get_last_prices() (in module lumibot.strategies.strategy.strategy)": [[75, "lumibot.strategies.strategy.Strategy.get_last_prices"]], "get_next_trading_day() (in module lumibot.strategies.strategy.strategy)": [[76, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [130, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [138, "lumibot.strategies.strategy.Strategy.get_next_trading_day"]], "get_quote() (in module lumibot.strategies.strategy.strategy)": [[77, "lumibot.strategies.strategy.Strategy.get_quote"]], "get_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[78, "lumibot.strategies.strategy.Strategy.get_realtime_bars"]], "get_yesterday_dividend() (in module lumibot.strategies.strategy.strategy)": [[79, "lumibot.strategies.strategy.Strategy.get_yesterday_dividend"]], "get_yesterday_dividends() (in module lumibot.strategies.strategy.strategy)": [[80, "lumibot.strategies.strategy.Strategy.get_yesterday_dividends"]], "start_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[81, "lumibot.strategies.strategy.Strategy.start_realtime_bars"]], "get_datetime() (in module lumibot.strategies.strategy.strategy)": [[83, "lumibot.strategies.strategy.Strategy.get_datetime"], [92, "lumibot.strategies.strategy.Strategy.get_datetime"]], "get_datetime_range() (in module lumibot.strategies.strategy.strategy)": [[84, "lumibot.strategies.strategy.Strategy.get_datetime_range"], [93, "lumibot.strategies.strategy.Strategy.get_datetime_range"]], "get_last_day() (in module lumibot.strategies.strategy.strategy)": [[85, "lumibot.strategies.strategy.Strategy.get_last_day"], [94, "lumibot.strategies.strategy.Strategy.get_last_day"]], "get_last_minute() (in module lumibot.strategies.strategy.strategy)": [[86, "lumibot.strategies.strategy.Strategy.get_last_minute"], [95, "lumibot.strategies.strategy.Strategy.get_last_minute"]], "get_round_day() (in module lumibot.strategies.strategy.strategy)": [[87, "lumibot.strategies.strategy.Strategy.get_round_day"], [96, "lumibot.strategies.strategy.Strategy.get_round_day"]], "get_round_minute() (in module lumibot.strategies.strategy.strategy)": [[88, "lumibot.strategies.strategy.Strategy.get_round_minute"], [97, "lumibot.strategies.strategy.Strategy.get_round_minute"]], "get_timestamp() (in module lumibot.strategies.strategy.strategy)": [[89, "lumibot.strategies.strategy.Strategy.get_timestamp"], [98, "lumibot.strategies.strategy.Strategy.get_timestamp"]], "localize_datetime() (in module lumibot.strategies.strategy.strategy)": [[90, "lumibot.strategies.strategy.Strategy.localize_datetime"], [99, "lumibot.strategies.strategy.Strategy.localize_datetime"]], "to_default_timezone() (in module lumibot.strategies.strategy.strategy)": [[91, "lumibot.strategies.strategy.Strategy.to_default_timezone"], [100, "lumibot.strategies.strategy.Strategy.to_default_timezone"]], "await_market_to_close() (in module lumibot.strategies.strategy.strategy)": [[102, "lumibot.strategies.strategy.Strategy.await_market_to_close"], [113, "lumibot.strategies.strategy.Strategy.await_market_to_close"]], "await_market_to_open() (in module lumibot.strategies.strategy.strategy)": [[103, "lumibot.strategies.strategy.Strategy.await_market_to_open"], [114, "lumibot.strategies.strategy.Strategy.await_market_to_open"]], "log_message() (in module lumibot.strategies.strategy.strategy)": [[105, "lumibot.strategies.strategy.Strategy.log_message"], [116, "lumibot.strategies.strategy.Strategy.log_message"]], "set_market() (in module lumibot.strategies.strategy.strategy)": [[106, "lumibot.strategies.strategy.Strategy.set_market"], [117, "lumibot.strategies.strategy.Strategy.set_market"]], "sleep() (in module lumibot.strategies.strategy.strategy)": [[107, "lumibot.strategies.strategy.Strategy.sleep"], [118, "lumibot.strategies.strategy.Strategy.sleep"]], "update_parameters() (in module lumibot.strategies.strategy.strategy)": [[108, "lumibot.strategies.strategy.Strategy.update_parameters"], [119, "lumibot.strategies.strategy.Strategy.update_parameters"]], "wait_for_order_execution() (in module lumibot.strategies.strategy.strategy)": [[109, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"], [120, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"]], "wait_for_order_registration() (in module lumibot.strategies.strategy.strategy)": [[110, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"], [121, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"]], "wait_for_orders_execution() (in module lumibot.strategies.strategy.strategy)": [[111, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"], [122, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"]], "wait_for_orders_registration() (in module lumibot.strategies.strategy.strategy)": [[112, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"], [123, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"]], "get_chain() (in module lumibot.strategies.strategy.strategy)": [[125, "lumibot.strategies.strategy.Strategy.get_chain"], [133, "lumibot.strategies.strategy.Strategy.get_chain"]], "get_chains() (in module lumibot.strategies.strategy.strategy)": [[126, "lumibot.strategies.strategy.Strategy.get_chains"], [134, "lumibot.strategies.strategy.Strategy.get_chains"]], "get_expiration() (in module lumibot.strategies.strategy.strategy)": [[127, "lumibot.strategies.strategy.Strategy.get_expiration"], [135, "lumibot.strategies.strategy.Strategy.get_expiration"]], "get_greeks() (in module lumibot.strategies.strategy.strategy)": [[128, "lumibot.strategies.strategy.Strategy.get_greeks"], [136, "lumibot.strategies.strategy.Strategy.get_greeks"]], "get_multiplier() (in module lumibot.strategies.strategy.strategy)": [[129, "lumibot.strategies.strategy.Strategy.get_multiplier"], [137, "lumibot.strategies.strategy.Strategy.get_multiplier"]], "get_strikes() (in module lumibot.strategies.strategy.strategy)": [[131, "lumibot.strategies.strategy.Strategy.get_strikes"], [140, "lumibot.strategies.strategy.Strategy.get_strikes"]], "options_expiry_to_datetime_date() (in module lumibot.strategies.strategy.strategy)": [[132, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"], [141, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"]], "get_option_expiration_after_date() (in module lumibot.strategies.strategy.strategy)": [[139, "lumibot.strategies.strategy.Strategy.get_option_expiration_after_date"]], "cancel_open_orders() (in module lumibot.strategies.strategy.strategy)": [[143, "lumibot.strategies.strategy.Strategy.cancel_open_orders"], [154, "lumibot.strategies.strategy.Strategy.cancel_open_orders"]], "cancel_order() (in module lumibot.strategies.strategy.strategy)": [[144, "lumibot.strategies.strategy.Strategy.cancel_order"], [155, "lumibot.strategies.strategy.Strategy.cancel_order"]], "cancel_orders() (in module lumibot.strategies.strategy.strategy)": [[145, "lumibot.strategies.strategy.Strategy.cancel_orders"], [156, "lumibot.strategies.strategy.Strategy.cancel_orders"]], "create_order() (in module lumibot.strategies.strategy.strategy)": [[146, "lumibot.strategies.strategy.Strategy.create_order"], [157, "lumibot.strategies.strategy.Strategy.create_order"]], "get_asset_potential_total() (in module lumibot.strategies.strategy.strategy)": [[147, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"], [158, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"]], "get_order() (in module lumibot.strategies.strategy.strategy)": [[148, "lumibot.strategies.strategy.Strategy.get_order"], [159, "lumibot.strategies.strategy.Strategy.get_order"]], "get_orders() (in module lumibot.strategies.strategy.strategy)": [[149, "lumibot.strategies.strategy.Strategy.get_orders"], [160, "lumibot.strategies.strategy.Strategy.get_orders"]], "get_selling_order() (in module lumibot.strategies.strategy.strategy)": [[150, "lumibot.strategies.strategy.Strategy.get_selling_order"], [161, "lumibot.strategies.strategy.Strategy.get_selling_order"]], "sell_all() (in module lumibot.strategies.strategy.strategy)": [[151, "lumibot.strategies.strategy.Strategy.sell_all"], [162, "lumibot.strategies.strategy.Strategy.sell_all"]], "submit_order() (in module lumibot.strategies.strategy.strategy)": [[152, "lumibot.strategies.strategy.Strategy.submit_order"], [163, "lumibot.strategies.strategy.Strategy.submit_order"]], "submit_orders() (in module lumibot.strategies.strategy.strategy)": [[153, "lumibot.strategies.strategy.Strategy.submit_orders"], [164, "lumibot.strategies.strategy.Strategy.submit_orders"]], "cash (lumibot.strategies.strategy.strategy property)": [[167, "lumibot.strategies.strategy.Strategy.cash"], [182, "lumibot.strategies.strategy.Strategy.cash"]], "first_iteration (lumibot.strategies.strategy.strategy property)": [[168, "lumibot.strategies.strategy.Strategy.first_iteration"], [183, "lumibot.strategies.strategy.Strategy.first_iteration"]], "initial_budget (lumibot.strategies.strategy.strategy property)": [[169, "lumibot.strategies.strategy.Strategy.initial_budget"], [184, "lumibot.strategies.strategy.Strategy.initial_budget"]], "is_backtesting (lumibot.strategies.strategy.strategy property)": [[170, "lumibot.strategies.strategy.Strategy.is_backtesting"], [185, "lumibot.strategies.strategy.Strategy.is_backtesting"]], "last_on_trading_iteration_datetime (lumibot.strategies.strategy.strategy property)": [[171, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"], [186, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"]], "minutes_before_closing (lumibot.strategies.strategy.strategy property)": [[172, "lumibot.strategies.strategy.Strategy.minutes_before_closing"], [187, "lumibot.strategies.strategy.Strategy.minutes_before_closing"]], "minutes_before_opening (lumibot.strategies.strategy.strategy property)": [[173, "lumibot.strategies.strategy.Strategy.minutes_before_opening"], [188, "lumibot.strategies.strategy.Strategy.minutes_before_opening"]], "name (lumibot.strategies.strategy.strategy property)": [[174, "lumibot.strategies.strategy.Strategy.name"], [189, "lumibot.strategies.strategy.Strategy.name"]], "portfolio_value (lumibot.strategies.strategy.strategy property)": [[175, "lumibot.strategies.strategy.Strategy.portfolio_value"], [190, "lumibot.strategies.strategy.Strategy.portfolio_value"]], "pytz (lumibot.strategies.strategy.strategy property)": [[176, "lumibot.strategies.strategy.Strategy.pytz"], [181, "lumibot.strategies.strategy.Strategy.pytz"], [191, "lumibot.strategies.strategy.Strategy.pytz"]], "quote_asset (lumibot.strategies.strategy.strategy property)": [[177, "lumibot.strategies.strategy.Strategy.quote_asset"], [192, "lumibot.strategies.strategy.Strategy.quote_asset"]], "sleeptime (lumibot.strategies.strategy.strategy property)": [[178, "lumibot.strategies.strategy.Strategy.sleeptime"], [193, "lumibot.strategies.strategy.Strategy.sleeptime"]], "timezone (lumibot.strategies.strategy.strategy property)": [[179, "lumibot.strategies.strategy.Strategy.timezone"], [194, "lumibot.strategies.strategy.Strategy.timezone"]], "unspent_money (lumibot.strategies.strategy.strategy property)": [[180, "lumibot.strategies.strategy.Strategy.unspent_money"], [195, "lumibot.strategies.strategy.Strategy.unspent_money"]]}}) \ No newline at end of file diff --git a/docsrc/deployment.rst b/docsrc/deployment.rst index 9c309f114..001ee9759 100644 --- a/docsrc/deployment.rst +++ b/docsrc/deployment.rst @@ -414,6 +414,9 @@ In addition to broker-specific secrets, the following environment variables are * - **Secret** - **Description** - **Example** + * - LUMIWEALTH_API_KEY + - Your API key from the BotSpot.trade website so that you can track your bot's performance. To get this API key, visit the `BotSpot.trade `_ website and add/create a bot. After creating the bot, you will receive an API key. + - 694rr2c8d9234b43a40fab494a79f5634ghd4f39d44ccf2e * - LIVE_CONFIG - Your live config file, only needed for strategies that have multiple configurations (there will be a folder named "configurations" in the src/ folder) and if you are running the strategy live. - paper_1 diff --git a/lumibot/data_sources/data_source.py b/lumibot/data_sources/data_source.py index b36512302..be85f47cb 100644 --- a/lumibot/data_sources/data_source.py +++ b/lumibot/data_sources/data_source.py @@ -2,6 +2,7 @@ from abc import ABC, abstractmethod from concurrent.futures import ThreadPoolExecutor, as_completed from datetime import datetime, timedelta +import traceback import time import pandas as pd @@ -307,8 +308,8 @@ def get_bars( length, timestep="minute", timeshift=None, - chunk_size=10, - max_workers=200, + chunk_size=2, + max_workers=2, quote=None, exchange=None, include_after_hours=True, @@ -316,33 +317,38 @@ def get_bars( """Get bars for the list of assets""" def process_chunk(chunk): - """Process a chunk of assets.""" chunk_result = {} for asset in chunk: - chunk_result[asset] = self.get_historical_prices( - asset, - length, - timestep=timestep, - timeshift=timeshift, - quote=quote, - exchange=exchange, - include_after_hours=include_after_hours, - ) + try: + chunk_result[asset] = self.get_historical_prices( + asset, + length, + timestep=timestep, + timeshift=timeshift, + quote=quote, + exchange=exchange, + include_after_hours=include_after_hours, + ) + + # Sleep to prevent rate limiting + time.sleep(0.1) + except Exception as e: + # Log once per asset to avoid spamming with a huge traceback + logging.warning(f"Error retrieving data for {asset.symbol}: {e}") + tb = traceback.format_exc() + logging.warning(tb) # This prints the traceback + chunk_result[asset] = None return chunk_result # Convert strings to Asset objects assets = [Asset(symbol=a) if isinstance(a, str) else a for a in assets] - # Chunking the assets + # Chunk the assets chunks = [assets[i : i + chunk_size] for i in range(0, len(assets), chunk_size)] - # Initialize ThreadPoolExecutor results = {} with ThreadPoolExecutor(max_workers=max_workers) as executor: - # Submit tasks futures = [executor.submit(process_chunk, chunk) for chunk in chunks] - - # Collect results as they complete for future in as_completed(futures): results.update(future.result()) diff --git a/lumibot/entities/bars.py b/lumibot/entities/bars.py index 27654e647..f18579b6f 100644 --- a/lumibot/entities/bars.py +++ b/lumibot/entities/bars.py @@ -112,11 +112,11 @@ def __init__(self, df, source, asset, quote=None, raw=None): self._raw = raw if "dividend" in df.columns: - df["price_change"] = df["close"].pct_change() - df["dividend_yield"] = df["dividend"] / df["close"] - df["return"] = df["dividend_yield"] + df["price_change"] + df.loc[:, "price_change"] = df["close"].pct_change() + df.loc[:, "dividend_yield"] = df["dividend"] / df["close"] + df.loc[:, "return"] = df["dividend_yield"] + df["price_change"] else: - df["return"] = df["close"].pct_change() + df.loc[:, "return"] = df["close"].pct_change() self.df = df diff --git a/lumibot/tools/yahoo_helper.py b/lumibot/tools/yahoo_helper.py index 9167b3473..005c16aae 100644 --- a/lumibot/tools/yahoo_helper.py +++ b/lumibot/tools/yahoo_helper.py @@ -1,6 +1,7 @@ import logging import os import pickle +import time from datetime import datetime, timedelta import pandas as pd @@ -11,6 +12,7 @@ from .helpers import get_lumibot_datetime INFO_DATA = "info" +INVALID_SYMBOLS = set() class _YahooData: @@ -91,6 +93,10 @@ def dump_pickle_file(symbol, type, data): @staticmethod def format_df(df, auto_adjust): + # Check if df is empty + if df is None or df.empty: + return df + if auto_adjust: del df["Adj Ratio"] del df["Close"] @@ -169,41 +175,104 @@ def get_symbol_last_price(symbol): return df["Close"].iloc[-1] - @staticmethod def download_symbol_data(symbol, interval="1d"): - ticker = yf.Ticker(symbol) - try: - if interval == "1m": - # Yahoo only supports 1 minute interval for past 7 days - df = ticker.history(interval=interval, start=get_lumibot_datetime() - timedelta(days=7), auto_adjust=False) - elif interval == "15m": - # Yahoo only supports 15 minute interval for past 60 days - df = ticker.history(interval=interval, start=get_lumibot_datetime() - timedelta(days=60), auto_adjust=False) - else: - df = ticker.history(interval=interval, period="max", auto_adjust=False) - except Exception as e: - logging.debug(f"Error while downloading symbol day data for {symbol}, returning empty dataframe for now.") - logging.debug(e) + """ + Attempts to download historical data from yfinance for the specified symbol and interval. + Retries on empty/None data in case of transient rate limits. + If all attempts fail, marks the symbol as invalid (added to INVALID_SYMBOLS) to skip it in future. + If symbol info is unavailable, we just skip timezone adjustments (do not return None). + """ + + # If we've already marked this symbol invalid, skip further calls + if symbol in INVALID_SYMBOLS: + logging.debug(f"{symbol} is already marked invalid. Skipping yfinance calls.") return None - # Adjust the time when we are getting daily stock data to the beginning of the day - # This way the times line up when backtesting daily data - info = YahooHelper.get_symbol_info(symbol) - if info.get("info") and info.get("info").get("market") == "us_market": - # Check if the timezone is already set, if not set it to the default timezone - if df.index.tzinfo is None: - df.index = df.index.tz_localize(info.get("info").get("exchangeTimezoneName")) - else: - df.index = df.index.tz_convert(info.get("info").get("exchangeTimezoneName")) - df.index = df.index.map(lambda t: t.replace(hour=16, minute=0)) - elif info.get("info") and info.get("info").get("market") == "ccc_market": - # Check if the timezone is already set, if not set it to the default timezone - if df.index.tzinfo is None: - df.index = df.index.tz_localize(info.get("info").get("exchangeTimezoneName")) + ticker = yf.Ticker(symbol) + + # --- HISTORICAL DATA RETRY LOGIC --- + max_retries = 3 + sleep_sec = 1 + df = None + + for attempt in range(1, max_retries + 1): + try: + if interval == "1m": + df = ticker.history( + interval=interval, + start=get_lumibot_datetime() - timedelta(days=7), + auto_adjust=False + ) + elif interval == "15m": + df = ticker.history( + interval=interval, + start=get_lumibot_datetime() - timedelta(days=60), + auto_adjust=False + ) + else: + df = ticker.history( + interval=interval, + period="max", + auto_adjust=False + ) + except Exception as e: + logging.debug(f"{symbol}: Exception from ticker.history(): {e}") + if attempt < max_retries: + logging.debug(f"{symbol}: Attempt {attempt} failed. Sleeping {sleep_sec}s, then retry.") + time.sleep(sleep_sec) + sleep_sec *= 2 + continue + else: + logging.debug(f"{symbol}: All {max_retries} attempts failed. Marking invalid.") + INVALID_SYMBOLS.add(symbol) + return None + + if df is None or df.empty: + logging.debug(f"{symbol}: Attempt {attempt} returned empty or None data.") + if attempt < max_retries: + logging.debug(f"{symbol}: Sleeping {sleep_sec}s, then retry.") + time.sleep(sleep_sec) + sleep_sec *= 2 + else: + logging.debug(f"{symbol}: Data still empty after {max_retries} attempts. Marking invalid.") + INVALID_SYMBOLS.add(symbol) + return None else: - df.index = df.index.tz_convert(info.get("info").get("exchangeTimezoneName")) - df.index = df.index.map(lambda t: t.replace(hour=23, minute=59)) + # Successfully got data, so break out of the loop + break + # --- SYMBOL INFO (OPTIONAL) --- + info = None + try: + info = YahooHelper.get_symbol_info(symbol) + except Exception as e: + logging.debug(f"{symbol}: Exception from get_symbol_info(): {e}") + + # If we have valid info, handle timezone adjustments. + # Using sub_info to avoid accessing .get() on None. + if info and isinstance(info, dict): + sub_info = info.get("info", {}) + if isinstance(sub_info, dict): + market = sub_info.get("market", "") + tz_name = sub_info.get("exchangeTimezoneName", None) + + # US market + if market == "us_market" and tz_name: + if df.index.tzinfo is None: + df.index = df.index.tz_localize(tz_name) + else: + df.index = df.index.tz_convert(tz_name) + df.index = df.index.map(lambda t: t.replace(hour=16, minute=0)) + + # Crypto/CCC market + elif market == "ccc_market" and tz_name: + if df.index.tzinfo is None: + df.index = df.index.tz_localize(tz_name) + else: + df.index = df.index.tz_convert(tz_name) + df.index = df.index.map(lambda t: t.replace(hour=23, minute=59)) + + # Finally, run any custom DataFrame processing df = YahooHelper.process_df(df, asset_info=info) return df diff --git a/setup.py b/setup.py index 9929622e7..6ab0eb97a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="lumibot", - version="3.8.24", + version="3.8.26", author="Robert Grzesik", author_email="rob@lumiwealth.com", description="Backtesting and Trading Library, Made by Lumiwealth", @@ -21,7 +21,8 @@ "yfinance>=0.2.46", "matplotlib>=3.3.3", "quandl", - "numpy>=1.20.0", + # Numpy greater than 1.20.0 and less than 2 because v2 has compatibility issues with a few libraries + "numpy>=1.20.0, <2", "pandas>=2.2.0", "pandas_market_calendars>=4.3.1", "plotly>=5.18.0", diff --git a/tests/backtest/test_polygon.py b/tests/backtest/test_polygon.py index 3feb59e6b..490963ddd 100644 --- a/tests/backtest/test_polygon.py +++ b/tests/backtest/test_polygon.py @@ -306,7 +306,6 @@ def test_polygon_legacy_backtest2(self): def test_pull_source_symbol_bars_with_api_call(self, polygon_data_backtesting, mocker): """Test that polygon_helper.get_price_data_from_polygon() is called with the right parameters""" - # Only simulate first date mocker.patch.object( polygon_data_backtesting, @@ -390,3 +389,89 @@ def test_get_historical_prices(self): assert prices is not None assert_frame_equal(prices.df, expected_df, check_dtype=False, check_index_type=False) + + ######################################################################################## + # Below are the NEW TESTS added to verify that get_chains(), get_last_price(), and + # get_historical_prices() data has not changed after code modifications. + # We have NOT modified existing tests or code, only appended these tests. + ######################################################################################## + + @pytest.mark.skipif(POLYGON_API_KEY == '', reason="This test requires a Polygon.io API key") + def test_get_chains_spy_expected_data(self): + """ + Test that get_chains() returns the expected option chain data for SPY when the backtesting date is 2025-01-13. + Verifies key components such as: + - A multiplier of 100. + - An exchange value of 'BATO'. + - For expiry "2025-01-13" in both CALL and PUT chains, the first five strike prices and the last strike. + """ + tzinfo = pytz.timezone("America/New_York") + # Set up a dummy backtesting period; in this test we only care about the 'current' datetime. + start = datetime.datetime(2025, 1, 13).astimezone(tzinfo) + end = datetime.datetime(2025, 1, 31).astimezone(tzinfo) + data_source = PolygonDataBacktesting(start, end, api_key=POLYGON_API_KEY) + # Patch get_datetime() to return January 13, 2025 (10:00 AM local) + data_source.get_datetime = lambda: datetime.datetime(2025, 1, 13, 10, 0, 0, tzinfo=tzinfo) + asset = Asset("SPY") + chains = data_source.get_chains(asset) + # Check that the chains structure is not None and contains required keys + assert chains is not None, "Expected chains data to be non-None" + assert chains.get("Multiplier") == 100, "Expected multiplier to be 100" + assert chains.get("Exchange") == "BATO", "Expected exchange to be 'BATO'" + # Check that the chains include an entry for expiry "2025-01-13" in both CALL and PUT + expected_expiry = "2025-01-13" + assert expected_expiry in chains["Chains"]["CALL"], f"Expected expiry {expected_expiry} in CALL chain" + assert expected_expiry in chains["Chains"]["PUT"], f"Expected expiry {expected_expiry} in PUT chain" + # Verify specific strike values for the 2025-01-13 entry on both sides. + expected_first_five = [497, 498, 499, 500, 505] + expected_last = 685 + call_strikes = chains["Chains"]["CALL"][expected_expiry] + put_strikes = chains["Chains"]["PUT"][expected_expiry] + assert call_strikes[:5] == expected_first_five, f"CALL strikes for {expected_expiry} expected first five {expected_first_five}, got {call_strikes[:5]}" + assert put_strikes[:5] == expected_first_five, f"PUT strikes for {expected_expiry} expected first five {expected_first_five}, got {put_strikes[:5]}" + assert call_strikes[-1] == expected_last, f"CALL strikes for {expected_expiry} expected last strike {expected_last}, got {call_strikes[-1]}" + assert put_strikes[-1] == expected_last, f"PUT strikes for {expected_expiry} expected last strike {expected_last}, got {put_strikes[-1]}" + + @pytest.mark.skipif(POLYGON_API_KEY == '', reason="This test requires a Polygon.io API key") + def test_get_last_price_unchanged(self): + """ + Additional test to ensure get_last_price() is unaffected by code changes. + We expect AMZN's last price (on 2023-08-02 ~10AM) to be in a certain known range + based on historical data from Polygon. + """ + tzinfo = pytz.timezone("America/New_York") + start = datetime.datetime(2023, 8, 1).astimezone(tzinfo) + end = datetime.datetime(2023, 8, 4).astimezone(tzinfo) + + data_source = PolygonDataBacktesting(start, end, api_key=POLYGON_API_KEY) + # Pick a known date/time within our backtest window + data_source._datetime = datetime.datetime(2023, 8, 2, 10).astimezone(tzinfo) + + last_price = data_source.get_last_price(Asset("AMZN")) + # As in the main test, we expect a price in the 130-140 range. + assert last_price is not None, "Expected to get a price, got None" + assert 130.0 < last_price < 140.0, f"Expected AMZN price between 130 and 140 on 2023-08-02, got {last_price}" + + @pytest.mark.skipif(POLYGON_API_KEY == '', reason="This test requires a Polygon.io API key") + def test_get_historical_prices_unchanged_for_amzn(self): + """ + Additional test to ensure get_historical_prices() is unaffected by code changes. + We'll check that we can retrieve day bars for AMZN for 2 days leading up to 2023-08-02. + """ + tzinfo = pytz.timezone("America/New_York") + start = datetime.datetime(2023, 8, 1).astimezone(tzinfo) + end = datetime.datetime(2023, 8, 4).astimezone(tzinfo) + + data_source = PolygonDataBacktesting(start, end, api_key=POLYGON_API_KEY) + # Set the 'current' backtesting datetime + data_source._datetime = datetime.datetime(2023, 8, 2, 15).astimezone(tzinfo) + + # Retrieve 2 day-bars for AMZN + historical_bars = data_source.get_historical_prices("AMZN", 2, "day") + assert historical_bars is not None, "Expected some historical bars, got None" + df = historical_bars.df + assert df is not None and not df.empty, "Expected non-empty DataFrame for historical AMZN day bars" + assert len(df) == 2, f"Expected 2 day bars for AMZN, got {len(df)}" + # Just a sanity check to make sure the close is within a plausible range + assert df['close'].mean() < 150, "Unexpectedly high close for AMZN, data might have changed" + assert df['close'].mean() > 50, "Unexpectedly low close for AMZN, data might have changed" diff --git a/tests/fixtures.py b/tests/fixtures.py index 4d7679379..838cf9c8b 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -49,8 +49,6 @@ def pandas_data_fixture() -> Dict[Asset, Data]: parse_dates=True, index_col=0, header=0, - usecols=[0, 1, 2, 3, 4, 6, 7], - names=["Date", "Open", "High", "Low", "Close", "Volume", "Dividends"], ) df = df.rename( columns={ diff --git a/tests/test_drift_rebalancer.py b/tests/test_drift_rebalancer.py index f1483126c..deec3dca9 100644 --- a/tests/test_drift_rebalancer.py +++ b/tests/test_drift_rebalancer.py @@ -22,8 +22,8 @@ class MockStrategyWithDriftCalculationLogic(Strategy): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) + def __init__(self, broker: BacktestingBroker, *args, **kwargs): + super().__init__(broker=broker, *args, **kwargs) self.orders = [] self.target_weights = {} self.drift_rebalancer_logic = DriftRebalancerLogic( @@ -96,7 +96,7 @@ def mock_add_positions(self): def test_calculate_absolute_drift(self, mocker): strategy = MockStrategyWithDriftCalculationLogic( - broker= self.backtesting_broker, + broker=self.backtesting_broker, drift_threshold=Decimal("0.05"), drift_type=DriftType.ABSOLUTE ) @@ -650,6 +650,41 @@ def mock_add_positions(self): assert df["target_value"].tolist() == [Decimal("-500"), Decimal("500")] assert df["drift"].tolist() == [Decimal("-1.0"), Decimal("0")] + def test_shorting_more_when_price_goes_up_short_something(self, mocker): + strategy = MockStrategyWithDriftCalculationLogic( + broker=self.backtesting_broker, + drift_threshold=Decimal("0.05"), + drift_type=DriftType.ABSOLUTE + ) + # patch the strategy so get_last_price returns 110 + mocker.patch.object(strategy, "get_last_price", return_value=110.0) + + target_weights = { + "AAPL": Decimal("-0.50"), + "USD": Decimal("0.50") + } + + def mock_add_positions(self): + self._add_position( + symbol="USD", + is_quote_asset=True, + current_quantity=Decimal("1500"), # original $1000 plus $500 from the short + current_value=Decimal("1500") + ) + self._add_position( + symbol="AAPL", + is_quote_asset=False, + current_quantity=Decimal("-5"), + current_value=Decimal("-550") + ) + + mocker.patch.object(DriftCalculationLogic, "_add_positions", mock_add_positions) + df = strategy.drift_rebalancer_logic.calculate(target_weights=target_weights) + + assert df["current_weight"].tolist() == [Decimal('-0.5789473684210526315789473684'), Decimal('1.578947368421052631578947368')] + assert df["target_value"].tolist() == [Decimal("-475"), Decimal("475")] + assert df["drift"].tolist() == [Decimal('0.0789473684210526315789473684'), Decimal('0')] + def test_calculate_absolute_drift_when_we_want_a_100_percent_short_position(self, mocker): strategy = MockStrategyWithDriftCalculationLogic( broker=self.backtesting_broker,