From bc03a0ac227f10d54749f6746205001f4815426f Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Mon, 30 Sep 2024 13:20:06 -0400 Subject: [PATCH 01/10] bug fixes for order serialization --- lumibot/brokers/tradier.py | 34 ++++++++- lumibot/entities/order.py | 92 ++++++++++++++++++++++--- lumibot/strategies/strategy_executor.py | 3 +- 3 files changed, 117 insertions(+), 12 deletions(-) diff --git a/lumibot/brokers/tradier.py b/lumibot/brokers/tradier.py index 10cae9ec..d22e5cba 100644 --- a/lumibot/brokers/tradier.py +++ b/lumibot/brokers/tradier.py @@ -107,11 +107,34 @@ def cancel_order(self, order: Order): # Cancel the order self.tradier.orders.cancel(order.identifier) - def submit_orders(self, orders, is_multileg=False, order_type="market", duration="day", price=None): + def submit_orders(self, orders, is_multileg=False, order_type=None, duration="day", price=None): """ Submit multiple orders to the broker. This function will submit the orders in the order they are provided. If any order fails to submit, the function will stop submitting orders and return the last successful order. + + Parameters + ---------- + orders: list[Order] + List of orders to submit + is_multileg: bool + Whether the order is a multi-leg order. Default is False. + order_type: str + The type of multi-leg order to submit, if applicable. Valid values are ('market', 'debit', 'credit', 'even'). Default is 'market'. + duration: str + The duration of the order. Valid values are ('day', 'gtc', 'pre', 'post'). Default is 'day'. + price: float + The limit price for the order. Required for 'debit' and 'credit' order types. + + Returns + ------- + Order + The list of processed order objects. """ + + # Check if order_type is set, if not, set it to 'market' + if order_type is None: + order_type = "market" + # Check if the orders are empty if not orders or len(orders) == 0: return @@ -130,6 +153,8 @@ def submit_orders(self, orders, is_multileg=False, order_type="market", duration for order in orders: self.submit_order(order) + return orders + def _submit_multileg_order(self, orders, order_type="market", duration="day", price=None, tag=None): """ Submit a multi-leg order to Tradier. This function will submit the multi-leg order to Tradier. @@ -220,6 +245,7 @@ def _submit_order(self, order: Order): ------- Updated order with broker identifier filled in """ + tag = order.tag if order.tag else order.strategy # Replace non-alphanumeric characters with '-', underscore "_" is not allowed by Tradier @@ -567,7 +593,11 @@ def _pull_broker_all_orders(self): and then returned. It is expected that the caller will convert each dictionary to an Order object by calling parse_broker_order() on the dictionary. """ - df = self.tradier.orders.get_orders() + try: + df = self.tradier.orders.get_orders() + except Exception as e: + logging.error(f"Error pulling orders from Tradier: {e}") + return [] # Check if the dataframe is empty or None if df is None or df.empty: diff --git a/lumibot/entities/order.py b/lumibot/entities/order.py index d4bc9c9a..09ac2ca1 100644 --- a/lumibot/entities/order.py +++ b/lumibot/entities/order.py @@ -2,7 +2,9 @@ import uuid from collections import namedtuple from decimal import Decimal +import threading from threading import Event +import datetime import copy import lumibot.entities as entities @@ -855,16 +857,88 @@ def wait_to_be_closed(self): # ========= Serialization methods =========== def to_dict(self): - order_dict = copy.deepcopy(self.__dict__) - order_dict["asset"] = self.asset.to_dict() - order_dict["quote"] = self.quote.to_dict() if self.quote else None - order_dict["child_orders"] = [child_order.to_dict() for child_order in self.child_orders] + # Initialize an empty dictionary for serializable attributes + order_dict = {} + + # List of non-serializable keys (thread locks, events, etc.) + non_serializable_keys = [ + "_new_event", "_canceled_event", "_partial_filled_event", "_filled_event", "_closed_event" + ] + + # Iterate through all attributes in the object's __dict__ + for key, value in self.__dict__.items(): + # Skip known non-serializable attributes by name + if key in non_serializable_keys: + continue + + # Convert datetime objects to ISO format for JSON serialization + if isinstance(value, datetime.datetime): + order_dict[key] = value.isoformat() + + # Recursively handle objects that have their own to_dict method (like asset, quote, etc.) + elif hasattr(value, "to_dict"): + order_dict[key] = value.to_dict() + + # Handle lists of objects, ensuring to call to_dict on each if applicable + elif isinstance(value, list): + order_dict[key] = [item.to_dict() if hasattr(item, "to_dict") else item for item in value] + + # Add serializable attributes directly + else: + order_dict[key] = value + return order_dict @classmethod def from_dict(cls, order_dict): - order_dict = copy.deepcopy(order_dict) - order_dict["asset"] = entities.Asset.from_dict(order_dict["asset"]) - order_dict["quote"] = entities.Asset.from_dict(order_dict["quote"]) if order_dict["quote"] else None - order_dict["child_orders"] = [Order.from_dict(child_order) for child_order in order_dict["child_orders"]] - return cls(**order_dict) + # Extract the core essential arguments to pass to __init__ + asset_data = order_dict.get('asset') + asset_obj = None + if asset_data and isinstance(asset_data, dict): + # Assuming Asset has its own from_dict method + asset_obj = entities.Asset.from_dict(asset_data) + + # Extract essential arguments, using None if the values are missing + strategy = order_dict.get('strategy', None) + side = order_dict.get('side', None) # Default to None if side is missing + quantity = order_dict.get('quantity', None) + + # Create the initial object using the essential arguments + obj = cls( + strategy=strategy, + side=side, + asset=asset_obj, # Pass the constructed asset object + quantity=quantity + ) + + # List of non-serializable keys (thread locks, events, etc.) + non_serializable_keys = [ + "_new_event", "_canceled_event", "_partial_filled_event", "_filled_event", "_closed_event" + ] + + # Handle additional fields directly after the instance is created + for key, value in order_dict.items(): + if key not in ['strategy', 'side', 'asset', 'quantity'] and key not in non_serializable_keys: + + # Convert datetime strings back to datetime objects + if isinstance(value, str) and "T" in value: + try: + setattr(obj, key, datetime.datetime.fromisoformat(value)) + except ValueError: + setattr(obj, key, value) + + # Recursively convert nested objects using from_dict (for objects like quote) + elif isinstance(value, dict) and hasattr(cls, key) and hasattr(getattr(cls, key), 'from_dict'): + nested_class = getattr(cls, key) + setattr(obj, key, nested_class.from_dict(value)) + + # Handle list of orders (child_orders) + elif isinstance(value, list) and key == 'child_orders': + child_orders = [cls.from_dict(item) for item in value] # Recursively create Order objects + setattr(obj, key, child_orders) + + # Set simple values directly + else: + setattr(obj, key, value) + + return obj diff --git a/lumibot/strategies/strategy_executor.py b/lumibot/strategies/strategy_executor.py index d0e5ac29..af226f59 100644 --- a/lumibot/strategies/strategy_executor.py +++ b/lumibot/strategies/strategy_executor.py @@ -357,6 +357,7 @@ def _trace_stats(self, context, snapshot_before): @lifecycle_method def _initialize(self): + self.strategy.log_message(f"Strategy {self.strategy._name} is initializing", color="green") self.strategy.log_message("Executing the initialize lifecycle method") # Do this for backwards compatibility. @@ -415,7 +416,7 @@ def _on_trading_iteration(self): self._strategy_context = None start_str = start_dt.strftime("%Y-%m-%d %H:%M:%S") - self.strategy.log_message(f"Executing the on_trading_iteration lifecycle method at {start_str}", color="blue") + self.strategy.log_message(f"Bot is running. Executing the on_trading_iteration lifecycle method at {start_str}", color="green") on_trading_iteration = append_locals(self.strategy.on_trading_iteration) # Time-consuming From a87cedf65c94ad64d9c5e8bf3ad8636eaa51ce6d Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Mon, 30 Sep 2024 23:33:04 -0400 Subject: [PATCH 02/10] update tradier version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 710095a8..6ad14666 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ "appdirs", "pyarrow", "tqdm", - "lumiwealth-tradier>=0.1.10", + "lumiwealth-tradier>=0.1.12", "pytz", "psycopg2-binary", "exchange_calendars>=4.5.2", From 93aabcaf86a29805811a5de6041e7d06a93d38ce Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Mon, 30 Sep 2024 23:36:03 -0400 Subject: [PATCH 03/10] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6ad14666..8443d0c3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="lumibot", - version="3.7.7", + version="3.7.8", author="Robert Grzesik", author_email="rob@lumiwealth.com", description="Backtesting and Trading Library, Made by Lumiwealth", From f713a24321af910ab137fc316d4359e498f5ff3d Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Wed, 2 Oct 2024 03:11:21 -0400 Subject: [PATCH 04/10] added send_update_to_cloud --- lumibot/credentials.py | 2 + lumibot/strategies/_strategy.py | 10 ++++ lumibot/strategies/strategy.py | 68 +++++++++++++++++++++++++ lumibot/strategies/strategy_executor.py | 3 ++ 4 files changed, 83 insertions(+) diff --git a/lumibot/credentials.py b/lumibot/credentials.py index 1721c0c3..2ac017af 100644 --- a/lumibot/credentials.py +++ b/lumibot/credentials.py @@ -173,6 +173,8 @@ "IP": os.environ.get("INTERACTIVE_BROKERS_IP", "127.0.0.1"), "IB_SUBACCOUNT": os.environ.get("IB_SUBACCOUNT", None) } + +LUMIWEALTH_API_KEY = os.environ.get("LUMIWEALTH_API_KEY") if IS_BACKTESTING: broker = None diff --git a/lumibot/strategies/_strategy.py b/lumibot/strategies/_strategy.py index 8b1ef5ab..bdf79011 100644 --- a/lumibot/strategies/_strategy.py +++ b/lumibot/strategies/_strategy.py @@ -33,6 +33,7 @@ MARKET, HIDE_POSITIONS, HIDE_TRADES, + LUMIWEALTH_API_KEY, ) class CustomLoggerAdapter(logging.LoggerAdapter): @@ -100,6 +101,7 @@ def __init__( should_backup_variables_to_database=True, should_send_summary_to_discord=True, save_logfile=False, + lumiwealth_api_key=None, **kwargs, ): """Initializes a Strategy object. @@ -183,6 +185,8 @@ def __init__( save_logfile : bool Whether to save the logfile. Defaults to False. If True, the logfile will be saved to the logs directory. Turning on this option will slow down the backtest. + lumiwealth_api_key : str + The API key to use for the LumiWealth data source. Defaults to None (saving to the cloud is off). kwargs : dict A dictionary of additional keyword arguments to pass to the strategy. @@ -262,6 +266,12 @@ def __init__( self.discord_account_summary_footer = discord_account_summary_footer self.backup_table_name="vars_backup" + # Set the LumiWealth API key + if lumiwealth_api_key: + self.lumiwealth_api_key = lumiwealth_api_key + else: + self.lumiwealth_api_key = LUMIWEALTH_API_KEY + if strategy_id is None: self.strategy_id = self._name else: diff --git a/lumibot/strategies/strategy.py b/lumibot/strategies/strategy.py index 80d7c59a..b55254c9 100644 --- a/lumibot/strategies/strategy.py +++ b/lumibot/strategies/strategy.py @@ -4566,3 +4566,71 @@ def should_send_account_summary_to_discord(self): # Return False because we should not send the account summary to Discord return False + + def send_update_to_cloud(self): + """ + Sends an update to the LumiWealth cloud server with the current portfolio value, cash, positions, and any outstanding orders. + There is an API Key that is required to send the update to the cloud. + The API Key is stored in the environment variable LUMIWEALTH_API_KEY. + """ + # Check if we are in backtesting mode, if so, don't send the message + if self.is_backtesting: + return + + # Check if self.lumiwealth_api_key has been set, if not, return + if not hasattr(self, "lumiwealth_api_key") or self.lumiwealth_api_key is None or self.lumiwealth_api_key == "": + + # TODO: Set this to a warning once the API is ready + # Log that we are not sending the update to the cloud + self.logger.debug("LUMIWEALTH_API_KEY not set. Not sending an update to the cloud because lumiwealth_api_key is not set. If you would like to be able to track your bot performance on our website, please set the lumiwealth_api_key parameter in the strategy initialization or the LUMIWEALTH_API_KEY environment variable.") + return + + # Get the current portfolio value + portfolio_value = self.get_portfolio_value() + + # Get the current cash + cash = self.get_cash() + + # Get the current positions + positions = self.get_positions() + + # Get the current orders + orders = self.get_orders() + + # Get the current time in New York + ny_tz = pytz.timezone("America/New_York") + now = datetime.datetime.now(ny_tz) + + LUMIWEALTH_URL = "https://api.lumiwealth.com/v1/update" + + headers = { + "Authorization": f"Bearer {self.lumiwealth_api_key}", + "Content-Type": "application/json", + } + + # Create the data to send to the cloud + data = { + "portfolio_value": portfolio_value, + "cash": cash, + "positions": [position.to_dict() for position in positions], + "orders": [order.to_dict() for order in orders], + "datetime": now.isoformat(), + } + + # Send the data to the cloud + response = requests.post(LUMIWEALTH_URL, headers=headers, json=data) + + # TODO: Uncomment this code once the API is ready + # # Check if the message was sent successfully + # if response.status_code == 200: + # self.logger.info("Update sent to the cloud successfully") + # return True + # else: + # self.logger.error( + # f"Failed to send update to the cloud. Status code: {response.status_code}, message: {response.text}" + # ) + # return False + + return True + + diff --git a/lumibot/strategies/strategy_executor.py b/lumibot/strategies/strategy_executor.py index af226f59..28244ac8 100644 --- a/lumibot/strategies/strategy_executor.py +++ b/lumibot/strategies/strategy_executor.py @@ -384,6 +384,9 @@ def _before_starting_trading(self): @lifecycle_method @trace_stats def _on_trading_iteration(self): + # Call the send_update_to_cloud method to send the strategy's data to the cloud. + self.strategy.send_update_to_cloud() + # If we are running live, we need to check if it's time to execute the trading iteration. if not self.strategy.is_backtesting: # Increase the cron count by 1. From 81444bb714884c9c0252c601d6dfe47c84aad8b3 Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Thu, 3 Oct 2024 00:33:01 -0400 Subject: [PATCH 05/10] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d2d62380..5f4964c1 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,16 @@ To get started with Lumibot, you can check out our documentation below. **Check out the documentation for the project here: 👉 👈** +# Run an Example Strategy + +We made a small example strategy to show you how to use Lumibot in this GitHub repository: [stock_example_algo](https://github.com/Lumiwealth-Strategies/stock_example_algo) + +To run an example strategy, click on the button below to deploy the strategy to Render (our recommendation). You can also run the strategy on Repl.it by clicking on the button below. + +[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/Lumiwealth-Strategies/stock_example_algo) + +[![Run on Repl.it](https://replit.com/badge/github/Lumiwealth-Strategies/stock_example_algo)](https://replit.com/new/github/Lumiwealth-Strategies/stock_example_algo) + ## Contributors If you want to contribute to Lumibot, you can check how to get started below. We are always looking for contributors to help us out! From 1419f03a6dfa2d2dc34b12b4e86af5d1ed1566ef Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Thu, 3 Oct 2024 00:34:00 -0400 Subject: [PATCH 06/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5f4964c1..5523be74 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ To get started with Lumibot, you can check out our documentation below. We made a small example strategy to show you how to use Lumibot in this GitHub repository: [stock_example_algo](https://github.com/Lumiwealth-Strategies/stock_example_algo) -To run an example strategy, click on the button below to deploy the strategy to Render (our recommendation). You can also run the strategy on Repl.it by clicking on the button below. +To run this example strategy, click on the `Deploy to Render` button below to deploy the strategy to Render (our recommendation). You can also run the strategy on Repl.it by clicking on the `Run on Repl.it` button below. [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/Lumiwealth-Strategies/stock_example_algo) From f3f08f2f30a0ee6ff1e2471da7e17015c495b349 Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Thu, 3 Oct 2024 00:37:08 -0400 Subject: [PATCH 07/10] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5523be74..b04cd2b8 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ To get started with Lumibot, you can check out our documentation below. **Check out the documentation for the project here: 👉 👈** -# Run an Example Strategy +## Run an Example Strategy -We made a small example strategy to show you how to use Lumibot in this GitHub repository: [stock_example_algo](https://github.com/Lumiwealth-Strategies/stock_example_algo) +We made a small example strategy to show you how to use Lumibot in this GitHub repository: [Example Algorithm GitHub](https://github.com/Lumiwealth-Strategies/stock_example_algo) To run this example strategy, click on the `Deploy to Render` button below to deploy the strategy to Render (our recommendation). You can also run the strategy on Repl.it by clicking on the `Run on Repl.it` button below. @@ -20,6 +20,8 @@ To run this example strategy, click on the `Deploy to Render` button below to de [![Run on Repl.it](https://replit.com/badge/github/Lumiwealth-Strategies/stock_example_algo)](https://replit.com/new/github/Lumiwealth-Strategies/stock_example_algo) +For more information on how to run the example strategy, you can check out the README in the example strategy repository here: [Example Algorithm](https://github.com/Lumiwealth-Strategies/stock_example_algo) + ## Contributors If you want to contribute to Lumibot, you can check how to get started below. We are always looking for contributors to help us out! From 8914ad55a432e303a7b77e04e5f0514b8eed80c9 Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Thu, 3 Oct 2024 00:37:41 -0400 Subject: [PATCH 08/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b04cd2b8..2444ae14 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To run this example strategy, click on the `Deploy to Render` button below to de [![Run on Repl.it](https://replit.com/badge/github/Lumiwealth-Strategies/stock_example_algo)](https://replit.com/new/github/Lumiwealth-Strategies/stock_example_algo) -For more information on how to run the example strategy, you can check out the README in the example strategy repository here: [Example Algorithm](https://github.com/Lumiwealth-Strategies/stock_example_algo) +**For more information on how to run the example strategy, you can check out the README in the example strategy repository here: [Example Algorithm](https://github.com/Lumiwealth-Strategies/stock_example_algo)** ## Contributors From 908a53bb065cadbc0a22dbad1665bdc36d1b3e92 Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Thu, 3 Oct 2024 00:38:08 -0400 Subject: [PATCH 09/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2444ae14..4ecabaac 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To run this example strategy, click on the `Deploy to Render` button below to de [![Run on Repl.it](https://replit.com/badge/github/Lumiwealth-Strategies/stock_example_algo)](https://replit.com/new/github/Lumiwealth-Strategies/stock_example_algo) -**For more information on how to run the example strategy, you can check out the README in the example strategy repository here: [Example Algorithm](https://github.com/Lumiwealth-Strategies/stock_example_algo)** +**For more information on this example strategy, you can check out the README in the example strategy repository here: [Example Algorithm](https://github.com/Lumiwealth-Strategies/stock_example_algo)** ## Contributors From e20c1c88c84b91764661cff712edcd1b101edeae Mon Sep 17 00:00:00 2001 From: Robert Grzesik Date: Thu, 3 Oct 2024 01:20:03 -0400 Subject: [PATCH 10/10] improved deployment guide in docs --- docs/_sources/deployment.rst.txt | 119 +++++++----- docs/deployment.html | 178 ++++++++++-------- docs/index.html | 7 +- docs/searchindex.js | 2 +- docsrc/_build/doctrees/deployment.doctree | Bin 99424 -> 106308 bytes docsrc/_build/doctrees/environment.pickle | Bin 3618389 -> 3627663 bytes .../_build/html/_sources/deployment.rst.txt | 119 +++++++----- docsrc/_build/html/deployment.html | 178 ++++++++++-------- docsrc/_build/html/index.html | 7 +- docsrc/_build/html/searchindex.js | 2 +- docsrc/deployment.rst | 119 +++++++----- 11 files changed, 437 insertions(+), 294 deletions(-) diff --git a/docs/_sources/deployment.rst.txt b/docs/_sources/deployment.rst.txt index b597c48b..43777d63 100644 --- a/docs/_sources/deployment.rst.txt +++ b/docs/_sources/deployment.rst.txt @@ -1,18 +1,47 @@ Deployment Guide ================ -Deploying your application is straightforward with our GitHub deployment buttons for **Render** and **Replit**. Follow the steps below to get your application up and running quickly. 🚀 +This guide will walk you through the deployment process for your trading strategy. We will cover the following topics: + +- **Choosing Your Deployment Platform:** Decide whether to deploy on **Render** or **Replit**. +- **Deploying to Render:** Step-by-step instructions for deploying on Render. +- **Deploying to Replit:** Step-by-step instructions for deploying on Replit. +- **Secrets Configuration:** Detailed information on setting up your environment variables. +- **Broker Configuration:** Required secrets for different brokers. +- **General Environment Variables:** Additional environment variables required for the strategy to function correctly. + +Before deploying your application, ensure that you have the necessary environment variables configured. The environment variables are crucial for the successful deployment of your application. We will cover the required environment variables for different brokers and general environment variables that are essential for the strategy to function correctly. + +Example Strategy for Deployment +------------------------------- .. important:: - **Render** is our recommended platform due to its ease of use and cost-effectiveness. **Replit** is also a great option, especially for developers who prefer editing code directly in the browser. + **Important:** This example strategy is for those without a strategy ready to deploy. If you have your own strategy, skip to `Choosing Your Deployment Platform <#id1>`_. + +Use this example to see the deployment process in action. It’s not intended for real-money use. More details are available in the GitHub repository: `Example Algorithm GitHub `_ + +To run the example strategy, click the Deploy to Render button or the Run on Repl.it button. See `Deploying to Render <#id2>`_ and `Deploying to Replit <#id3>`_ for more details. + +.. raw:: html + + + +Render is recommended for ease of use and affordability. Replit is more expensive but great for in-browser code editing, if you want to see/edit the code directly in your browser. .. tip:: **Tip:** Scroll down to the :ref:`Secrets Configuration ` section for detailed information on setting up your environment variables. Choosing Your Deployment Platform --------------------------------- +--------------------------------- We recommend using **Render** for deployment because it is easier to use and more affordable compared to Replit. However, **Replit** is an excellent choice for developers who want to edit code directly in the browser. @@ -47,7 +76,8 @@ Render offers powerful deployment options with easy scalability. Follow these st **Figure 2:** Deploying Blueprint on Render. 3. **Navigate to the Worker** - - **Navigate to the Background Worker:** Click on the name of the background worker, e.g., **options-butterfly-condor-worker-afas (Starter)** so you can configure theis specific bot worker (we are currently in the blueprint configuration, not the bot itself). + + - **Navigate to the Background Worker:** Click on the name of the background worker, e.g., **options-butterfly-condor-worker-afas (Starter)** so you can configure this specific bot worker (we are currently in the blueprint configuration, not the bot itself). .. figure:: _static/images/render_worker.png :alt: Worker on Render @@ -57,7 +87,6 @@ Render offers powerful deployment options with easy scalability. Follow these st 4. **Configure Environment Variables** - - **Select Environment:** On the worker's page, select **Environment** from the left sidebar. - **Edit Environment Variables:** Click **Edit** and fill in the required keys as detailed in the :ref:`Secrets Configuration ` section. Once you have added your values for the environment variables, click **Save**. - **Delete Unnecessary Variables:** If you have any unnecessary environment variables, you can delete them by clicking the **Delete (trashcan)** button next to the variable. One example of an unnecessary variable is `POLYGON_API_KEY` which is only used if you are backtesting. @@ -66,7 +95,7 @@ Render offers powerful deployment options with easy scalability. Follow these st :alt: Environment Settings on Render :align: center - **Figure 3:** Editing Environment Variables on Render. + **Figure 4:** Editing Environment Variables on Render. .. note:: @@ -80,7 +109,7 @@ Render offers powerful deployment options with easy scalability. Follow these st :alt: Restart Service on Render :align: center - **Figure 4:** Redeploying the Service on Render using the latest commit. + **Figure 5:** Redeploying the Service on Render using the latest commit. 6. **View The Logs** @@ -90,21 +119,21 @@ Render offers powerful deployment options with easy scalability. Follow these st :alt: Logs on Render :align: center - **Figure 5:** Viewing Logs on Render. + **Figure 6:** Viewing Logs on Render. 7. **Monitor Bot Performance** - **Monitor Performance:** Go to your broker account to monitor the bot's performance and ensure that it is executing trades as expected. - .. figure:: _static/images/replit_monitor_bot.png - :alt: Monitor bot performance - :align: center - - **Figure 13:** Monitoring bot performance in Replit. + .. figure:: _static/images/replit_monitor_bot.png + :alt: Monitor bot performance + :align: center + + **Figure 7:** Monitoring bot performance. - .. note:: - - **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. + .. note:: + + **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. Deploying to Replit ------------------- @@ -119,7 +148,7 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Deploy on Replit Button :align: center - **Figure 6:** Deploy on Replit button on GitHub. + **Figure 8:** Deploy on Replit button on GitHub. 2. **Open Secrets Configuration** @@ -132,7 +161,7 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Replit Tools -> Secrets :align: center - **Figure 7:** Accessing Secrets in Replit. + **Figure 9:** Accessing Secrets in Replit. 3. **Add Required Secrets** @@ -142,7 +171,7 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Adding a new secret in Replit :align: center - **Figure 8:** Adding a new secret in Replit. + **Figure 10:** Adding a new secret in Replit. 4. **Test Run the Application** @@ -154,13 +183,13 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Running the application in Replit :align: center - **Figure 9:** Running the application in Replit. + **Figure 11:** Running the application in Replit. .. figure:: _static/images/replit_logs.png :alt: Viewing logs in Replit :align: center - **Figure 10:** Viewing logs in Replit. + **Figure 12:** Viewing logs in Replit. 5. **Deployment Part 1** @@ -171,27 +200,30 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Select Reserved VM and Background Worker :align: center - **Figure 10:** Selecting Reserved VM and Background Worker on Replit. + **Figure 13:** Selecting Reserved VM and Background Worker on Replit. + + .. note:: - **Note:** Ensure that you have downgraded the vCPU before selecting the Background Worker to optimize costs effectively. + **Note:** Ensure that you have downgraded the vCPU before selecting the Background Worker to optimize costs effectively. 6. **Deployment Part 2** + - **Downgrade vCPU:** We recommend downgrading to **0.25 vCPU** to reduce costs. As of today, it costs **$6/month** compared to the default **$12/month** for **0.5 vCPU**. - **Select Background Worker:** Choose **"Background Worker"**. - **Click Deploy:** Click **"Deploy"** to deploy your application. - **Wait for Deployment:** The deployment process may take a few minutes. Once completed, you will see a success message. - .. figure:: _static/images/replit_deploy.png - :alt: Deploying the application in Replit - :align: center - - **Figure 11:** Deploying the application in Replit. + .. figure:: _static/images/replit_deploy.png + :alt: Deploying the application in Replit + :align: center - .. figure:: _static/images/replit_deploy_process.png - :alt: Deployment process - :align: center + **Figure 14:** Deploying the application in Replit. - **Figure 12:** Deployment process in Replit. + .. figure:: _static/images/replit_deploy_process.png + :alt: Deployment process + :align: center + + **Figure 15:** Deployment process in Replit. 7. **Check The Logs** @@ -201,22 +233,21 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Logs on Replit :align: center - **Figure 12:** Viewing Logs on Replit. + **Figure 16:** Viewing Logs on Replit. 8. **Monitor Bot Performance** - **Monitor Performance:** Go to your broker account to monitor the bot's performance and ensure that it is executing trades as expected. - .. figure:: _static/images/replit_monitor_bot.png - :alt: Monitor bot performance - :align: center - - **Figure 13:** Monitoring bot performance in Replit. + .. figure:: _static/images/replit_monitor_bot.png + :alt: Monitor bot performance + :align: center - .. note:: - - **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. + **Figure 17:** Monitoring bot performance. + + .. note:: + **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. Secrets Configuration ===================== @@ -322,7 +353,7 @@ Kraken is an excellent cryptocurrency broker offering very low fees and a wide r - abcdef1234567890abcdef1234567890abcdef1234 Interactive Brokers Configuration --------------------------------- +--------------------------------- Interactive Brokers is ideal for international users as they offer a wide array of asset classes, including stocks, options, futures, forex, CFDs, and more. Their global presence makes them suitable for users around the world. To create an account, visit the `Interactive Brokers `_ website. @@ -347,7 +378,7 @@ Interactive Brokers is ideal for international users as they offer a wide array - Subaccount1 General Environment Variables -============================ +============================= In addition to broker-specific secrets, the following environment variables are required for the strategy to function correctly: @@ -395,4 +426,4 @@ Conclusion Deploying your application is straightforward with our GitHub deployment buttons for **Render** and **Replit**. By following this guide, you can quickly set up your environment variables and get your application live. Happy deploying! 🎉 -For further assistance, refer to the [Render Documentation](https://render.com/docs) or the [Replit Documentation](https://docs.replit.com/). +For further assistance, refer to the `Render Documentation `_ or the `Replit Documentation `_. diff --git a/docs/deployment.html b/docs/deployment.html index 1e6386c9..60dd924b 100644 --- a/docs/deployment.html +++ b/docs/deployment.html @@ -366,33 +366,55 @@
Need Extra Help?

Deployment Guide#

-

Deploying your application is straightforward with our GitHub deployment buttons for Render and Replit. Follow the steps below to get your application up and running quickly. 🚀

+

This guide will walk you through the deployment process for your trading strategy. We will cover the following topics:

+
    +
  • Choosing Your Deployment Platform: Decide whether to deploy on Render or Replit.

  • +
  • Deploying to Render: Step-by-step instructions for deploying on Render.

  • +
  • Deploying to Replit: Step-by-step instructions for deploying on Replit.

  • +
  • Secrets Configuration: Detailed information on setting up your environment variables.

  • +
  • Broker Configuration: Required secrets for different brokers.

  • +
  • General Environment Variables: Additional environment variables required for the strategy to function correctly.

  • +
+

Before deploying your application, ensure that you have the necessary environment variables configured. The environment variables are crucial for the successful deployment of your application. We will cover the required environment variables for different brokers and general environment variables that are essential for the strategy to function correctly.

+
+

Example Strategy for Deployment#

Important

-

Render is our recommended platform due to its ease of use and cost-effectiveness. Replit is also a great option, especially for developers who prefer editing code directly in the browser.

+

Important: This example strategy is for those without a strategy ready to deploy. If you have your own strategy, skip to Choosing Your Deployment Platform.

+

Use this example to see the deployment process in action. It’s not intended for real-money use. More details are available in the GitHub repository: Example Algorithm GitHub

+

To run the example strategy, click the Deploy to Render button or the Run on Repl.it button. See Deploying to Render and Deploying to Replit for more details.

+

Render is recommended for ease of use and affordability. Replit is more expensive but great for in-browser code editing, if you want to see/edit the code directly in your browser.

Tip

Tip: Scroll down to the Secrets Configuration section for detailed information on setting up your environment variables.

-
-

Choosing Your Deployment Platform#

+
+
+

Choosing Your Deployment Platform#

We recommend using Render for deployment because it is easier to use and more affordable compared to Replit. However, Replit is an excellent choice for developers who want to edit code directly in the browser.

Note

Render costs $7/month, while Replit is priced at $25/month. Choose the platform that best fits your needs and budget.

-
-

Deploying to Render#

+
+

Deploying to Render#

Render offers powerful deployment options with easy scalability. Follow these steps to deploy your application on Render:

  1. Click the “Deploy to Render” Button

    Start by clicking the “Deploy to Render” button on the GitHub repository.

    -
    +
    Deploy to Render Button
    -

    Figure 1: Deploy to Render button on GitHub.#

    +

    Figure 1: Deploy to Render button on GitHub.#

  2. @@ -401,19 +423,21 @@

    Deploying to Render +
    Deploy Blueprint on Render
    -

    Figure 2: Deploying Blueprint on Render.#

    +

    Figure 2: Deploying Blueprint on Render.#

    -
  3. Navigate to the Worker -- Navigate to the Background Worker: Click on the name of the background worker, e.g., options-butterfly-condor-worker-afas (Starter) so you can configure theis specific bot worker (we are currently in the blueprint configuration, not the bot itself).

    -
    +
  4. Navigate to the Worker

    +
      +
    • Navigate to the Background Worker: Click on the name of the background worker, e.g., options-butterfly-condor-worker-afas (Starter) so you can configure this specific bot worker (we are currently in the blueprint configuration, not the bot itself).

    • +
    +
    Worker on Render
    -

    Figure 3: Worker on Render.#

    +

    Figure 3: Worker on Render.#

  5. @@ -423,10 +447,10 @@

    Deploying to RenderSecrets Configuration section. Once you have added your values for the environment variables, click Save.

  6. Delete Unnecessary Variables: If you have any unnecessary environment variables, you can delete them by clicking the Delete (trashcan) button next to the variable. One example of an unnecessary variable is POLYGON_API_KEY which is only used if you are backtesting.

  7. -
    +
    Environment Settings on Render
    -

    Figure 3: Editing Environment Variables on Render.#

    +

    Figure 4: Editing Environment Variables on Render.#

    @@ -436,10 +460,10 @@

    Deploying to Render +
    Restart Service on Render
    -

    Figure 4: Redeploying the Service on Render using the latest commit.#

    +

    Figure 5: Redeploying the Service on Render using the latest commit.#

    @@ -447,10 +471,10 @@

    Deploying to Render
  8. Check the Logs: Navigate to the Logs tab on the left to view the deployment logs and ensure that there are no errors.

  9. -
    +
    Logs on Render
    -

    Figure 5: Viewing Logs on Render.#

    +

    Figure 6: Viewing Logs on Render.#

    @@ -458,31 +482,29 @@

    Deploying to Render
  10. Monitor Performance: Go to your broker account to monitor the bot’s performance and ensure that it is executing trades as expected.

  11. -
    -
    +
    Monitor bot performance
    -

    Figure 13: Monitoring bot performance in Replit.#

    +

    Figure 7: Monitoring bot performance.#

    Note

    Note: Monitor the bot’s performance regularly to ensure that it is functioning correctly and making profitable trades.

    -

-
-

Deploying to Replit#

+
+

Deploying to Replit#

Replit is a versatile platform that allows you to deploy applications quickly. Follow these steps to deploy your application on Replit:

  1. Click the “Deploy on Replit” Button

    Start by clicking the “Deploy on Replit” button on the GitHub repository.

    -
    +
    Deploy on Replit Button
    -

    Figure 6: Deploy on Replit button on GitHub.#

    +

    Figure 8: Deploy on Replit button on GitHub.#

  2. @@ -492,35 +514,35 @@

    Deploying to Replit +
    Replit Tools -> Secrets
    -

    Figure 7: Accessing Secrets in Replit.#

    +

    Figure 9: Accessing Secrets in Replit.#

  3. Add Required Secrets

    In the Secrets tab, add the necessary environment variables as detailed in the Secrets Configuration section.

    -
    +
    Adding a new secret in Replit
    -

    Figure 8: Adding a new secret in Replit.#

    +

    Figure 10: Adding a new secret in Replit.#

  4. Test Run the Application

    After adding all required secrets, click Run. This step is crucial as it installs all necessary libraries and ensures that the secrets are correctly configured.

    When you press Run, the application will start running in the console. You can see the logs in real-time to ensure that everything is working as expected.

    -
    +
    Running the application in Replit
    -

    Figure 9: Running the application in Replit.#

    +

    Figure 11: Running the application in Replit.#

    -
    +
    Viewing logs in Replit
    -

    Figure 10: Viewing logs in Replit.#

    +

    Figure 12: Viewing logs in Replit.#

  5. @@ -529,42 +551,45 @@

    Deploying to Replit +
    Select Reserved VM and Background Worker
    -

    Figure 10: Selecting Reserved VM and Background Worker on Replit.#

    +

    Figure 13: Selecting Reserved VM and Background Worker on Replit.#

    +
    +

    Note

    Note: Ensure that you have downgraded the vCPU before selecting the Background Worker to optimize costs effectively.

    +
    -
  6. Deployment Part 2 -- Downgrade vCPU: We recommend downgrading to 0.25 vCPU to reduce costs. As of today, it costs $6/month compared to the default $12/month for 0.5 vCPU. -- Select Background Worker: Choose “Background Worker”. -- Click Deploy: Click “Deploy” to deploy your application. -- Wait for Deployment: The deployment process may take a few minutes. Once completed, you will see a success message.

    -
    -
    +
  7. Deployment Part 2

    +
      +
    • Downgrade vCPU: We recommend downgrading to 0.25 vCPU to reduce costs. As of today, it costs $6/month compared to the default $12/month for 0.5 vCPU.

    • +
    • Select Background Worker: Choose “Background Worker”.

    • +
    • Click Deploy: Click “Deploy” to deploy your application.

    • +
    • Wait for Deployment: The deployment process may take a few minutes. Once completed, you will see a success message.

    • +
    +
    Deploying the application in Replit
    -

    Figure 11: Deploying the application in Replit.#

    +

    Figure 14: Deploying the application in Replit.#

    -
    +
    Deployment process
    -

    Figure 12: Deployment process in Replit.#

    +

    Figure 15: Deployment process in Replit.#

    -
  8. Check The Logs

    • View Logs: Navigate to the Logs tab in Deployment to view the deployment logs and ensure that there are no errors.

    -
    +
    Logs on Replit
    -

    Figure 12: Viewing Logs on Replit.#

    +

    Figure 16: Viewing Logs on Replit.#

  9. @@ -572,18 +597,16 @@

    Deploying to Replit
  10. Monitor Performance: Go to your broker account to monitor the bot’s performance and ensure that it is executing trades as expected.

  11. -
    -
    +
    Monitor bot performance
    -

    Figure 13: Monitoring bot performance in Replit.#

    +

    Figure 17: Monitoring bot performance.#

    Note

    Note: Monitor the bot’s performance regularly to ensure that it is functioning correctly and making profitable trades.

    -

@@ -606,9 +629,9 @@

Broker Configuration

Tradier Configuration#

Tradier is great because they can trade stocks, options, and soon futures. Tradier also offers an incredible plan for $10/month, providing commission-free options trading. This can save a lot of money for those day trading options or engaging in similar activities. To create an account, visit the Tradier website.

-
- - +
+
Tradier Configuration#
+@@ -640,9 +663,9 @@

Tradier Configuration

Alpaca Configuration#

Alpaca is great because they’re a commission-free broker specifically designed for API trading, which aligns perfectly with our platform. Alpaca supports trading stocks, crypto, and soon options, with their APIs working seamlessly for automated trading strategies. To create an account, visit the Alpaca website.

-
-

Tradier Configuration#
- +
+
Alpaca Configuration#
+@@ -674,9 +697,9 @@

Alpaca Configuration

Coinbase Configuration#

Coinbase is a cryptocurrency broker that is easy to set up and operates across all United States, including New York, which is typically challenging to find for crypto brokers. It offers a wide range of cryptocurrencies with user-friendly APIs. To create an account, visit the Coinbase website.

-
-

Alpaca Configuration#
- +
+
Coinbase Configuration#
+@@ -708,9 +731,9 @@

Coinbase Configuration

Kraken Configuration#

Kraken is an excellent cryptocurrency broker offering very low fees and a wide range of cryptocurrencies, likely more than Coinbase. It is ideal for users focused on crypto trading with competitive pricing. To create an account, visit the Kraken website.

-
-

Coinbase Configuration#
- +
+
Kraken Configuration#
+@@ -738,9 +761,9 @@

Kraken Configuration

Interactive Brokers Configuration#

Interactive Brokers is ideal for international users as they offer a wide array of asset classes, including stocks, options, futures, forex, CFDs, and more. Their global presence makes them suitable for users around the world. To create an account, visit the Interactive Brokers website.

-
-

Kraken Configuration#
- +
+
Interactive Brokers Configuration#
+@@ -777,9 +800,9 @@

Interactive Brokers Configuration

General Environment Variables#

In addition to broker-specific secrets, the following environment variables are required for the strategy to function correctly:

-
-

Interactive Brokers Configuration#
- +
+
General Environment Variables#
+@@ -835,7 +858,7 @@

Final Steps

Conclusion#

Deploying your application is straightforward with our GitHub deployment buttons for Render and Replit. By following this guide, you can quickly set up your environment variables and get your application live. Happy deploying! 🎉

-

For further assistance, refer to the [Render Documentation](https://render.com/docs) or the [Replit Documentation](https://docs.replit.com/).

+

For further assistance, refer to the Render Documentation or the Replit Documentation.

@@ -895,9 +918,10 @@

Conclusion -
+
Environment Settings on Render
-

Figure 3: Editing Environment Variables on Render.#

+

Figure 4: Editing Environment Variables on Render.#

@@ -436,10 +460,10 @@

Deploying to Render +
Restart Service on Render
-

Figure 4: Redeploying the Service on Render using the latest commit.#

+

Figure 5: Redeploying the Service on Render using the latest commit.#

@@ -447,10 +471,10 @@

Deploying to Render
  • Check the Logs: Navigate to the Logs tab on the left to view the deployment logs and ensure that there are no errors.

  • -
    +
    Logs on Render
    -

    Figure 5: Viewing Logs on Render.#

    +

    Figure 6: Viewing Logs on Render.#

    @@ -458,31 +482,29 @@

    Deploying to Render
  • Monitor Performance: Go to your broker account to monitor the bot’s performance and ensure that it is executing trades as expected.

  • -
    -
    +
    Monitor bot performance
    -

    Figure 13: Monitoring bot performance in Replit.#

    +

    Figure 7: Monitoring bot performance.#

    Note

    Note: Monitor the bot’s performance regularly to ensure that it is functioning correctly and making profitable trades.

    -
    -
    -

    Deploying to Replit#

    +
    +

    Deploying to Replit#

    Replit is a versatile platform that allows you to deploy applications quickly. Follow these steps to deploy your application on Replit:

    1. Click the “Deploy on Replit” Button

      Start by clicking the “Deploy on Replit” button on the GitHub repository.

      -
      +
      Deploy on Replit Button
      -

      Figure 6: Deploy on Replit button on GitHub.#

      +

      Figure 8: Deploy on Replit button on GitHub.#

    2. @@ -492,35 +514,35 @@

      Deploying to Replit +
      Replit Tools -> Secrets
      -

      Figure 7: Accessing Secrets in Replit.#

      +

      Figure 9: Accessing Secrets in Replit.#

    3. Add Required Secrets

      In the Secrets tab, add the necessary environment variables as detailed in the Secrets Configuration section.

      -
      +
      Adding a new secret in Replit
      -

      Figure 8: Adding a new secret in Replit.#

      +

      Figure 10: Adding a new secret in Replit.#

    4. Test Run the Application

      After adding all required secrets, click Run. This step is crucial as it installs all necessary libraries and ensures that the secrets are correctly configured.

      When you press Run, the application will start running in the console. You can see the logs in real-time to ensure that everything is working as expected.

      -
      +
      Running the application in Replit
      -

      Figure 9: Running the application in Replit.#

      +

      Figure 11: Running the application in Replit.#

      -
      +
      Viewing logs in Replit
      -

      Figure 10: Viewing logs in Replit.#

      +

      Figure 12: Viewing logs in Replit.#

    5. @@ -529,42 +551,45 @@

      Deploying to Replit +
      Select Reserved VM and Background Worker
      -

      Figure 10: Selecting Reserved VM and Background Worker on Replit.#

      +

      Figure 13: Selecting Reserved VM and Background Worker on Replit.#

      +
      +

      Note

      Note: Ensure that you have downgraded the vCPU before selecting the Background Worker to optimize costs effectively.

      +
      -
    6. Deployment Part 2 -- Downgrade vCPU: We recommend downgrading to 0.25 vCPU to reduce costs. As of today, it costs $6/month compared to the default $12/month for 0.5 vCPU. -- Select Background Worker: Choose “Background Worker”. -- Click Deploy: Click “Deploy” to deploy your application. -- Wait for Deployment: The deployment process may take a few minutes. Once completed, you will see a success message.

      -
      -
      +
    7. Deployment Part 2

      +
        +
      • Downgrade vCPU: We recommend downgrading to 0.25 vCPU to reduce costs. As of today, it costs $6/month compared to the default $12/month for 0.5 vCPU.

      • +
      • Select Background Worker: Choose “Background Worker”.

      • +
      • Click Deploy: Click “Deploy” to deploy your application.

      • +
      • Wait for Deployment: The deployment process may take a few minutes. Once completed, you will see a success message.

      • +
      +
      Deploying the application in Replit
      -

      Figure 11: Deploying the application in Replit.#

      +

      Figure 14: Deploying the application in Replit.#

      -
      +
      Deployment process
      -

      Figure 12: Deployment process in Replit.#

      +

      Figure 15: Deployment process in Replit.#

      -
    8. Check The Logs

      • View Logs: Navigate to the Logs tab in Deployment to view the deployment logs and ensure that there are no errors.

      -
      +
      Logs on Replit
      -

      Figure 12: Viewing Logs on Replit.#

      +

      Figure 16: Viewing Logs on Replit.#

    9. @@ -572,18 +597,16 @@

      Deploying to Replit
    10. Monitor Performance: Go to your broker account to monitor the bot’s performance and ensure that it is executing trades as expected.

    11. -
      -
      +
      Monitor bot performance
      -

      Figure 13: Monitoring bot performance in Replit.#

      +

      Figure 17: Monitoring bot performance.#

      Note

      Note: Monitor the bot’s performance regularly to ensure that it is functioning correctly and making profitable trades.

      -

    @@ -606,9 +629,9 @@

    Broker Configuration

    Tradier Configuration#

    Tradier is great because they can trade stocks, options, and soon futures. Tradier also offers an incredible plan for $10/month, providing commission-free options trading. This can save a lot of money for those day trading options or engaging in similar activities. To create an account, visit the Tradier website.

    -
    -

    General Environment Variables#
    - +
    +
    Tradier Configuration#
    +@@ -640,9 +663,9 @@

    Tradier Configuration

    Alpaca Configuration#

    Alpaca is great because they’re a commission-free broker specifically designed for API trading, which aligns perfectly with our platform. Alpaca supports trading stocks, crypto, and soon options, with their APIs working seamlessly for automated trading strategies. To create an account, visit the Alpaca website.

    -
    -

    Tradier Configuration#
    - +
    +
    Alpaca Configuration#
    +@@ -674,9 +697,9 @@

    Alpaca Configuration

    Coinbase Configuration#

    Coinbase is a cryptocurrency broker that is easy to set up and operates across all United States, including New York, which is typically challenging to find for crypto brokers. It offers a wide range of cryptocurrencies with user-friendly APIs. To create an account, visit the Coinbase website.

    -
    -

    Alpaca Configuration#
    - +
    +
    Coinbase Configuration#
    +@@ -708,9 +731,9 @@

    Coinbase Configuration

    Kraken Configuration#

    Kraken is an excellent cryptocurrency broker offering very low fees and a wide range of cryptocurrencies, likely more than Coinbase. It is ideal for users focused on crypto trading with competitive pricing. To create an account, visit the Kraken website.

    -
    -

    Coinbase Configuration#
    - +
    +
    Kraken Configuration#
    +@@ -738,9 +761,9 @@

    Kraken Configuration

    Interactive Brokers Configuration#

    Interactive Brokers is ideal for international users as they offer a wide array of asset classes, including stocks, options, futures, forex, CFDs, and more. Their global presence makes them suitable for users around the world. To create an account, visit the Interactive Brokers website.

    -
    -

    Kraken Configuration#
    - +
    +
    Interactive Brokers Configuration#
    +@@ -777,9 +800,9 @@

    Interactive Brokers Configuration

    General Environment Variables#

    In addition to broker-specific secrets, the following environment variables are required for the strategy to function correctly:

    -
    -

    Interactive Brokers Configuration#
    - +
    +
    General Environment Variables#
    +@@ -835,7 +858,7 @@

    Final Steps

    Conclusion#

    Deploying your application is straightforward with our GitHub deployment buttons for Render and Replit. By following this guide, you can quickly set up your environment variables and get your application live. Happy deploying! 🎉

    -

    For further assistance, refer to the [Render Documentation](https://render.com/docs) or the [Replit Documentation](https://docs.replit.com/).

    +

    For further assistance, refer to the Render Documentation or the Replit Documentation.

    @@ -895,9 +918,10 @@

    Conclusion
    • Deployment Guide
    • Secrets Configuration
    • diff --git a/docsrc/_build/html/index.html b/docsrc/_build/html/index.html index ab266de5..6ff8419f 100644 --- a/docsrc/_build/html/index.html +++ b/docsrc/_build/html/index.html @@ -672,9 +672,10 @@

      Table of ContentsDiscord Community
    • Get Pre-Built Profitable Strategies
    • Deployment Guide
    • Secrets Configuration
    • diff --git a/docsrc/_build/html/searchindex.js b/docsrc/_build/html/searchindex.js index b622b2bb..7a5df663 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.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"], "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.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"], "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", "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"], "terms": {"lumibot": [0, 1, 5, 6, 8, 10, 11, 12, 13, 14, 15, 17, 18, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164], "ha": [0, 7, 19, 21, 25, 34, 35, 36, 38, 44, 70, 73, 77], "three": [0, 14, 19, 21], "mode": [0, 14, 16, 42, 169, 184], "yahoo": [0, 1, 2, 5, 19, 25, 71, 72, 105, 116], "daili": [0, 2, 5, 7, 10, 30, 71, 72], "stock": [0, 1, 2, 5, 6, 8, 9, 10, 12, 16, 18, 19, 20, 21, 22, 25, 31, 43, 105, 116, 125, 133, 145, 151, 156, 162], "data": [0, 1, 3, 6, 8, 10, 13, 17, 18, 19, 22, 25, 29, 30, 39, 44, 46, 61, 65, 70, 71, 72, 77, 80, 82, 88, 89, 90, 91, 97, 98, 99, 175, 178, 180, 190, 193], "from": [1, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 22, 24, 25, 40, 41, 43, 44, 71, 72, 75, 79, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 139, 145, 151, 152, 156, 162, 163], "panda": [0, 2, 10, 19, 20, 25, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 77, 105, 116], "intra": [0, 5, 10], "dai": [0, 1, 2, 5, 6, 8, 10, 16, 20, 21, 25, 29, 30, 31, 39, 43, 71, 72, 75, 78, 79, 83, 84, 85, 86, 92, 93, 94, 95, 129, 137, 145, 152, 156, 163, 177, 192], "inter": [0, 5], "test": [0, 2, 14, 16], "futur": [0, 5, 12, 16, 18, 19, 25, 42, 43, 73, 145, 146, 151, 156, 157, 162, 179, 194], "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 54, 60, 61, 62, 65, 66, 69, 71, 72, 75, 81, 100, 104, 106, 115, 117, 126, 127, 128, 129, 130, 134, 135, 136, 137, 139, 141, 145, 156, 164, 165, 166, 176, 177, 179, 181, 191, 192, 194], "csv": [0, 2, 3, 9, 20, 25, 43], "suppli": [0, 10, 20], "you": [0, 1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 21, 24, 25, 28, 31, 43, 46, 47, 48, 50, 54, 56, 60, 61, 65, 69, 71, 72, 81, 100, 123, 141, 145, 156, 164, 165, 177, 192], "polygon": [0, 1, 5, 8, 10, 16, 25], "io": [0, 13, 14, 19, 25], "It": [0, 4, 5, 6, 7, 8, 13, 14, 16, 18, 21, 22, 24, 25, 40, 42, 43, 73, 76, 145, 156], "i": [0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 25, 27, 28, 29, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 45, 46, 48, 50, 51, 54, 56, 57, 61, 62, 65, 66, 71, 72, 73, 74, 75, 76, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 101, 102, 105, 112, 113, 116, 124, 125, 126, 128, 129, 131, 132, 133, 134, 136, 137, 140, 145, 146, 148, 150, 152, 156, 157, 159, 161, 163, 165, 166, 167, 169, 171, 172, 176, 177, 181, 182, 184, 186, 187, 191, 192], "recommend": [0, 14, 16, 24], "option": [0, 2, 6, 8, 9, 12, 15, 16, 18, 19, 21, 25, 31, 35, 38, 40, 42, 43, 46, 71, 73, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 145, 151, 156, 162], "crypto": [0, 1, 5, 7, 11, 16, 18, 19, 22, 25, 48, 50, 54, 56, 71, 73, 105, 116, 145, 151, 152, 156, 162, 163, 166, 174, 181, 189], "forex": [0, 2, 5, 6, 8, 12, 16, 18, 25, 43, 72, 73, 145, 151, 152, 156, 162, 163], "an": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 16, 18, 21, 22, 25, 33, 34, 35, 38, 39, 40, 42, 43, 51, 57, 71, 73, 74, 80, 101, 102, 104, 112, 113, 115, 125, 126, 130, 131, 133, 134, 139, 140, 143, 145, 146, 147, 151, 154, 156, 157, 158, 162, 164, 177, 192], "advanc": [0, 2, 5, 24, 25, 145, 156], "featur": [0, 2, 6, 8, 25], "allow": [0, 2, 4, 5, 6, 8, 16, 19, 21, 24, 25, 80, 145, 156, 164], "ani": [0, 1, 2, 5, 6, 7, 8, 10, 13, 14, 16, 20, 24, 40, 42, 61, 65, 71, 72, 104, 115, 144, 155, 164], "type": [0, 1, 2, 5, 12, 17, 18, 19, 20, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 63, 64, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193], "have": [0, 1, 2, 5, 6, 8, 10, 15, 16, 19, 21, 22, 24, 25, 27, 42, 46, 48, 50, 54, 56, 71, 77], "format": [0, 5, 18, 20, 43, 75, 124, 125, 129, 131, 132, 133, 137, 140], "requir": [0, 1, 2, 10, 13, 14, 16, 18, 21, 73, 74, 145, 152, 156, 163], "more": [0, 2, 3, 11, 13, 15, 16, 17, 19, 24, 25, 42, 43, 46, 69, 71, 100, 123, 127, 135, 141], "work": [0, 2, 5, 11, 14, 16, 24, 25, 71, 72, 76, 165], "setup": [0, 2], "most": [0, 5, 7, 16, 19, 24, 40, 71, 77, 127, 135], "user": [0, 2, 5, 10, 16, 20, 24, 26, 40, 44, 45, 143, 145, 154, 156], "all": [1, 4, 5, 13, 16, 19, 20, 24, 29, 32, 33, 42, 44, 45, 50, 52, 56, 58, 71, 72, 124, 126, 127, 128, 130, 132, 134, 135, 136, 139, 142, 144, 145, 148, 149, 150, 153, 155, 156, 159, 160, 161, 164], "other": [0, 2, 6, 8, 10, 13, 16, 19, 21, 24, 25, 40, 61, 65, 76, 100, 145, 156, 166, 181], "In": [0, 6, 8, 13, 16, 21, 42, 73, 74, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97], "summari": [0, 6, 8, 25, 26], "here": [1, 2, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 24, 25, 40, 164, 165], "descript": [1, 16], "function": [0, 2, 3, 13, 16, 20, 25, 31, 37, 40, 46, 47, 81, 141], "its": [1, 6, 8, 16, 21, 41], "paramet": [1, 2, 6, 8, 12, 18, 19, 20, 21, 22, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 83, 86, 87, 89, 90, 92, 95, 96, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 149, 150, 151, 152, 153, 154, 155, 156, 157, 160, 161, 162, 163, 171, 186], "thi": [1, 2, 5, 6, 8, 9, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 48, 50, 54, 56, 61, 62, 65, 66, 71, 72, 73, 74, 76, 80, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 106, 117, 145, 152, 156, 163, 166, 167, 176, 177, 181, 182, 191, 192], "true": [1, 5, 12, 13, 15, 16, 21, 23, 24, 25, 31, 42, 43, 45, 71, 72, 73, 104, 115, 150, 161, 167, 169, 182, 184], "kind": [1, 24], "do": [1, 5, 10, 13, 15, 19, 24, 25, 37, 46, 100, 145, 156], "strategi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 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, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 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], "arg": [1, 20, 43], "minutes_before_clos": [1, 25, 28, 31, 39, 101, 112], "1": [1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 30, 43, 71, 72, 83, 89, 90, 92, 98, 99, 127, 135, 138, 145, 151, 152, 156, 162, 163, 177, 192], "minutes_before_open": [1, 25, 29, 102, 113], "60": [1, 19, 172, 187], "sleeptim": [1, 2, 6, 8, 13, 24, 25, 31, 39, 106, 117], "stats_fil": [1, 31], "none": [1, 12, 13, 16, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 42, 43, 45, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 65, 66, 70, 71, 72, 73, 74, 80, 83, 92, 101, 102, 104, 105, 106, 107, 112, 113, 115, 116, 117, 118, 127, 130, 135, 139, 142, 143, 144, 145, 147, 149, 150, 153, 154, 155, 156, 158, 160, 161], "risk_free_r": [1, 43, 127, 135], "logfil": [1, 45], "config": [1, 12, 13, 15, 16, 24, 42], "auto_adjust": [1, 43], "fals": [1, 12, 13, 15, 16, 21, 24, 25, 31, 42, 43, 45, 72, 73, 82, 91, 104, 115, 127, 135, 145, 150, 156, 161], "name": [0, 1, 5, 10, 16, 18, 20, 24, 25, 31, 43, 45, 61, 62, 65, 66, 73, 104, 115, 164], "budget": [1, 5, 10, 16, 24, 31, 168, 183], "benchmark_asset": [1, 2, 6, 8, 24], "spy": [1, 2, 5, 6, 8, 18, 21, 24, 29, 30, 31, 35, 39, 43, 70, 71, 72, 73, 74, 78, 79, 108, 109, 110, 111, 119, 120, 121, 122, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 139, 143, 145, 149, 151, 152, 154, 156, 160, 162, 163, 164], "plot_file_html": 1, "trades_fil": 1, "settings_fil": 1, "pandas_data": [1, 5, 24, 42, 43], "quote_asset": [1, 13, 18, 22, 25, 151, 152, 162, 163], "usd": [1, 18, 20, 71, 72, 73, 145, 151, 152, 156, 162, 163], "starting_posit": 1, "show_plot": [1, 45], "tearsheet_fil": 1, "save_tearsheet": [1, 45], "show_tearsheet": [1, 45], "buy_trading_fe": [1, 24], "sell_trading_fe": [1, 24], "api_kei": [1, 12, 24, 25, 42, 43], "polygon_api_kei": [1, 2, 16], "polygon_has_paid_subscript": 1, "indicators_fil": 1, "show_ind": [1, 45], "save_logfil": 1, "kwarg": [1, 12, 18, 20, 42, 43, 152, 163], "datasource_class": 1, "class": [1, 2, 5, 6, 8, 10, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 164], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 18, 19, 20, 21, 22, 26, 27, 33, 34, 35, 36, 37, 38, 40, 42, 43, 44, 48, 49, 50, 53, 54, 55, 56, 59, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 103, 105, 107, 114, 116, 118, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 145, 146, 149, 150, 152, 156, 157, 160, 161, 163, 164, 166, 168, 170, 171, 172, 173, 174, 175, 176, 178, 180, 181, 183, 185, 186, 187, 188, 189, 190, 191, 193], "datasourc": [1, 8, 42, 43], "For": [1, 2, 3, 5, 7, 10, 13, 16, 18, 19, 21, 25, 27, 43, 48, 50, 54, 56, 108, 109, 110, 111, 119, 120, 121, 122, 145, 151, 152, 156, 162, 163, 164], "exampl": [1, 2, 6, 8, 11, 12, 14, 16, 18, 19, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 51, 52, 57, 58, 61, 62, 65, 66, 70, 71, 72, 73, 74, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 115, 116, 117, 119, 120, 121, 122, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193], "want": [1, 2, 5, 8, 10, 12, 13, 15, 16, 24, 25, 40, 43, 61, 65], "financ": [1, 2, 10, 25], "would": [1, 2, 5, 15, 18, 24, 25, 43, 50, 56, 145, 156, 177, 192], "pass": [1, 2, 5, 8, 10, 17, 27, 35, 39, 40, 44, 101, 102, 112, 113, 127, 135, 145, 156], "yahoodatabacktest": [1, 10, 24, 25, 31], "backtesting_start": [1, 2, 5, 6, 8, 10, 24, 25, 31, 42], "datetim": [1, 2, 5, 6, 8, 10, 13, 18, 19, 20, 24, 25, 31, 42, 43, 46, 61, 62, 65, 66, 71, 75, 77, 80, 82, 83, 89, 90, 91, 92, 98, 99, 126, 129, 131, 134, 137, 138, 140, 145, 156, 170, 185], "start": [1, 2, 5, 6, 7, 8, 10, 11, 13, 16, 19, 20, 29, 31, 43, 71, 72, 77, 80, 101, 112, 172, 187], "date": [0, 1, 2, 5, 6, 8, 10, 18, 20, 25, 31, 43, 73, 75, 81, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 140, 145, 156], "period": [1, 2, 5, 7, 13, 20, 80], "backtesting_end": [1, 2, 5, 6, 8, 10, 24, 25, 31], "end": [1, 2, 6, 7, 8, 10, 19, 20, 25, 41], "int": [1, 12, 18, 20, 21, 35, 38, 43, 61, 62, 65, 66, 71, 72, 80, 83, 84, 85, 86, 87, 88, 92, 93, 94, 95, 96, 97, 101, 102, 112, 113, 145, 146, 156, 157, 171, 172, 177, 186, 187, 192], "number": [1, 12, 14, 15, 16, 20, 21, 28, 31, 43, 71, 72, 83, 86, 87, 92, 95, 96, 145, 156, 171, 172, 177, 186, 187, 192], "minut": [1, 5, 13, 16, 19, 20, 24, 25, 28, 29, 31, 39, 42, 43, 71, 72, 83, 85, 87, 92, 94, 96, 101, 102, 112, 113, 171, 172, 177, 186, 187, 192], "befor": [1, 2, 5, 7, 10, 13, 14, 16, 19, 21, 24, 25, 28, 29, 30, 31, 39, 40, 41, 43, 71, 72, 101, 102, 112, 113, 150, 161, 171, 172, 186, 187], "close": [1, 5, 12, 13, 19, 20, 21, 27, 28, 31, 32, 39, 42, 50, 56, 71, 73, 74, 77, 80, 101, 102, 112, 113, 150, 161, 171, 186], "method": [1, 6, 8, 18, 19, 21, 22, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 69, 100, 123, 124, 126, 128, 130, 132, 134, 136, 139, 164, 167, 171, 172, 177, 182, 186, 187, 192], "call": [1, 5, 6, 8, 18, 19, 21, 27, 31, 33, 34, 35, 37, 38, 39, 40, 41, 43, 71, 73, 74, 124, 125, 127, 132, 133, 135, 151, 162], "open": [1, 2, 5, 12, 16, 19, 20, 21, 24, 28, 29, 30, 39, 42, 62, 66, 71, 77, 80, 101, 102, 112, 113, 142, 143, 144, 148, 150, 153, 154, 155, 159, 161, 172, 187], "second": [1, 12, 21, 31, 39, 42, 72, 80, 100, 106, 117, 177, 192], "sleep": [1, 2, 25, 39, 46, 100, 101, 112, 177, 192], "between": [1, 2, 13, 19, 20, 25, 31, 71, 177, 192], "each": [0, 1, 2, 3, 5, 7, 9, 13, 19, 21, 25, 29, 31, 39, 40, 43, 44, 46, 52, 58, 71, 79, 125, 133, 148, 150, 159, 161], "iter": [1, 2, 6, 8, 13, 20, 31, 39, 40, 167, 170, 182, 185], "str": [1, 18, 19, 20, 21, 22, 43, 51, 57, 61, 62, 65, 66, 71, 72, 73, 74, 75, 83, 92, 104, 105, 115, 116, 124, 125, 126, 128, 129, 131, 132, 133, 134, 136, 137, 140, 145, 152, 156, 163, 173, 177, 178, 188, 192, 193], "file": [1, 4, 5, 7, 14, 16, 24, 25, 100, 104, 115, 164], "write": [1, 2, 6, 8], "stat": [1, 27, 41], "float": [1, 5, 18, 19, 21, 22, 35, 38, 42, 43, 48, 50, 54, 56, 61, 62, 65, 66, 73, 74, 78, 79, 101, 102, 106, 112, 113, 117, 127, 130, 135, 139, 145, 146, 152, 156, 157, 163, 166, 168, 174, 181, 183, 189], "risk": [1, 7, 24, 127, 135], "free": [1, 2, 6, 8, 16, 22, 25, 127, 135], "rate": [1, 6, 8, 19, 127, 135], "log": [0, 1, 2, 7, 10, 14, 15, 16, 18, 25, 41, 100, 104, 115], "dict": [1, 20, 37, 41, 43, 45, 49, 53, 55, 59, 76, 103, 107, 114, 118, 145, 156], "set": [1, 2, 6, 8, 11, 14, 15, 16, 18, 19, 20, 21, 24, 25, 28, 31, 42, 43, 53, 59, 71, 72, 77, 105, 116, 124, 132, 145, 156, 164, 165, 171, 172, 177, 186, 187, 192], "up": [1, 2, 5, 6, 11, 14, 16, 18, 24, 25, 62, 66], "broker": [1, 5, 12, 15, 18, 19, 21, 22, 23, 24, 25, 31, 34, 35, 36, 38, 44, 71, 72, 73, 76, 80, 108, 109, 110, 111, 119, 120, 121, 122, 127, 135, 145, 151, 152, 156, 162, 163, 166, 181], "live": [1, 2, 12, 14, 16, 19, 24, 42, 43, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 105, 116], "trade": [0, 1, 4, 5, 10, 11, 13, 14, 16, 17, 18, 19, 20, 26, 29, 30, 31, 32, 39, 40, 42, 43, 44, 51, 57, 72, 73, 75, 77, 80, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 105, 116, 125, 129, 133, 137, 145, 156, 170, 185], "bool": [1, 21, 42, 43, 45, 71, 72, 73, 104, 115, 127, 135, 152, 163, 167, 169, 182, 184], "whether": [1, 21, 43, 45, 71, 81, 127, 135, 145, 156], "automat": [1, 6, 8, 21, 145, 146, 156, 157], "adjust": [1, 7, 20, 43], "initi": [1, 2, 6, 8, 13, 14, 24, 25, 26, 40, 105, 116, 164, 168, 171, 172, 177, 183, 186, 187, 192], "asset": [1, 2, 5, 9, 12, 13, 16, 17, 19, 20, 21, 22, 25, 32, 33, 34, 35, 36, 38, 39, 42, 43, 48, 50, 51, 52, 54, 56, 57, 58, 61, 65, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 139, 145, 146, 151, 152, 156, 157, 162, 163, 166, 176, 181, 191], "benchmark": [1, 2, 7], "compar": [1, 7, 16], "If": [1, 5, 6, 8, 12, 13, 15, 16, 19, 20, 24, 25, 29, 31, 35, 39, 43, 71, 72, 73, 80, 101, 102, 104, 112, 113, 115, 130, 139, 142, 145, 150, 153, 156, 161], "string": [1, 16, 18, 19, 20, 21, 43, 71, 72, 104, 115, 131, 140, 145, 156, 177, 192], "convert": [1, 18, 19, 21, 25, 42, 43, 131, 140, 145, 156], "object": [1, 5, 10, 12, 17, 18, 19, 20, 21, 22, 23, 34, 35, 36, 38, 42, 43, 45, 51, 52, 57, 58, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 108, 109, 110, 111, 119, 120, 121, 122, 125, 130, 133, 139, 143, 144, 145, 146, 147, 148, 151, 152, 154, 155, 156, 157, 158, 159, 162, 163, 175, 180, 190], "plot": [1, 10, 45, 62, 66], "html": [0, 1, 3, 9, 14, 19, 25], "list": [1, 2, 13, 17, 18, 19, 22, 24, 30, 42, 43, 46, 47, 52, 58, 60, 69, 72, 74, 79, 81, 83, 92, 100, 105, 110, 111, 116, 121, 122, 123, 126, 128, 130, 134, 136, 139, 141, 144, 148, 152, 155, 159, 163, 165], "A": [1, 5, 7, 10, 12, 21, 25, 43, 45, 51, 52, 57, 58, 76, 83, 92, 145, 152, 156, 163], "ar": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 37, 40, 43, 44, 46, 47, 52, 58, 60, 61, 62, 65, 66, 69, 72, 77, 80, 81, 100, 105, 116, 123, 124, 125, 127, 132, 133, 135, 141, 142, 145, 146, 148, 150, 152, 153, 156, 157, 159, 161, 163, 164, 166, 181], "when": [0, 1, 2, 5, 6, 8, 13, 16, 18, 19, 21, 24, 25, 26, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 61, 62, 65, 66, 81, 145, 156, 166, 171, 181, 186], "pandasdatabacktest": [1, 5, 24], "contain": [1, 3, 19, 20, 39, 41, 77, 151, 152, 162, 163], "currenc": [18, 71, 145, 156, 166, 174, 176, 181, 189, 191], "get": [1, 2, 5, 6, 8, 10, 11, 12, 13, 16, 17, 19, 20, 21, 29, 30, 32, 37, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 69, 71, 72, 74, 76, 78, 79, 81, 103, 114, 123, 146, 147, 148, 149, 157, 158, 159, 160, 164, 165, 166, 171, 172, 174, 177, 181, 186, 187, 189, 192], "valuat": 1, "measur": [1, 7], "overal": [1, 7], "porfolio": 1, "valu": [1, 3, 5, 9, 12, 13, 16, 18, 19, 20, 22, 27, 42, 44, 45, 47, 48, 50, 54, 56, 60, 61, 62, 65, 66, 71, 72, 127, 135, 152, 163, 174, 189], "usual": [1, 46, 177, 192], "usdt": [1, 18, 48, 50, 54, 56, 71, 73, 145, 156], "usdc": 1, "dictionari": [1, 5, 8, 15, 35, 41, 42, 43, 45, 72, 76, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 139, 145, 156, 164], "posit": [1, 13, 17, 21, 25, 35, 38, 42, 44, 50, 51, 52, 56, 57, 58, 146, 149, 150, 157, 160, 161, 166, 174, 181, 189], "100": [1, 5, 12, 13, 15, 18, 19, 24, 25, 31, 41, 43, 71, 72, 108, 109, 110, 111, 119, 120, 121, 122, 124, 125, 127, 132, 133, 135, 143, 144, 145, 151, 152, 154, 155, 156, 162, 163], "200": [1, 12, 35, 43, 72, 110, 111, 121, 122, 152, 163], "aapl": [1, 2, 5, 6, 8, 10, 12, 15, 18, 19, 22, 25, 31, 34, 35, 36, 38, 71, 72, 144, 155], "show": [1, 7, 51, 52, 57, 58, 146, 147, 148, 157, 158, 159], "tearsheet": [0, 1, 25, 45], "save": [1, 5, 10, 16, 24, 45], "These": [0, 1, 2, 3, 4, 7, 10, 31, 44, 53, 59, 81], "must": [1, 2, 5, 6, 8, 10, 12, 14, 15, 20, 21, 40, 71, 72, 130, 139, 145, 156], "within": [1, 16, 17, 106, 117, 142, 153], "tradingfe": [1, 23, 24, 25], "appli": [1, 16, 43], "bui": [1, 2, 5, 6, 7, 8, 9, 10, 12, 13, 15, 18, 21, 24, 25, 35, 39, 44, 48, 54, 104, 108, 109, 110, 111, 115, 119, 120, 121, 122, 143, 144, 145, 151, 152, 154, 155, 156, 162, 163, 166, 181], "order": [1, 2, 5, 6, 8, 9, 10, 12, 13, 17, 18, 22, 24, 25, 28, 29, 34, 35, 36, 38, 39, 40, 42, 46, 104, 108, 109, 110, 111, 115, 119, 120, 121, 122, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 166, 181], "dure": [1, 2, 4, 7, 44, 72], "sell": [1, 7, 9, 21, 22, 28, 32, 33, 35, 39, 42, 44, 145, 149, 150, 151, 152, 156, 160, 161, 162, 163], "api": [1, 2, 6, 8, 10, 12, 13, 14, 15, 16, 19, 25, 127, 135], "kei": [1, 2, 3, 5, 6, 8, 12, 14, 15, 16, 20, 25, 45, 127, 135, 164], "onli": [1, 5, 10, 13, 14, 16, 18, 19, 20, 21, 22, 24, 25, 31, 40, 42, 43, 45, 71, 72, 73, 76, 80, 127, 135, 142, 152, 153, 163, 171, 186], "polygondatabacktest": [1, 2, 6, 8], "depric": 73, "pleas": [1, 2, 5, 6, 8, 10, 13, 21, 71, 179, 194], "instead": [1, 5, 16, 19, 42, 106, 117, 127, 135, 179, 194], "indic": [0, 1, 5, 13, 45, 51, 52, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 152, 163], "directori": [5, 16], "default": [1, 5, 10, 16, 18, 19, 20, 31, 33, 43, 44, 53, 59, 61, 62, 65, 66, 71, 72, 73, 75, 90, 99, 105, 116, 124, 126, 127, 128, 129, 132, 134, 135, 136, 137, 145, 150, 152, 156, 161, 163, 171, 172, 175, 177, 178, 180, 186, 187, 190, 192, 193], "turn": [], "slow": 24, "down": [16, 24, 32, 62, 66], "return": [1, 7, 12, 18, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 63, 64, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193], "result": [2, 5, 6, 8, 10, 24, 25, 41], "eg": [13, 18, 19, 24, 43, 46, 48, 50, 54, 56, 61, 62, 65, 66, 69, 76, 81, 104, 115, 124, 125, 132, 133, 145, 156, 177, 192], "import": [0, 1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 25, 40, 41, 43, 44, 62, 66, 72, 79, 145, 151, 152, 156, 162, 163, 164], "simpl": [1, 5, 6, 8, 10, 15, 21, 25, 145, 156], "first": [1, 5, 6, 8, 10, 13, 15, 16, 19, 20, 21, 24, 25, 29, 31, 72, 167, 177, 182, 192], "mystrategi": [1, 2, 5, 6, 8, 10, 13, 15, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 44, 164], "def": [1, 2, 5, 6, 8, 10, 12, 13, 15, 24, 25, 26, 40, 105, 116, 164, 171, 172, 177, 186, 187, 192], "on_trading_iter": [1, 2, 5, 6, 8, 10, 13, 15, 24, 25, 26, 27, 40, 41, 46, 101, 102, 112, 113, 164, 167, 171, 177, 182, 186, 192], "self": [1, 2, 5, 6, 8, 10, 12, 13, 15, 18, 19, 21, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 46, 164], "first_iter": [1, 2, 5, 6, 8, 10, 25], "create_ord": [1, 2, 5, 6, 8, 10, 12, 13, 18, 21, 24, 25, 39, 46, 108, 109, 110, 111, 119, 120, 121, 122, 143, 144, 151, 152, 154, 155, 162, 163], "quantiti": [1, 2, 6, 7, 8, 10, 12, 13, 21, 22, 24, 25, 35, 38, 51, 52, 57, 58, 145, 156], "side": [1, 2, 6, 8, 12, 21, 24, 35, 42, 145, 156], "submit_ord": [1, 2, 5, 6, 8, 10, 13, 18, 21, 24, 25, 39, 42, 46, 108, 109, 110, 111, 119, 120, 121, 122, 143, 144, 145, 149, 154, 155, 156, 160], "creat": [1, 2, 5, 6, 7, 8, 10, 13, 15, 16, 18, 20, 21, 35, 71, 124, 126, 128, 130, 132, 134, 136, 139, 141, 143, 144, 145, 154, 155, 156], "2018": [1, 19], "31": [1, 5, 10, 24, 25, 43, 124, 125, 132, 133], "symbol": [1, 2, 5, 6, 8, 12, 13, 18, 19, 20, 21, 22, 24, 35, 43, 62, 66, 71, 72, 73, 145, 151, 152, 156, 162, 163], "qqq": 1, "asset_typ": [1, 5, 13, 18, 19, 43, 71, 72, 73, 145, 146, 151, 152, 156, 157, 162, 163], "note": [5, 10, 13, 14, 16, 19, 21, 42, 76, 145, 156], "ensur": [5, 10, 16, 20, 21, 24, 25, 145, 156], "instal": [0, 5, 10, 13, 14, 16], "latest": [2, 5, 10, 13, 16, 24, 25, 71], "version": [2, 5, 7, 10, 24, 25], "pip": [2, 5, 10, 13, 24, 25], "upgrad": [2, 5, 10, 24, 25], "proceed": [5, 10, 24], "been": [5, 10, 21, 22, 34, 35, 36, 38, 42, 73, 77], "some": [5, 10, 24, 25, 43, 44, 73, 145, 156], "major": [5, 10], "chang": [5, 10, 12, 15, 16, 19, 31], "backtest": [4, 5, 7, 10, 16, 20, 21, 23, 31, 43, 45, 62, 66, 71, 72, 73, 74, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 105, 116, 169, 184], "modul": [5, 10, 25], "situat": 5, "thei": [3, 5, 11, 16, 19, 25, 40, 80, 127, 135], "much": [5, 6, 8, 12], "easier": [5, 16], "intend": 5, "who": [5, 16, 51, 57, 146, 157], "own": [2, 5, 6, 8, 12, 13, 15, 16, 22, 24, 25, 149, 160], "after": [5, 6, 8, 13, 16, 20, 25, 27, 29, 30, 39, 41, 43, 62, 66, 71, 75, 129, 137, 138], "python": [2, 5, 24, 104, 115], "librari": [5, 7, 13, 15, 16, 24], "becaus": [3, 5, 6, 8, 10, 16, 42], "provid": [0, 2, 4, 5, 6, 8, 9, 16, 20, 43, 73, 74, 130, 139, 143, 144, 154, 155], "strictli": [5, 20], "can": [2, 5, 6, 8, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 28, 31, 40, 43, 44, 47, 48, 54, 60, 61, 62, 65, 66, 69, 71, 72, 81, 100, 123, 127, 135, 141, 145, 156, 164, 165, 177, 192], "parquet": 5, "databas": [2, 5, 16], "etc": [5, 15, 19, 20, 39, 44, 47, 60, 62, 66, 76, 147, 158], "wish": [5, 25], "accept": [5, 18], "one": [5, 7, 13, 16, 21, 24, 25, 40, 42, 46, 71, 108, 119, 145, 152, 156, 163], "time": [3, 5, 6, 8, 9, 12, 13, 16, 19, 20, 24, 31, 40, 42, 43, 44, 70, 71, 72, 77, 80, 81, 86, 87, 95, 96, 101, 102, 106, 112, 113, 117, 127, 135, 145, 156, 167, 177, 182, 192], "frame": 5, "raw": [5, 19, 21], "addition": [5, 10, 19], "possibl": [5, 31, 43, 61, 62, 65, 66, 152, 163], "like": [2, 5, 16, 20, 24, 25, 28, 29, 30, 31, 32, 42, 164], "secur": [2, 5, 10, 18, 21], "contract": [5, 18, 19, 21, 31, 42], "flexibl": [2, 5, 6, 8, 24], "also": [5, 10, 14, 16, 21, 24, 25, 31, 42, 71, 145, 150, 156, 161, 165], "difficult": 5, "follow": [2, 5, 6, 8, 13, 14, 16, 18, 19, 21, 25, 26, 29, 40, 77, 164, 177, 192], "backtestingbrok": [5, 6, 8, 10, 42], "next": [5, 6, 8, 12, 16, 25, 39, 75, 129, 137, 138], "your": [2, 5, 6, 7, 8, 10, 11, 12, 14, 17, 19, 21, 39, 40, 46, 47, 48, 50, 54, 56, 60, 69, 81, 100, 145, 156, 164, 165, 177, 192], "normal": [5, 15, 130, 139], "built": [2, 5, 25], "someth": [5, 13], "0000": 5, "hr": [5, 20], "2359": [5, 20], "last": [5, 13, 19, 20, 21, 27, 29, 30, 41, 42, 43, 71, 72, 73, 74, 84, 85, 93, 94, 170, 185], "consid": [5, 19, 176, 191], "zone": [5, 19], "unless": 5, "america": [5, 19, 43, 175, 178, 180, 190, 193], "new": [2, 5, 7, 16, 18, 19, 21, 25, 35, 36, 42, 53, 59, 145, 156, 166, 181], "york": [5, 16], "aka": 5, "est": 5, "receiv": 5, "index": [5, 18, 19, 20, 25, 77], "datetime64": [5, 20], "column": [5, 19, 20, 77], "high": [5, 19, 20, 24, 25, 42, 77, 80], "low": [5, 16, 19, 20, 42, 77, 80], "volum": [5, 19, 20, 77, 80], "should": [5, 10, 15, 19, 21, 26, 39, 42, 44, 73, 106, 117, 127, 135], "look": [2, 5, 14, 25], "2020": [5, 10, 24, 25, 71, 89, 90, 98, 99, 146, 151, 157, 162], "01": [5, 6, 8, 19, 24, 145, 146, 151, 156, 157, 162], "02": [5, 19], "09": 5, "00": [5, 43, 109, 120, 145, 151, 152, 156, 162, 163], "3237": 5, "3234": 5, "75": 5, "3235": 5, "25": [5, 16], "16808": 5, "32": 5, "10439": 5, "33": 5, "50": [5, 21, 31, 145, 156, 177, 192], "3233": 5, "8203": 5, "04": [5, 43], "22": 5, "15": [5, 19, 31, 43, 71, 72], "56": 5, "2800": 5, "2796": 5, "8272": 5, "57": 5, "2794": 5, "7440": 5, "58": 5, "2793": 5, "7569": 5, "download": [2, 5, 6, 8, 24, 25], "yfinanc": [5, 43], "yf": [5, 43], "5": [1, 2, 5, 6, 8, 16, 25, 31, 43, 71, 72, 105, 106, 116, 117, 145, 156, 164, 171, 177, 186, 192], "5d": 5, "interv": 5, "1m": [5, 20, 43], "to_csv": 5, "collect": [4, 5], "subsequ": [5, 6, 8], "ad": [5, 11, 13, 16, 18, 25, 71, 72], "One": [5, 16, 18, 21, 43, 145, 156], "differ": [2, 3, 5, 7, 11, 13, 16, 19, 24, 25, 44], "load": [5, 17, 20, 62, 66], "mai": [5, 13, 16, 18, 21, 24, 71, 72, 80, 145, 156], "might": [5, 13, 16], "entiti": [5, 13, 18, 19, 20, 21, 22, 23, 24, 25, 71, 72, 79, 145, 151, 152, 156, 162, 163], "assettyp": [5, 13, 18, 145, 151, 152, 156, 162, 163], "step": [2, 5], "pd": [5, 19], "awar": [5, 19], "go": [2, 5, 12, 14, 16, 24, 25], "df": [5, 13, 19, 20, 29, 71, 72], "read_csv": 5, "third": 5, "we": [5, 6, 7, 8, 10, 11, 13, 16, 24, 25, 27, 46, 71, 145, 156], "make": [2, 4, 5, 6, 8, 16, 21, 24, 25, 73, 74], "least": [5, 40], "timestep": [5, 20, 42, 43, 71, 72, 83, 92], "either": [5, 18, 20, 21, 71, 72, 73, 74], "add": [3, 5, 13, 16, 18, 21, 24, 31, 42, 45, 61, 62, 65, 66], "final": [5, 6, 8, 10, 25], "run": [0, 5, 6, 8, 10, 11, 12, 16, 20, 25, 29, 31, 32, 33, 36, 43, 45, 80, 101, 102, 112, 113, 142, 144, 153, 155, 169, 184], "trader": [5, 6, 8, 10, 12, 13, 14, 15, 25, 32], "data_sourc": [5, 12, 42, 43, 71, 72], "datetime_start": [5, 42], "datetime_end": [5, 42], "strat": 5, "100000": 5, "add_strategi": [5, 12, 13, 14, 15, 24, 25, 45], "run_al": [5, 13, 14, 15, 24, 25, 45], "put": [5, 12, 15, 18, 24], "togeth": [5, 24], "inform": [2, 3, 5, 9, 10, 13, 16, 42, 43, 76, 77, 125, 130, 133, 139, 145, 156, 165], "code": [2, 5, 6, 7, 8, 13, 16, 24, 25, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 61, 65, 101, 102, 112, 113, 164], "sourc": [0, 5, 8, 13, 19, 82, 88, 89, 90, 91, 97, 98, 99, 175, 178, 180, 190, 193], "Then": [5, 13, 15, 71], "startegi": 5, "read": [5, 14, 24, 43], "folder": [2, 5, 10, 13, 16], "same": [5, 16, 21, 25, 72], "script": 5, "pick": [5, 10, 16, 25], "rang": [5, 13, 16, 19, 20], "full": [2, 6, 8, 11, 25, 124, 132], "link": [6, 8], "give": [6, 8, 13, 130, 139], "u": [6, 7, 8, 13, 20, 25, 174, 189], "credit": [6, 8, 152, 163], "sale": [6, 8], "http": [2, 6, 8, 12, 13, 14, 15, 16, 19, 24, 25], "utm_sourc": 6, "affili": 6, "utm_campaign": 6, "lumi10": [2, 6], "help": [2, 3, 6, 8, 24], "support": [2, 6, 7, 8, 13, 16, 20, 24, 25, 43, 62, 66, 127, 135, 145, 156], "project": [2, 6, 8, 16], "coupon": [2, 6, 8], "10": [2, 6, 8, 13, 16, 18, 19, 31, 39, 43, 62, 66, 81, 126, 134, 151, 152, 162, 163, 164, 171, 172, 177, 186, 187, 192], "off": [2, 6, 8], "robust": [6, 8], "fetch": [6, 8, 43, 125, 130, 133, 139], "price": [2, 6, 8, 9, 13, 15, 16, 18, 19, 20, 21, 22, 30, 35, 38, 42, 43, 44, 46, 61, 62, 65, 66, 69, 71, 72, 73, 74, 77, 127, 135, 145, 151, 152, 156, 162, 163], "cryptocurr": [1, 2, 6, 8, 13, 16, 19, 71, 72, 73, 74, 145, 156], "simplifi": [6, 8], "process": [4, 6, 8, 16, 24, 36, 38, 151, 152, 162, 163], "simpli": [6, 8], "polygondatasourc": 6, "get_last_pric": [2, 6, 8, 10, 13, 15, 19, 20, 25, 43, 46], "get_historical_pric": [6, 8, 13, 19, 25, 30, 43, 46, 72], "As": [6, 8, 16], "2": [2, 6, 16, 21, 29, 31, 61, 65, 71, 72, 110, 111, 121, 122, 152, 163, 177, 192], "year": [2, 6, 8], "histor": [2, 6, 8, 12, 13, 19, 25, 42, 43, 69, 71, 72], "pai": [6, 8], "mani": [6, 8, 13, 25, 31, 40, 80], "faster": [2, 6, 8], "won": [6, 8], "t": [6, 8, 13, 25], "limit": [6, 8, 13, 21, 42, 71, 72, 80, 109, 120, 145, 151, 152, 156, 162, 163], "cach": [6, 8], "comput": [6, 8, 16, 24, 25], "so": [6, 8, 10, 13, 16, 18, 21, 24, 25, 46, 81, 127, 135], "even": [2, 6, 8, 29, 152, 163], "take": [6, 8, 16, 21, 24, 40, 43, 61, 62, 65, 66, 72, 73, 74, 124, 132], "bit": [6, 8], "To": [0, 6, 8, 10, 13, 14, 15, 16, 21, 24, 25, 71], "need": [2, 6, 8, 13, 15, 16, 24, 26, 40, 42, 71, 72, 76], "obtain": [6, 8, 13, 43, 125, 126, 128, 130, 133, 134, 136, 139], "which": [2, 6, 7, 8, 9, 13, 16, 19, 20, 21, 31, 40, 48, 50, 54, 56, 73, 74, 75, 76, 127, 129, 135, 137, 177, 192], "dashboard": [6, 8, 24], "account": [2, 6, 8, 12, 13, 14, 15, 16, 25, 42, 46, 48, 50, 52, 54, 56, 58, 60, 149, 160, 166, 181], "replac": [2, 6, 8, 13], "your_polygon_api_kei": [2, 6], "necessari": [6, 8, 16, 42], "inherit": [6, 8, 44], "defin": [6, 7, 8, 13, 23, 26, 31, 40, 41, 42, 44, 164], "hold": [6, 8, 19, 22, 25, 35], "until": [6, 8, 12, 19, 101, 102, 112, 113, 145, 156], "determin": [6, 7, 8, 12, 21, 42, 105, 116, 145, 156, 165], "2023": [2, 6, 8, 43, 124, 125, 132, 133], "05": [6, 8, 145, 156], "my_strat": [], "": [2, 3, 6, 7, 8, 13, 15, 16, 17, 20, 24, 25, 37, 40, 45, 51, 57, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 127, 135, 146, 157, 164, 177, 192], "sure": [2, 6, 8, 24, 25], "form": [6, 20, 80, 105, 116, 126, 128, 134, 136, 166, 181], "1d": [2, 6, 8, 19, 20, 39, 43], "qty": [2, 6, 8], "portfolio_valu": [2, 6, 8, 10, 13, 25, 27, 41, 176, 191], "__name__": [2, 6, 8, 13], "__main__": [2, 6, 8, 13], "your_api_key_her": [], "power": [2, 6, 8, 16, 24, 25], "tool": [6, 8, 16, 25], "variou": [2, 6, 7, 8], "With": [2, 6, 8, 25], "capabl": [6, 8], "easi": [6, 8, 16, 24, 25], "integr": [6, 8], "versatil": [6, 8, 13, 16], "choic": [6, 8, 16], "websit": [2, 7, 10, 13, 15, 16], "avail": [2, 9, 10, 19, 20, 22, 25, 46, 71, 72, 105, 116, 127, 135, 152, 163, 166, 181], "includ": [2, 3, 7, 9, 10, 13, 16, 18, 19, 25, 31, 40, 43, 53, 59, 71, 123, 145, 147, 156, 158, 174, 189], "etf": [2, 10], "cannot": 10, "veri": [10, 16, 25], "easili": [10, 25, 31, 44], "modifi": [10, 24, 25], "anyth": 10, "There": [10, 11, 145, 156], "sever": [0, 2, 10, 11, 44, 164], "gener": [7, 10, 13, 15, 25, 150, 161], "aapl_pric": [10, 25], "alloc": 10, "11": [10, 16, 18, 25], "12": [10, 16, 18, 24, 25, 73], "re": [2, 11, 16, 25, 81], "speak": [11, 40], "learn": [11, 16, 24, 25], "about": [2, 9, 11, 25, 165], "how": [0, 3, 11, 12, 13, 16, 24, 25, 44, 71, 80, 165], "them": [2, 11, 16, 19, 24, 25, 46, 47, 60, 69, 81, 100, 123, 141, 144, 155], "alpaca": [11, 19, 25, 71, 72], "document": [11, 13, 16, 24, 25, 71], "interact": [11, 13, 19, 21, 25, 44, 71, 72, 73, 80], "ccxt": [11, 25], "configur": [2, 11, 14, 25], "tradier": [11, 25, 76, 152, 163], "max_work": [12, 42, 43, 72], "20": [12, 13, 21, 31, 42, 164], "chunk_siz": [12, 43, 72], "connect_stream": [12, 42], "base": [2, 7, 12, 13, 18, 19, 20, 21, 22, 23, 25, 39, 42, 43, 45, 71, 72, 73, 145, 156], "connect": [12, 13, 16, 104, 115], "tradeapi": 12, "rest": [12, 40], "get_timestamp": [12, 25, 43, 46], "current": [12, 13, 16, 20, 35, 36, 41, 42, 43, 48, 50, 51, 54, 56, 57, 61, 62, 65, 66, 71, 72, 76, 77, 81, 82, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 97, 127, 135, 142, 148, 152, 153, 159, 163, 166, 174, 177, 181, 189, 192], "unix": 12, "timestamp": [2, 12, 19, 43, 61, 62, 65, 66, 84, 85, 86, 87, 88, 93, 94, 95, 96, 97], "represent": [12, 20, 21, 43, 71, 72], "is_market_open": [12, 42], "market": [2, 12, 13, 21, 24, 25, 27, 28, 29, 30, 31, 39, 42, 73, 74, 101, 102, 105, 108, 109, 110, 111, 112, 113, 116, 119, 120, 121, 122, 145, 150, 151, 152, 156, 161, 162, 163, 171, 172, 174, 186, 187, 189], "get_time_to_open": [12, 42], "remain": [12, 38, 42, 171, 186], "get_time_to_clos": [12, 42], "alpaca_config": [12, 24, 25], "your_api_kei": [12, 13], "secret": [12, 13, 15, 24, 25], "api_secret": [12, 24, 25], "your_api_secret": 12, "endpoint": 12, "paper": [12, 14, 15, 16, 25, 43], "print": [12, 41], "alpacastrategi": 12, "on_trading_inter": [12, 31], "order_typ": [12, 152, 163], "asset_type_map": 12, "us_equ": 12, "cancel_ord": [12, 25, 42, 46, 148, 159], "cancel": [12, 21, 29, 34, 42, 70, 108, 110, 119, 121, 141, 142, 143, 144, 145, 148, 150, 153, 154, 155, 156, 159, 161], "wa": [2, 12, 13, 26, 29, 32, 33, 40, 42, 71, 166, 181], "get_historical_account_valu": [12, 42], "1400": 12, "1600": 12, "7": [12, 13, 16, 25, 31, 105, 116], "0830": 12, "0930": 12, "3": [2, 12, 16, 145, 156], "600": 12, "sampl": [12, 25], "1612172730": 12, "000234": 12, "boolean": [12, 150, 152, 161, 163], "map_asset_typ": 12, "orderdata": 12, "to_request_field": 12, "guid": [2, 13, 15, 24, 25], "cryoptocurr": 13, "through": [2, 13], "popular": 13, "interest": [7, 13, 127, 135], "find": [13, 14, 15, 16, 25, 43, 75, 126, 128, 129, 130, 134, 136, 137, 138, 139], "readthedoc": 13, "en": 13, "enabl": [13, 14], "wide": [13, 16, 62, 66], "coinbas": [13, 25], "pro": 13, "binanc": [13, 25], "kraken": [13, 25, 145, 156], "kucoin": [13, 25], "constantli": [13, 25], "don": [13, 25], "see": [2, 13, 14, 16, 18, 19, 24, 25, 43, 47, 60, 69, 81, 100, 123, 141], "let": 13, "know": [13, 17], "ll": [13, 15, 25], "desir": [13, 20, 80, 127, 135], "credenti": [13, 14], "rememb": [13, 25], "under": [13, 16, 24], "similar": [13, 16, 29], "alwai": [13, 29, 42, 105, 116, 166, 181], "24": [13, 31, 105, 116], "set_market": [13, 25, 31, 46], "few": [13, 16, 25, 100], "common": 13, "coinbase_config": 13, "exchange_id": 13, "apikei": 13, "your_secret_kei": 13, "sandbox": [13, 16], "kraken_config": 13, "margin": [13, 145, 156], "kucoin_config": 13, "password": [2, 8, 13], "your_passphras": 13, "NOT": 13, "your_secret": 13, "coinbasepro_config": 13, "coinbasepro": 13, "actual": [2, 13, 40, 42, 174, 189], "instanti": [13, 15, 25, 42], "chosen": [13, 15, 16], "correct": [13, 15], "instanc": 13, "strategy_executor": [13, 15], "complet": [13, 14, 16, 21, 25, 73, 74], "demonstr": 13, "pandas_ta": 13, "error": [13, 16, 21, 33], "termin": [2, 13, 24, 25], "importantfunct": 13, "30": [13, 39, 71, 72, 80], "sinc": 13, "those": [13, 16, 165], "hour": [13, 19, 20, 31, 39, 43, 71, 72, 105, 116, 177, 192], "place": [9, 13, 17, 145, 150, 156, 161], "quot": [13, 18, 19, 20, 21, 43, 48, 50, 54, 56, 71, 72, 73, 74, 76, 145, 151, 152, 156, 162, 163, 174, 176, 189, 191], "our": [7, 13, 16, 24, 25, 27], "transact": [13, 21, 166, 181], "btc": [13, 18, 19, 71, 72, 73, 145, 151, 152, 156, 162, 163], "0": [13, 14, 16, 18, 20, 21, 22, 23, 24, 31, 41, 42, 43, 86, 87, 95, 96, 145, 151, 152, 156, 162, 163, 172, 187], "mkt_order": 13, "000": [13, 24, 25], "lmt_order": 13, "limit_pric": [13, 21, 42, 109, 120, 145, 151, 152, 156, 162, 163], "10000": [13, 24], "pair": [13, 19, 21, 43, 73, 74, 124, 125, 132, 133, 145, 156], "bar": [13, 17, 20, 25, 42, 43, 62, 66, 70, 71, 72, 73, 74, 77, 80, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 127, 135], "max_pric": 13, "max": [7, 13], "log_messag": [13, 15, 19, 25, 27, 29, 32, 33, 34, 35, 36, 37, 38, 39, 41, 46, 51, 52, 57, 58, 71, 72, 73, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 131, 140, 146, 147, 148, 157, 158, 159, 166, 167, 168, 169, 170, 171, 173, 174, 175, 176, 178, 180, 181, 182, 183, 184, 185, 186, 188, 189, 190, 191, 193], "f": [13, 15, 27, 34, 35, 37, 38, 41, 71, 73, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 131, 140, 168, 170, 173, 175, 176, 178, 180, 183, 185, 188, 190, 191, 193], "technic": [2, 13, 40], "analysi": [2, 4, 13, 45], "calcul": [13, 19, 21, 42, 43, 127, 135], "rsi": [2, 13], "ta": 13, "length": [13, 20, 42, 43, 71, 72, 77, 83, 92], "current_rsi": 13, "iloc": [13, 71], "macd": 13, "current_macd": 13, "55": 13, "ema": 13, "current_ema": 13, "cash": [9, 13, 25, 27, 41, 42, 47, 48, 50, 54, 56, 60, 174, 176, 179, 189, 191, 194], "get_posit": [13, 22, 25, 46, 149, 160], "share": [13, 15, 19, 21, 28, 30, 35, 38, 43, 145, 156, 174, 189], "specif": [2, 7, 13, 16, 18, 21, 40, 43, 61, 65, 108, 119, 124, 125, 132, 133, 145, 156, 165], "asset_to_get": 13, "outstand": 13, "get_ord": [13, 25, 46], "whatev": 13, "identifi": [2, 13, 18, 21, 147, 158], "last_pric": [13, 73, 74], "color": [13, 61, 62, 65, 66, 104, 115], "green": [13, 61, 62, 65, 66, 104, 115], "dt": [13, 20, 43, 61, 62, 65, 66, 89, 90, 98, 99, 138], "get_datetim": [13, 25, 42, 43, 46], "check": [13, 16, 25, 39, 42, 46, 71, 147, 148, 158, 159, 167, 169, 182, 184], "certain": [13, 62, 66], "9": [13, 16, 31], "30am": 13, "entir": 13, "portfolio": [7, 9, 13, 22, 27, 50, 56, 62, 66, 174, 189], "amount": [9, 13, 19, 21, 27, 43, 48, 50, 54, 56, 78, 79, 145, 156], "ve": [2, 13, 15, 25], "example_strategi": [13, 24, 25], "github": [13, 14, 16, 19, 24, 25], "repositori": [13, 16], "workstat": 14, "gatewai": 14, "instruct": [14, 145, 151, 152, 156, 162, 163], "found": [14, 25], "interactivebrok": [14, 19], "tw": [14, 19], "initial_setup": 14, "onc": [2, 14, 15, 16, 21, 24, 25, 31, 40, 145, 156], "navig": [14, 16], "global": [14, 16, 19, 44], "activex": 14, "socket": [14, 16], "client": [14, 16], "disabl": 14, "port": [14, 16], "7496": 14, "7497": [14, 16], "highli": [14, 25], "thoroughli": 14, "algorithm": [14, 24], "master": 14, "id": [2, 14, 16, 147, 158], "choos": [0, 14, 25], "999": 14, "py": [14, 16, 24, 25], "interactive_brokers_config": 14, "socket_port": 14, "client_id": 14, "digit": 14, "ip": [14, 16], "127": [14, 16], "entri": [14, 21], "point": [3, 7, 9, 14, 21, 43, 61, 65, 71, 72, 146, 157], "abov": [2, 14, 18, 19, 31], "except": [14, 19, 24, 25, 33], "strangl": 14, "interactive_brok": 14, "simple_start_ib": 14, "bot": [14, 16, 24, 31, 33, 44], "com": [2, 7, 14, 15, 16, 24, 25], "lumiwealth": [7, 14, 25], "blob": [14, 24, 25], "getting_start": 14, "visit": [7, 15, 16, 24, 25], "www": [8, 15], "access": [7, 15, 16, 19, 24, 25, 164], "page": [15, 16, 25], "dash": [15, 61, 65], "tradier_config": 15, "access_token": 15, "qtrz3zurd9244ahuw2aoyapgvyra": 15, "account_numb": 15, "va22904793": 15, "real": [15, 16, 24, 70, 77, 80], "monei": [15, 16, 24, 48, 50, 54, 56, 166, 181], "your_access_token": 15, "your_account_numb": 15, "That": 15, "now": [15, 24, 43, 73], "abl": 15, "less": [15, 145, 146, 156, 157], "than": [15, 16, 43, 81, 145, 146, 156, 157], "main": [16, 17, 21, 25, 32, 39, 44, 145, 156], "around": [16, 17], "fee": [16, 17, 25], "repres": [18, 21, 43, 44, 71, 72, 125, 133], "attribut": 18, "track": [18, 22, 25, 51, 52, 57, 58, 147, 148, 158, 159], "ticker": [9, 18, 19, 31, 43, 80], "underli": [18, 20, 127, 130, 135, 139], "ibm": [18, 144, 155], "just": [18, 25, 31, 35, 42, 145, 156], "corpor": 18, "printout": 18, "expir": [7, 18, 21, 31, 43, 71, 73, 124, 125, 126, 127, 132, 133, 134, 135, 138, 145, 156], "strike": [9, 18, 43, 71, 125, 127, 130, 133, 135, 139, 145, 156], "right": [16, 18, 27, 62, 66, 71, 151, 162], "enter": [16, 18, 21, 30, 145, 156, 177, 192], "multipli": [18, 19, 35, 38, 43, 124, 125, 128, 130, 132, 133, 136, 139, 151, 162], "e": [2, 9, 16, 18, 19, 20, 21, 22, 24, 71, 72, 73, 145, 146, 151, 156, 157, 162], "nexpir": 18, "expiri": [18, 126, 131, 134, 140], "june": 18, "2021": [18, 31, 127, 135, 138], "6": [16, 18, 25], "18": 18, "eur": [18, 71, 72, 145, 151, 152, 156, 162, 163], "convers": [18, 177, 192], "gbp": [18, 151, 162], "two": [2, 3, 18, 21, 24, 72, 144, 155], "permiss": 18, "behind": 18, "scene": 18, "anytim": 18, "mandatori": [16, 18, 44, 145, 156], "due": [16, 18], "addit": [2, 16, 18, 21, 145, 156], "detail": [0, 2, 3, 4, 9, 16, 18, 71, 147, 158], "precis": [18, 127, 135], "underlying_asset": 18, "case": [18, 20, 21], "ib": [18, 131, 140], "yyyymmdd": [18, 131, 140], "yyyymm": 18, "retriev": [2, 18, 20, 73, 74, 77], "leverag": [18, 145, 156], "over": [7, 18, 19, 24, 25, 61, 62, 65, 66], "_asset_typ": 18, "_right": 18, "asset_type_must_be_one_of": 18, "valid": [2, 18, 20, 21, 43, 124, 125, 132, 133, 145, 156], "right_must_be_one_of": 18, "17": [18, 31], "26": 18, "155": 18, "base_asset": [18, 151, 152, 162, 163], "optionright": 18, "v": [2, 7, 18], "is_valid": 18, "classmethod": [18, 19, 21, 22, 43], "symbol2asset": 18, "particularli": 18, "assetsmap": 18, "map": 18, "userdict": 18, "datafram": [19, 20, 43, 63, 64, 67, 68, 71, 77, 80], "dividend": [19, 43, 78, 79, 127, 135, 166, 181], "stock_split": 19, "local": [19, 20, 41, 43, 89, 90, 98, 99, 127, 135], "timezon": [19, 20, 25, 43, 89, 90, 98, 99, 175, 180, 190], "new_york": [19, 43, 175, 178, 180, 190, 193], "field": [19, 21], "g": [2, 9, 16, 19, 20, 21, 22, 24, 71, 72, 145, 156], "helper": [19, 21, 44], "row": [19, 41, 71, 72, 80], "get_last_dividend": 19, "per": [19, 43], "get_momentum": 19, "momentum": 19, "aggregate_bar": 19, "frequenc": [19, 20], "Will": [19, 24, 61, 62, 65, 66, 73, 74, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 150, 161, 175, 178, 180, 190, 193], "timefram": 19, "min": 19, "15min": 19, "1h": [19, 39], "specifi": [19, 21, 43, 71, 72, 145, 156], "filter": 19, "daterang": 19, "get_total_volum": 19, "sum": [19, 50, 56], "given": [19, 20, 42, 43, 51, 57, 70, 71, 72, 75, 83, 92, 124, 126, 128, 129, 130, 132, 134, 136, 137, 138, 139, 142, 147, 153, 158], "total": [7, 19, 27, 50, 56, 146, 157, 174, 189], "themselv": 19, "supplier": 19, "exce": 19, "pace": 19, "throttl": 19, "respect": 19, "mention": 19, "tick": 19, "frequent": 19, "accur": [19, 43], "updat": [19, 21, 25, 35, 37, 107, 118, 145, 156, 166, 181], "rule": 19, "historical_limit": 19, "financi": [19, 24], "ohlcv": [19, 20, 42], "split": [19, 44], "instrument": 19, "yield": 19, "appropri": 19, "coin": [19, 145, 156], "eth": [19, 72, 145, 152, 156, 163], "get_total_dividend": 19, "get_total_stock_split": 19, "get_total_return": 19, "get_total_return_pct": 19, "percentag": [19, 24], "get_total_return_pct_chang": 19, "recent": [19, 71, 77], "get_bar": [19, 20, 43], "ethereum": 19, "bitcoin": 19, "grouper_kwarg": 19, "bars_agg": 19, "inclus": 19, "parse_bar_list": 19, "bar_list": 19, "singl": [19, 143, 154], "nobardatafound": 19, "date_start": 20, "date_end": 20, "trading_hours_start": 20, "trading_hours_end": 20, "23": 20, "59": 20, "input": [20, 101, 102, 112, 113], "manag": [20, 21, 25, 46, 60, 123], "attach": 20, "0001": 20, "localize_timezon": 20, "tz_local": 20, "eastern": 20, "utc": 20, "sybmol": 20, "datalin": 20, "numpi": 20, "arrai": [16, 20], "iter_index": 20, "count": [20, 31, 77, 80], "seri": 20, "set_tim": 20, "repair_times_and_fil": 20, "merg": 20, "reindex": 20, "fill": [16, 20, 21, 22, 35, 38, 42, 145, 156, 166, 181], "nan": 20, "lower": 20, "set_date_format": 20, "set_dat": 20, "trim_data": 20, "trim": 20, "match": [20, 43], "to_datalin": 20, "exist": [20, 53, 59], "get_iter_count": 20, "len": 20, "check_data": 20, "wrapper": 20, "timeshift": [20, 42, 43, 71, 72, 83, 86, 87, 92, 95, 96], "_get_bars_dict": 20, "min_timestep": [20, 43], "timestep_map": [20, 43], "shift": [20, 43, 71, 72, 83, 86, 87, 92, 95, 96], "get_bars_between_d": 20, "exchang": [20, 21, 43, 71, 72, 73, 74, 75, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 124, 125, 126, 128, 129, 130, 132, 133, 134, 136, 137, 139, 145, 156], "start_dat": 20, "end_dat": 20, "idx": 20, "belong": 21, "construct": 21, "goog": [21, 41, 71, 72], "googl": 21, "to_posit": 21, "get_incr": 21, "wait_to_be_regist": 21, "wait": [16, 21, 38, 108, 109, 110, 111, 119, 120, 121, 122], "regist": [21, 109, 111, 120, 122], "wait_to_be_clos": 21, "better": [7, 21, 145, 156], "keyword": 21, "my_limit_pric": 21, "500": [21, 35], "stop": [21, 24, 31, 32, 39, 42, 61, 62, 65, 66, 101, 102, 112, 113, 145, 151, 152, 156, 162, 163, 171, 186], "move": [2, 7, 21, 25], "past": [2, 21, 24], "particular": [21, 124, 126, 128, 132, 134, 136], "higher": 21, "probabl": 21, "achiev": [7, 21, 24, 25], "predetermin": 21, "exit": 21, "stop_pric": [21, 42, 145, 151, 152, 156, 162, 163], "my_stop_pric": 21, "400": 21, "stop_limit": [21, 145, 156], "combin": 21, "405": 21, "trail": [21, 145, 151, 156, 162], "continu": [21, 145, 156], "keep": [16, 21, 22, 80, 145, 156], "threshold": [21, 145, 156], "movement": [21, 145, 156], "trailing_stop": [21, 145, 156], "trail_pric": [21, 145, 156], "trail_perc": [21, 145, 156], "my_trail_pric": 21, "order_1": 21, "my_trail_perc": 21, "order_2": 21, "bracket": [21, 145, 156], "chain": [21, 43, 123, 124, 125, 126, 128, 130, 132, 133, 134, 136, 139], "long": 21, "short": [21, 105, 116], "condit": [2, 21, 39], "activ": [16, 21, 25, 73, 74, 77, 151, 152, 162, 163], "profit": [16, 21, 24, 25, 42, 61, 62, 65, 66], "loss": [7, 21, 42, 61, 62, 65, 66, 145, 151, 152, 156, 162, 163], "importantli": 21, "execut": [2, 9, 16, 21, 22, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 101, 102, 106, 108, 110, 112, 113, 117, 119, 121, 142, 151, 153, 162, 171, 172, 177, 186, 187, 192], "howev": [16, 21, 29, 31, 145, 156], "extrem": 21, "volatil": [7, 21, 127, 135], "fast": [21, 24, 25], "both": [8, 21, 24, 29, 145, 156], "occur": 21, "take_profit_pric": [21, 145, 151, 156, 162], "stop_loss_pric": [21, 145, 151, 156, 162], "stop_loss_limit_pric": [21, 145, 156], "my_take_profit_pric": 21, "420": 21, "my_stop_loss_pric": 21, "parent": 21, "oto": [21, 145, 156], "trigger": [21, 145, 156], "variant": 21, "oco": [21, 145, 151, 156, 162], "word": [21, 166, 181], "part": [16, 21, 40, 152, 163, 164], "where": [21, 24, 41, 145, 156], "alreadi": [21, 29, 35, 40], "submit": [21, 36, 42, 46, 141, 145, 151, 152, 156, 162, 163], "submiss": 21, "position_fil": [21, 145, 156], "time_in_forc": [21, 145, 156], "good_till_d": [21, 145, 156], "date_cr": 21, "trade_cost": 21, "custom_param": [21, 145, 156], "avg_fill_pric": [21, 22], "tag": [21, 152, 163], "ordersid": 21, "buy_to_clos": 21, "buy_to_cov": 21, "buy_to_open": 21, "sell_short": 21, "sell_to_clos": 21, "sell_to_open": 21, "orderstatu": 21, "cash_settl": 21, "partially_fil": 21, "partial_fil": 21, "ordertyp": 21, "tupl": [21, 72], "alia": 21, "add_transact": 21, "properti": [21, 22, 25, 42, 44, 45, 166, 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], "cash_pend": 21, "equivalent_statu": 21, "statu": [21, 147, 148, 158, 159], "equival": 21, "get_fill_pric": 21, "weight": 21, "averag": [2, 7, 21, 22], "often": 21, "encount": 21, "partial": [21, 38], "pnl": 21, "yet": [21, 45], "is_act": 21, "otherwis": [21, 35], "rtype": [21, 43], "is_cancel": 21, "is_fil": 21, "is_opt": 21, "set_cancel": 21, "set_error": 21, "set_fil": 21, "set_identifi": 21, "set_new": 21, "set_partially_fil": 21, "update_raw": 21, "update_trail_stop_pric": 21, "was_transmit": 21, "retreiv": 22, "appl": 22, "add_ord": 22, "decim": [22, 73, 74, 145, 146, 156, 157], "get_selling_ord": [22, 25, 46], "value_typ": 22, "trading_fe": 23, "flat_fe": [23, 24], "percent_fe": [23, 24], "maker": 23, "taker": 23, "made": [24, 69, 81], "design": [2, 16, 24, 26, 40], "beginn": 24, "quickli": [2, 16, 24], "At": 24, "join": [24, 25], "commun": [24, 25], "comprehens": [4, 24], "cours": [24, 25], "shown": [24, 25], "annual": [7, 24, 25], "reach": [7, 24, 25, 42], "discov": [24, 25], "enhanc": 24, "skill": 24, "potenti": [2, 24, 25, 146, 157], "expert": [24, 25], "guidanc": 24, "resourc": 24, "welcom": 24, "hope": 24, "enjoi": 24, "section": [2, 16, 24, 46], "command": [2, 24, 25], "easiest": 24, "comfort": 24, "without": [24, 130, 139], "copi": 24, "your_alpaca_api_kei": [24, 25], "your_alpaca_secret": [24, 25], "custom": [2, 24, 31, 145, 156, 164], "everi": [2, 24, 31, 39, 42, 46, 80], "180": 24, "180m": 24, "my": [16, 24], "crucial": [2, 16, 24], "understand": [2, 4, 24], "refin": [4, 24], "carri": 24, "familiar": 24, "expect": [16, 24, 25, 127, 135], "And": [24, 71, 72], "try": [24, 145, 156], "Or": [24, 25, 164], "dev": [24, 25], "simple_start_single_fil": [24, 25], "flat": 24, "trading_fee_1": 24, "trading_fee_2": 24, "sometim": 24, "spend": 24, "yappi": 24, "machinelearninglongshort": 24, "tqqq": 24, "thread": [], "get_thread_stat": 24, "d": [31, 177, 192], "robot": 25, "well": 25, "super": 25, "develop": [16, 25], "being": [25, 34, 35, 36, 37, 38, 43, 45, 71, 125, 133, 145, 156, 167, 182], "bug": 25, "fix": [25, 80], "fortun": 25, "against": 25, "invest": [7, 25], "switch": 25, "line": [3, 25, 45, 61, 62, 63, 65, 66, 67], "top": [16, 25], "industri": 25, "tradest": 25, "offer": [2, 7, 16, 25], "tutori": 25, "build": [25, 26, 44], "analy": 25, "out": [25, 42, 46, 51, 57, 73], "box": 25, "suit": [2, 25], "analyt": 25, "analyz": 25, "optim": [2, 7, 16, 25], "chart": [25, 46, 61, 62, 63, 64, 65, 66, 67, 68], "event": [4, 25, 32, 33, 34, 35, 36, 37, 38, 42, 62, 66], "engin": [25, 40], "were": [9, 25, 37], "deal": 25, "complic": 25, "confus": 25, "vector": 25, "math": 25, "mac": 25, "powershel": 25, "window": 25, "packag": 25, "notic": 25, "exactli": 25, "everyth": [16, 25], "suggest": 25, "lifecycl": [25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 44, 46, 167, 171, 172, 177, 182, 186, 187, 192], "menu": 25, "describ": [25, 44], "what": [25, 46, 81, 176, 191], "sub": 25, "individu": [2, 25], "tree": 25, "good": [25, 145, 156], "luck": 25, "forget": 25, "swim": 25, "cover": 25, "By": [2, 16, 25, 33, 127, 135, 171, 172, 175, 177, 178, 180, 186, 187, 190, 192, 193], "gain": 25, "wealth": 25, "expertis": 25, "level": [25, 62, 66, 104, 115], "why": [2, 25], "implement": [7, 25, 26, 40, 43, 45], "perform": [0, 2, 3, 7, 16, 25, 40], "proven": 25, "record": 25, "home": 25, "discord": [16, 25], "pre": [25, 152, 163], "4": [2, 16, 25, 146, 157], "8": [16, 25], "profil": 25, "improv": 25, "refer": [2, 3, 16, 25, 26], "before_market_open": [25, 26, 172, 187], "before_starting_trad": [25, 26, 29], "before_market_clos": [25, 26], "after_market_clos": [25, 26], "on_abrupt_clos": [25, 26, 33], "on_bot_crash": [25, 26], "trace_stat": [25, 26, 177, 192], "on_new_ord": [25, 26], "on_partially_filled_ord": [25, 26], "on_filled_ord": [25, 26], "on_canceled_ord": [25, 26], "on_parameters_upd": [25, 26], "cancel_open_ord": [25, 29, 46, 150, 161], "sell_al": [25, 28, 32, 33, 46], "get_asset_potential_tot": [25, 46], "get_portfolio_valu": [25, 46], "get_cash": [25, 46], "get_historical_prices_for_asset": [25, 29, 46], "get_quot": [20, 25, 46], "get_yesterday_dividend": [25, 43, 46], "get_next_trading_dai": [25, 46], "add_mark": [3, 25, 46], "add_lin": [3, 25, 46], "get_markers_df": [25, 46], "get_lines_df": [25, 46], "get_paramet": [25, 46, 164], "set_paramet": [25, 46, 164], "get_chain": [25, 43, 46, 126, 128, 130, 134, 136, 139], "get_greek": [25, 46], "get_strik": [25, 43, 46], "get_expir": [25, 46], "get_multipli": [25, 46], "options_expiry_to_datetime_d": [25, 46], "get_round_minut": [25, 43, 46], "get_last_minut": [25, 43, 46], "get_round_dai": [25, 43, 46], "get_last_dai": [25, 43, 46], "get_datetime_rang": [25, 42, 43, 46], "localize_datetim": [25, 43, 46], "to_default_timezon": [25, 43, 46], "miscellan": [25, 46], "update_paramet": [25, 37, 46], "await_market_to_clos": [25, 46], "await_market_to_open": [25, 46], "wait_for_order_registr": [25, 46], "wait_for_order_execut": [25, 46], "wait_for_orders_registr": [25, 46], "wait_for_orders_execut": [25, 46], "is_backtest": [16, 25], "initial_budget": 25, "last_on_trading_iteration_datetim": 25, "pytz": 25, "unspent_monei": 25, "leg": 25, "search": [2, 25], "abstract": [26, 40, 42, 43, 44], "pattern": [26, 40], "greatli": [26, 40], "influenc": [3, 26, 40], "react": [26, 40], "j": [26, 40], "compon": [26, 40], "overload": [26, 33, 40, 42], "logic": [26, 28, 29, 39, 40, 42, 44], "dump": [27, 41], "report": 27, "busi": [28, 29], "execud": [28, 29], "skip": 29, "unlik": 29, "launch": 29, "tlt": [29, 51, 57, 72, 74, 79, 110, 111, 121, 122, 145, 146, 152, 156, 157, 163], "bars_list": 29, "asset_bar": 29, "reiniti": 30, "variabl": [25, 30, 41, 165], "reset": 30, "blacklist": 30, "loop": [30, 39, 102, 113, 171, 186], "durat": [7, 31, 145, 152, 156, 163, 177, 192], "my_custom_paramet": 31, "5m": [31, 177, 192], "constructor": 31, "later": 31, "strategy_1": 31, "my_other_paramet": 31, "strategy_2": 31, "my_last_paramet": 31, "oper": [16, 31, 40], "asset_symbol": 31, "mnq": 31, "nasdaq": [31, 105, 116], "calendar": [31, 75, 129, 137], "marketcalendar": [31, 105, 116], "asx": [31, 105, 116], "bmf": [31, 105, 116], "cfe": [31, 105, 116], "nyse": [31, 75, 105, 116, 129, 137], "bat": [31, 105, 116], "cme_equ": [31, 105, 116], "cbot_equ": [31, 105, 116], "cme_agricultur": [31, 105, 116], "cbot_agricultur": [31, 105, 116], "comex_agricultur": [31, 105, 116], "nymex_agricultur": [31, 105, 116], "cme_rat": [31, 105, 116], "cbot_rat": [31, 105, 116], "cme_interestr": [31, 105, 116], "cbot_interestr": [31, 105, 116], "cme_bond": [31, 105, 116], "cbot_bond": [31, 105, 116], "eurex": [31, 105, 116], "hkex": [31, 105, 116], "ic": [31, 105, 116], "iceu": [31, 105, 116], "nyfe": [31, 105, 116], "jpx": [31, 105, 116], "lse": [31, 105, 116], "os": [31, 105, 116], "six": [31, 105, 116], "sse": [31, 105, 116], "tsx": [31, 105, 116], "tsxv": [31, 105, 116], "bse": [31, 105, 116], "tase": [31, 105, 116], "tradingcalendar": [31, 105, 116], "asex": [31, 105, 116], "bvmf": [31, 105, 116], "cme": [31, 73, 105, 116], "iepa": [31, 105, 116], "xam": [31, 105, 116], "xasx": [31, 105, 116], "xbkk": [31, 105, 116], "xbog": [31, 105, 116], "xbom": [31, 105, 116], "xbru": [31, 105, 116], "xbud": [31, 105, 116], "xbue": [31, 105, 116], "xcbf": [31, 105, 116], "xcse": [31, 105, 116], "xdub": [31, 105, 116], "xfra": [31, 105, 116], "xetr": [31, 105, 116], "xhel": [31, 105, 116], "xhkg": [31, 105, 116], "xice": [31, 105, 116], "xidx": [31, 105, 116], "xist": [31, 105, 116], "xjse": [31, 105, 116], "xkar": [31, 105, 116], "xkl": [31, 105, 116], "xkrx": [31, 105, 116], "xlim": [31, 105, 116], "xli": [31, 105, 116], "xlon": [31, 105, 116], "xmad": [31, 105, 116], "xmex": [31, 105, 116], "xmil": [31, 105, 116], "xmo": [31, 105, 116], "xny": [31, 105, 116], "xnze": [31, 105, 116], "xosl": [31, 105, 116], "xpar": [31, 105, 116], "xph": [31, 105, 116], "xpra": [31, 105, 116], "xse": [31, 105, 116], "xsgo": [31, 105, 116], "xshg": [31, 105, 116], "xsto": [31, 105, 116], "xswx": [31, 105, 116], "xtae": [31, 105, 116], "xtai": [31, 105, 116], "xtk": [31, 105, 116], "xtse": [31, 105, 116], "xwar": [31, 105, 116], "xwbo": [31, 105, 116], "us_futur": [31, 105, 116], "max_bar": 31, "10m": [31, 177, 192], "20h": 31, "48": 31, "2d": [31, 177, 192], "interrupt": 32, "gracefulli": 32, "shut": 32, "keybord": 32, "interupt": [32, 39], "abrupt": 32, "crash": [33, 39], "rais": 33, "successfulli": [34, 35, 36], "correspond": [16, 34, 35, 36], "relat": [16, 35], "300": [35, 177, 192], "sold": [35, 50, 56, 145, 156], "elif": 35, "bought": [35, 145, 156], "r": 36, "miss": 38, "restart": [16, 39], "again": [39, 102, 113], "pull": [39, 71], "hello": 39, "task": 40, "core": 40, "framework": [2, 40], "ones": [16, 40], "perspect": 40, "readi": [2, 40, 145, 156], "care": 40, "he": 40, "illustr": 40, "context": 41, "scope": 41, "random": 41, "google_symbol": 41, "snapshot_befor": 41, "random_numb": 41, "randint": 41, "my_custom_stat": 41, "trace": 41, "snapshot": 41, "my_stat": 41, "my_other_stat": 41, "backtesting_brok": 42, "is_backtesting_brok": 42, "calculate_trade_cost": 42, "cost": [16, 42], "cash_settle_options_contract": 42, "settl": 42, "todo": [42, 73], "docstr": 42, "get_last_bar": 42, "els": 42, "limit_ord": [42, 145, 156], "open_": 42, "process_expired_option_contract": 42, "expri": 42, "process_pending_ord": 42, "evalu": 42, "begin": [2, 42], "mostli": 42, "should_continu": 42, "product": 42, "stop_ord": 42, "delai": 43, "abc": [42, 43], "default_pytz": 43, "dsttzinfo": 43, "lmt": 43, "19": 43, "std": 43, "default_timezon": 43, "is_backtesting_data_sourc": [42, 43], "calculate_greek": 43, "asset_pric": [43, 127, 135], "underlying_pric": [43, 127, 135], "greek": [43, 123, 127, 135], "static": 43, "convert_timestep_str_to_timedelta": 43, "timedelta": [43, 71, 72, 101, 102, 112, 113], "1minut": 43, "1hour": 43, "1dai": 43, "unit": [16, 43, 145, 156, 177, 192], "include_after_hour": [43, 71, 72], "info": [43, 104, 115, 124, 125, 132, 133], "guarente": [43, 124, 125, 132, 133], "exp_dat": [43, 124, 125, 132, 133], "strike1": [43, 124, 125, 132, 133], "strike2": [43, 124, 125, 132, 133], "07": [43, 124, 125, 132, 133], "adjust_for_delai": [42, 43, 82, 91], "ago": [43, 71], "known": [43, 73, 74], "round": [43, 86, 87, 95, 96], "param": 43, "get_timestep": 43, "query_greek": [43, 127, 135], "queri": [43, 127, 135], "categori": [44, 100], "flow": 44, "below": [16, 44, 46, 47, 60, 69, 73, 81, 100, 123, 141], "filled_order_callback": [], "force_start_immedi": [], "discord_webhook_url": 16, "account_history_db_connection_str": [], "strategy_id": 16, "discord_account_summary_foot": [], "_strategi": [], "style": [61, 65], "solid": [61, 65], "width": [61, 65, 71, 72], "detail_text": [61, 62, 65, 66], "bolling": [7, 61, 65], "band": [7, 61, 65], "displai": [45, 61, 62, 65, 66], "graph": [7, 61, 62, 65, 66], "overbought": [61, 62, 65, 66], "oversold": [61, 62, 65, 66], "red": [61, 62, 65, 66, 104, 115], "blue": [61, 62, 65, 66], "yellow": [61, 62, 65, 66], "orang": [61, 62, 65, 66], "purpl": [61, 62, 65, 66], "pink": [61, 62, 65, 66], "brown": [61, 62, 65, 66], "black": [61, 62, 65, 66], "white": [61, 62, 65, 66], "grai": [61, 65], "lightgrai": [61, 65], "darkgrai": [61, 65], "lightblu": [61, 65], "darkblu": [61, 65], "lightgreen": [61, 65], "darkgreen": [61, 65], "lightr": [61, 65], "darkr": [61, 65], "hex": [61, 65], "dot": [61, 62, 65, 66], "text": [61, 62, 65, 66], "hover": [61, 62, 65, 66], "add_chart_lin": [61, 65], "80": [61, 65], "circl": [62, 66], "size": [62, 66, 80], "marker": [3, 45, 62, 64, 66, 68], "mark": [62, 66], "cross": [62, 66], "resist": [62, 66], "squar": [62, 66], "diamond": [62, 66], "x": [62, 66], "triangl": [62, 66], "left": [16, 62, 66], "ne": [62, 66], "se": [62, 66], "sw": [62, 66], "nw": [62, 66], "pentagon": [62, 66], "hexagon": [62, 66], "hexagon2": [62, 66], "octagon": [62, 66], "star": [62, 66], "hexagram": [62, 66], "tall": [62, 66], "hourglass": [62, 66], "bowti": [62, 66], "thin": [62, 66], "asterisk": [62, 66], "hash": [62, 66], "y": [62, 66], "ew": [62, 66], "n": [62, 66], "arrow": [62, 66], "add_chart_mark": [62, 66], "paus": [101, 102, 106, 112, 113, 117, 177, 192], "overrid": [101, 102, 112, 113], "infinit": [102, 113], "await": [102, 113, 142, 153], "calculate_return": [], "multipl": [2, 16, 142, 153], "seek": [51, 57, 143, 154], "order1": [110, 111, 121, 122, 144, 152, 155, 163], "order2": [110, 111, 121, 122, 144, 152, 155, 163], "cancel_realtime_bar": [], "stream": [70, 77, 80], "create_asset": [70, 71, 78], "whenev": [166, 181], "paid": [1, 2, 166, 181], "therefor": [166, 181], "zero": [166, 181], "crytpo": [], "gtc": [145, 152, 156, 163], "still": [145, 156], "restric": [145, 156], "compound": [145, 156], "suffici": [145, 156], "deprec": [1, 145, 156, 179, 194], "213": [145, 156], "obect": [145, 156], "intern": [16, 145, 156], "favor": [145, 156], "doe": [42, 43, 76, 145, 156], "guarante": [145, 156], "attain": [7, 145, 156], "penetr": [145, 156], "forc": [145, 156], "remaind": [145, 156], "gtd": [145, 156], "though": [145, 156], "dollar": [145, 156, 174, 189], "percent": [145, 156], "smart": [43, 124, 126, 128, 132, 134, 136, 145, 156], "stop_loss": [145, 151, 156, 162], "stop_loss_limit": [145, 156], "2019": [145, 156], "chf": [145, 156], "aset": [145, 151, 152, 156, 162, 163], "41000": [145, 156], "crypto_assets_to_tupl": [], "find_first_fridai": [], "excut": [167, 182], "sought": [51, 57, 146, 157], "expiration_d": [146, 151, 157, 162], "remov": [179, 194], "cboe": [124, 126, 128, 132, 134, 136], "strke": [43, 124, 132], "stike": [43, 124, 132], "whose": [43, 125, 133], "accord": [81, 82, 88, 91, 97], "sort": [126, 128, 130, 134, 136, 139], "2022": [73, 126, 134], "13": [16, 126, 134], "expiry_d": [126, 131, 134, 140], "expens": [127, 135], "argument": [8, 127, 135], "could": [127, 135], "theoret": [127, 135], "implied_volatil": [127, 135], "impli": [127, 135], "delta": [7, 127, 135], "option_pric": [127, 135], "pv_dividend": [127, 135], "present": [71, 72, 127, 135], "gamma": [127, 135], "vega": [127, 135], "theta": [127, 135], "opt_asset": [127, 135], "option_typ": [127, 135], "get_historical_bot_stat": [], "bot_stat": [], "account_valu": [], "backward": [71, 72], "depend": [16, 71, 72], "week": [71, 72], "1month": [71, 72], "integ": [71, 72, 177, 192], "decid": 71, "extract": 71, "24h": 71, "last_ohlc": 71, "asset_bas": [71, 72, 151, 162], "asset_quot": [71, 72, 151, 152, 162, 163], "regular": 72, "eurusd": 72, "month": [16, 84, 93], "last_dai": [84, 93], "last_minut": [85, 94], "should_use_last_clos": 73, "todai": [16, 73, 81], "comment": 73, "16": 73, "20221013": [128, 136], "yyyi": [75, 129, 137], "mm": [75, 129, 137], "dd": [75, 129, 137], "next_trading_dai": [75, 129, 137], "get_option_expiration_after_d": [], "next_option_expir": 138, "get_next_option_expir": 138, "order_id": [147, 158], "get_tracked_ord": [148, 159], "net": [2, 8, 50, 56], "equiti": [2, 50, 56], "assset": [51, 57], "empti": [52, 58], "backtets": 76, "bid": 76, "ask": 76, "get_realtime_bar": [], "vwap": [77, 80], "intial": 77, "nearest": [86, 87, 95, 96], "round_dai": [86, 95], "round_minut": [87, 96], "get_stats_from_databas": [], "stats_table_nam": [], "get_symbol_bar": 69, "get_tick": [], "get_tracked_asset": [], "get_tracked_posit": [], "previou": [7, 78, 79], "happen": [170, 185], "load_panda": [], "messag": [16, 100, 104, 115], "broadcast": [104, 115], "prefix": [0, 104, 115], "goe": [104, 115], "consol": [16, 104, 115], "servic": [16, 104, 115], "plu": [104, 115, 174, 189], "origin": [104, 115], "send": [16, 104, 115], "insid": [46, 165, 171, 186], "equal": [171, 172, 177, 186, 187, 192], "on_strategy_end": [], "statist": 2, "finish": [], "20200101": [131, 140], "attempt": [174, 189], "resov": [174, 189], "held": [174, 189], "system": [150, 161], "leav": [150, 161], "send_account_summary_to_discord": [], "send_discord_messag": [], "image_buf": [], "silent": [], "send_result_text_to_discord": [], "returns_text": [], "send_spark_chart_to_discord": [], "stats_df": [], "Not": [42, 105, 116], "applic": [16, 105, 116], "set_parameter_default": [], "overwrit": [53, 59], "should_send_account_summary_to_discord": [], "program": [106, 117, 164, 177, 192], "control": [177, 192], "speed": [177, 192], "interpret": [2, 177, 192], "m": [177, 192], "h": [177, 192], "2h": [177, 192], "start_realtime_bar": [], "keep_bar": 80, "arriv": 80, "extend": 80, "kept": 80, "strike_pric": [151, 162], "trailing_stop_pric": [151, 162], "41250": [151, 162], "41325": [151, 162], "41300": [151, 162], "is_multileg": [152, 163], "multileg": [21, 152, 163], "debit": [152, 163], "post": [152, 163], "asset_btc": [152, 163], "asset_eth": [152, 163], "to_sql": [], "connection_str": [], "if_exist": [], "write_backtest_set": [], "redefin": [], "debug": [4, 45], "is_backtest_brok": 45, "async_": 45, "async": 45, "asynchron": 45, "displi": 45, "web": [24, 45], "browser": [16, 24, 45], "run_all_async": 45, "stop_al": 45, "thing": 46, "divid": 46, "sens": 46, "preced": 46, "accoutn": [], "datatim": 81, "think": 81, "regardless": 81, "especi": [16, 81], "1990": 81, "tell": 81, "jan": 81, "1991": 81, "rather": 81, "fit": [16, 100], "pend": [], "meantim": [], "meant": 123, "typic": [16, 164], "my_paramet": 164, "main_tick": 164, "ema_threshold": 164, "lot": [16, 165], "state": [16, 165], "insight": [0, 2], "behavior": [0, 2], "quantstat": 7, "lumi": [2, 7, 8], "varieti": 7, "metric": [2, 7], "yearli": 7, "sharp": [2, 7], "ratio": [2, 7], "romad": 7, "maximum": 7, "drawdown": [2, 7], "sortino": 7, "variat": 7, "differenti": 7, "harm": 7, "observ": 7, "peak": 7, "trough": 7, "longest": 7, "accompani": 7, "cumul": 7, "scale": 7, "visual": [2, 3, 7, 24], "exponenti": 7, "growth": 7, "showcas": 7, "tailor": 7, "goal": 7, "aim": [], "steadi": [], "focus": 16, "toler": [], "balanc": [], "question": 7, "email": 7, "along": 9, "involv": 9, "uniqu": 3, "decis": [3, 4], "signal": [], "action": 4, "taken": 4, "view": [4, 16], "utm_medium": [], "referr": [], "lumibot_backtesting_sect": [], "condor": [7, 16], "martingal": 7, "iron": 7, "dte": 7, "bband": 7, "v2": 7, "strategy_method": [], "doc": 16, "_": [], "order_class": 21, "error_messag": 21, "child_ord": 21, "unprocess": 21, "orderclass": 21, "add_child_ord": 21, "o": 21, "child": [21, 42], "is_buy_ord": 21, "is_sell_ord": 21, "data_source_backtest": 42, "datasourcebacktest": [42, 43], "directli": [16, 42], "pandasdata": [42, 43], "clean_trading_tim": 43, "dt_index": 43, "pcal": 43, "find_asset_in_data_stor": 43, "get_asset_by_nam": 43, "get_asset_by_symbol": 43, "get_asset": 43, "get_start_datetime_and_ts_unit": 43, "start_dt": 43, "start_buff": 43, "get_trading_days_panda": 43, "load_data": 43, "update_date_index": 43, "yahoo_data": 43, "yahoodata": 43, "15m": 43, "becuas": 43, "chain_data": 43, "option_chain": 43, "subscript": 1, "usernam": [2, 8], "thetadatabacktest": 8, "thetadata_usernam": 8, "thetadata_password": 8, "thetadata": [0, 2, 25], "run_backtest": [0, 1, 2, 5, 6, 8, 10, 24], "altern": 8, "get_func_stat": 24, "print_al": 24, "prof": 24, "pstat": 24, "snakeviz": 24, "complex": 24, "conclus": [0, 25], "vital": 2, "across": [2, 16], "walk": 2, "explain": 2, "introduc": 2, "studio": 2, "pycharm": 2, "offici": 2, "visualstudio": 2, "extens": 2, "environ": [2, 25], "overview": 2, "suitabl": [2, 16], "longer": 2, "term": 2, "intradai": 2, "ideal": [2, 16], "plan": [2, 16], "dataset": 2, "export": 2, "correctli": 16, "select": [2, 16], "backtesting_funct": [], "curv": 2, "comparison": 2, "tearsheet_html": [], "review": 2, "warn": [], "logs_csv": [], "eas": 16, "further": [2, 16], "weak": 2, "strength": 2, "deploi": [2, 25], "machin": 2, "quick": 2, "manual": [2, 16], "essenti": 2, "breakdown": [], "respond": 2, "catch": [], "confid": 2, "aspect": 2, "tear": 2, "sheet": 2, "issu": 2, "straightforward": 16, "button": 16, "effect": 16, "great": 16, "prefer": 16, "edit": 16, "tip": 16, "scroll": 16, "afford": 16, "excel": 16, "while": 16, "best": 16, "scalabl": 16, "click": 16, "figur": 16, "blueprint": 16, "background": 16, "worker": 16, "butterfli": 16, "jljk": [], "starter": 16, "On": 16, "sidebar": 16, "corner": 16, "success": 16, "monitor": 16, "smoothli": 16, "bottom": 16, "tab": 16, "locat": 16, "reserv": 16, "vm": 16, "downgrad": 16, "vcpu": 16, "reduc": 16, "proper": 16, "webhook": 16, "url": 16, "live_config": 16, "separ": 16, "env": 16, "verifi": 16, "confirm": 16, "behav": 16, "ey": 16, "happi": 16, "assist": 16, "from_dict": [18, 21, 22], "to_dict": [18, 21, 22], "order_dict": 21, "deploy": 25, "platform": 25, "render": 25, "replit": 25, "src": 16, "paper_1": 16, "a7py0zidhxde6qkx8ojjknp7cd87hwku": 16, "notif": 16, "123456789": 16, "db_connection_str": 16, "histori": 16, "sqlite": 16, "account_histori": 16, "db": 16, "strategy_nam": 16, "competit": 16, "kraken_api_kei": 16, "xyz1234567890abcdef": 16, "kraken_api_secret": 16, "abcdef1234567890abcdef1234567890abcdef1234": 16, "soon": 16, "incred": 16, "commiss": 16, "engag": 16, "tradier_access_token": 16, "token": 16, "qtrz3zurl9244ahuw4aoyapgvyra": 16, "tradier_account_numb": 16, "va12204793": 16, "tradier_is_pap": 16, "align": 16, "perfectli": 16, "seamlessli": 16, "autom": 16, "alpaca_api_kei": 16, "brokerag": 16, "pk7t6yvax6pmh1em20yn": 16, "alpaca_api_secret": 16, "9wgjls3wixq54fcphwwzjcp8jcfjfkuwsryskkma": 16, "alpaca_is_pap": 16, "challeng": 16, "friendli": 16, "coinbase_api_kei": 16, "steea9fhiszntmpihqjudeqolitj0javz": 16, "coinbase_api_secret": 16, "nuzcnprsxjxxouxrhqe5k2k1xnqlpckh2xcutifkcw": 16, "coinbase_is_sandbox": 16, "cfd": 16, "Their": 16, "presenc": 16, "world": 16, "interactive_brokers_port": 16, "interactive_brokers_client_id": 16, "123456": 16, "interactive_brokers_ip": 16, "address": 16, "ib_subaccount": 16, "subaccount": 16, "subaccount1": 16, "afa": 16, "itself": 16, "commit": 16, "redeploi": 16, "regularli": 16, "delet": 16, "unnecessari": 16, "trashcan": 16, "press": 16}, "objects": {"entities": [[18, 0, 0, "-", "asset"], [19, 0, 0, "-", "bars"], [20, 0, 0, "-", "data"], [21, 0, 0, "-", "order"], [22, 0, 0, "-", "position"], [23, 0, 0, "-", "trading_fee"]], "entities.asset": [[18, 1, 1, "", "Asset"], [18, 1, 1, "", "AssetsMapping"]], "entities.asset.Asset": [[18, 1, 1, "", "AssetType"], [18, 1, 1, "", "OptionRight"], [18, 2, 1, "", "_asset_types"], [18, 2, 1, "", "_right"], [18, 2, 1, "id0", "asset_type"], [18, 3, 1, "id1", "asset_type_must_be_one_of"], [18, 2, 1, "id2", "expiration"], [18, 3, 1, "", "from_dict"], [18, 3, 1, "", "is_valid"], [18, 2, 1, "id3", "multiplier"], [18, 2, 1, "id4", "precision"], [18, 2, 1, "id5", "right"], [18, 3, 1, "id6", "right_must_be_one_of"], [18, 2, 1, "id7", "strike"], [18, 2, 1, "id8", "symbol"], [18, 3, 1, "", "symbol2asset"], [18, 3, 1, "", "to_dict"], [18, 2, 1, "", "underlying_asset"]], "entities.asset.Asset.AssetType": [[18, 2, 1, "", "CRYPTO"], [18, 2, 1, "", "FOREX"], [18, 2, 1, "", "FUTURE"], [18, 2, 1, "", "INDEX"], [18, 2, 1, "", "OPTION"], [18, 2, 1, "", "STOCK"]], "entities.asset.Asset.OptionRight": [[18, 2, 1, "", "CALL"], [18, 2, 1, "", "PUT"]], "entities.bars": [[19, 1, 1, "", "Bars"], [19, 4, 1, "", "NoBarDataFound"]], "entities.bars.Bars": [[19, 3, 1, "id0", "aggregate_bars"], [19, 3, 1, "", "filter"], [19, 3, 1, "id1", "get_last_dividend"], [19, 3, 1, "id2", "get_last_price"], [19, 3, 1, "id3", "get_momentum"], [19, 3, 1, "", "get_total_dividends"], [19, 3, 1, "", "get_total_return"], [19, 3, 1, "", "get_total_return_pct"], [19, 3, 1, "", "get_total_return_pct_change"], [19, 3, 1, "", "get_total_stock_splits"], [19, 3, 1, "id4", "get_total_volume"], [19, 3, 1, "", "parse_bar_list"], [19, 3, 1, "", "split"]], "entities.data": [[20, 1, 1, "", "Data"]], "entities.data.Data": [[20, 2, 1, "", "MIN_TIMESTEP"], [20, 2, 1, "", "TIMESTEP_MAPPING"], [20, 3, 1, "", "_get_bars_dict"], [20, 2, 1, "", "asset"], [20, 3, 1, "id0", "check_data"], [20, 3, 1, "id1", "columns"], [20, 2, 1, "", "datalines"], [20, 2, 1, "", "date_end"], [20, 2, 1, "", "date_start"], [20, 2, 1, "", "df"], [20, 3, 1, "id2", "get_bars"], [20, 3, 1, "", "get_bars_between_dates"], [20, 3, 1, "id3", "get_iter_count"], [20, 3, 1, "id4", "get_last_price"], [20, 3, 1, "", "get_quote"], [20, 2, 1, "", "iter_index"], [20, 3, 1, "id5", "repair_times_and_fill"], [20, 3, 1, "id6", "set_date_format"], [20, 3, 1, "id7", "set_dates"], [20, 3, 1, "id8", "set_times"], [20, 2, 1, "", "sybmol"], [20, 2, 1, "", "timestep"], [20, 3, 1, "id9", "to_datalines"], [20, 2, 1, "", "trading_hours_end"], [20, 2, 1, "", "trading_hours_start"], [20, 3, 1, "id10", "trim_data"]], "entities.order": [[21, 1, 1, "", "Order"]], "entities.order.Order": [[21, 1, 1, "", "OrderClass"], [21, 1, 1, "", "OrderSide"], [21, 1, 1, "", "OrderStatus"], [21, 1, 1, "", "OrderType"], [21, 1, 1, "", "Transaction"], [21, 3, 1, "", "add_child_order"], [21, 3, 1, "", "add_transaction"], [21, 5, 1, "", "avg_fill_price"], [21, 3, 1, "", "cash_pending"], [21, 3, 1, "", "equivalent_status"], [21, 3, 1, "", "from_dict"], [21, 3, 1, "", "get_fill_price"], [21, 3, 1, "", "get_increment"], [21, 3, 1, "", "is_active"], [21, 3, 1, "", "is_buy_order"], [21, 3, 1, "", "is_canceled"], [21, 3, 1, "", "is_filled"], [21, 3, 1, "", "is_option"], [21, 3, 1, "", "is_sell_order"], [21, 5, 1, "", "quantity"], [21, 3, 1, "", "set_canceled"], [21, 3, 1, "", "set_error"], [21, 3, 1, "", "set_filled"], [21, 3, 1, "", "set_identifier"], [21, 3, 1, "", "set_new"], [21, 3, 1, "", "set_partially_filled"], [21, 5, 1, "", "status"], [21, 3, 1, "", "to_dict"], [21, 3, 1, "", "to_position"], [21, 3, 1, "", "update_raw"], [21, 3, 1, "", "update_trail_stop_price"], [21, 3, 1, "", "wait_to_be_closed"], [21, 3, 1, "", "wait_to_be_registered"], [21, 3, 1, "", "was_transmitted"]], "entities.order.Order.OrderClass": [[21, 2, 1, "", "BRACKET"], [21, 2, 1, "", "MULTILEG"], [21, 2, 1, "", "OCO"], [21, 2, 1, "", "OTO"]], "entities.order.Order.OrderSide": [[21, 2, 1, "", "BUY"], [21, 2, 1, "", "BUY_TO_CLOSE"], [21, 2, 1, "", "BUY_TO_COVER"], [21, 2, 1, "", "BUY_TO_OPEN"], [21, 2, 1, "", "SELL"], [21, 2, 1, "", "SELL_SHORT"], [21, 2, 1, "", "SELL_TO_CLOSE"], [21, 2, 1, "", "SELL_TO_OPEN"]], "entities.order.Order.OrderStatus": [[21, 2, 1, "", "CANCELED"], [21, 2, 1, "", "CANCELLING"], [21, 2, 1, "", "CASH_SETTLED"], [21, 2, 1, "", "ERROR"], [21, 2, 1, "", "EXPIRED"], [21, 2, 1, "", "FILLED"], [21, 2, 1, "", "NEW"], [21, 2, 1, "", "OPEN"], [21, 2, 1, "", "PARTIALLY_FILLED"], [21, 2, 1, "", "UNPROCESSED"]], "entities.order.Order.OrderType": [[21, 2, 1, "", "BRACKET"], [21, 2, 1, "", "LIMIT"], [21, 2, 1, "", "MARKET"], [21, 2, 1, "", "OCO"], [21, 2, 1, "", "OTO"], [21, 2, 1, "", "STOP"], [21, 2, 1, "", "STOP_LIMIT"], [21, 2, 1, "", "TRAIL"]], "entities.order.Order.Transaction": [[21, 2, 1, "", "price"], [21, 2, 1, "", "quantity"]], "entities.position": [[22, 1, 1, "", "Position"]], "entities.position.Position": [[22, 3, 1, "", "add_order"], [22, 2, 1, "", "asset"], [22, 5, 1, "id0", "available"], [22, 2, 1, "", "avg_fill_price"], [22, 3, 1, "", "from_dict"], [22, 3, 1, "", "get_selling_order"], [22, 5, 1, "id1", "hold"], [22, 2, 1, "", "orders"], [22, 5, 1, "id2", "quantity"], [22, 2, 1, "", "strategy"], [22, 2, 1, "", "symbol"], [22, 3, 1, "", "to_dict"], [22, 3, 1, "", "value_type"]], "entities.trading_fee": [[23, 1, 1, "", "TradingFee"]], "lumibot.backtesting": [[42, 0, 0, "-", "backtesting_broker"]], "lumibot.backtesting.backtesting_broker": [[42, 1, 1, "", "BacktestingBroker"]], "lumibot.backtesting.backtesting_broker.BacktestingBroker": [[42, 2, 1, "", "IS_BACKTESTING_BROKER"], [42, 3, 1, "", "calculate_trade_cost"], [42, 3, 1, "", "cancel_order"], [42, 3, 1, "", "cash_settle_options_contract"], [42, 5, 1, "", "datetime"], [42, 3, 1, "", "get_historical_account_value"], [42, 3, 1, "", "get_last_bar"], [42, 3, 1, "", "get_time_to_close"], [42, 3, 1, "", "get_time_to_open"], [42, 3, 1, "", "is_market_open"], [42, 3, 1, "", "limit_order"], [42, 3, 1, "", "process_expired_option_contracts"], [42, 3, 1, "", "process_pending_orders"], [42, 3, 1, "", "should_continue"], [42, 3, 1, "", "stop_order"], [42, 3, 1, "", "submit_order"], [42, 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": [[43, 0, 0, "-", "data_sources"]], "lumibot.data_sources": [[43, 0, 0, "-", "data_source"], [42, 0, 0, "-", "data_source_backtesting"], [43, 0, 0, "-", "pandas_data"], [43, 0, 0, "-", "yahoo_data"]], "lumibot.data_sources.data_source": [[43, 1, 1, "", "DataSource"]], "lumibot.data_sources.data_source.DataSource": [[43, 2, 1, "", "DEFAULT_PYTZ"], [43, 2, 1, "", "DEFAULT_TIMEZONE"], [43, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [43, 2, 1, "", "MIN_TIMESTEP"], [43, 2, 1, "", "SOURCE"], [43, 2, 1, "", "TIMESTEP_MAPPING"], [43, 3, 1, "", "calculate_greeks"], [43, 3, 1, "", "convert_timestep_str_to_timedelta"], [43, 3, 1, "", "get_bars"], [43, 3, 1, "", "get_chains"], [43, 3, 1, "", "get_datetime"], [43, 3, 1, "", "get_datetime_range"], [43, 3, 1, "", "get_historical_prices"], [43, 3, 1, "", "get_last_day"], [43, 3, 1, "", "get_last_minute"], [43, 3, 1, "", "get_last_price"], [43, 3, 1, "", "get_last_prices"], [43, 3, 1, "", "get_round_day"], [43, 3, 1, "", "get_round_minute"], [43, 3, 1, "", "get_strikes"], [43, 3, 1, "", "get_timestamp"], [43, 3, 1, "", "get_timestep"], [43, 3, 1, "", "get_yesterday_dividend"], [43, 3, 1, "", "get_yesterday_dividends"], [43, 3, 1, "", "localize_datetime"], [43, 3, 1, "", "query_greeks"], [43, 3, 1, "", "to_default_timezone"]], "lumibot.data_sources.data_source_backtesting": [[42, 1, 1, "", "DataSourceBacktesting"]], "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting": [[42, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [42, 3, 1, "", "get_datetime"], [42, 3, 1, "", "get_datetime_range"]], "lumibot.data_sources.pandas_data": [[43, 1, 1, "", "PandasData"]], "lumibot.data_sources.pandas_data.PandasData": [[43, 2, 1, "", "SOURCE"], [43, 2, 1, "", "TIMESTEP_MAPPING"], [43, 3, 1, "", "clean_trading_times"], [43, 3, 1, "", "find_asset_in_data_store"], [43, 3, 1, "", "get_asset_by_name"], [43, 3, 1, "", "get_asset_by_symbol"], [43, 3, 1, "", "get_assets"], [43, 3, 1, "", "get_chains"], [43, 3, 1, "", "get_historical_prices"], [43, 3, 1, "", "get_last_price"], [43, 3, 1, "", "get_last_prices"], [43, 3, 1, "", "get_start_datetime_and_ts_unit"], [43, 3, 1, "", "get_trading_days_pandas"], [43, 3, 1, "", "get_yesterday_dividend"], [43, 3, 1, "", "get_yesterday_dividends"], [43, 3, 1, "", "load_data"], [43, 3, 1, "", "update_date_index"]], "lumibot.data_sources.yahoo_data": [[43, 1, 1, "", "YahooData"]], "lumibot.data_sources.yahoo_data.YahooData": [[43, 2, 1, "", "MIN_TIMESTEP"], [43, 2, 1, "", "SOURCE"], [43, 2, 1, "", "TIMESTEP_MAPPING"], [43, 3, 1, "", "get_chains"], [43, 3, 1, "", "get_historical_prices"], [43, 3, 1, "", "get_last_price"], [43, 3, 1, "", "get_strikes"]], "lumibot.strategies.strategy": [[44, 0, 0, "-", "Strategy"]], "lumibot.strategies.strategy.Strategy": [[65, 6, 1, "", "add_line"], [66, 6, 1, "", "add_marker"], [27, 6, 1, "", "after_market_closes"], [112, 6, 1, "", "await_market_to_close"], [113, 6, 1, "", "await_market_to_open"], [28, 6, 1, "", "before_market_closes"], [29, 6, 1, "", "before_market_opens"], [30, 6, 1, "", "before_starting_trading"], [153, 6, 1, "", "cancel_open_orders"], [154, 6, 1, "", "cancel_order"], [155, 6, 1, "", "cancel_orders"], [70, 6, 1, "", "cancel_realtime_bars"], [181, 5, 1, "", "cash"], [156, 6, 1, "", "create_order"], [182, 5, 1, "", "first_iteration"], [157, 6, 1, "", "get_asset_potential_total"], [54, 6, 1, "", "get_cash"], [132, 6, 1, "", "get_chain"], [133, 6, 1, "", "get_chains"], [91, 6, 1, "", "get_datetime"], [92, 6, 1, "", "get_datetime_range"], [134, 6, 1, "", "get_expiration"], [135, 6, 1, "", "get_greeks"], [71, 6, 1, "", "get_historical_prices"], [72, 6, 1, "", "get_historical_prices_for_assets"], [93, 6, 1, "", "get_last_day"], [94, 6, 1, "", "get_last_minute"], [73, 6, 1, "", "get_last_price"], [74, 6, 1, "", "get_last_prices"], [67, 6, 1, "", "get_lines_df"], [68, 6, 1, "", "get_markers_df"], [136, 6, 1, "", "get_multiplier"], [137, 6, 1, "", "get_next_trading_day"], [138, 6, 1, "", "get_option_expiration_after_date"], [158, 6, 1, "", "get_order"], [159, 6, 1, "", "get_orders"], [114, 6, 1, "", "get_parameters"], [56, 6, 1, "", "get_portfolio_value"], [57, 6, 1, "", "get_position"], [58, 6, 1, "", "get_positions"], [76, 6, 1, "", "get_quote"], [77, 6, 1, "", "get_realtime_bars"], [95, 6, 1, "", "get_round_day"], [96, 6, 1, "", "get_round_minute"], [160, 6, 1, "", "get_selling_order"], [139, 6, 1, "", "get_strikes"], [97, 6, 1, "", "get_timestamp"], [78, 6, 1, "", "get_yesterday_dividend"], [79, 6, 1, "", "get_yesterday_dividends"], [183, 5, 1, "", "initial_budget"], [31, 6, 1, "", "initialize"], [184, 5, 1, "", "is_backtesting"], [185, 5, 1, "", "last_on_trading_iteration_datetime"], [98, 6, 1, "", "localize_datetime"], [115, 6, 1, "", "log_message"], [186, 5, 1, "", "minutes_before_closing"], [187, 5, 1, "", "minutes_before_opening"], [188, 5, 1, "", "name"], [32, 6, 1, "", "on_abrupt_closing"], [33, 6, 1, "", "on_bot_crash"], [34, 6, 1, "", "on_canceled_order"], [35, 6, 1, "", "on_filled_order"], [36, 6, 1, "", "on_new_order"], [37, 6, 1, "", "on_parameters_updated"], [38, 6, 1, "", "on_partially_filled_order"], [39, 6, 1, "", "on_trading_iteration"], [140, 6, 1, "", "options_expiry_to_datetime_date"], [189, 5, 1, "", "portfolio_value"], [190, 5, 1, "", "pytz"], [191, 5, 1, "", "quote_asset"], [1, 6, 1, "", "run_backtest"], [161, 6, 1, "", "sell_all"], [116, 6, 1, "", "set_market"], [59, 6, 1, "", "set_parameters"], [117, 6, 1, "", "sleep"], [192, 5, 1, "", "sleeptime"], [80, 6, 1, "", "start_realtime_bars"], [162, 6, 1, "", "submit_order"], [163, 6, 1, "", "submit_orders"], [193, 5, 1, "", "timezone"], [99, 6, 1, "", "to_default_timezone"], [41, 6, 1, "", "trace_stats"], [194, 5, 1, "", "unspent_money"], [118, 6, 1, "", "update_parameters"], [119, 6, 1, "", "wait_for_order_execution"], [120, 6, 1, "", "wait_for_order_registration"], [121, 6, 1, "", "wait_for_orders_execution"], [122, 6, 1, "", "wait_for_orders_registration"]], "lumibot.traders": [[45, 0, 0, "-", "trader"]], "lumibot.traders.trader": [[45, 1, 1, "", "Trader"]], "lumibot.traders.trader.Trader": [[45, 3, 1, "", "add_strategy"], [45, 5, 1, "", "is_backtest_broker"], [45, 3, 1, "", "run_all"], [45, 3, 1, "", "run_all_async"], [45, 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, 24, 25, 42], "content": [0, 11, 17, 25, 26, 43, 46], "all": 25, "panda": [5, 43], "csv": [4, 5], "other": 5, "data": [2, 5, 20, 42, 43, 69], "exampl": [5, 13, 15], "datafram": 5, "In": 5, "summari": [5, 40], "polygon": [2, 6], "io": [2, 6], "yahoo": [10, 43], "broker": [11, 13, 14, 16, 42], "alpaca": [12, 16, 24], "document": [12, 18, 19, 21, 44], "crypto": 13, "us": 13, "ccxt": 13, "configur": [13, 15, 16, 24], "set": 13, "run": [2, 13, 15, 24], "your": [13, 15, 16, 24, 25], "strategi": [13, 15, 24, 25, 44, 46, 165], "full": [13, 15], "interact": [14, 16], "tradier": [15, 16], "get": [15, 24, 25], "start": [15, 24, 25], "entiti": 17, "asset": 18, "bar": 19, "order": [21, 141], "advanc": 21, "type": 21, "With": [21, 24], "leg": 21, "posit": 22, "trade": [2, 9, 23, 24, 25], "fee": [23, 24], "what": 24, "i": 24, "lumibot": [2, 24, 25], "lumiwealth": 24, "step": [16, 24, 25], "1": [24, 25], "instal": [2, 24, 25], "packag": 24, "2": [24, 25], "import": 24, "follow": 24, "modul": [24, 43], "3": [24, 25], "creat": [24, 25], "an": 24, "paper": 24, "account": [24, 47], "4": 24, "api": 24, "kei": 24, "5": 24, "class": 24, "6": 24, "instanti": 24, "trader": [24, 45], "7": 24, "option": [24, 123], "8": 24, "ad": 24, "profil": 24, "improv": 24, "perform": 24, "algorithm": 25, "librari": 25, "take": 25, "bot": 25, "live": 25, "togeth": 25, "addit": 25, "resourc": 25, "need": 25, "extra": 25, "help": 25, "tabl": 25, "indic": [2, 3, 25], "lifecycl": 26, "method": [26, 46], "def": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41], "after_market_clos": 27, "refer": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41], "before_market_clos": 28, "before_market_open": 29, "before_starting_trad": 30, "initi": 31, "on_abrupt_clos": 32, "on_bot_crash": 33, "on_canceled_ord": 34, "on_filled_ord": 35, "on_new_ord": 36, "on_parameters_upd": 37, "on_partially_filled_ord": 38, "on_trading_iter": 39, "trace_stat": 41, "sourc": [2, 42, 43], "manag": [47, 141], "self": [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 166, 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], "get_cash": [48, 54], "get_paramet": [49, 55, 103, 114], "get_portfolio_valu": [50, 56], "get_posit": [51, 52, 57, 58], "set_paramet": [53, 59], "chart": 60, "function": [1, 60], "add_lin": [61, 65], "add_mark": [62, 66], "get_lines_df": [63, 67], "get_markers_df": [64, 68], "cancel_realtime_bar": 70, "get_historical_pric": 71, "get_historical_prices_for_asset": 72, "get_last_pric": [73, 74], "get_next_trading_dai": [75, 129, 137], "get_quot": 76, "get_realtime_bar": 77, "get_yesterday_dividend": [78, 79], "start_realtime_bar": 80, "datetim": 81, "get_datetim": [82, 91], "get_datetime_rang": [83, 92], "get_last_dai": [84, 93], "get_last_minut": [85, 94], "get_round_dai": [86, 95], "get_round_minut": [87, 96], "get_timestamp": [88, 97], "localize_datetim": [89, 98], "to_default_timezon": [90, 99], "miscellan": 100, "await_market_to_clos": [101, 112], "await_market_to_open": [102, 113], "log_messag": [104, 115], "set_market": [105, 116], "sleep": [106, 117], "update_paramet": [107, 118], "wait_for_order_execut": [108, 119], "wait_for_order_registr": [109, 120], "wait_for_orders_execut": [110, 121], "wait_for_orders_registr": [111, 122], "get_chain": [124, 125, 132, 133], "get_expir": [126, 134], "get_greek": [127, 135], "get_multipli": [128, 136], "get_option_expiration_after_d": 138, "get_strik": [130, 139], "options_expiry_to_datetime_d": [131, 140], "cancel_open_ord": [142, 153], "cancel_ord": [143, 144, 154, 155], "create_ord": [145, 156], "get_asset_potential_tot": [146, 157], "get_ord": [147, 148, 158, 159], "get_selling_ord": [149, 160], "sell_al": [150, 161], "submit_ord": [151, 152, 162, 163], "paramet": 164, "properti": 165, "cash": [166, 181], "first_iter": [167, 182], "initial_budget": [168, 183], "is_backtest": [169, 184], "last_on_trading_iteration_datetim": [170, 185], "minutes_before_clos": [171, 186], "minutes_before_open": [172, 187], "name": [173, 188], "portfolio_valu": [174, 189], "pytz": [175, 180, 190], "quote_asset": [176, 191], "sleeptim": [177, 192], "timezon": [178, 193], "unspent_monei": [179, 194], "file": [0, 2, 3, 9], "gener": [0, 2, 16], "from": [0, 2], "tearsheet": [2, 7], "html": [2, 7], "log": 4, "thetadata": 8, "how": 2, "To": 2, "up": [], "v": [], "code": [], "choos": [2, 16], "conclus": [2, 16], "deploy": 16, "guid": 16, "platform": 16, "deploi": 16, "render": 16, "replit": 16, "secret": 16, "coinbas": 16, "kraken": 16, "environ": 16, "variabl": 16, "final": 16}, "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"], [42, "backtesting"]], "Files Generated from Backtesting": [[0, "files-generated-from-backtesting"], [2, "files-generated-from-backtesting"]], "Contents:": [[0, null], [11, null], [17, null], [26, null], [46, 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"], [16, "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"], [43, "module-lumibot.data_sources.yahoo_data"]], "Brokers": [[11, "brokers"]], "Alpaca": [[12, "alpaca"]], "Documentation": [[12, "module-lumibot.brokers.alpaca"], [18, "module-entities.asset"], [19, "module-entities.bars"], [21, "module-entities.order"], [44, "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"], [15, "running-your-strategy"]], "Full Example Strategy": [[13, "full-example-strategy"], [15, "full-example-strategy"]], "Interactive Brokers": [[14, "interactive-brokers"]], "Tradier": [[15, "tradier"]], "Getting Started": [[15, "getting-started"], [25, "getting-started"]], "Configuration": [[15, "configuration"]], "Deployment Guide": [[16, "deployment-guide"]], "Choosing Your Deployment Platform": [[16, "choosing-your-deployment-platform"]], "Deploying to Render": [[16, "deploying-to-render"]], "Deploying to Replit": [[16, "deploying-to-replit"]], "Secrets Configuration": [[16, "secrets-configuration"]], "Broker Configuration": [[16, "broker-configuration"]], "Tradier Configuration": [[16, "tradier-configuration"], [16, "id18"]], "Alpaca Configuration": [[16, "alpaca-configuration"], [16, "id19"]], "Coinbase Configuration": [[16, "coinbase-configuration"], [16, "id20"]], "Kraken Configuration": [[16, "kraken-configuration"], [16, "id21"]], "Interactive Brokers Configuration": [[16, "interactive-brokers-configuration"], [16, "id22"]], "General Environment Variables": [[16, "general-environment-variables"], [16, "id23"]], "Final Steps": [[16, "final-steps"]], "Entities": [[17, "entities"]], "Asset": [[18, "asset"]], "Bars": [[19, "bars"]], "Data": [[20, "module-entities.data"], [69, "data"]], "Order": [[21, "order"]], "Advanced Order Types": [[21, "advanced-order-types"]], "Order With Legs": [[21, "order-with-legs"]], "Position": [[22, "module-entities.position"]], "Trading Fee": [[23, "module-entities.trading_fee"]], "What is Lumibot?": [[24, "what-is-lumibot"]], "Lumiwealth": [[24, "id1"]], "Getting Started With Lumibot": [[24, "getting-started-with-lumibot"]], "Step 1: Install the Package": [[24, "step-1-install-the-package"]], "Step 2: Import the Following Modules": [[24, "step-2-import-the-following-modules"]], "Step 3: Create an Alpaca Paper Trading Account": [[24, "step-3-create-an-alpaca-paper-trading-account"]], "Step 4: Configure Your API Keys": [[24, "step-4-configure-your-api-keys"]], "Step 5: Create a Strategy Class": [[24, "step-5-create-a-strategy-class"]], "Step 6: Instantiate the Trader, Alpaca, and Strategy Classes": [[24, "step-6-instantiate-the-trader-alpaca-and-strategy-classes"]], "Step 7: Backtest the Strategy (Optional)": [[24, "step-7-backtest-the-strategy-optional"]], "Step 8: Run the Strategy": [[24, "step-8-run-the-strategy"]], "Adding Trading Fees": [[24, "adding-trading-fees"]], "Profiling to Improve Performance": [[24, "profiling-to-improve-performance"]], "Lumibot: Backtesting and Algorithmic Trading Library": [[25, "lumibot-backtesting-and-algorithmic-trading-library"]], "Step 1: Install Lumibot": [[25, "step-1-install-lumibot"]], "Step 2: Create a Strategy for Backtesting": [[25, "step-2-create-a-strategy-for-backtesting"]], "Step 3: Take Your Bot Live": [[25, "step-3-take-your-bot-live"]], "All Together": [[25, "all-together"]], "Additional Resources": [[25, "additional-resources"]], "Need Extra Help?": [[25, "need-extra-help"]], "Table of Contents": [[25, "table-of-contents"]], "Indices and tables": [[25, "indices-and-tables"]], "Lifecycle Methods": [[26, "lifecycle-methods"]], "def after_market_closes": [[27, "def-after-market-closes"]], "Reference": [[27, "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"], [41, "reference"]], "def before_market_closes": [[28, "def-before-market-closes"]], "def before_market_opens": [[29, "def-before-market-opens"]], "def before_starting_trading": [[30, "def-before-starting-trading"]], "def initialize": [[31, "def-initialize"]], "def on_abrupt_closing": [[32, "def-on-abrupt-closing"]], "def on_bot_crash": [[33, "def-on-bot-crash"]], "def on_canceled_order": [[34, "def-on-canceled-order"]], "def on_filled_order": [[35, "def-on-filled-order"]], "def on_new_order": [[36, "def-on-new-order"]], "def on_parameters_updated": [[37, "def-on-parameters-updated"]], "def on_partially_filled_order": [[38, "def-on-partially-filled-order"]], "def on_trading_iteration": [[39, "def-on-trading-iteration"]], "Summary": [[40, "summary"]], "def trace_stats": [[41, "def-trace-stats"]], "Backtesting Broker": [[42, "module-lumibot.backtesting.backtesting_broker"]], "Data Source Backtesting": [[42, "module-lumibot.data_sources.data_source_backtesting"]], "Data Sources": [[43, "data-sources"]], "Data Source": [[43, "module-lumibot.data_sources.data_source"]], "Pandas": [[43, "module-lumibot.data_sources.pandas_data"]], "Module contents": [[43, "module-lumibot.data_sources"]], "Strategies": [[44, "strategies"]], "Traders": [[45, "traders"]], "Trader": [[45, "module-lumibot.traders.trader"]], "Strategy Methods": [[46, "strategy-methods"]], "Account Management": [[47, "account-management"]], "self.get_cash": [[48, "self-get-cash"], [54, "self-get-cash"]], "self.get_parameters": [[49, "self-get-parameters"], [55, "self-get-parameters"], [103, "self-get-parameters"], [114, "self-get-parameters"]], "self.get_portfolio_value": [[50, "self-get-portfolio-value"], [56, "self-get-portfolio-value"]], "self.get_position": [[51, "self-get-position"], [57, "self-get-position"]], "self.get_positions": [[52, "self-get-positions"], [58, "self-get-positions"]], "self.set_parameters": [[53, "self-set-parameters"], [59, "self-set-parameters"]], "Chart Functions": [[60, "chart-functions"]], "self.add_line": [[61, "self-add-line"], [65, "self-add-line"]], "self.add_marker": [[62, "self-add-marker"], [66, "self-add-marker"]], "self.get_lines_df": [[63, "self-get-lines-df"], [67, "self-get-lines-df"]], "self.get_markers_df": [[64, "self-get-markers-df"], [68, "self-get-markers-df"]], "self.cancel_realtime_bars": [[70, "self-cancel-realtime-bars"]], "self.get_historical_prices": [[71, "self-get-historical-prices"]], "self.get_historical_prices_for_assets": [[72, "self-get-historical-prices-for-assets"]], "self.get_last_price": [[73, "self-get-last-price"]], "self.get_last_prices": [[74, "self-get-last-prices"]], "self.get_next_trading_day": [[75, "self-get-next-trading-day"], [129, "self-get-next-trading-day"], [137, "self-get-next-trading-day"]], "self.get_quote": [[76, "self-get-quote"]], "self.get_realtime_bars": [[77, "self-get-realtime-bars"]], "self.get_yesterday_dividend": [[78, "self-get-yesterday-dividend"]], "self.get_yesterday_dividends": [[79, "self-get-yesterday-dividends"]], "self.start_realtime_bars": [[80, "self-start-realtime-bars"]], "DateTime": [[81, "datetime"]], "self.get_datetime": [[82, "self-get-datetime"], [91, "self-get-datetime"]], "self.get_datetime_range": [[83, "self-get-datetime-range"], [92, "self-get-datetime-range"]], "self.get_last_day": [[84, "self-get-last-day"], [93, "self-get-last-day"]], "self.get_last_minute": [[85, "self-get-last-minute"], [94, "self-get-last-minute"]], "self.get_round_day": [[86, "self-get-round-day"], [95, "self-get-round-day"]], "self.get_round_minute": [[87, "self-get-round-minute"], [96, "self-get-round-minute"]], "self.get_timestamp": [[88, "self-get-timestamp"], [97, "self-get-timestamp"]], "self.localize_datetime": [[89, "self-localize-datetime"], [98, "self-localize-datetime"]], "self.to_default_timezone": [[90, "self-to-default-timezone"], [99, "self-to-default-timezone"]], "Miscellaneous": [[100, "miscellaneous"]], "self.await_market_to_close": [[101, "self-await-market-to-close"], [112, "self-await-market-to-close"]], "self.await_market_to_open": [[102, "self-await-market-to-open"], [113, "self-await-market-to-open"]], "self.log_message": [[104, "self-log-message"], [115, "self-log-message"]], "self.set_market": [[105, "self-set-market"], [116, "self-set-market"]], "self.sleep": [[106, "self-sleep"], [117, "self-sleep"]], "self.update_parameters": [[107, "self-update-parameters"], [118, "self-update-parameters"]], "self.wait_for_order_execution": [[108, "self-wait-for-order-execution"], [119, "self-wait-for-order-execution"]], "self.wait_for_order_registration": [[109, "self-wait-for-order-registration"], [120, "self-wait-for-order-registration"]], "self.wait_for_orders_execution": [[110, "self-wait-for-orders-execution"], [121, "self-wait-for-orders-execution"]], "self.wait_for_orders_registration": [[111, "self-wait-for-orders-registration"], [122, "self-wait-for-orders-registration"]], "Options": [[123, "options"]], "self.get_chain": [[124, "self-get-chain"], [132, "self-get-chain"]], "self.get_chains": [[125, "self-get-chains"], [133, "self-get-chains"]], "self.get_expiration": [[126, "self-get-expiration"], [134, "self-get-expiration"]], "self.get_greeks": [[127, "self-get-greeks"], [135, "self-get-greeks"]], "self.get_multiplier": [[128, "self-get-multiplier"], [136, "self-get-multiplier"]], "self.get_strikes": [[130, "self-get-strikes"], [139, "self-get-strikes"]], "self.options_expiry_to_datetime_date": [[131, "self-options-expiry-to-datetime-date"], [140, "self-options-expiry-to-datetime-date"]], "self.get_option_expiration_after_date": [[138, "self-get-option-expiration-after-date"]], "Order Management": [[141, "order-management"]], "self.cancel_open_orders": [[142, "self-cancel-open-orders"], [153, "self-cancel-open-orders"]], "self.cancel_order": [[143, "self-cancel-order"], [154, "self-cancel-order"]], "self.cancel_orders": [[144, "self-cancel-orders"], [155, "self-cancel-orders"]], "self.create_order": [[145, "self-create-order"], [156, "self-create-order"]], "self.get_asset_potential_total": [[146, "self-get-asset-potential-total"], [157, "self-get-asset-potential-total"]], "self.get_order": [[147, "self-get-order"], [158, "self-get-order"]], "self.get_orders": [[148, "self-get-orders"], [159, "self-get-orders"]], "self.get_selling_order": [[149, "self-get-selling-order"], [160, "self-get-selling-order"]], "self.sell_all": [[150, "self-sell-all"], [161, "self-sell-all"]], "self.submit_order": [[151, "self-submit-order"], [162, "self-submit-order"]], "self.submit_orders": [[152, "self-submit-orders"], [163, "self-submit-orders"]], "Parameters": [[164, "parameters"]], "Strategy Properties": [[165, "strategy-properties"]], "self.cash": [[166, "self-cash"], [181, "self-cash"]], "self.first_iteration": [[167, "self-first-iteration"], [182, "self-first-iteration"]], "self.initial_budget": [[168, "self-initial-budget"], [183, "self-initial-budget"]], "self.is_backtesting": [[169, "self-is-backtesting"], [184, "self-is-backtesting"]], "self.last_on_trading_iteration_datetime": [[170, "self-last-on-trading-iteration-datetime"], [185, "self-last-on-trading-iteration-datetime"]], "self.minutes_before_closing": [[171, "self-minutes-before-closing"], [186, "self-minutes-before-closing"]], "self.minutes_before_opening": [[172, "self-minutes-before-opening"], [187, "self-minutes-before-opening"]], "self.name": [[173, "self-name"], [188, "self-name"]], "self.portfolio_value": [[174, "self-portfolio-value"], [189, "self-portfolio-value"]], "self.pytz": [[175, "self-pytz"], [180, "self-pytz"], [190, "self-pytz"]], "self.quote_asset": [[176, "self-quote-asset"], [191, "self-quote-asset"]], "self.sleeptime": [[177, "self-sleeptime"], [192, "self-sleeptime"]], "self.timezone": [[178, "self-timezone"], [193, "self-timezone"]], "self.unspent_money": [[179, "self-unspent-money"], [194, "self-unspent-money"]]}, "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"], [18, "module-entities.asset"], [19, "module-entities.bars"], [20, "module-entities.data"], [21, "module-entities.order"], [22, "module-entities.position"], [23, "module-entities.trading_fee"], [42, "module-lumibot.backtesting.backtesting_broker"], [42, "module-lumibot.data_sources.data_source_backtesting"], [43, "module-lumibot.data_sources"], [43, "module-lumibot.data_sources.data_source"], [43, "module-lumibot.data_sources.pandas_data"], [43, "module-lumibot.data_sources.yahoo_data"], [44, "module-lumibot.strategies.strategy.Strategy"], [45, "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)": [[18, "entities.asset.Asset"]], "asset.assettype (class in entities.asset)": [[18, "entities.asset.Asset.AssetType"]], "asset.optionright (class in entities.asset)": [[18, "entities.asset.Asset.OptionRight"]], "assetsmapping (class in entities.asset)": [[18, "entities.asset.AssetsMapping"]], "call (entities.asset.asset.optionright attribute)": [[18, "entities.asset.Asset.OptionRight.CALL"]], "crypto (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.CRYPTO"]], "forex (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.FOREX"]], "future (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.FUTURE"]], "index (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.INDEX"]], "option (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.OPTION"]], "put (entities.asset.asset.optionright attribute)": [[18, "entities.asset.Asset.OptionRight.PUT"]], "stock (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.STOCK"]], "_asset_types (entities.asset.asset attribute)": [[18, "entities.asset.Asset._asset_types"]], "_right (entities.asset.asset attribute)": [[18, "entities.asset.Asset._right"]], "asset_type (entities.asset.asset attribute)": [[18, "entities.asset.Asset.asset_type"], [18, "id0"]], "asset_type_must_be_one_of() (entities.asset.asset method)": [[18, "entities.asset.Asset.asset_type_must_be_one_of"], [18, "id1"]], "entities.asset": [[18, "module-entities.asset"]], "expiration (entities.asset.asset attribute)": [[18, "entities.asset.Asset.expiration"], [18, "id2"]], "from_dict() (entities.asset.asset class method)": [[18, "entities.asset.Asset.from_dict"]], "is_valid() (entities.asset.asset method)": [[18, "entities.asset.Asset.is_valid"]], "multiplier (entities.asset.asset attribute)": [[18, "entities.asset.Asset.multiplier"], [18, "id3"]], "precision (entities.asset.asset attribute)": [[18, "entities.asset.Asset.precision"], [18, "id4"]], "right (entities.asset.asset attribute)": [[18, "entities.asset.Asset.right"], [18, "id5"]], "right_must_be_one_of() (entities.asset.asset method)": [[18, "entities.asset.Asset.right_must_be_one_of"], [18, "id6"]], "strike (entities.asset.asset attribute)": [[18, "entities.asset.Asset.strike"], [18, "id7"]], "symbol (entities.asset.asset attribute)": [[18, "entities.asset.Asset.symbol"], [18, "id8"]], "symbol2asset() (entities.asset.asset class method)": [[18, "entities.asset.Asset.symbol2asset"]], "to_dict() (entities.asset.asset method)": [[18, "entities.asset.Asset.to_dict"]], "underlying_asset (entities.asset.asset attribute)": [[18, "entities.asset.Asset.underlying_asset"]], "bars (class in entities.bars)": [[19, "entities.bars.Bars"]], "nobardatafound": [[19, "entities.bars.NoBarDataFound"]], "aggregate_bars() (entities.bars.bars method)": [[19, "entities.bars.Bars.aggregate_bars"], [19, "id0"]], "entities.bars": [[19, "module-entities.bars"]], "filter() (entities.bars.bars method)": [[19, "entities.bars.Bars.filter"]], "get_last_dividend() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_last_dividend"], [19, "id1"]], "get_last_price() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_last_price"], [19, "id2"]], "get_momentum() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_momentum"], [19, "id3"]], "get_total_dividends() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_dividends"]], "get_total_return() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_return"]], "get_total_return_pct() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_return_pct"]], "get_total_return_pct_change() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_return_pct_change"]], "get_total_stock_splits() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_stock_splits"]], "get_total_volume() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_volume"], [19, "id4"]], "parse_bar_list() (entities.bars.bars class method)": [[19, "entities.bars.Bars.parse_bar_list"]], "split() (entities.bars.bars method)": [[19, "entities.bars.Bars.split"]], "data (class in entities.data)": [[20, "entities.data.Data"]], "min_timestep (entities.data.data attribute)": [[20, "entities.data.Data.MIN_TIMESTEP"]], "timestep_mapping (entities.data.data attribute)": [[20, "entities.data.Data.TIMESTEP_MAPPING"]], "_get_bars_dict() (entities.data.data method)": [[20, "entities.data.Data._get_bars_dict"]], "asset (entities.data.data attribute)": [[20, "entities.data.Data.asset"]], "check_data() (entities.data.data method)": [[20, "entities.data.Data.check_data"], [20, "id0"]], "columns() (entities.data.data method)": [[20, "entities.data.Data.columns"], [20, "id1"]], "datalines (entities.data.data attribute)": [[20, "entities.data.Data.datalines"]], "date_end (entities.data.data attribute)": [[20, "entities.data.Data.date_end"]], "date_start (entities.data.data attribute)": [[20, "entities.data.Data.date_start"]], "df (entities.data.data attribute)": [[20, "entities.data.Data.df"]], "entities.data": [[20, "module-entities.data"]], "get_bars() (entities.data.data method)": [[20, "entities.data.Data.get_bars"], [20, "id2"]], "get_bars_between_dates() (entities.data.data method)": [[20, "entities.data.Data.get_bars_between_dates"]], "get_iter_count() (entities.data.data method)": [[20, "entities.data.Data.get_iter_count"], [20, "id3"]], "get_last_price() (entities.data.data method)": [[20, "entities.data.Data.get_last_price"], [20, "id4"]], "get_quote() (entities.data.data method)": [[20, "entities.data.Data.get_quote"]], "iter_index (entities.data.data attribute)": [[20, "entities.data.Data.iter_index"]], "repair_times_and_fill() (entities.data.data method)": [[20, "entities.data.Data.repair_times_and_fill"], [20, "id5"]], "set_date_format() (entities.data.data method)": [[20, "entities.data.Data.set_date_format"], [20, "id6"]], "set_dates() (entities.data.data method)": [[20, "entities.data.Data.set_dates"], [20, "id7"]], "set_times() (entities.data.data method)": [[20, "entities.data.Data.set_times"], [20, "id8"]], "sybmol (entities.data.data attribute)": [[20, "entities.data.Data.sybmol"]], "timestep (entities.data.data attribute)": [[20, "entities.data.Data.timestep"]], "to_datalines() (entities.data.data method)": [[20, "entities.data.Data.to_datalines"], [20, "id9"]], "trading_hours_end (entities.data.data attribute)": [[20, "entities.data.Data.trading_hours_end"]], "trading_hours_start (entities.data.data attribute)": [[20, "entities.data.Data.trading_hours_start"]], "trim_data() (entities.data.data method)": [[20, "entities.data.Data.trim_data"], [20, "id10"]], "bracket (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.BRACKET"]], "bracket (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.BRACKET"]], "buy (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY"]], "buy_to_close (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY_TO_CLOSE"]], "buy_to_cover (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY_TO_COVER"]], "buy_to_open (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY_TO_OPEN"]], "canceled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.CANCELED"]], "cancelling (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.CANCELLING"]], "cash_settled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.CASH_SETTLED"]], "error (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.ERROR"]], "expired (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.EXPIRED"]], "filled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.FILLED"]], "limit (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.LIMIT"]], "market (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.MARKET"]], "multileg (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.MULTILEG"]], "new (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.NEW"]], "oco (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.OCO"]], "oco (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.OCO"]], "open (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.OPEN"]], "oto (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.OTO"]], "oto (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.OTO"]], "order (class in entities.order)": [[21, "entities.order.Order"]], "order.orderclass (class in entities.order)": [[21, "entities.order.Order.OrderClass"]], "order.orderside (class in entities.order)": [[21, "entities.order.Order.OrderSide"]], "order.orderstatus (class in entities.order)": [[21, "entities.order.Order.OrderStatus"]], "order.ordertype (class in entities.order)": [[21, "entities.order.Order.OrderType"]], "order.transaction (class in entities.order)": [[21, "entities.order.Order.Transaction"]], "partially_filled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.PARTIALLY_FILLED"]], "sell (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL"]], "sell_short (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL_SHORT"]], "sell_to_close (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL_TO_CLOSE"]], "sell_to_open (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL_TO_OPEN"]], "stop (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.STOP"]], "stop_limit (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.STOP_LIMIT"]], "trail (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.TRAIL"]], "unprocessed (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.UNPROCESSED"]], "add_child_order() (entities.order.order method)": [[21, "entities.order.Order.add_child_order"]], "add_transaction() (entities.order.order method)": [[21, "entities.order.Order.add_transaction"]], "avg_fill_price (entities.order.order property)": [[21, "entities.order.Order.avg_fill_price"]], "cash_pending() (entities.order.order method)": [[21, "entities.order.Order.cash_pending"]], "entities.order": [[21, "module-entities.order"]], "equivalent_status() (entities.order.order method)": [[21, "entities.order.Order.equivalent_status"]], "from_dict() (entities.order.order class method)": [[21, "entities.order.Order.from_dict"]], "get_fill_price() (entities.order.order method)": [[21, "entities.order.Order.get_fill_price"]], "get_increment() (entities.order.order method)": [[21, "entities.order.Order.get_increment"]], "is_active() (entities.order.order method)": [[21, "entities.order.Order.is_active"]], "is_buy_order() (entities.order.order method)": [[21, "entities.order.Order.is_buy_order"]], "is_canceled() (entities.order.order method)": [[21, "entities.order.Order.is_canceled"]], "is_filled() (entities.order.order method)": [[21, "entities.order.Order.is_filled"]], "is_option() (entities.order.order method)": [[21, "entities.order.Order.is_option"]], "is_sell_order() (entities.order.order method)": [[21, "entities.order.Order.is_sell_order"]], "price (entities.order.order.transaction attribute)": [[21, "entities.order.Order.Transaction.price"]], "quantity (entities.order.order property)": [[21, "entities.order.Order.quantity"]], "quantity (entities.order.order.transaction attribute)": [[21, "entities.order.Order.Transaction.quantity"]], "set_canceled() (entities.order.order method)": [[21, "entities.order.Order.set_canceled"]], "set_error() (entities.order.order method)": [[21, "entities.order.Order.set_error"]], "set_filled() (entities.order.order method)": [[21, "entities.order.Order.set_filled"]], "set_identifier() (entities.order.order method)": [[21, "entities.order.Order.set_identifier"]], "set_new() (entities.order.order method)": [[21, "entities.order.Order.set_new"]], "set_partially_filled() (entities.order.order method)": [[21, "entities.order.Order.set_partially_filled"]], "status (entities.order.order property)": [[21, "entities.order.Order.status"]], "to_dict() (entities.order.order method)": [[21, "entities.order.Order.to_dict"]], "to_position() (entities.order.order method)": [[21, "entities.order.Order.to_position"]], "update_raw() (entities.order.order method)": [[21, "entities.order.Order.update_raw"]], "update_trail_stop_price() (entities.order.order method)": [[21, "entities.order.Order.update_trail_stop_price"]], "wait_to_be_closed() (entities.order.order method)": [[21, "entities.order.Order.wait_to_be_closed"]], "wait_to_be_registered() (entities.order.order method)": [[21, "entities.order.Order.wait_to_be_registered"]], "was_transmitted() (entities.order.order method)": [[21, "entities.order.Order.was_transmitted"]], "position (class in entities.position)": [[22, "entities.position.Position"]], "add_order() (entities.position.position method)": [[22, "entities.position.Position.add_order"]], "asset (entities.position.position attribute)": [[22, "entities.position.Position.asset"]], "available (entities.position.position attribute)": [[22, "entities.position.Position.available"]], "available (entities.position.position property)": [[22, "id0"]], "avg_fill_price (entities.position.position attribute)": [[22, "entities.position.Position.avg_fill_price"]], "entities.position": [[22, "module-entities.position"]], "from_dict() (entities.position.position class method)": [[22, "entities.position.Position.from_dict"]], "get_selling_order() (entities.position.position method)": [[22, "entities.position.Position.get_selling_order"]], "hold (entities.position.position attribute)": [[22, "entities.position.Position.hold"]], "hold (entities.position.position property)": [[22, "id1"]], "orders (entities.position.position attribute)": [[22, "entities.position.Position.orders"]], "quantity (entities.position.position attribute)": [[22, "entities.position.Position.quantity"]], "quantity (entities.position.position property)": [[22, "id2"]], "strategy (entities.position.position attribute)": [[22, "entities.position.Position.strategy"]], "symbol (entities.position.position attribute)": [[22, "entities.position.Position.symbol"]], "to_dict() (entities.position.position method)": [[22, "entities.position.Position.to_dict"]], "value_type() (entities.position.position method)": [[22, "entities.position.Position.value_type"]], "tradingfee (class in entities.trading_fee)": [[23, "entities.trading_fee.TradingFee"]], "entities.trading_fee": [[23, "module-entities.trading_fee"]], "after_market_closes() (in module lumibot.strategies.strategy.strategy)": [[27, "lumibot.strategies.strategy.Strategy.after_market_closes"]], "before_market_closes() (in module lumibot.strategies.strategy.strategy)": [[28, "lumibot.strategies.strategy.Strategy.before_market_closes"]], "before_market_opens() (in module lumibot.strategies.strategy.strategy)": [[29, "lumibot.strategies.strategy.Strategy.before_market_opens"]], "before_starting_trading() (in module lumibot.strategies.strategy.strategy)": [[30, "lumibot.strategies.strategy.Strategy.before_starting_trading"]], "initialize() (in module lumibot.strategies.strategy.strategy)": [[31, "lumibot.strategies.strategy.Strategy.initialize"]], "on_abrupt_closing() (in module lumibot.strategies.strategy.strategy)": [[32, "lumibot.strategies.strategy.Strategy.on_abrupt_closing"]], "on_bot_crash() (in module lumibot.strategies.strategy.strategy)": [[33, "lumibot.strategies.strategy.Strategy.on_bot_crash"]], "on_canceled_order() (in module lumibot.strategies.strategy.strategy)": [[34, "lumibot.strategies.strategy.Strategy.on_canceled_order"]], "on_filled_order() (in module lumibot.strategies.strategy.strategy)": [[35, "lumibot.strategies.strategy.Strategy.on_filled_order"]], "on_new_order() (in module lumibot.strategies.strategy.strategy)": [[36, "lumibot.strategies.strategy.Strategy.on_new_order"]], "on_parameters_updated() (in module lumibot.strategies.strategy.strategy)": [[37, "lumibot.strategies.strategy.Strategy.on_parameters_updated"]], "on_partially_filled_order() (in module lumibot.strategies.strategy.strategy)": [[38, "lumibot.strategies.strategy.Strategy.on_partially_filled_order"]], "on_trading_iteration() (in module lumibot.strategies.strategy.strategy)": [[39, "lumibot.strategies.strategy.Strategy.on_trading_iteration"]], "trace_stats() (in module lumibot.strategies.strategy.strategy)": [[41, "lumibot.strategies.strategy.Strategy.trace_stats"]], "backtestingbroker (class in lumibot.backtesting.backtesting_broker)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker"]], "datasourcebacktesting (class in lumibot.data_sources.data_source_backtesting)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting"]], "is_backtesting_broker (lumibot.backtesting.backtesting_broker.backtestingbroker attribute)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.IS_BACKTESTING_BROKER"]], "is_backtesting_data_source (lumibot.data_sources.data_source_backtesting.datasourcebacktesting attribute)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.IS_BACKTESTING_DATA_SOURCE"]], "calculate_trade_cost() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.calculate_trade_cost"]], "cancel_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cancel_order"]], "cash_settle_options_contract() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cash_settle_options_contract"]], "datetime (lumibot.backtesting.backtesting_broker.backtestingbroker property)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.datetime"]], "get_datetime() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime_range"]], "get_historical_account_value() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_historical_account_value"]], "get_last_bar() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_last_bar"]], "get_time_to_close() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_close"]], "get_time_to_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_open"]], "is_market_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.is_market_open"]], "limit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.limit_order"]], "lumibot.backtesting.backtesting_broker": [[42, "module-lumibot.backtesting.backtesting_broker"]], "lumibot.data_sources.data_source_backtesting": [[42, "module-lumibot.data_sources.data_source_backtesting"]], "process_expired_option_contracts() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_expired_option_contracts"]], "process_pending_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_pending_orders"]], "should_continue() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.should_continue"]], "stop_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.stop_order"]], "submit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_order"]], "submit_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_orders"]], "default_pytz (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.DEFAULT_PYTZ"]], "default_timezone (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.DEFAULT_TIMEZONE"]], "datasource (class in lumibot.data_sources.data_source)": [[43, "lumibot.data_sources.data_source.DataSource"]], "is_backtesting_data_source (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.IS_BACKTESTING_DATA_SOURCE"]], "min_timestep (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.MIN_TIMESTEP"]], "min_timestep (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[43, "lumibot.data_sources.yahoo_data.YahooData.MIN_TIMESTEP"]], "pandasdata (class in lumibot.data_sources.pandas_data)": [[43, "lumibot.data_sources.pandas_data.PandasData"]], "source (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.SOURCE"]], "source (lumibot.data_sources.pandas_data.pandasdata attribute)": [[43, "lumibot.data_sources.pandas_data.PandasData.SOURCE"]], "source (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[43, "lumibot.data_sources.yahoo_data.YahooData.SOURCE"]], "timestep_mapping (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.pandas_data.pandasdata attribute)": [[43, "lumibot.data_sources.pandas_data.PandasData.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[43, "lumibot.data_sources.yahoo_data.YahooData.TIMESTEP_MAPPING"]], "yahoodata (class in lumibot.data_sources.yahoo_data)": [[43, "lumibot.data_sources.yahoo_data.YahooData"]], "calculate_greeks() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.calculate_greeks"]], "clean_trading_times() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.clean_trading_times"]], "convert_timestep_str_to_timedelta() (lumibot.data_sources.data_source.datasource static method)": [[43, "lumibot.data_sources.data_source.DataSource.convert_timestep_str_to_timedelta"]], "find_asset_in_data_store() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.find_asset_in_data_store"]], "get_asset_by_name() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_name"]], "get_asset_by_symbol() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_symbol"]], "get_assets() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_assets"]], "get_bars() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_bars"]], "get_chains() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_chains"]], "get_chains() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_chains"]], "get_chains() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_chains"]], "get_datetime() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_datetime_range"]], "get_historical_prices() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_historical_prices"]], "get_last_day() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_day"]], "get_last_minute() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_minute"]], "get_last_price() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_price"]], "get_last_price() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_last_price"]], "get_last_price() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_last_price"]], "get_last_prices() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_prices"]], "get_last_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_last_prices"]], "get_round_day() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_round_day"]], "get_round_minute() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_round_minute"]], "get_start_datetime_and_ts_unit() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_start_datetime_and_ts_unit"]], "get_strikes() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_strikes"]], "get_strikes() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_strikes"]], "get_timestamp() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_timestamp"]], "get_timestep() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_timestep"]], "get_trading_days_pandas() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_trading_days_pandas"]], "get_yesterday_dividend() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividend"]], "get_yesterday_dividend() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividend"]], "get_yesterday_dividends() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividends"]], "get_yesterday_dividends() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividends"]], "load_data() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.load_data"]], "localize_datetime() (lumibot.data_sources.data_source.datasource class method)": [[43, "lumibot.data_sources.data_source.DataSource.localize_datetime"]], "lumibot.data_sources": [[43, "module-lumibot.data_sources"]], "lumibot.data_sources.data_source": [[43, "module-lumibot.data_sources.data_source"]], "lumibot.data_sources.pandas_data": [[43, "module-lumibot.data_sources.pandas_data"]], "lumibot.data_sources.yahoo_data": [[43, "module-lumibot.data_sources.yahoo_data"]], "query_greeks() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.query_greeks"]], "to_default_timezone() (lumibot.data_sources.data_source.datasource class method)": [[43, "lumibot.data_sources.data_source.DataSource.to_default_timezone"]], "update_date_index() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.update_date_index"]], "lumibot.strategies.strategy.strategy": [[44, "module-lumibot.strategies.strategy.Strategy"]], "trader (class in lumibot.traders.trader)": [[45, "lumibot.traders.trader.Trader"]], "add_strategy() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.add_strategy"]], "is_backtest_broker (lumibot.traders.trader.trader property)": [[45, "lumibot.traders.trader.Trader.is_backtest_broker"]], "lumibot.traders.trader": [[45, "module-lumibot.traders.trader"]], "run_all() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.run_all"]], "run_all_async() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.run_all_async"]], "stop_all() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.stop_all"]], "get_cash() (in module lumibot.strategies.strategy.strategy)": [[48, "lumibot.strategies.strategy.Strategy.get_cash"], [54, "lumibot.strategies.strategy.Strategy.get_cash"]], "get_parameters() (in module lumibot.strategies.strategy.strategy)": [[49, "lumibot.strategies.strategy.Strategy.get_parameters"], [55, "lumibot.strategies.strategy.Strategy.get_parameters"], [103, "lumibot.strategies.strategy.Strategy.get_parameters"], [114, "lumibot.strategies.strategy.Strategy.get_parameters"]], "get_portfolio_value() (in module lumibot.strategies.strategy.strategy)": [[50, "lumibot.strategies.strategy.Strategy.get_portfolio_value"], [56, "lumibot.strategies.strategy.Strategy.get_portfolio_value"]], "get_position() (in module lumibot.strategies.strategy.strategy)": [[51, "lumibot.strategies.strategy.Strategy.get_position"], [57, "lumibot.strategies.strategy.Strategy.get_position"]], "get_positions() (in module lumibot.strategies.strategy.strategy)": [[52, "lumibot.strategies.strategy.Strategy.get_positions"], [58, "lumibot.strategies.strategy.Strategy.get_positions"]], "set_parameters() (in module lumibot.strategies.strategy.strategy)": [[53, "lumibot.strategies.strategy.Strategy.set_parameters"], [59, "lumibot.strategies.strategy.Strategy.set_parameters"]], "add_line() (in module lumibot.strategies.strategy.strategy)": [[61, "lumibot.strategies.strategy.Strategy.add_line"], [65, "lumibot.strategies.strategy.Strategy.add_line"]], "add_marker() (in module lumibot.strategies.strategy.strategy)": [[62, "lumibot.strategies.strategy.Strategy.add_marker"], [66, "lumibot.strategies.strategy.Strategy.add_marker"]], "get_lines_df() (in module lumibot.strategies.strategy.strategy)": [[63, "lumibot.strategies.strategy.Strategy.get_lines_df"], [67, "lumibot.strategies.strategy.Strategy.get_lines_df"]], "get_markers_df() (in module lumibot.strategies.strategy.strategy)": [[64, "lumibot.strategies.strategy.Strategy.get_markers_df"], [68, "lumibot.strategies.strategy.Strategy.get_markers_df"]], "cancel_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[70, "lumibot.strategies.strategy.Strategy.cancel_realtime_bars"]], "get_historical_prices() (in module lumibot.strategies.strategy.strategy)": [[71, "lumibot.strategies.strategy.Strategy.get_historical_prices"]], "get_historical_prices_for_assets() (in module lumibot.strategies.strategy.strategy)": [[72, "lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets"]], "get_last_price() (in module lumibot.strategies.strategy.strategy)": [[73, "lumibot.strategies.strategy.Strategy.get_last_price"]], "get_last_prices() (in module lumibot.strategies.strategy.strategy)": [[74, "lumibot.strategies.strategy.Strategy.get_last_prices"]], "get_next_trading_day() (in module lumibot.strategies.strategy.strategy)": [[75, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [129, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [137, "lumibot.strategies.strategy.Strategy.get_next_trading_day"]], "get_quote() (in module lumibot.strategies.strategy.strategy)": [[76, "lumibot.strategies.strategy.Strategy.get_quote"]], "get_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[77, "lumibot.strategies.strategy.Strategy.get_realtime_bars"]], "get_yesterday_dividend() (in module lumibot.strategies.strategy.strategy)": [[78, "lumibot.strategies.strategy.Strategy.get_yesterday_dividend"]], "get_yesterday_dividends() (in module lumibot.strategies.strategy.strategy)": [[79, "lumibot.strategies.strategy.Strategy.get_yesterday_dividends"]], "start_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[80, "lumibot.strategies.strategy.Strategy.start_realtime_bars"]], "get_datetime() (in module lumibot.strategies.strategy.strategy)": [[82, "lumibot.strategies.strategy.Strategy.get_datetime"], [91, "lumibot.strategies.strategy.Strategy.get_datetime"]], "get_datetime_range() (in module lumibot.strategies.strategy.strategy)": [[83, "lumibot.strategies.strategy.Strategy.get_datetime_range"], [92, "lumibot.strategies.strategy.Strategy.get_datetime_range"]], "get_last_day() (in module lumibot.strategies.strategy.strategy)": [[84, "lumibot.strategies.strategy.Strategy.get_last_day"], [93, "lumibot.strategies.strategy.Strategy.get_last_day"]], "get_last_minute() (in module lumibot.strategies.strategy.strategy)": [[85, "lumibot.strategies.strategy.Strategy.get_last_minute"], [94, "lumibot.strategies.strategy.Strategy.get_last_minute"]], "get_round_day() (in module lumibot.strategies.strategy.strategy)": [[86, "lumibot.strategies.strategy.Strategy.get_round_day"], [95, "lumibot.strategies.strategy.Strategy.get_round_day"]], "get_round_minute() (in module lumibot.strategies.strategy.strategy)": [[87, "lumibot.strategies.strategy.Strategy.get_round_minute"], [96, "lumibot.strategies.strategy.Strategy.get_round_minute"]], "get_timestamp() (in module lumibot.strategies.strategy.strategy)": [[88, "lumibot.strategies.strategy.Strategy.get_timestamp"], [97, "lumibot.strategies.strategy.Strategy.get_timestamp"]], "localize_datetime() (in module lumibot.strategies.strategy.strategy)": [[89, "lumibot.strategies.strategy.Strategy.localize_datetime"], [98, "lumibot.strategies.strategy.Strategy.localize_datetime"]], "to_default_timezone() (in module lumibot.strategies.strategy.strategy)": [[90, "lumibot.strategies.strategy.Strategy.to_default_timezone"], [99, "lumibot.strategies.strategy.Strategy.to_default_timezone"]], "await_market_to_close() (in module lumibot.strategies.strategy.strategy)": [[101, "lumibot.strategies.strategy.Strategy.await_market_to_close"], [112, "lumibot.strategies.strategy.Strategy.await_market_to_close"]], "await_market_to_open() (in module lumibot.strategies.strategy.strategy)": [[102, "lumibot.strategies.strategy.Strategy.await_market_to_open"], [113, "lumibot.strategies.strategy.Strategy.await_market_to_open"]], "log_message() (in module lumibot.strategies.strategy.strategy)": [[104, "lumibot.strategies.strategy.Strategy.log_message"], [115, "lumibot.strategies.strategy.Strategy.log_message"]], "set_market() (in module lumibot.strategies.strategy.strategy)": [[105, "lumibot.strategies.strategy.Strategy.set_market"], [116, "lumibot.strategies.strategy.Strategy.set_market"]], "sleep() (in module lumibot.strategies.strategy.strategy)": [[106, "lumibot.strategies.strategy.Strategy.sleep"], [117, "lumibot.strategies.strategy.Strategy.sleep"]], "update_parameters() (in module lumibot.strategies.strategy.strategy)": [[107, "lumibot.strategies.strategy.Strategy.update_parameters"], [118, "lumibot.strategies.strategy.Strategy.update_parameters"]], "wait_for_order_execution() (in module lumibot.strategies.strategy.strategy)": [[108, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"], [119, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"]], "wait_for_order_registration() (in module lumibot.strategies.strategy.strategy)": [[109, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"], [120, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"]], "wait_for_orders_execution() (in module lumibot.strategies.strategy.strategy)": [[110, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"], [121, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"]], "wait_for_orders_registration() (in module lumibot.strategies.strategy.strategy)": [[111, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"], [122, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"]], "get_chain() (in module lumibot.strategies.strategy.strategy)": [[124, "lumibot.strategies.strategy.Strategy.get_chain"], [132, "lumibot.strategies.strategy.Strategy.get_chain"]], "get_chains() (in module lumibot.strategies.strategy.strategy)": [[125, "lumibot.strategies.strategy.Strategy.get_chains"], [133, "lumibot.strategies.strategy.Strategy.get_chains"]], "get_expiration() (in module lumibot.strategies.strategy.strategy)": [[126, "lumibot.strategies.strategy.Strategy.get_expiration"], [134, "lumibot.strategies.strategy.Strategy.get_expiration"]], "get_greeks() (in module lumibot.strategies.strategy.strategy)": [[127, "lumibot.strategies.strategy.Strategy.get_greeks"], [135, "lumibot.strategies.strategy.Strategy.get_greeks"]], "get_multiplier() (in module lumibot.strategies.strategy.strategy)": [[128, "lumibot.strategies.strategy.Strategy.get_multiplier"], [136, "lumibot.strategies.strategy.Strategy.get_multiplier"]], "get_strikes() (in module lumibot.strategies.strategy.strategy)": [[130, "lumibot.strategies.strategy.Strategy.get_strikes"], [139, "lumibot.strategies.strategy.Strategy.get_strikes"]], "options_expiry_to_datetime_date() (in module lumibot.strategies.strategy.strategy)": [[131, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"], [140, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"]], "get_option_expiration_after_date() (in module lumibot.strategies.strategy.strategy)": [[138, "lumibot.strategies.strategy.Strategy.get_option_expiration_after_date"]], "cancel_open_orders() (in module lumibot.strategies.strategy.strategy)": [[142, "lumibot.strategies.strategy.Strategy.cancel_open_orders"], [153, "lumibot.strategies.strategy.Strategy.cancel_open_orders"]], "cancel_order() (in module lumibot.strategies.strategy.strategy)": [[143, "lumibot.strategies.strategy.Strategy.cancel_order"], [154, "lumibot.strategies.strategy.Strategy.cancel_order"]], "cancel_orders() (in module lumibot.strategies.strategy.strategy)": [[144, "lumibot.strategies.strategy.Strategy.cancel_orders"], [155, "lumibot.strategies.strategy.Strategy.cancel_orders"]], "create_order() (in module lumibot.strategies.strategy.strategy)": [[145, "lumibot.strategies.strategy.Strategy.create_order"], [156, "lumibot.strategies.strategy.Strategy.create_order"]], "get_asset_potential_total() (in module lumibot.strategies.strategy.strategy)": [[146, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"], [157, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"]], "get_order() (in module lumibot.strategies.strategy.strategy)": [[147, "lumibot.strategies.strategy.Strategy.get_order"], [158, "lumibot.strategies.strategy.Strategy.get_order"]], "get_orders() (in module lumibot.strategies.strategy.strategy)": [[148, "lumibot.strategies.strategy.Strategy.get_orders"], [159, "lumibot.strategies.strategy.Strategy.get_orders"]], "get_selling_order() (in module lumibot.strategies.strategy.strategy)": [[149, "lumibot.strategies.strategy.Strategy.get_selling_order"], [160, "lumibot.strategies.strategy.Strategy.get_selling_order"]], "sell_all() (in module lumibot.strategies.strategy.strategy)": [[150, "lumibot.strategies.strategy.Strategy.sell_all"], [161, "lumibot.strategies.strategy.Strategy.sell_all"]], "submit_order() (in module lumibot.strategies.strategy.strategy)": [[151, "lumibot.strategies.strategy.Strategy.submit_order"], [162, "lumibot.strategies.strategy.Strategy.submit_order"]], "submit_orders() (in module lumibot.strategies.strategy.strategy)": [[152, "lumibot.strategies.strategy.Strategy.submit_orders"], [163, "lumibot.strategies.strategy.Strategy.submit_orders"]], "cash (lumibot.strategies.strategy.strategy property)": [[166, "lumibot.strategies.strategy.Strategy.cash"], [181, "lumibot.strategies.strategy.Strategy.cash"]], "first_iteration (lumibot.strategies.strategy.strategy property)": [[167, "lumibot.strategies.strategy.Strategy.first_iteration"], [182, "lumibot.strategies.strategy.Strategy.first_iteration"]], "initial_budget (lumibot.strategies.strategy.strategy property)": [[168, "lumibot.strategies.strategy.Strategy.initial_budget"], [183, "lumibot.strategies.strategy.Strategy.initial_budget"]], "is_backtesting (lumibot.strategies.strategy.strategy property)": [[169, "lumibot.strategies.strategy.Strategy.is_backtesting"], [184, "lumibot.strategies.strategy.Strategy.is_backtesting"]], "last_on_trading_iteration_datetime (lumibot.strategies.strategy.strategy property)": [[170, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"], [185, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"]], "minutes_before_closing (lumibot.strategies.strategy.strategy property)": [[171, "lumibot.strategies.strategy.Strategy.minutes_before_closing"], [186, "lumibot.strategies.strategy.Strategy.minutes_before_closing"]], "minutes_before_opening (lumibot.strategies.strategy.strategy property)": [[172, "lumibot.strategies.strategy.Strategy.minutes_before_opening"], [187, "lumibot.strategies.strategy.Strategy.minutes_before_opening"]], "name (lumibot.strategies.strategy.strategy property)": [[173, "lumibot.strategies.strategy.Strategy.name"], [188, "lumibot.strategies.strategy.Strategy.name"]], "portfolio_value (lumibot.strategies.strategy.strategy property)": [[174, "lumibot.strategies.strategy.Strategy.portfolio_value"], [189, "lumibot.strategies.strategy.Strategy.portfolio_value"]], "pytz (lumibot.strategies.strategy.strategy property)": [[175, "lumibot.strategies.strategy.Strategy.pytz"], [180, "lumibot.strategies.strategy.Strategy.pytz"], [190, "lumibot.strategies.strategy.Strategy.pytz"]], "quote_asset (lumibot.strategies.strategy.strategy property)": [[176, "lumibot.strategies.strategy.Strategy.quote_asset"], [191, "lumibot.strategies.strategy.Strategy.quote_asset"]], "sleeptime (lumibot.strategies.strategy.strategy property)": [[177, "lumibot.strategies.strategy.Strategy.sleeptime"], [192, "lumibot.strategies.strategy.Strategy.sleeptime"]], "timezone (lumibot.strategies.strategy.strategy property)": [[178, "lumibot.strategies.strategy.Strategy.timezone"], [193, "lumibot.strategies.strategy.Strategy.timezone"]], "unspent_money (lumibot.strategies.strategy.strategy property)": [[179, "lumibot.strategies.strategy.Strategy.unspent_money"], [194, "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.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"], "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.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"], "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", "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"], "terms": {"lumibot": [0, 1, 5, 6, 8, 10, 11, 12, 13, 14, 15, 17, 18, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164], "ha": [0, 7, 19, 21, 25, 34, 35, 36, 38, 44, 70, 73, 77], "three": [0, 14, 19, 21], "mode": [0, 14, 16, 42, 169, 184], "yahoo": [0, 1, 2, 5, 19, 25, 71, 72, 105, 116], "daili": [0, 2, 5, 7, 10, 30, 71, 72], "stock": [0, 1, 2, 5, 6, 8, 9, 10, 12, 16, 18, 19, 20, 21, 22, 25, 31, 43, 105, 116, 125, 133, 145, 151, 156, 162], "data": [0, 1, 3, 6, 8, 10, 13, 17, 18, 19, 22, 25, 29, 30, 39, 44, 46, 61, 65, 70, 71, 72, 77, 80, 82, 88, 89, 90, 91, 97, 98, 99, 175, 178, 180, 190, 193], "from": [1, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 22, 24, 25, 40, 41, 43, 44, 71, 72, 75, 79, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 139, 145, 151, 152, 156, 162, 163], "panda": [0, 2, 10, 19, 20, 25, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 77, 105, 116], "intra": [0, 5, 10], "dai": [0, 1, 2, 5, 6, 8, 10, 16, 20, 21, 25, 29, 30, 31, 39, 43, 71, 72, 75, 78, 79, 83, 84, 85, 86, 92, 93, 94, 95, 129, 137, 145, 152, 156, 163, 177, 192], "inter": [0, 5], "test": [0, 2, 14, 16], "futur": [0, 5, 12, 16, 18, 19, 25, 42, 43, 73, 145, 146, 151, 156, 157, 162, 179, 194], "us": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 54, 60, 61, 62, 65, 66, 69, 71, 72, 75, 81, 100, 104, 106, 115, 117, 126, 127, 128, 129, 130, 134, 135, 136, 137, 139, 141, 145, 156, 164, 165, 166, 176, 177, 179, 181, 191, 192, 194], "csv": [0, 2, 3, 9, 20, 25, 43], "suppli": [0, 10, 20], "you": [0, 1, 2, 5, 6, 8, 10, 11, 12, 13, 14, 15, 16, 19, 21, 24, 25, 28, 31, 43, 46, 47, 48, 50, 54, 56, 60, 61, 65, 69, 71, 72, 81, 100, 123, 141, 145, 156, 164, 165, 177, 192], "polygon": [0, 1, 5, 8, 10, 16, 25], "io": [0, 13, 14, 19, 25], "It": [0, 4, 5, 6, 7, 8, 13, 14, 16, 18, 21, 22, 24, 25, 40, 42, 43, 73, 76, 145, 156], "i": [0, 1, 2, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 25, 27, 28, 29, 31, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 45, 46, 48, 50, 51, 54, 56, 57, 61, 62, 65, 66, 71, 72, 73, 74, 75, 76, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 101, 102, 105, 112, 113, 116, 124, 125, 126, 128, 129, 131, 132, 133, 134, 136, 137, 140, 145, 146, 148, 150, 152, 156, 157, 159, 161, 163, 165, 166, 167, 169, 171, 172, 176, 177, 181, 182, 184, 186, 187, 191, 192], "recommend": [0, 14, 16, 24], "option": [0, 2, 6, 8, 9, 12, 15, 16, 18, 19, 21, 25, 31, 35, 38, 40, 42, 43, 46, 71, 73, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 145, 151, 156, 162], "crypto": [0, 1, 5, 7, 11, 16, 18, 19, 22, 25, 48, 50, 54, 56, 71, 73, 105, 116, 145, 151, 152, 156, 162, 163, 166, 174, 181, 189], "forex": [0, 2, 5, 6, 8, 12, 16, 18, 25, 43, 72, 73, 145, 151, 152, 156, 162, 163], "an": [0, 1, 2, 5, 6, 7, 8, 12, 13, 14, 15, 16, 18, 21, 22, 25, 33, 34, 35, 38, 39, 40, 42, 43, 51, 57, 71, 73, 74, 80, 101, 102, 104, 112, 113, 115, 125, 126, 130, 131, 133, 134, 139, 140, 143, 145, 146, 147, 151, 154, 156, 157, 158, 162, 164, 177, 192], "advanc": [0, 2, 5, 24, 25, 145, 156], "featur": [0, 2, 6, 8, 25], "allow": [0, 2, 4, 5, 6, 8, 16, 19, 21, 24, 25, 80, 145, 156, 164], "ani": [0, 1, 2, 5, 6, 7, 8, 10, 13, 14, 16, 20, 24, 40, 42, 61, 65, 71, 72, 104, 115, 144, 155, 164], "type": [0, 1, 2, 5, 12, 17, 18, 19, 20, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 63, 64, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 128, 129, 130, 131, 132, 133, 134, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193], "have": [0, 1, 2, 5, 6, 8, 10, 15, 16, 19, 21, 22, 24, 25, 27, 42, 46, 48, 50, 54, 56, 71, 77], "format": [0, 5, 18, 20, 43, 75, 124, 125, 129, 131, 132, 133, 137, 140], "requir": [0, 1, 2, 10, 13, 14, 16, 18, 21, 73, 74, 145, 152, 156, 163], "more": [0, 2, 3, 11, 13, 15, 16, 17, 19, 24, 25, 42, 43, 46, 69, 71, 100, 123, 127, 135, 141], "work": [0, 2, 5, 11, 14, 16, 24, 25, 71, 72, 76, 165], "setup": [0, 2], "most": [0, 5, 7, 16, 19, 24, 40, 71, 77, 127, 135], "user": [0, 2, 5, 10, 16, 20, 24, 26, 40, 44, 45, 143, 145, 154, 156], "all": [1, 4, 5, 13, 16, 19, 20, 24, 29, 32, 33, 42, 44, 45, 50, 52, 56, 58, 71, 72, 124, 126, 127, 128, 130, 132, 134, 135, 136, 139, 142, 144, 145, 148, 149, 150, 153, 155, 156, 159, 160, 161, 164], "other": [0, 2, 6, 8, 10, 13, 16, 19, 21, 24, 25, 40, 61, 65, 76, 100, 145, 156, 166, 181], "In": [0, 6, 8, 13, 16, 21, 42, 73, 74, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97], "summari": [0, 6, 8, 25, 26], "here": [1, 2, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 24, 25, 40, 164, 165], "descript": [1, 16], "function": [0, 2, 3, 13, 16, 20, 25, 31, 37, 40, 46, 47, 81, 141], "its": [1, 6, 8, 21, 41], "paramet": [1, 2, 6, 8, 12, 18, 19, 20, 21, 22, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 83, 86, 87, 89, 90, 92, 95, 96, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 149, 150, 151, 152, 153, 154, 155, 156, 157, 160, 161, 162, 163, 171, 186], "thi": [1, 2, 5, 6, 8, 9, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 48, 50, 54, 56, 61, 62, 65, 66, 71, 72, 73, 74, 76, 80, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 106, 117, 145, 152, 156, 163, 166, 167, 176, 177, 181, 182, 191, 192], "true": [1, 5, 12, 13, 15, 16, 21, 23, 24, 25, 31, 42, 43, 45, 71, 72, 73, 104, 115, 150, 161, 167, 169, 182, 184], "kind": [1, 24], "do": [1, 5, 10, 13, 15, 19, 24, 25, 37, 46, 100, 145, 156], "strategi": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 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, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 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], "arg": [1, 20, 43], "minutes_before_clos": [1, 25, 28, 31, 39, 101, 112], "1": [1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 30, 43, 71, 72, 83, 89, 90, 92, 98, 99, 127, 135, 138, 145, 151, 152, 156, 162, 163, 177, 192], "minutes_before_open": [1, 25, 29, 102, 113], "60": [1, 19, 172, 187], "sleeptim": [1, 2, 6, 8, 13, 24, 25, 31, 39, 106, 117], "stats_fil": [1, 31], "none": [1, 12, 13, 16, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 42, 43, 45, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 65, 66, 70, 71, 72, 73, 74, 80, 83, 92, 101, 102, 104, 105, 106, 107, 112, 113, 115, 116, 117, 118, 127, 130, 135, 139, 142, 143, 144, 145, 147, 149, 150, 153, 154, 155, 156, 158, 160, 161], "risk_free_r": [1, 43, 127, 135], "logfil": [1, 45], "config": [1, 12, 13, 15, 16, 24, 42], "auto_adjust": [1, 43], "fals": [1, 12, 13, 15, 16, 21, 24, 25, 31, 42, 43, 45, 72, 73, 82, 91, 104, 115, 127, 135, 145, 150, 156, 161], "name": [0, 1, 5, 10, 16, 18, 20, 24, 25, 31, 43, 45, 61, 62, 65, 66, 73, 104, 115, 164], "budget": [1, 5, 10, 16, 24, 31, 168, 183], "benchmark_asset": [1, 2, 6, 8, 24], "spy": [1, 2, 5, 6, 8, 18, 21, 24, 29, 30, 31, 35, 39, 43, 70, 71, 72, 73, 74, 78, 79, 108, 109, 110, 111, 119, 120, 121, 122, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 139, 143, 145, 149, 151, 152, 154, 156, 160, 162, 163, 164], "plot_file_html": 1, "trades_fil": 1, "settings_fil": 1, "pandas_data": [1, 5, 24, 42, 43], "quote_asset": [1, 13, 18, 22, 25, 151, 152, 162, 163], "usd": [1, 18, 20, 71, 72, 73, 145, 151, 152, 156, 162, 163], "starting_posit": 1, "show_plot": [1, 45], "tearsheet_fil": 1, "save_tearsheet": [1, 45], "show_tearsheet": [1, 45], "buy_trading_fe": [1, 24], "sell_trading_fe": [1, 24], "api_kei": [1, 12, 24, 25, 42, 43], "polygon_api_kei": [1, 2, 16], "polygon_has_paid_subscript": 1, "indicators_fil": 1, "show_ind": [1, 45], "save_logfil": 1, "kwarg": [1, 12, 18, 20, 42, 43, 152, 163], "datasource_class": 1, "class": [1, 2, 5, 6, 8, 10, 12, 13, 15, 16, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 164], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 18, 19, 20, 21, 22, 26, 27, 33, 34, 35, 36, 37, 38, 40, 42, 43, 44, 48, 49, 50, 53, 54, 55, 56, 59, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 103, 105, 107, 114, 116, 118, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 145, 146, 149, 150, 152, 156, 157, 160, 161, 163, 164, 166, 168, 170, 171, 172, 173, 174, 175, 176, 178, 180, 181, 183, 185, 186, 187, 188, 189, 190, 191, 193], "datasourc": [1, 8, 42, 43], "For": [1, 2, 3, 5, 7, 10, 13, 16, 18, 19, 21, 25, 27, 43, 48, 50, 54, 56, 108, 109, 110, 111, 119, 120, 121, 122, 145, 151, 152, 156, 162, 163, 164], "exampl": [1, 2, 6, 8, 11, 12, 14, 18, 19, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 51, 52, 57, 58, 61, 62, 65, 66, 70, 71, 72, 73, 74, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 115, 116, 117, 119, 120, 121, 122, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193], "want": [1, 2, 5, 8, 10, 12, 13, 15, 16, 24, 25, 40, 43, 61, 65], "financ": [1, 2, 10, 25], "would": [1, 2, 5, 15, 18, 24, 25, 43, 50, 56, 145, 156, 177, 192], "pass": [1, 2, 5, 8, 10, 17, 27, 35, 39, 40, 44, 101, 102, 112, 113, 127, 135, 145, 156], "yahoodatabacktest": [1, 10, 24, 25, 31], "backtesting_start": [1, 2, 5, 6, 8, 10, 24, 25, 31, 42], "datetim": [1, 2, 5, 6, 8, 10, 13, 18, 19, 20, 24, 25, 31, 42, 43, 46, 61, 62, 65, 66, 71, 75, 77, 80, 82, 83, 89, 90, 91, 92, 98, 99, 126, 129, 131, 134, 137, 138, 140, 145, 156, 170, 185], "start": [1, 2, 5, 6, 7, 8, 10, 11, 13, 16, 19, 20, 29, 31, 43, 71, 72, 77, 80, 101, 112, 172, 187], "date": [0, 1, 2, 5, 6, 8, 10, 18, 20, 25, 31, 43, 73, 75, 81, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 140, 145, 156], "period": [1, 2, 5, 7, 13, 20, 80], "backtesting_end": [1, 2, 5, 6, 8, 10, 24, 25, 31], "end": [1, 2, 6, 7, 8, 10, 19, 20, 25, 41], "int": [1, 12, 18, 20, 21, 35, 38, 43, 61, 62, 65, 66, 71, 72, 80, 83, 84, 85, 86, 87, 88, 92, 93, 94, 95, 96, 97, 101, 102, 112, 113, 145, 146, 156, 157, 171, 172, 177, 186, 187, 192], "number": [1, 12, 14, 15, 16, 20, 21, 28, 31, 43, 71, 72, 83, 86, 87, 92, 95, 96, 145, 156, 171, 172, 177, 186, 187, 192], "minut": [1, 5, 13, 16, 19, 20, 24, 25, 28, 29, 31, 39, 42, 43, 71, 72, 83, 85, 87, 92, 94, 96, 101, 102, 112, 113, 171, 172, 177, 186, 187, 192], "befor": [1, 2, 5, 7, 10, 13, 14, 16, 19, 21, 24, 25, 28, 29, 30, 31, 39, 40, 41, 43, 71, 72, 101, 102, 112, 113, 150, 161, 171, 172, 186, 187], "close": [1, 5, 12, 13, 19, 20, 21, 27, 28, 31, 32, 39, 42, 50, 56, 71, 73, 74, 77, 80, 101, 102, 112, 113, 150, 161, 171, 186], "method": [1, 6, 8, 18, 19, 21, 22, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 69, 100, 123, 124, 126, 128, 130, 132, 134, 136, 139, 164, 167, 171, 172, 177, 182, 186, 187, 192], "call": [1, 5, 6, 8, 18, 19, 21, 27, 31, 33, 34, 35, 37, 38, 39, 40, 41, 43, 71, 73, 74, 124, 125, 127, 132, 133, 135, 151, 162], "open": [1, 2, 5, 12, 16, 19, 20, 21, 24, 28, 29, 30, 39, 42, 62, 66, 71, 77, 80, 101, 102, 112, 113, 142, 143, 144, 148, 150, 153, 154, 155, 159, 161, 172, 187], "second": [1, 12, 21, 31, 39, 42, 72, 80, 100, 106, 117, 177, 192], "sleep": [1, 2, 25, 39, 46, 100, 101, 112, 177, 192], "between": [1, 2, 13, 19, 20, 25, 31, 71, 177, 192], "each": [0, 1, 2, 3, 5, 7, 9, 13, 19, 21, 25, 29, 31, 39, 40, 43, 44, 46, 52, 58, 71, 79, 125, 133, 148, 150, 159, 161], "iter": [1, 2, 6, 8, 13, 20, 31, 39, 40, 167, 170, 182, 185], "str": [1, 18, 19, 20, 21, 22, 43, 51, 57, 61, 62, 65, 66, 71, 72, 73, 74, 75, 83, 92, 104, 105, 115, 116, 124, 125, 126, 128, 129, 131, 132, 133, 134, 136, 137, 140, 145, 152, 156, 163, 173, 177, 178, 188, 192, 193], "file": [1, 4, 5, 7, 14, 16, 24, 25, 100, 104, 115, 164], "write": [1, 2, 6, 8], "stat": [1, 27, 41], "float": [1, 5, 18, 19, 21, 22, 35, 38, 42, 43, 48, 50, 54, 56, 61, 62, 65, 66, 73, 74, 78, 79, 101, 102, 106, 112, 113, 117, 127, 130, 135, 139, 145, 146, 152, 156, 157, 163, 166, 168, 174, 181, 183, 189], "risk": [1, 7, 24, 127, 135], "free": [1, 2, 6, 8, 16, 22, 25, 127, 135], "rate": [1, 6, 8, 19, 127, 135], "log": [0, 1, 2, 7, 10, 14, 15, 16, 18, 25, 41, 100, 104, 115], "dict": [1, 20, 37, 41, 43, 45, 49, 53, 55, 59, 76, 103, 107, 114, 118, 145, 156], "set": [1, 2, 6, 8, 11, 14, 15, 16, 18, 19, 20, 21, 24, 25, 28, 31, 42, 43, 53, 59, 71, 72, 77, 105, 116, 124, 132, 145, 156, 164, 165, 171, 172, 177, 186, 187, 192], "up": [1, 2, 5, 6, 11, 14, 16, 18, 24, 25, 62, 66], "broker": [1, 5, 12, 15, 18, 19, 21, 22, 23, 24, 25, 31, 34, 35, 36, 38, 44, 71, 72, 73, 76, 80, 108, 109, 110, 111, 119, 120, 121, 122, 127, 135, 145, 151, 152, 156, 162, 163, 166, 181], "live": [1, 2, 12, 14, 16, 19, 24, 42, 43, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 105, 116], "trade": [0, 1, 4, 5, 10, 11, 13, 14, 16, 17, 18, 19, 20, 26, 29, 30, 31, 32, 39, 40, 42, 43, 44, 51, 57, 72, 73, 75, 77, 80, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 105, 116, 125, 129, 133, 137, 145, 156, 170, 185], "bool": [1, 21, 42, 43, 45, 71, 72, 73, 104, 115, 127, 135, 152, 163, 167, 169, 182, 184], "whether": [1, 16, 21, 43, 45, 71, 81, 127, 135, 145, 156], "automat": [1, 6, 8, 21, 145, 146, 156, 157], "adjust": [1, 7, 20, 43], "initi": [1, 2, 6, 8, 13, 14, 24, 25, 26, 40, 105, 116, 164, 168, 171, 172, 177, 183, 186, 187, 192], "asset": [1, 2, 5, 9, 12, 13, 16, 17, 19, 20, 21, 22, 25, 32, 33, 34, 35, 36, 38, 39, 42, 43, 48, 50, 51, 52, 54, 56, 57, 58, 61, 65, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 139, 145, 146, 151, 152, 156, 157, 162, 163, 166, 176, 181, 191], "benchmark": [1, 2, 7], "compar": [1, 7, 16], "If": [1, 5, 6, 8, 12, 13, 15, 16, 19, 20, 24, 25, 29, 31, 35, 39, 43, 71, 72, 73, 80, 101, 102, 104, 112, 113, 115, 130, 139, 142, 145, 150, 153, 156, 161], "string": [1, 16, 18, 19, 20, 21, 43, 71, 72, 104, 115, 131, 140, 145, 156, 177, 192], "convert": [1, 18, 19, 21, 25, 42, 43, 131, 140, 145, 156], "object": [1, 5, 10, 12, 17, 18, 19, 20, 21, 22, 23, 34, 35, 36, 38, 42, 43, 45, 51, 52, 57, 58, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 108, 109, 110, 111, 119, 120, 121, 122, 125, 130, 133, 139, 143, 144, 145, 146, 147, 148, 151, 152, 154, 155, 156, 157, 158, 159, 162, 163, 175, 180, 190], "plot": [1, 10, 45, 62, 66], "html": [0, 1, 3, 9, 14, 19, 25], "list": [1, 2, 13, 17, 18, 19, 22, 24, 30, 42, 43, 46, 47, 52, 58, 60, 69, 72, 74, 79, 81, 83, 92, 100, 105, 110, 111, 116, 121, 122, 123, 126, 128, 130, 134, 136, 139, 141, 144, 148, 152, 155, 159, 163, 165], "A": [1, 5, 7, 10, 12, 21, 25, 43, 45, 51, 52, 57, 58, 76, 83, 92, 145, 152, 156, 163], "ar": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 25, 37, 40, 43, 44, 46, 47, 52, 58, 60, 61, 62, 65, 66, 69, 72, 77, 80, 81, 100, 105, 116, 123, 124, 125, 127, 132, 133, 135, 141, 142, 145, 146, 148, 150, 152, 153, 156, 157, 159, 161, 163, 164, 166, 181], "when": [0, 1, 2, 5, 6, 8, 13, 16, 18, 19, 21, 24, 25, 26, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 61, 62, 65, 66, 81, 145, 156, 166, 171, 181, 186], "pandasdatabacktest": [1, 5, 24], "contain": [1, 3, 19, 20, 39, 41, 77, 151, 152, 162, 163], "currenc": [18, 71, 145, 156, 166, 174, 176, 181, 189, 191], "get": [1, 2, 5, 6, 8, 10, 11, 12, 13, 16, 17, 19, 20, 21, 29, 30, 32, 37, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 69, 71, 72, 74, 76, 78, 79, 81, 103, 114, 123, 146, 147, 148, 149, 157, 158, 159, 160, 164, 165, 166, 171, 172, 174, 177, 181, 186, 187, 189, 192], "valuat": 1, "measur": [1, 7], "overal": [1, 7], "porfolio": 1, "valu": [1, 3, 5, 9, 12, 13, 16, 18, 19, 20, 22, 27, 42, 44, 45, 47, 48, 50, 54, 56, 60, 61, 62, 65, 66, 71, 72, 127, 135, 152, 163, 174, 189], "usual": [1, 46, 177, 192], "usdt": [1, 18, 48, 50, 54, 56, 71, 73, 145, 156], "usdc": 1, "dictionari": [1, 5, 8, 15, 35, 41, 42, 43, 45, 72, 76, 124, 125, 126, 127, 128, 130, 132, 133, 134, 135, 136, 139, 145, 156, 164], "posit": [1, 13, 17, 21, 25, 35, 38, 42, 44, 50, 51, 52, 56, 57, 58, 146, 149, 150, 157, 160, 161, 166, 174, 181, 189], "100": [1, 5, 12, 13, 15, 18, 19, 24, 25, 31, 41, 43, 71, 72, 108, 109, 110, 111, 119, 120, 121, 122, 124, 125, 127, 132, 133, 135, 143, 144, 145, 151, 152, 154, 155, 156, 162, 163], "200": [1, 12, 35, 43, 72, 110, 111, 121, 122, 152, 163], "aapl": [1, 2, 5, 6, 8, 10, 12, 15, 18, 19, 22, 25, 31, 34, 35, 36, 38, 71, 72, 144, 155], "show": [1, 7, 51, 52, 57, 58, 146, 147, 148, 157, 158, 159], "tearsheet": [0, 1, 25, 45], "save": [1, 5, 10, 16, 24, 45], "These": [0, 1, 2, 3, 4, 7, 10, 31, 44, 53, 59, 81], "must": [1, 2, 5, 6, 8, 10, 12, 14, 15, 20, 21, 40, 71, 72, 130, 139, 145, 156], "within": [1, 16, 17, 106, 117, 142, 153], "tradingfe": [1, 23, 24, 25], "appli": [1, 16, 43], "bui": [1, 2, 5, 6, 7, 8, 9, 10, 12, 13, 15, 18, 21, 24, 25, 35, 39, 44, 48, 54, 104, 108, 109, 110, 111, 115, 119, 120, 121, 122, 143, 144, 145, 151, 152, 154, 155, 156, 162, 163, 166, 181], "order": [1, 2, 5, 6, 8, 9, 10, 12, 13, 17, 18, 22, 24, 25, 28, 29, 34, 35, 36, 38, 39, 40, 42, 46, 104, 108, 109, 110, 111, 115, 119, 120, 121, 122, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 166, 181], "dure": [1, 2, 4, 7, 44, 72], "sell": [1, 7, 9, 21, 22, 28, 32, 33, 35, 39, 42, 44, 145, 149, 150, 151, 152, 156, 160, 161, 162, 163], "api": [1, 2, 6, 8, 10, 12, 13, 14, 15, 16, 19, 25, 127, 135], "kei": [1, 2, 3, 5, 6, 8, 12, 14, 15, 16, 20, 25, 45, 127, 135, 164], "onli": [1, 5, 10, 13, 14, 16, 18, 19, 20, 21, 22, 24, 25, 31, 40, 42, 43, 45, 71, 72, 73, 76, 80, 127, 135, 142, 152, 153, 163, 171, 186], "polygondatabacktest": [1, 2, 6, 8], "depric": 73, "pleas": [1, 2, 5, 6, 8, 10, 13, 21, 71, 179, 194], "instead": [1, 5, 16, 19, 42, 106, 117, 127, 135, 179, 194], "indic": [0, 1, 5, 13, 45, 51, 52, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 152, 163], "directori": [5, 16], "default": [1, 5, 10, 16, 18, 19, 20, 31, 33, 43, 44, 53, 59, 61, 62, 65, 66, 71, 72, 73, 75, 90, 99, 105, 116, 124, 126, 127, 128, 129, 132, 134, 135, 136, 137, 145, 150, 152, 156, 161, 163, 171, 172, 175, 177, 178, 180, 186, 187, 190, 192, 193], "turn": [], "slow": 24, "down": [16, 24, 32, 62, 66], "return": [1, 7, 12, 18, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 63, 64, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193], "result": [2, 5, 6, 8, 10, 24, 25, 41], "eg": [13, 18, 19, 24, 43, 46, 48, 50, 54, 56, 61, 62, 65, 66, 69, 76, 81, 104, 115, 124, 125, 132, 133, 145, 156, 177, 192], "import": [0, 1, 2, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 25, 40, 41, 43, 44, 62, 66, 72, 79, 145, 151, 152, 156, 162, 163, 164], "simpl": [1, 5, 6, 8, 10, 15, 21, 25, 145, 156], "first": [1, 5, 6, 8, 10, 13, 15, 16, 19, 20, 21, 24, 25, 29, 31, 72, 167, 177, 182, 192], "mystrategi": [1, 2, 5, 6, 8, 10, 13, 15, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 44, 164], "def": [1, 2, 5, 6, 8, 10, 12, 13, 15, 24, 25, 26, 40, 105, 116, 164, 171, 172, 177, 186, 187, 192], "on_trading_iter": [1, 2, 5, 6, 8, 10, 13, 15, 24, 25, 26, 27, 40, 41, 46, 101, 102, 112, 113, 164, 167, 171, 177, 182, 186, 192], "self": [1, 2, 5, 6, 8, 10, 12, 13, 15, 18, 19, 21, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 46, 164], "first_iter": [1, 2, 5, 6, 8, 10, 25], "create_ord": [1, 2, 5, 6, 8, 10, 12, 13, 18, 21, 24, 25, 39, 46, 108, 109, 110, 111, 119, 120, 121, 122, 143, 144, 151, 152, 154, 155, 162, 163], "quantiti": [1, 2, 6, 7, 8, 10, 12, 13, 21, 22, 24, 25, 35, 38, 51, 52, 57, 58, 145, 156], "side": [1, 2, 6, 8, 12, 21, 24, 35, 42, 145, 156], "submit_ord": [1, 2, 5, 6, 8, 10, 13, 18, 21, 24, 25, 39, 42, 46, 108, 109, 110, 111, 119, 120, 121, 122, 143, 144, 145, 149, 154, 155, 156, 160], "creat": [1, 2, 5, 6, 7, 8, 10, 13, 15, 16, 18, 20, 21, 35, 71, 124, 126, 128, 130, 132, 134, 136, 139, 141, 143, 144, 145, 154, 155, 156], "2018": [1, 19], "31": [1, 5, 10, 24, 25, 43, 124, 125, 132, 133], "symbol": [1, 2, 5, 6, 8, 12, 13, 18, 19, 20, 21, 22, 24, 35, 43, 62, 66, 71, 72, 73, 145, 151, 152, 156, 162, 163], "qqq": 1, "asset_typ": [1, 5, 13, 18, 19, 43, 71, 72, 73, 145, 146, 151, 152, 156, 157, 162, 163], "note": [5, 10, 13, 14, 16, 19, 21, 42, 76, 145, 156], "ensur": [5, 10, 16, 20, 21, 24, 25, 145, 156], "instal": [0, 5, 10, 13, 14, 16], "latest": [2, 5, 10, 13, 16, 24, 25, 71], "version": [2, 5, 7, 10, 24, 25], "pip": [2, 5, 10, 13, 24, 25], "upgrad": [2, 5, 10, 24, 25], "proceed": [5, 10, 24], "been": [5, 10, 21, 22, 34, 35, 36, 38, 42, 73, 77], "some": [5, 10, 24, 25, 43, 44, 73, 145, 156], "major": [5, 10], "chang": [5, 10, 12, 15, 16, 19, 31], "backtest": [4, 5, 7, 10, 16, 20, 21, 23, 31, 43, 45, 62, 66, 71, 72, 73, 74, 81, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 105, 116, 169, 184], "modul": [5, 10, 25], "situat": 5, "thei": [3, 5, 11, 16, 19, 25, 40, 80, 127, 135], "much": [5, 6, 8, 12], "easier": [5, 16], "intend": [5, 16], "who": [5, 16, 51, 57, 146, 157], "own": [2, 5, 6, 8, 12, 13, 15, 16, 22, 24, 25, 149, 160], "after": [5, 6, 8, 13, 16, 20, 25, 27, 29, 30, 39, 41, 43, 62, 66, 71, 75, 129, 137, 138], "python": [2, 5, 24, 104, 115], "librari": [5, 7, 13, 15, 16, 24], "becaus": [3, 5, 6, 8, 10, 16, 42], "provid": [0, 2, 4, 5, 6, 8, 9, 16, 20, 43, 73, 74, 130, 139, 143, 144, 154, 155], "strictli": [5, 20], "can": [2, 5, 6, 8, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 28, 31, 40, 43, 44, 47, 48, 54, 60, 61, 62, 65, 66, 69, 71, 72, 81, 100, 123, 127, 135, 141, 145, 156, 164, 165, 177, 192], "parquet": 5, "databas": [2, 5, 16], "etc": [5, 15, 19, 20, 39, 44, 47, 60, 62, 66, 76, 147, 158], "wish": [5, 25], "accept": [5, 18], "one": [5, 7, 13, 16, 21, 24, 25, 40, 42, 46, 71, 108, 119, 145, 152, 156, 163], "time": [3, 5, 6, 8, 9, 12, 13, 16, 19, 20, 24, 31, 40, 42, 43, 44, 70, 71, 72, 77, 80, 81, 86, 87, 95, 96, 101, 102, 106, 112, 113, 117, 127, 135, 145, 156, 167, 177, 182, 192], "frame": 5, "raw": [5, 19, 21], "addition": [5, 10, 19], "possibl": [5, 31, 43, 61, 62, 65, 66, 152, 163], "like": [2, 5, 16, 20, 24, 25, 28, 29, 30, 31, 32, 42, 164], "secur": [2, 5, 10, 18, 21], "contract": [5, 18, 19, 21, 31, 42], "flexibl": [2, 5, 6, 8, 24], "also": [5, 10, 14, 16, 21, 24, 25, 31, 42, 71, 145, 150, 156, 161, 165], "difficult": 5, "follow": [2, 5, 6, 8, 13, 14, 16, 18, 19, 21, 25, 26, 29, 40, 77, 164, 177, 192], "backtestingbrok": [5, 6, 8, 10, 42], "next": [5, 6, 8, 12, 16, 25, 39, 75, 129, 137, 138], "your": [2, 5, 6, 7, 8, 10, 11, 12, 14, 17, 19, 21, 39, 40, 46, 47, 48, 50, 54, 56, 60, 69, 81, 100, 145, 156, 164, 165, 177, 192], "normal": [5, 15, 130, 139], "built": [2, 5, 25], "someth": [5, 13], "0000": 5, "hr": [5, 20], "2359": [5, 20], "last": [5, 13, 19, 20, 21, 27, 29, 30, 41, 42, 43, 71, 72, 73, 74, 84, 85, 93, 94, 170, 185], "consid": [5, 19, 176, 191], "zone": [5, 19], "unless": 5, "america": [5, 19, 43, 175, 178, 180, 190, 193], "new": [2, 5, 7, 16, 18, 19, 21, 25, 35, 36, 42, 53, 59, 145, 156, 166, 181], "york": [5, 16], "aka": 5, "est": 5, "receiv": 5, "index": [5, 18, 19, 20, 25, 77], "datetime64": [5, 20], "column": [5, 19, 20, 77], "high": [5, 19, 20, 24, 25, 42, 77, 80], "low": [5, 16, 19, 20, 42, 77, 80], "volum": [5, 19, 20, 77, 80], "should": [5, 10, 15, 19, 21, 26, 39, 42, 44, 73, 106, 117, 127, 135], "look": [2, 5, 14, 25], "2020": [5, 10, 24, 25, 71, 89, 90, 98, 99, 146, 151, 157, 162], "01": [5, 6, 8, 19, 24, 145, 146, 151, 156, 157, 162], "02": [5, 19], "09": 5, "00": [5, 43, 109, 120, 145, 151, 152, 156, 162, 163], "3237": 5, "3234": 5, "75": 5, "3235": 5, "25": [5, 16], "16808": 5, "32": 5, "10439": 5, "33": 5, "50": [5, 21, 31, 145, 156, 177, 192], "3233": 5, "8203": 5, "04": [5, 43], "22": 5, "15": [5, 16, 19, 31, 43, 71, 72], "56": 5, "2800": 5, "2796": 5, "8272": 5, "57": 5, "2794": 5, "7440": 5, "58": 5, "2793": 5, "7569": 5, "download": [2, 5, 6, 8, 24, 25], "yfinanc": [5, 43], "yf": [5, 43], "5": [1, 2, 5, 6, 8, 16, 25, 31, 43, 71, 72, 105, 106, 116, 117, 145, 156, 164, 171, 177, 186, 192], "5d": 5, "interv": 5, "1m": [5, 20, 43], "to_csv": 5, "collect": [4, 5], "subsequ": [5, 6, 8], "ad": [5, 11, 13, 16, 18, 25, 71, 72], "One": [5, 16, 18, 21, 43, 145, 156], "differ": [2, 3, 5, 7, 11, 13, 16, 19, 24, 25, 44], "load": [5, 17, 20, 62, 66], "mai": [5, 13, 16, 18, 21, 24, 71, 72, 80, 145, 156], "might": [5, 13, 16], "entiti": [5, 13, 18, 19, 20, 21, 22, 23, 24, 25, 71, 72, 79, 145, 151, 152, 156, 162, 163], "assettyp": [5, 13, 18, 145, 151, 152, 156, 162, 163], "step": [2, 5], "pd": [5, 19], "awar": [5, 19], "go": [2, 5, 12, 14, 16, 24, 25], "df": [5, 13, 19, 20, 29, 71, 72], "read_csv": 5, "third": 5, "we": [5, 6, 7, 8, 10, 11, 13, 16, 24, 25, 27, 46, 71, 145, 156], "make": [2, 4, 5, 6, 8, 16, 21, 24, 25, 73, 74], "least": [5, 40], "timestep": [5, 20, 42, 43, 71, 72, 83, 92], "either": [5, 18, 20, 21, 71, 72, 73, 74], "add": [3, 5, 13, 16, 18, 21, 24, 31, 42, 45, 61, 62, 65, 66], "final": [5, 6, 8, 10, 25], "run": [0, 5, 6, 8, 10, 11, 12, 16, 20, 25, 29, 31, 32, 33, 36, 43, 45, 80, 101, 102, 112, 113, 142, 144, 153, 155, 169, 184], "trader": [5, 6, 8, 10, 12, 13, 14, 15, 25, 32], "data_sourc": [5, 12, 42, 43, 71, 72], "datetime_start": [5, 42], "datetime_end": [5, 42], "strat": 5, "100000": 5, "add_strategi": [5, 12, 13, 14, 15, 24, 25, 45], "run_al": [5, 13, 14, 15, 24, 25, 45], "put": [5, 12, 15, 18, 24], "togeth": [5, 24], "inform": [2, 3, 5, 9, 10, 13, 16, 42, 43, 76, 77, 125, 130, 133, 139, 145, 156, 165], "code": [2, 5, 6, 7, 8, 13, 16, 24, 25, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 61, 65, 101, 102, 112, 113, 164], "sourc": [0, 5, 8, 13, 19, 82, 88, 89, 90, 91, 97, 98, 99, 175, 178, 180, 190, 193], "Then": [5, 13, 15, 71], "startegi": 5, "read": [5, 14, 24, 43], "folder": [2, 5, 10, 13, 16], "same": [5, 16, 21, 25, 72], "script": 5, "pick": [5, 10, 16, 25], "rang": [5, 13, 16, 19, 20], "full": [2, 6, 8, 11, 25, 124, 132], "link": [6, 8], "give": [6, 8, 13, 130, 139], "u": [6, 7, 8, 13, 20, 25, 174, 189], "credit": [6, 8, 152, 163], "sale": [6, 8], "http": [2, 6, 8, 12, 13, 14, 15, 16, 19, 24, 25], "utm_sourc": 6, "affili": 6, "utm_campaign": 6, "lumi10": [2, 6], "help": [2, 3, 6, 8, 24], "support": [2, 6, 7, 8, 13, 16, 20, 24, 25, 43, 62, 66, 127, 135, 145, 156], "project": [2, 6, 8, 16], "coupon": [2, 6, 8], "10": [2, 6, 8, 13, 16, 18, 19, 31, 39, 43, 62, 66, 81, 126, 134, 151, 152, 162, 163, 164, 171, 172, 177, 186, 187, 192], "off": [2, 6, 8], "robust": [6, 8], "fetch": [6, 8, 43, 125, 130, 133, 139], "price": [2, 6, 8, 9, 13, 15, 16, 18, 19, 20, 21, 22, 30, 35, 38, 42, 43, 44, 46, 61, 62, 65, 66, 69, 71, 72, 73, 74, 77, 127, 135, 145, 151, 152, 156, 162, 163], "cryptocurr": [1, 2, 6, 8, 13, 16, 19, 71, 72, 73, 74, 145, 156], "simplifi": [6, 8], "process": [4, 6, 8, 16, 24, 36, 38, 151, 152, 162, 163], "simpli": [6, 8], "polygondatasourc": 6, "get_last_pric": [2, 6, 8, 10, 13, 15, 19, 20, 25, 43, 46], "get_historical_pric": [6, 8, 13, 19, 25, 30, 43, 46, 72], "As": [6, 8, 16], "2": [2, 6, 16, 21, 29, 31, 61, 65, 71, 72, 110, 111, 121, 122, 152, 163, 177, 192], "year": [2, 6, 8], "histor": [2, 6, 8, 12, 13, 19, 25, 42, 43, 69, 71, 72], "pai": [6, 8], "mani": [6, 8, 13, 25, 31, 40, 80], "faster": [2, 6, 8], "won": [6, 8], "t": [6, 8, 13, 25], "limit": [6, 8, 13, 21, 42, 71, 72, 80, 109, 120, 145, 151, 152, 156, 162, 163], "cach": [6, 8], "comput": [6, 8, 16, 24, 25], "so": [6, 8, 10, 13, 16, 18, 21, 24, 25, 46, 81, 127, 135], "even": [2, 6, 8, 29, 152, 163], "take": [6, 8, 16, 21, 24, 40, 43, 61, 62, 65, 66, 72, 73, 74, 124, 132], "bit": [6, 8], "To": [0, 6, 8, 10, 13, 14, 15, 16, 21, 24, 25, 71], "need": [2, 6, 8, 13, 15, 16, 24, 26, 40, 42, 71, 72, 76], "obtain": [6, 8, 13, 43, 125, 126, 128, 130, 133, 134, 136, 139], "which": [2, 6, 7, 8, 9, 13, 16, 19, 20, 21, 31, 40, 48, 50, 54, 56, 73, 74, 75, 76, 127, 129, 135, 137, 177, 192], "dashboard": [6, 8, 24], "account": [2, 6, 8, 12, 13, 14, 15, 16, 25, 42, 46, 48, 50, 52, 54, 56, 58, 60, 149, 160, 166, 181], "replac": [2, 6, 8, 13], "your_polygon_api_kei": [2, 6], "necessari": [6, 8, 16, 42], "inherit": [6, 8, 44], "defin": [6, 7, 8, 13, 23, 26, 31, 40, 41, 42, 44, 164], "hold": [6, 8, 19, 22, 25, 35], "until": [6, 8, 12, 19, 101, 102, 112, 113, 145, 156], "determin": [6, 7, 8, 12, 21, 42, 105, 116, 145, 156, 165], "2023": [2, 6, 8, 43, 124, 125, 132, 133], "05": [6, 8, 145, 156], "my_strat": [], "": [2, 3, 6, 7, 8, 13, 15, 16, 17, 20, 24, 25, 37, 40, 45, 51, 57, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 99, 127, 135, 146, 157, 164, 177, 192], "sure": [2, 6, 8, 24, 25], "form": [6, 20, 80, 105, 116, 126, 128, 134, 136, 166, 181], "1d": [2, 6, 8, 19, 20, 39, 43], "qty": [2, 6, 8], "portfolio_valu": [2, 6, 8, 10, 13, 25, 27, 41, 176, 191], "__name__": [2, 6, 8, 13], "__main__": [2, 6, 8, 13], "your_api_key_her": [], "power": [2, 6, 8, 16, 24, 25], "tool": [6, 8, 16, 25], "variou": [2, 6, 7, 8], "With": [2, 6, 8, 25], "capabl": [6, 8], "easi": [6, 8, 16, 24, 25], "integr": [6, 8], "versatil": [6, 8, 13, 16], "choic": [6, 8, 16], "websit": [2, 7, 10, 13, 15, 16], "avail": [2, 9, 10, 16, 19, 20, 22, 25, 46, 71, 72, 105, 116, 127, 135, 152, 163, 166, 181], "includ": [2, 3, 7, 9, 10, 13, 16, 18, 19, 25, 31, 40, 43, 53, 59, 71, 123, 145, 147, 156, 158, 174, 189], "etf": [2, 10], "cannot": 10, "veri": [10, 16, 25], "easili": [10, 25, 31, 44], "modifi": [10, 24, 25], "anyth": 10, "There": [10, 11, 145, 156], "sever": [0, 2, 10, 11, 44, 164], "gener": [7, 10, 13, 15, 25, 150, 161], "aapl_pric": [10, 25], "alloc": 10, "11": [10, 16, 18, 25], "12": [10, 16, 18, 24, 25, 73], "re": [2, 11, 16, 25, 81], "speak": [11, 40], "learn": [11, 16, 24, 25], "about": [2, 9, 11, 25, 165], "how": [0, 3, 11, 12, 13, 16, 24, 25, 44, 71, 80, 165], "them": [2, 11, 16, 19, 24, 25, 46, 47, 60, 69, 81, 100, 123, 141, 144, 155], "alpaca": [11, 19, 25, 71, 72], "document": [11, 13, 16, 24, 25, 71], "interact": [11, 13, 19, 21, 25, 44, 71, 72, 73, 80], "ccxt": [11, 25], "configur": [2, 11, 14, 25], "tradier": [11, 25, 76, 152, 163], "max_work": [12, 42, 43, 72], "20": [12, 13, 21, 31, 42, 164], "chunk_siz": [12, 43, 72], "connect_stream": [12, 42], "base": [2, 7, 12, 13, 18, 19, 20, 21, 22, 23, 25, 39, 42, 43, 45, 71, 72, 73, 145, 156], "connect": [12, 13, 16, 104, 115], "tradeapi": 12, "rest": [12, 40], "get_timestamp": [12, 25, 43, 46], "current": [12, 13, 16, 20, 35, 36, 41, 42, 43, 48, 50, 51, 54, 56, 57, 61, 62, 65, 66, 71, 72, 76, 77, 81, 82, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 97, 127, 135, 142, 148, 152, 153, 159, 163, 166, 174, 177, 181, 189, 192], "unix": 12, "timestamp": [2, 12, 19, 43, 61, 62, 65, 66, 84, 85, 86, 87, 88, 93, 94, 95, 96, 97], "represent": [12, 20, 21, 43, 71, 72], "is_market_open": [12, 42], "market": [2, 12, 13, 21, 24, 25, 27, 28, 29, 30, 31, 39, 42, 73, 74, 101, 102, 105, 108, 109, 110, 111, 112, 113, 116, 119, 120, 121, 122, 145, 150, 151, 152, 156, 161, 162, 163, 171, 172, 174, 186, 187, 189], "get_time_to_open": [12, 42], "remain": [12, 38, 42, 171, 186], "get_time_to_clos": [12, 42], "alpaca_config": [12, 24, 25], "your_api_kei": [12, 13], "secret": [12, 13, 15, 24, 25], "api_secret": [12, 24, 25], "your_api_secret": 12, "endpoint": 12, "paper": [12, 14, 15, 16, 25, 43], "print": [12, 41], "alpacastrategi": 12, "on_trading_inter": [12, 31], "order_typ": [12, 152, 163], "asset_type_map": 12, "us_equ": 12, "cancel_ord": [12, 25, 42, 46, 148, 159], "cancel": [12, 21, 29, 34, 42, 70, 108, 110, 119, 121, 141, 142, 143, 144, 145, 148, 150, 153, 154, 155, 156, 159, 161], "wa": [2, 12, 13, 26, 29, 32, 33, 40, 42, 71, 166, 181], "get_historical_account_valu": [12, 42], "1400": 12, "1600": 12, "7": [12, 13, 16, 25, 31, 105, 116], "0830": 12, "0930": 12, "3": [2, 12, 16, 145, 156], "600": 12, "sampl": [12, 25], "1612172730": 12, "000234": 12, "boolean": [12, 150, 152, 161, 163], "map_asset_typ": 12, "orderdata": 12, "to_request_field": 12, "guid": [2, 13, 15, 24, 25], "cryoptocurr": 13, "through": [2, 13, 16], "popular": 13, "interest": [7, 13, 127, 135], "find": [13, 14, 15, 16, 25, 43, 75, 126, 128, 129, 130, 134, 136, 137, 138, 139], "readthedoc": 13, "en": 13, "enabl": [13, 14], "wide": [13, 16, 62, 66], "coinbas": [13, 25], "pro": 13, "binanc": [13, 25], "kraken": [13, 25, 145, 156], "kucoin": [13, 25], "constantli": [13, 25], "don": [13, 25], "see": [2, 13, 14, 16, 18, 19, 24, 25, 43, 47, 60, 69, 81, 100, 123, 141], "let": 13, "know": [13, 17], "ll": [13, 15, 25], "desir": [13, 20, 80, 127, 135], "credenti": [13, 14], "rememb": [13, 25], "under": [13, 16, 24], "similar": [13, 16, 29], "alwai": [13, 29, 42, 105, 116, 166, 181], "24": [13, 31, 105, 116], "set_market": [13, 25, 31, 46], "few": [13, 16, 25, 100], "common": 13, "coinbase_config": 13, "exchange_id": 13, "apikei": 13, "your_secret_kei": 13, "sandbox": [13, 16], "kraken_config": 13, "margin": [13, 145, 156], "kucoin_config": 13, "password": [2, 8, 13], "your_passphras": 13, "NOT": 13, "your_secret": 13, "coinbasepro_config": 13, "coinbasepro": 13, "actual": [2, 13, 40, 42, 174, 189], "instanti": [13, 15, 25, 42], "chosen": [13, 15, 16], "correct": [13, 15], "instanc": 13, "strategy_executor": [13, 15], "complet": [13, 14, 16, 21, 25, 73, 74], "demonstr": 13, "pandas_ta": 13, "error": [13, 16, 21, 33], "termin": [2, 13, 24, 25], "importantfunct": 13, "30": [13, 39, 71, 72, 80], "sinc": 13, "those": [13, 16, 165], "hour": [13, 19, 20, 31, 39, 43, 71, 72, 105, 116, 177, 192], "place": [9, 13, 17, 145, 150, 156, 161], "quot": [13, 18, 19, 20, 21, 43, 48, 50, 54, 56, 71, 72, 73, 74, 76, 145, 151, 152, 156, 162, 163, 174, 176, 189, 191], "our": [7, 13, 16, 24, 25, 27], "transact": [13, 21, 166, 181], "btc": [13, 18, 19, 71, 72, 73, 145, 151, 152, 156, 162, 163], "0": [13, 14, 16, 18, 20, 21, 22, 23, 24, 31, 41, 42, 43, 86, 87, 95, 96, 145, 151, 152, 156, 162, 163, 172, 187], "mkt_order": 13, "000": [13, 24, 25], "lmt_order": 13, "limit_pric": [13, 21, 42, 109, 120, 145, 151, 152, 156, 162, 163], "10000": [13, 24], "pair": [13, 19, 21, 43, 73, 74, 124, 125, 132, 133, 145, 156], "bar": [13, 17, 20, 25, 42, 43, 62, 66, 70, 71, 72, 73, 74, 77, 80, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 127, 135], "max_pric": 13, "max": [7, 13], "log_messag": [13, 15, 19, 25, 27, 29, 32, 33, 34, 35, 36, 37, 38, 39, 41, 46, 51, 52, 57, 58, 71, 72, 73, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 131, 140, 146, 147, 148, 157, 158, 159, 166, 167, 168, 169, 170, 171, 173, 174, 175, 176, 178, 180, 181, 182, 183, 184, 185, 186, 188, 189, 190, 191, 193], "f": [13, 15, 27, 34, 35, 37, 38, 41, 71, 73, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 131, 140, 168, 170, 173, 175, 176, 178, 180, 183, 185, 188, 190, 191, 193], "technic": [2, 13, 40], "analysi": [2, 4, 13, 45], "calcul": [13, 19, 21, 42, 43, 127, 135], "rsi": [2, 13], "ta": 13, "length": [13, 20, 42, 43, 71, 72, 77, 83, 92], "current_rsi": 13, "iloc": [13, 71], "macd": 13, "current_macd": 13, "55": 13, "ema": 13, "current_ema": 13, "cash": [9, 13, 25, 27, 41, 42, 47, 48, 50, 54, 56, 60, 174, 176, 179, 189, 191, 194], "get_posit": [13, 22, 25, 46, 149, 160], "share": [13, 15, 19, 21, 28, 30, 35, 38, 43, 145, 156, 174, 189], "specif": [2, 7, 13, 16, 18, 21, 40, 43, 61, 65, 108, 119, 124, 125, 132, 133, 145, 156, 165], "asset_to_get": 13, "outstand": 13, "get_ord": [13, 25, 46], "whatev": 13, "identifi": [2, 13, 18, 21, 147, 158], "last_pric": [13, 73, 74], "color": [13, 61, 62, 65, 66, 104, 115], "green": [13, 61, 62, 65, 66, 104, 115], "dt": [13, 20, 43, 61, 62, 65, 66, 89, 90, 98, 99, 138], "get_datetim": [13, 25, 42, 43, 46], "check": [13, 16, 25, 39, 42, 46, 71, 147, 148, 158, 159, 167, 169, 182, 184], "certain": [13, 62, 66], "9": [13, 16, 31], "30am": 13, "entir": 13, "portfolio": [7, 9, 13, 22, 27, 50, 56, 62, 66, 174, 189], "amount": [9, 13, 19, 21, 27, 43, 48, 50, 54, 56, 78, 79, 145, 156], "ve": [2, 13, 15, 25], "example_strategi": [13, 24, 25], "github": [13, 14, 16, 19, 24, 25], "repositori": [13, 16], "workstat": 14, "gatewai": 14, "instruct": [14, 16, 145, 151, 152, 156, 162, 163], "found": [14, 25], "interactivebrok": [14, 19], "tw": [14, 19], "initial_setup": 14, "onc": [2, 14, 15, 16, 21, 24, 25, 31, 40, 145, 156], "navig": [14, 16], "global": [14, 16, 19, 44], "activex": 14, "socket": [14, 16], "client": [14, 16], "disabl": 14, "port": [14, 16], "7496": 14, "7497": [14, 16], "highli": [14, 25], "thoroughli": 14, "algorithm": [14, 16, 24], "master": 14, "id": [2, 14, 16, 147, 158], "choos": [0, 14, 25], "999": 14, "py": [14, 16, 24, 25], "interactive_brokers_config": 14, "socket_port": 14, "client_id": 14, "digit": 14, "ip": [14, 16], "127": [14, 16], "entri": [14, 21], "point": [3, 7, 9, 14, 21, 43, 61, 65, 71, 72, 146, 157], "abov": [2, 14, 18, 19, 31], "except": [14, 19, 24, 25, 33], "strangl": 14, "interactive_brok": 14, "simple_start_ib": 14, "bot": [14, 16, 24, 31, 33, 44], "com": [2, 7, 14, 15, 16, 24, 25], "lumiwealth": [7, 14, 25], "blob": [14, 24, 25], "getting_start": 14, "visit": [7, 15, 16, 24, 25], "www": [8, 15], "access": [7, 15, 16, 19, 24, 25, 164], "page": [15, 16, 25], "dash": [15, 61, 65], "tradier_config": 15, "access_token": 15, "qtrz3zurd9244ahuw2aoyapgvyra": 15, "account_numb": 15, "va22904793": 15, "real": [15, 16, 24, 70, 77, 80], "monei": [15, 16, 24, 48, 50, 54, 56, 166, 181], "your_access_token": 15, "your_account_numb": 15, "That": 15, "now": [15, 24, 43, 73], "abl": 15, "less": [15, 145, 146, 156, 157], "than": [15, 16, 43, 81, 145, 146, 156, 157], "main": [16, 17, 21, 25, 32, 39, 44, 145, 156], "around": [16, 17], "fee": [16, 17, 25], "repres": [18, 21, 43, 44, 71, 72, 125, 133], "attribut": 18, "track": [18, 22, 25, 51, 52, 57, 58, 147, 148, 158, 159], "ticker": [9, 18, 19, 31, 43, 80], "underli": [18, 20, 127, 130, 135, 139], "ibm": [18, 144, 155], "just": [18, 25, 31, 35, 42, 145, 156], "corpor": 18, "printout": 18, "expir": [7, 18, 21, 31, 43, 71, 73, 124, 125, 126, 127, 132, 133, 134, 135, 138, 145, 156], "strike": [9, 18, 43, 71, 125, 127, 130, 133, 135, 139, 145, 156], "right": [16, 18, 27, 62, 66, 71, 151, 162], "enter": [16, 18, 21, 30, 145, 156, 177, 192], "multipli": [18, 19, 35, 38, 43, 124, 125, 128, 130, 132, 133, 136, 139, 151, 162], "e": [2, 9, 16, 18, 19, 20, 21, 22, 24, 71, 72, 73, 145, 146, 151, 156, 157, 162], "nexpir": 18, "expiri": [18, 126, 131, 134, 140], "june": 18, "2021": [18, 31, 127, 135, 138], "6": [16, 18, 25], "18": 18, "eur": [18, 71, 72, 145, 151, 152, 156, 162, 163], "convers": [18, 177, 192], "gbp": [18, 151, 162], "two": [2, 3, 18, 21, 24, 72, 144, 155], "permiss": 18, "behind": 18, "scene": 18, "anytim": 18, "mandatori": [16, 18, 44, 145, 156], "due": 18, "addit": [2, 16, 18, 21, 145, 156], "detail": [0, 2, 3, 4, 9, 16, 18, 71, 147, 158], "precis": [18, 127, 135], "underlying_asset": 18, "case": [18, 20, 21], "ib": [18, 131, 140], "yyyymmdd": [18, 131, 140], "yyyymm": 18, "retriev": [2, 18, 20, 73, 74, 77], "leverag": [18, 145, 156], "over": [7, 18, 19, 24, 25, 61, 62, 65, 66], "_asset_typ": 18, "_right": 18, "asset_type_must_be_one_of": 18, "valid": [2, 18, 20, 21, 43, 124, 125, 132, 133, 145, 156], "right_must_be_one_of": 18, "17": [16, 18, 31], "26": 18, "155": 18, "base_asset": [18, 151, 152, 162, 163], "optionright": 18, "v": [2, 7, 18], "is_valid": 18, "classmethod": [18, 19, 21, 22, 43], "symbol2asset": 18, "particularli": 18, "assetsmap": 18, "map": 18, "userdict": 18, "datafram": [19, 20, 43, 63, 64, 67, 68, 71, 77, 80], "dividend": [19, 43, 78, 79, 127, 135, 166, 181], "stock_split": 19, "local": [19, 20, 41, 43, 89, 90, 98, 99, 127, 135], "timezon": [19, 20, 25, 43, 89, 90, 98, 99, 175, 180, 190], "new_york": [19, 43, 175, 178, 180, 190, 193], "field": [19, 21], "g": [2, 9, 16, 19, 20, 21, 22, 24, 71, 72, 145, 156], "helper": [19, 21, 44], "row": [19, 41, 71, 72, 80], "get_last_dividend": 19, "per": [19, 43], "get_momentum": 19, "momentum": 19, "aggregate_bar": 19, "frequenc": [19, 20], "Will": [19, 24, 61, 62, 65, 66, 73, 74, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 135, 136, 138, 139, 140, 150, 161, 175, 178, 180, 190, 193], "timefram": 19, "min": 19, "15min": 19, "1h": [19, 39], "specifi": [19, 21, 43, 71, 72, 145, 156], "filter": 19, "daterang": 19, "get_total_volum": 19, "sum": [19, 50, 56], "given": [19, 20, 42, 43, 51, 57, 70, 71, 72, 75, 83, 92, 124, 126, 128, 129, 130, 132, 134, 136, 137, 138, 139, 142, 147, 153, 158], "total": [7, 19, 27, 50, 56, 146, 157, 174, 189], "themselv": 19, "supplier": 19, "exce": 19, "pace": 19, "throttl": 19, "respect": 19, "mention": 19, "tick": 19, "frequent": 19, "accur": [19, 43], "updat": [19, 21, 25, 35, 37, 107, 118, 145, 156, 166, 181], "rule": 19, "historical_limit": 19, "financi": [19, 24], "ohlcv": [19, 20, 42], "split": [19, 44], "instrument": 19, "yield": 19, "appropri": 19, "coin": [19, 145, 156], "eth": [19, 72, 145, 152, 156, 163], "get_total_dividend": 19, "get_total_stock_split": 19, "get_total_return": 19, "get_total_return_pct": 19, "percentag": [19, 24], "get_total_return_pct_chang": 19, "recent": [19, 71, 77], "get_bar": [19, 20, 43], "ethereum": 19, "bitcoin": 19, "grouper_kwarg": 19, "bars_agg": 19, "inclus": 19, "parse_bar_list": 19, "bar_list": 19, "singl": [19, 143, 154], "nobardatafound": 19, "date_start": 20, "date_end": 20, "trading_hours_start": 20, "trading_hours_end": 20, "23": 20, "59": 20, "input": [20, 101, 102, 112, 113], "manag": [20, 21, 25, 46, 60, 123], "attach": 20, "0001": 20, "localize_timezon": 20, "tz_local": 20, "eastern": 20, "utc": 20, "sybmol": 20, "datalin": 20, "numpi": 20, "arrai": [16, 20], "iter_index": 20, "count": [20, 31, 77, 80], "seri": 20, "set_tim": 20, "repair_times_and_fil": 20, "merg": 20, "reindex": 20, "fill": [16, 20, 21, 22, 35, 38, 42, 145, 156, 166, 181], "nan": 20, "lower": 20, "set_date_format": 20, "set_dat": 20, "trim_data": 20, "trim": 20, "match": [20, 43], "to_datalin": 20, "exist": [20, 53, 59], "get_iter_count": 20, "len": 20, "check_data": 20, "wrapper": 20, "timeshift": [20, 42, 43, 71, 72, 83, 86, 87, 92, 95, 96], "_get_bars_dict": 20, "min_timestep": [20, 43], "timestep_map": [20, 43], "shift": [20, 43, 71, 72, 83, 86, 87, 92, 95, 96], "get_bars_between_d": 20, "exchang": [20, 21, 43, 71, 72, 73, 74, 75, 82, 84, 85, 86, 87, 88, 91, 93, 94, 95, 96, 97, 124, 125, 126, 128, 129, 130, 132, 133, 134, 136, 137, 139, 145, 156], "start_dat": 20, "end_dat": 20, "idx": 20, "belong": 21, "construct": 21, "goog": [21, 41, 71, 72], "googl": 21, "to_posit": 21, "get_incr": 21, "wait_to_be_regist": 21, "wait": [16, 21, 38, 108, 109, 110, 111, 119, 120, 121, 122], "regist": [21, 109, 111, 120, 122], "wait_to_be_clos": 21, "better": [7, 21, 145, 156], "keyword": 21, "my_limit_pric": 21, "500": [21, 35], "stop": [21, 24, 31, 32, 39, 42, 61, 62, 65, 66, 101, 102, 112, 113, 145, 151, 152, 156, 162, 163, 171, 186], "move": [2, 7, 21, 25], "past": [2, 21, 24], "particular": [21, 124, 126, 128, 132, 134, 136], "higher": 21, "probabl": 21, "achiev": [7, 21, 24, 25], "predetermin": 21, "exit": 21, "stop_pric": [21, 42, 145, 151, 152, 156, 162, 163], "my_stop_pric": 21, "400": 21, "stop_limit": [21, 145, 156], "combin": 21, "405": 21, "trail": [21, 145, 151, 156, 162], "continu": [21, 145, 156], "keep": [16, 21, 22, 80, 145, 156], "threshold": [21, 145, 156], "movement": [21, 145, 156], "trailing_stop": [21, 145, 156], "trail_pric": [21, 145, 156], "trail_perc": [21, 145, 156], "my_trail_pric": 21, "order_1": 21, "my_trail_perc": 21, "order_2": 21, "bracket": [21, 145, 156], "chain": [21, 43, 123, 124, 125, 126, 128, 130, 132, 133, 134, 136, 139], "long": 21, "short": [21, 105, 116], "condit": [2, 21, 39], "activ": [16, 21, 25, 73, 74, 77, 151, 152, 162, 163], "profit": [16, 21, 24, 25, 42, 61, 62, 65, 66], "loss": [7, 21, 42, 61, 62, 65, 66, 145, 151, 152, 156, 162, 163], "importantli": 21, "execut": [2, 9, 16, 21, 22, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 101, 102, 106, 108, 110, 112, 113, 117, 119, 121, 142, 151, 153, 162, 171, 172, 177, 186, 187, 192], "howev": [16, 21, 29, 31, 145, 156], "extrem": 21, "volatil": [7, 21, 127, 135], "fast": [21, 24, 25], "both": [8, 21, 24, 29, 145, 156], "occur": 21, "take_profit_pric": [21, 145, 151, 156, 162], "stop_loss_pric": [21, 145, 151, 156, 162], "stop_loss_limit_pric": [21, 145, 156], "my_take_profit_pric": 21, "420": 21, "my_stop_loss_pric": 21, "parent": 21, "oto": [21, 145, 156], "trigger": [21, 145, 156], "variant": 21, "oco": [21, 145, 151, 156, 162], "word": [21, 166, 181], "part": [16, 21, 40, 152, 163, 164], "where": [21, 24, 41, 145, 156], "alreadi": [21, 29, 35, 40], "submit": [21, 36, 42, 46, 141, 145, 151, 152, 156, 162, 163], "submiss": 21, "position_fil": [21, 145, 156], "time_in_forc": [21, 145, 156], "good_till_d": [21, 145, 156], "date_cr": 21, "trade_cost": 21, "custom_param": [21, 145, 156], "avg_fill_pric": [21, 22], "tag": [21, 152, 163], "ordersid": 21, "buy_to_clos": 21, "buy_to_cov": 21, "buy_to_open": 21, "sell_short": 21, "sell_to_clos": 21, "sell_to_open": 21, "orderstatu": 21, "cash_settl": 21, "partially_fil": 21, "partial_fil": 21, "ordertyp": 21, "tupl": [21, 72], "alia": 21, "add_transact": 21, "properti": [21, 22, 25, 42, 44, 45, 166, 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], "cash_pend": 21, "equivalent_statu": 21, "statu": [21, 147, 148, 158, 159], "equival": 21, "get_fill_pric": 21, "weight": 21, "averag": [2, 7, 21, 22], "often": 21, "encount": 21, "partial": [21, 38], "pnl": 21, "yet": [21, 45], "is_act": 21, "otherwis": [21, 35], "rtype": [21, 43], "is_cancel": 21, "is_fil": 21, "is_opt": 21, "set_cancel": 21, "set_error": 21, "set_fil": 21, "set_identifi": 21, "set_new": 21, "set_partially_fil": 21, "update_raw": 21, "update_trail_stop_pric": 21, "was_transmit": 21, "retreiv": 22, "appl": 22, "add_ord": 22, "decim": [22, 73, 74, 145, 146, 156, 157], "get_selling_ord": [22, 25, 46], "value_typ": 22, "trading_fe": 23, "flat_fe": [23, 24], "percent_fe": [23, 24], "maker": 23, "taker": 23, "made": [24, 69, 81], "design": [2, 16, 24, 26, 40], "beginn": 24, "quickli": [2, 16, 24], "At": 24, "join": [24, 25], "commun": [24, 25], "comprehens": [4, 24], "cours": [24, 25], "shown": [24, 25], "annual": [7, 24, 25], "reach": [7, 24, 25, 42], "discov": [24, 25], "enhanc": 24, "skill": 24, "potenti": [2, 24, 25, 146, 157], "expert": [24, 25], "guidanc": 24, "resourc": 24, "welcom": 24, "hope": 24, "enjoi": 24, "section": [2, 16, 24, 46], "command": [2, 24, 25], "easiest": 24, "comfort": 24, "without": [16, 24, 130, 139], "copi": 24, "your_alpaca_api_kei": [24, 25], "your_alpaca_secret": [24, 25], "custom": [2, 24, 31, 145, 156, 164], "everi": [2, 24, 31, 39, 42, 46, 80], "180": 24, "180m": 24, "my": [16, 24], "crucial": [2, 16, 24], "understand": [2, 4, 24], "refin": [4, 24], "carri": 24, "familiar": 24, "expect": [16, 24, 25, 127, 135], "And": [24, 71, 72], "try": [24, 145, 156], "Or": [24, 25, 164], "dev": [24, 25], "simple_start_single_fil": [24, 25], "flat": 24, "trading_fee_1": 24, "trading_fee_2": 24, "sometim": 24, "spend": 24, "yappi": 24, "machinelearninglongshort": 24, "tqqq": 24, "thread": [], "get_thread_stat": 24, "d": [31, 177, 192], "robot": 25, "well": 25, "super": 25, "develop": [16, 25], "being": [25, 34, 35, 36, 37, 38, 43, 45, 71, 125, 133, 145, 156, 167, 182], "bug": 25, "fix": [25, 80], "fortun": 25, "against": 25, "invest": [7, 25], "switch": 25, "line": [3, 25, 45, 61, 62, 63, 65, 66, 67], "top": [16, 25], "industri": 25, "tradest": 25, "offer": [2, 7, 16, 25], "tutori": 25, "build": [25, 26, 44], "analy": 25, "out": [25, 42, 46, 51, 57, 73], "box": 25, "suit": [2, 25], "analyt": 25, "analyz": 25, "optim": [2, 7, 16, 25], "chart": [25, 46, 61, 62, 63, 64, 65, 66, 67, 68], "event": [4, 25, 32, 33, 34, 35, 36, 37, 38, 42, 62, 66], "engin": [25, 40], "were": [9, 25, 37], "deal": 25, "complic": 25, "confus": 25, "vector": 25, "math": 25, "mac": 25, "powershel": 25, "window": 25, "packag": 25, "notic": 25, "exactli": 25, "everyth": [16, 25], "suggest": 25, "lifecycl": [25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 44, 46, 167, 171, 172, 177, 182, 186, 187, 192], "menu": 25, "describ": [25, 44], "what": [25, 46, 81, 176, 191], "sub": 25, "individu": [2, 25], "tree": 25, "good": [25, 145, 156], "luck": 25, "forget": 25, "swim": 25, "cover": [16, 25], "By": [2, 16, 25, 33, 127, 135, 171, 172, 175, 177, 178, 180, 186, 187, 190, 192, 193], "gain": 25, "wealth": 25, "expertis": 25, "level": [25, 62, 66, 104, 115], "why": [2, 25], "implement": [7, 25, 26, 40, 43, 45], "perform": [0, 2, 3, 7, 16, 25, 40], "proven": 25, "record": 25, "home": 25, "discord": [16, 25], "pre": [25, 152, 163], "4": [2, 16, 25, 146, 157], "8": [16, 25], "profil": 25, "improv": 25, "refer": [2, 3, 16, 25, 26], "before_market_open": [25, 26, 172, 187], "before_starting_trad": [25, 26, 29], "before_market_clos": [25, 26], "after_market_clos": [25, 26], "on_abrupt_clos": [25, 26, 33], "on_bot_crash": [25, 26], "trace_stat": [25, 26, 177, 192], "on_new_ord": [25, 26], "on_partially_filled_ord": [25, 26], "on_filled_ord": [25, 26], "on_canceled_ord": [25, 26], "on_parameters_upd": [25, 26], "cancel_open_ord": [25, 29, 46, 150, 161], "sell_al": [25, 28, 32, 33, 46], "get_asset_potential_tot": [25, 46], "get_portfolio_valu": [25, 46], "get_cash": [25, 46], "get_historical_prices_for_asset": [25, 29, 46], "get_quot": [20, 25, 46], "get_yesterday_dividend": [25, 43, 46], "get_next_trading_dai": [25, 46], "add_mark": [3, 25, 46], "add_lin": [3, 25, 46], "get_markers_df": [25, 46], "get_lines_df": [25, 46], "get_paramet": [25, 46, 164], "set_paramet": [25, 46, 164], "get_chain": [25, 43, 46, 126, 128, 130, 134, 136, 139], "get_greek": [25, 46], "get_strik": [25, 43, 46], "get_expir": [25, 46], "get_multipli": [25, 46], "options_expiry_to_datetime_d": [25, 46], "get_round_minut": [25, 43, 46], "get_last_minut": [25, 43, 46], "get_round_dai": [25, 43, 46], "get_last_dai": [25, 43, 46], "get_datetime_rang": [25, 42, 43, 46], "localize_datetim": [25, 43, 46], "to_default_timezon": [25, 43, 46], "miscellan": [25, 46], "update_paramet": [25, 37, 46], "await_market_to_clos": [25, 46], "await_market_to_open": [25, 46], "wait_for_order_registr": [25, 46], "wait_for_order_execut": [25, 46], "wait_for_orders_registr": [25, 46], "wait_for_orders_execut": [25, 46], "is_backtest": [16, 25], "initial_budget": 25, "last_on_trading_iteration_datetim": 25, "pytz": 25, "unspent_monei": 25, "leg": 25, "search": [2, 25], "abstract": [26, 40, 42, 43, 44], "pattern": [26, 40], "greatli": [26, 40], "influenc": [3, 26, 40], "react": [26, 40], "j": [26, 40], "compon": [26, 40], "overload": [26, 33, 40, 42], "logic": [26, 28, 29, 39, 40, 42, 44], "dump": [27, 41], "report": 27, "busi": [28, 29], "execud": [28, 29], "skip": [16, 29], "unlik": 29, "launch": 29, "tlt": [29, 51, 57, 72, 74, 79, 110, 111, 121, 122, 145, 146, 152, 156, 157, 163], "bars_list": 29, "asset_bar": 29, "reiniti": 30, "variabl": [25, 30, 41, 165], "reset": 30, "blacklist": 30, "loop": [30, 39, 102, 113, 171, 186], "durat": [7, 31, 145, 152, 156, 163, 177, 192], "my_custom_paramet": 31, "5m": [31, 177, 192], "constructor": 31, "later": 31, "strategy_1": 31, "my_other_paramet": 31, "strategy_2": 31, "my_last_paramet": 31, "oper": [16, 31, 40], "asset_symbol": 31, "mnq": 31, "nasdaq": [31, 105, 116], "calendar": [31, 75, 129, 137], "marketcalendar": [31, 105, 116], "asx": [31, 105, 116], "bmf": [31, 105, 116], "cfe": [31, 105, 116], "nyse": [31, 75, 105, 116, 129, 137], "bat": [31, 105, 116], "cme_equ": [31, 105, 116], "cbot_equ": [31, 105, 116], "cme_agricultur": [31, 105, 116], "cbot_agricultur": [31, 105, 116], "comex_agricultur": [31, 105, 116], "nymex_agricultur": [31, 105, 116], "cme_rat": [31, 105, 116], "cbot_rat": [31, 105, 116], "cme_interestr": [31, 105, 116], "cbot_interestr": [31, 105, 116], "cme_bond": [31, 105, 116], "cbot_bond": [31, 105, 116], "eurex": [31, 105, 116], "hkex": [31, 105, 116], "ic": [31, 105, 116], "iceu": [31, 105, 116], "nyfe": [31, 105, 116], "jpx": [31, 105, 116], "lse": [31, 105, 116], "os": [31, 105, 116], "six": [31, 105, 116], "sse": [31, 105, 116], "tsx": [31, 105, 116], "tsxv": [31, 105, 116], "bse": [31, 105, 116], "tase": [31, 105, 116], "tradingcalendar": [31, 105, 116], "asex": [31, 105, 116], "bvmf": [31, 105, 116], "cme": [31, 73, 105, 116], "iepa": [31, 105, 116], "xam": [31, 105, 116], "xasx": [31, 105, 116], "xbkk": [31, 105, 116], "xbog": [31, 105, 116], "xbom": [31, 105, 116], "xbru": [31, 105, 116], "xbud": [31, 105, 116], "xbue": [31, 105, 116], "xcbf": [31, 105, 116], "xcse": [31, 105, 116], "xdub": [31, 105, 116], "xfra": [31, 105, 116], "xetr": [31, 105, 116], "xhel": [31, 105, 116], "xhkg": [31, 105, 116], "xice": [31, 105, 116], "xidx": [31, 105, 116], "xist": [31, 105, 116], "xjse": [31, 105, 116], "xkar": [31, 105, 116], "xkl": [31, 105, 116], "xkrx": [31, 105, 116], "xlim": [31, 105, 116], "xli": [31, 105, 116], "xlon": [31, 105, 116], "xmad": [31, 105, 116], "xmex": [31, 105, 116], "xmil": [31, 105, 116], "xmo": [31, 105, 116], "xny": [31, 105, 116], "xnze": [31, 105, 116], "xosl": [31, 105, 116], "xpar": [31, 105, 116], "xph": [31, 105, 116], "xpra": [31, 105, 116], "xse": [31, 105, 116], "xsgo": [31, 105, 116], "xshg": [31, 105, 116], "xsto": [31, 105, 116], "xswx": [31, 105, 116], "xtae": [31, 105, 116], "xtai": [31, 105, 116], "xtk": [31, 105, 116], "xtse": [31, 105, 116], "xwar": [31, 105, 116], "xwbo": [31, 105, 116], "us_futur": [31, 105, 116], "max_bar": 31, "10m": [31, 177, 192], "20h": 31, "48": 31, "2d": [31, 177, 192], "interrupt": 32, "gracefulli": 32, "shut": 32, "keybord": 32, "interupt": [32, 39], "abrupt": 32, "crash": [33, 39], "rais": 33, "successfulli": [34, 35, 36], "correspond": [16, 34, 35, 36], "relat": [16, 35], "300": [35, 177, 192], "sold": [35, 50, 56, 145, 156], "elif": 35, "bought": [35, 145, 156], "r": 36, "miss": 38, "restart": [16, 39], "again": [39, 102, 113], "pull": [39, 71], "hello": 39, "task": 40, "core": 40, "framework": [2, 40], "ones": [16, 40], "perspect": 40, "readi": [2, 16, 40, 145, 156], "care": 40, "he": 40, "illustr": 40, "context": 41, "scope": 41, "random": 41, "google_symbol": 41, "snapshot_befor": 41, "random_numb": 41, "randint": 41, "my_custom_stat": 41, "trace": 41, "snapshot": 41, "my_stat": 41, "my_other_stat": 41, "backtesting_brok": 42, "is_backtesting_brok": 42, "calculate_trade_cost": 42, "cost": [16, 42], "cash_settle_options_contract": 42, "settl": 42, "todo": [42, 73], "docstr": 42, "get_last_bar": 42, "els": 42, "limit_ord": [42, 145, 156], "open_": 42, "process_expired_option_contract": 42, "expri": 42, "process_pending_ord": 42, "evalu": 42, "begin": [2, 42], "mostli": 42, "should_continu": 42, "product": 42, "stop_ord": 42, "delai": 43, "abc": [42, 43], "default_pytz": 43, "dsttzinfo": 43, "lmt": 43, "19": 43, "std": 43, "default_timezon": 43, "is_backtesting_data_sourc": [42, 43], "calculate_greek": 43, "asset_pric": [43, 127, 135], "underlying_pric": [43, 127, 135], "greek": [43, 123, 127, 135], "static": 43, "convert_timestep_str_to_timedelta": 43, "timedelta": [43, 71, 72, 101, 102, 112, 113], "1minut": 43, "1hour": 43, "1dai": 43, "unit": [16, 43, 145, 156, 177, 192], "include_after_hour": [43, 71, 72], "info": [43, 104, 115, 124, 125, 132, 133], "guarente": [43, 124, 125, 132, 133], "exp_dat": [43, 124, 125, 132, 133], "strike1": [43, 124, 125, 132, 133], "strike2": [43, 124, 125, 132, 133], "07": [43, 124, 125, 132, 133], "adjust_for_delai": [42, 43, 82, 91], "ago": [43, 71], "known": [43, 73, 74], "round": [43, 86, 87, 95, 96], "param": 43, "get_timestep": 43, "query_greek": [43, 127, 135], "queri": [43, 127, 135], "categori": [44, 100], "flow": 44, "below": [44, 46, 47, 60, 69, 73, 81, 100, 123, 141], "filled_order_callback": [], "force_start_immedi": [], "discord_webhook_url": 16, "account_history_db_connection_str": [], "strategy_id": 16, "discord_account_summary_foot": [], "_strategi": [], "style": [61, 65], "solid": [61, 65], "width": [61, 65, 71, 72], "detail_text": [61, 62, 65, 66], "bolling": [7, 61, 65], "band": [7, 61, 65], "displai": [45, 61, 62, 65, 66], "graph": [7, 61, 62, 65, 66], "overbought": [61, 62, 65, 66], "oversold": [61, 62, 65, 66], "red": [61, 62, 65, 66, 104, 115], "blue": [61, 62, 65, 66], "yellow": [61, 62, 65, 66], "orang": [61, 62, 65, 66], "purpl": [61, 62, 65, 66], "pink": [61, 62, 65, 66], "brown": [61, 62, 65, 66], "black": [61, 62, 65, 66], "white": [61, 62, 65, 66], "grai": [61, 65], "lightgrai": [61, 65], "darkgrai": [61, 65], "lightblu": [61, 65], "darkblu": [61, 65], "lightgreen": [61, 65], "darkgreen": [61, 65], "lightr": [61, 65], "darkr": [61, 65], "hex": [61, 65], "dot": [61, 62, 65, 66], "text": [61, 62, 65, 66], "hover": [61, 62, 65, 66], "add_chart_lin": [61, 65], "80": [61, 65], "circl": [62, 66], "size": [62, 66, 80], "marker": [3, 45, 62, 64, 66, 68], "mark": [62, 66], "cross": [62, 66], "resist": [62, 66], "squar": [62, 66], "diamond": [62, 66], "x": [62, 66], "triangl": [62, 66], "left": [16, 62, 66], "ne": [62, 66], "se": [62, 66], "sw": [62, 66], "nw": [62, 66], "pentagon": [62, 66], "hexagon": [62, 66], "hexagon2": [62, 66], "octagon": [62, 66], "star": [62, 66], "hexagram": [62, 66], "tall": [62, 66], "hourglass": [62, 66], "bowti": [62, 66], "thin": [62, 66], "asterisk": [62, 66], "hash": [62, 66], "y": [62, 66], "ew": [62, 66], "n": [62, 66], "arrow": [62, 66], "add_chart_mark": [62, 66], "paus": [101, 102, 106, 112, 113, 117, 177, 192], "overrid": [101, 102, 112, 113], "infinit": [102, 113], "await": [102, 113, 142, 153], "calculate_return": [], "multipl": [2, 16, 142, 153], "seek": [51, 57, 143, 154], "order1": [110, 111, 121, 122, 144, 152, 155, 163], "order2": [110, 111, 121, 122, 144, 152, 155, 163], "cancel_realtime_bar": [], "stream": [70, 77, 80], "create_asset": [70, 71, 78], "whenev": [166, 181], "paid": [1, 2, 166, 181], "therefor": [166, 181], "zero": [166, 181], "crytpo": [], "gtc": [145, 152, 156, 163], "still": [145, 156], "restric": [145, 156], "compound": [145, 156], "suffici": [145, 156], "deprec": [1, 145, 156, 179, 194], "213": [145, 156], "obect": [145, 156], "intern": [16, 145, 156], "favor": [145, 156], "doe": [42, 43, 76, 145, 156], "guarante": [145, 156], "attain": [7, 145, 156], "penetr": [145, 156], "forc": [145, 156], "remaind": [145, 156], "gtd": [145, 156], "though": [145, 156], "dollar": [145, 156, 174, 189], "percent": [145, 156], "smart": [43, 124, 126, 128, 132, 134, 136, 145, 156], "stop_loss": [145, 151, 156, 162], "stop_loss_limit": [145, 156], "2019": [145, 156], "chf": [145, 156], "aset": [145, 151, 152, 156, 162, 163], "41000": [145, 156], "crypto_assets_to_tupl": [], "find_first_fridai": [], "excut": [167, 182], "sought": [51, 57, 146, 157], "expiration_d": [146, 151, 157, 162], "remov": [179, 194], "cboe": [124, 126, 128, 132, 134, 136], "strke": [43, 124, 132], "stike": [43, 124, 132], "whose": [43, 125, 133], "accord": [81, 82, 88, 91, 97], "sort": [126, 128, 130, 134, 136, 139], "2022": [73, 126, 134], "13": [16, 126, 134], "expiry_d": [126, 131, 134, 140], "expens": [16, 127, 135], "argument": [8, 127, 135], "could": [127, 135], "theoret": [127, 135], "implied_volatil": [127, 135], "impli": [127, 135], "delta": [7, 127, 135], "option_pric": [127, 135], "pv_dividend": [127, 135], "present": [71, 72, 127, 135], "gamma": [127, 135], "vega": [127, 135], "theta": [127, 135], "opt_asset": [127, 135], "option_typ": [127, 135], "get_historical_bot_stat": [], "bot_stat": [], "account_valu": [], "backward": [71, 72], "depend": [16, 71, 72], "week": [71, 72], "1month": [71, 72], "integ": [71, 72, 177, 192], "decid": [16, 71], "extract": 71, "24h": 71, "last_ohlc": 71, "asset_bas": [71, 72, 151, 162], "asset_quot": [71, 72, 151, 152, 162, 163], "regular": 72, "eurusd": 72, "month": [16, 84, 93], "last_dai": [84, 93], "last_minut": [85, 94], "should_use_last_clos": 73, "todai": [16, 73, 81], "comment": 73, "16": [16, 73], "20221013": [128, 136], "yyyi": [75, 129, 137], "mm": [75, 129, 137], "dd": [75, 129, 137], "next_trading_dai": [75, 129, 137], "get_option_expiration_after_d": [], "next_option_expir": 138, "get_next_option_expir": 138, "order_id": [147, 158], "get_tracked_ord": [148, 159], "net": [2, 8, 50, 56], "equiti": [2, 50, 56], "assset": [51, 57], "empti": [52, 58], "backtets": 76, "bid": 76, "ask": 76, "get_realtime_bar": [], "vwap": [77, 80], "intial": 77, "nearest": [86, 87, 95, 96], "round_dai": [86, 95], "round_minut": [87, 96], "get_stats_from_databas": [], "stats_table_nam": [], "get_symbol_bar": 69, "get_tick": [], "get_tracked_asset": [], "get_tracked_posit": [], "previou": [7, 78, 79], "happen": [170, 185], "load_panda": [], "messag": [16, 100, 104, 115], "broadcast": [104, 115], "prefix": [0, 104, 115], "goe": [104, 115], "consol": [16, 104, 115], "servic": [16, 104, 115], "plu": [104, 115, 174, 189], "origin": [104, 115], "send": [16, 104, 115], "insid": [46, 165, 171, 186], "equal": [171, 172, 177, 186, 187, 192], "on_strategy_end": [], "statist": 2, "finish": [], "20200101": [131, 140], "attempt": [174, 189], "resov": [174, 189], "held": [174, 189], "system": [150, 161], "leav": [150, 161], "send_account_summary_to_discord": [], "send_discord_messag": [], "image_buf": [], "silent": [], "send_result_text_to_discord": [], "returns_text": [], "send_spark_chart_to_discord": [], "stats_df": [], "Not": [42, 105, 116], "applic": [16, 105, 116], "set_parameter_default": [], "overwrit": [53, 59], "should_send_account_summary_to_discord": [], "program": [106, 117, 164, 177, 192], "control": [177, 192], "speed": [177, 192], "interpret": [2, 177, 192], "m": [177, 192], "h": [177, 192], "2h": [177, 192], "start_realtime_bar": [], "keep_bar": 80, "arriv": 80, "extend": 80, "kept": 80, "strike_pric": [151, 162], "trailing_stop_pric": [151, 162], "41250": [151, 162], "41325": [151, 162], "41300": [151, 162], "is_multileg": [152, 163], "multileg": [21, 152, 163], "debit": [152, 163], "post": [152, 163], "asset_btc": [152, 163], "asset_eth": [152, 163], "to_sql": [], "connection_str": [], "if_exist": [], "write_backtest_set": [], "redefin": [], "debug": [4, 45], "is_backtest_brok": 45, "async_": 45, "async": 45, "asynchron": 45, "displi": 45, "web": [24, 45], "browser": [16, 24, 45], "run_all_async": 45, "stop_al": 45, "thing": 46, "divid": 46, "sens": 46, "preced": 46, "accoutn": [], "datatim": 81, "think": 81, "regardless": 81, "especi": 81, "1990": 81, "tell": 81, "jan": 81, "1991": 81, "rather": 81, "fit": [16, 100], "pend": [], "meantim": [], "meant": 123, "typic": [16, 164], "my_paramet": 164, "main_tick": 164, "ema_threshold": 164, "lot": [16, 165], "state": [16, 165], "insight": [0, 2], "behavior": [0, 2], "quantstat": 7, "lumi": [2, 7, 8], "varieti": 7, "metric": [2, 7], "yearli": 7, "sharp": [2, 7], "ratio": [2, 7], "romad": 7, "maximum": 7, "drawdown": [2, 7], "sortino": 7, "variat": 7, "differenti": 7, "harm": 7, "observ": 7, "peak": 7, "trough": 7, "longest": 7, "accompani": 7, "cumul": 7, "scale": 7, "visual": [2, 3, 7, 24], "exponenti": 7, "growth": 7, "showcas": 7, "tailor": 7, "goal": 7, "aim": [], "steadi": [], "focus": 16, "toler": [], "balanc": [], "question": 7, "email": 7, "along": 9, "involv": 9, "uniqu": 3, "decis": [3, 4], "signal": [], "action": [4, 16], "taken": 4, "view": [4, 16], "utm_medium": [], "referr": [], "lumibot_backtesting_sect": [], "condor": [7, 16], "martingal": 7, "iron": 7, "dte": 7, "bband": 7, "v2": 7, "strategy_method": [], "doc": [], "_": [], "order_class": 21, "error_messag": 21, "child_ord": 21, "unprocess": 21, "orderclass": 21, "add_child_ord": 21, "o": 21, "child": [21, 42], "is_buy_ord": 21, "is_sell_ord": 21, "data_source_backtest": 42, "datasourcebacktest": [42, 43], "directli": [16, 42], "pandasdata": [42, 43], "clean_trading_tim": 43, "dt_index": 43, "pcal": 43, "find_asset_in_data_stor": 43, "get_asset_by_nam": 43, "get_asset_by_symbol": 43, "get_asset": 43, "get_start_datetime_and_ts_unit": 43, "start_dt": 43, "start_buff": 43, "get_trading_days_panda": 43, "load_data": 43, "update_date_index": 43, "yahoo_data": 43, "yahoodata": 43, "15m": 43, "becuas": 43, "chain_data": 43, "option_chain": 43, "subscript": 1, "usernam": [2, 8], "thetadatabacktest": 8, "thetadata_usernam": 8, "thetadata_password": 8, "thetadata": [0, 2, 25], "run_backtest": [0, 1, 2, 5, 6, 8, 10, 24], "altern": 8, "get_func_stat": 24, "print_al": 24, "prof": 24, "pstat": 24, "snakeviz": 24, "complex": 24, "conclus": [0, 25], "vital": 2, "across": [2, 16], "walk": [2, 16], "explain": 2, "introduc": 2, "studio": 2, "pycharm": 2, "offici": 2, "visualstudio": 2, "extens": 2, "environ": [2, 25], "overview": 2, "suitabl": [2, 16], "longer": 2, "term": 2, "intradai": 2, "ideal": [2, 16], "plan": [2, 16], "dataset": 2, "export": 2, "correctli": 16, "select": [2, 16], "backtesting_funct": [], "curv": 2, "comparison": 2, "tearsheet_html": [], "review": 2, "warn": [], "logs_csv": [], "eas": 16, "further": [2, 16], "weak": 2, "strength": 2, "deploi": [2, 25], "machin": 2, "quick": 2, "manual": [2, 16], "essenti": [2, 16], "breakdown": [], "respond": 2, "catch": [], "confid": 2, "aspect": 2, "tear": 2, "sheet": 2, "issu": 2, "straightforward": 16, "button": 16, "effect": 16, "great": 16, "prefer": [], "edit": 16, "tip": 16, "scroll": 16, "afford": 16, "excel": 16, "while": 16, "best": 16, "scalabl": 16, "click": 16, "figur": 16, "blueprint": 16, "background": 16, "worker": 16, "butterfli": 16, "jljk": [], "starter": 16, "On": 16, "sidebar": 16, "corner": 16, "success": 16, "monitor": 16, "smoothli": 16, "bottom": 16, "tab": 16, "locat": 16, "reserv": 16, "vm": 16, "downgrad": 16, "vcpu": 16, "reduc": 16, "proper": 16, "webhook": 16, "url": 16, "live_config": 16, "separ": 16, "env": 16, "verifi": 16, "confirm": 16, "behav": 16, "ey": 16, "happi": 16, "assist": 16, "from_dict": [18, 21, 22], "to_dict": [18, 21, 22], "order_dict": 21, "deploy": 25, "platform": 25, "render": 25, "replit": 25, "src": 16, "paper_1": 16, "a7py0zidhxde6qkx8ojjknp7cd87hwku": 16, "notif": 16, "123456789": 16, "db_connection_str": 16, "histori": 16, "sqlite": 16, "account_histori": 16, "db": 16, "strategy_nam": 16, "competit": 16, "kraken_api_kei": 16, "xyz1234567890abcdef": 16, "kraken_api_secret": 16, "abcdef1234567890abcdef1234567890abcdef1234": 16, "soon": 16, "incred": 16, "commiss": 16, "engag": 16, "tradier_access_token": 16, "token": 16, "qtrz3zurl9244ahuw4aoyapgvyra": 16, "tradier_account_numb": 16, "va12204793": 16, "tradier_is_pap": 16, "align": 16, "perfectli": 16, "seamlessli": 16, "autom": 16, "alpaca_api_kei": 16, "brokerag": 16, "pk7t6yvax6pmh1em20yn": 16, "alpaca_api_secret": 16, "9wgjls3wixq54fcphwwzjcp8jcfjfkuwsryskkma": 16, "alpaca_is_pap": 16, "challeng": 16, "friendli": 16, "coinbase_api_kei": 16, "steea9fhiszntmpihqjudeqolitj0javz": 16, "coinbase_api_secret": 16, "nuzcnprsxjxxouxrhqe5k2k1xnqlpckh2xcutifkcw": 16, "coinbase_is_sandbox": 16, "cfd": 16, "Their": 16, "presenc": 16, "world": 16, "interactive_brokers_port": 16, "interactive_brokers_client_id": 16, "123456": 16, "interactive_brokers_ip": 16, "address": 16, "ib_subaccount": 16, "subaccount": 16, "subaccount1": 16, "afa": 16, "itself": 16, "commit": 16, "redeploi": 16, "regularli": 16, "delet": 16, "unnecessari": 16, "trashcan": 16, "press": 16, "anoth": [], "indefinit": [], "repl": 16, "14": 16, "straight": [], "ran": [], "ref": [], "topic": 16}, "objects": {"entities": [[18, 0, 0, "-", "asset"], [19, 0, 0, "-", "bars"], [20, 0, 0, "-", "data"], [21, 0, 0, "-", "order"], [22, 0, 0, "-", "position"], [23, 0, 0, "-", "trading_fee"]], "entities.asset": [[18, 1, 1, "", "Asset"], [18, 1, 1, "", "AssetsMapping"]], "entities.asset.Asset": [[18, 1, 1, "", "AssetType"], [18, 1, 1, "", "OptionRight"], [18, 2, 1, "", "_asset_types"], [18, 2, 1, "", "_right"], [18, 2, 1, "id0", "asset_type"], [18, 3, 1, "id1", "asset_type_must_be_one_of"], [18, 2, 1, "id2", "expiration"], [18, 3, 1, "", "from_dict"], [18, 3, 1, "", "is_valid"], [18, 2, 1, "id3", "multiplier"], [18, 2, 1, "id4", "precision"], [18, 2, 1, "id5", "right"], [18, 3, 1, "id6", "right_must_be_one_of"], [18, 2, 1, "id7", "strike"], [18, 2, 1, "id8", "symbol"], [18, 3, 1, "", "symbol2asset"], [18, 3, 1, "", "to_dict"], [18, 2, 1, "", "underlying_asset"]], "entities.asset.Asset.AssetType": [[18, 2, 1, "", "CRYPTO"], [18, 2, 1, "", "FOREX"], [18, 2, 1, "", "FUTURE"], [18, 2, 1, "", "INDEX"], [18, 2, 1, "", "OPTION"], [18, 2, 1, "", "STOCK"]], "entities.asset.Asset.OptionRight": [[18, 2, 1, "", "CALL"], [18, 2, 1, "", "PUT"]], "entities.bars": [[19, 1, 1, "", "Bars"], [19, 4, 1, "", "NoBarDataFound"]], "entities.bars.Bars": [[19, 3, 1, "id0", "aggregate_bars"], [19, 3, 1, "", "filter"], [19, 3, 1, "id1", "get_last_dividend"], [19, 3, 1, "id2", "get_last_price"], [19, 3, 1, "id3", "get_momentum"], [19, 3, 1, "", "get_total_dividends"], [19, 3, 1, "", "get_total_return"], [19, 3, 1, "", "get_total_return_pct"], [19, 3, 1, "", "get_total_return_pct_change"], [19, 3, 1, "", "get_total_stock_splits"], [19, 3, 1, "id4", "get_total_volume"], [19, 3, 1, "", "parse_bar_list"], [19, 3, 1, "", "split"]], "entities.data": [[20, 1, 1, "", "Data"]], "entities.data.Data": [[20, 2, 1, "", "MIN_TIMESTEP"], [20, 2, 1, "", "TIMESTEP_MAPPING"], [20, 3, 1, "", "_get_bars_dict"], [20, 2, 1, "", "asset"], [20, 3, 1, "id0", "check_data"], [20, 3, 1, "id1", "columns"], [20, 2, 1, "", "datalines"], [20, 2, 1, "", "date_end"], [20, 2, 1, "", "date_start"], [20, 2, 1, "", "df"], [20, 3, 1, "id2", "get_bars"], [20, 3, 1, "", "get_bars_between_dates"], [20, 3, 1, "id3", "get_iter_count"], [20, 3, 1, "id4", "get_last_price"], [20, 3, 1, "", "get_quote"], [20, 2, 1, "", "iter_index"], [20, 3, 1, "id5", "repair_times_and_fill"], [20, 3, 1, "id6", "set_date_format"], [20, 3, 1, "id7", "set_dates"], [20, 3, 1, "id8", "set_times"], [20, 2, 1, "", "sybmol"], [20, 2, 1, "", "timestep"], [20, 3, 1, "id9", "to_datalines"], [20, 2, 1, "", "trading_hours_end"], [20, 2, 1, "", "trading_hours_start"], [20, 3, 1, "id10", "trim_data"]], "entities.order": [[21, 1, 1, "", "Order"]], "entities.order.Order": [[21, 1, 1, "", "OrderClass"], [21, 1, 1, "", "OrderSide"], [21, 1, 1, "", "OrderStatus"], [21, 1, 1, "", "OrderType"], [21, 1, 1, "", "Transaction"], [21, 3, 1, "", "add_child_order"], [21, 3, 1, "", "add_transaction"], [21, 5, 1, "", "avg_fill_price"], [21, 3, 1, "", "cash_pending"], [21, 3, 1, "", "equivalent_status"], [21, 3, 1, "", "from_dict"], [21, 3, 1, "", "get_fill_price"], [21, 3, 1, "", "get_increment"], [21, 3, 1, "", "is_active"], [21, 3, 1, "", "is_buy_order"], [21, 3, 1, "", "is_canceled"], [21, 3, 1, "", "is_filled"], [21, 3, 1, "", "is_option"], [21, 3, 1, "", "is_sell_order"], [21, 5, 1, "", "quantity"], [21, 3, 1, "", "set_canceled"], [21, 3, 1, "", "set_error"], [21, 3, 1, "", "set_filled"], [21, 3, 1, "", "set_identifier"], [21, 3, 1, "", "set_new"], [21, 3, 1, "", "set_partially_filled"], [21, 5, 1, "", "status"], [21, 3, 1, "", "to_dict"], [21, 3, 1, "", "to_position"], [21, 3, 1, "", "update_raw"], [21, 3, 1, "", "update_trail_stop_price"], [21, 3, 1, "", "wait_to_be_closed"], [21, 3, 1, "", "wait_to_be_registered"], [21, 3, 1, "", "was_transmitted"]], "entities.order.Order.OrderClass": [[21, 2, 1, "", "BRACKET"], [21, 2, 1, "", "MULTILEG"], [21, 2, 1, "", "OCO"], [21, 2, 1, "", "OTO"]], "entities.order.Order.OrderSide": [[21, 2, 1, "", "BUY"], [21, 2, 1, "", "BUY_TO_CLOSE"], [21, 2, 1, "", "BUY_TO_COVER"], [21, 2, 1, "", "BUY_TO_OPEN"], [21, 2, 1, "", "SELL"], [21, 2, 1, "", "SELL_SHORT"], [21, 2, 1, "", "SELL_TO_CLOSE"], [21, 2, 1, "", "SELL_TO_OPEN"]], "entities.order.Order.OrderStatus": [[21, 2, 1, "", "CANCELED"], [21, 2, 1, "", "CANCELLING"], [21, 2, 1, "", "CASH_SETTLED"], [21, 2, 1, "", "ERROR"], [21, 2, 1, "", "EXPIRED"], [21, 2, 1, "", "FILLED"], [21, 2, 1, "", "NEW"], [21, 2, 1, "", "OPEN"], [21, 2, 1, "", "PARTIALLY_FILLED"], [21, 2, 1, "", "UNPROCESSED"]], "entities.order.Order.OrderType": [[21, 2, 1, "", "BRACKET"], [21, 2, 1, "", "LIMIT"], [21, 2, 1, "", "MARKET"], [21, 2, 1, "", "OCO"], [21, 2, 1, "", "OTO"], [21, 2, 1, "", "STOP"], [21, 2, 1, "", "STOP_LIMIT"], [21, 2, 1, "", "TRAIL"]], "entities.order.Order.Transaction": [[21, 2, 1, "", "price"], [21, 2, 1, "", "quantity"]], "entities.position": [[22, 1, 1, "", "Position"]], "entities.position.Position": [[22, 3, 1, "", "add_order"], [22, 2, 1, "", "asset"], [22, 5, 1, "id0", "available"], [22, 2, 1, "", "avg_fill_price"], [22, 3, 1, "", "from_dict"], [22, 3, 1, "", "get_selling_order"], [22, 5, 1, "id1", "hold"], [22, 2, 1, "", "orders"], [22, 5, 1, "id2", "quantity"], [22, 2, 1, "", "strategy"], [22, 2, 1, "", "symbol"], [22, 3, 1, "", "to_dict"], [22, 3, 1, "", "value_type"]], "entities.trading_fee": [[23, 1, 1, "", "TradingFee"]], "lumibot.backtesting": [[42, 0, 0, "-", "backtesting_broker"]], "lumibot.backtesting.backtesting_broker": [[42, 1, 1, "", "BacktestingBroker"]], "lumibot.backtesting.backtesting_broker.BacktestingBroker": [[42, 2, 1, "", "IS_BACKTESTING_BROKER"], [42, 3, 1, "", "calculate_trade_cost"], [42, 3, 1, "", "cancel_order"], [42, 3, 1, "", "cash_settle_options_contract"], [42, 5, 1, "", "datetime"], [42, 3, 1, "", "get_historical_account_value"], [42, 3, 1, "", "get_last_bar"], [42, 3, 1, "", "get_time_to_close"], [42, 3, 1, "", "get_time_to_open"], [42, 3, 1, "", "is_market_open"], [42, 3, 1, "", "limit_order"], [42, 3, 1, "", "process_expired_option_contracts"], [42, 3, 1, "", "process_pending_orders"], [42, 3, 1, "", "should_continue"], [42, 3, 1, "", "stop_order"], [42, 3, 1, "", "submit_order"], [42, 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": [[43, 0, 0, "-", "data_sources"]], "lumibot.data_sources": [[43, 0, 0, "-", "data_source"], [42, 0, 0, "-", "data_source_backtesting"], [43, 0, 0, "-", "pandas_data"], [43, 0, 0, "-", "yahoo_data"]], "lumibot.data_sources.data_source": [[43, 1, 1, "", "DataSource"]], "lumibot.data_sources.data_source.DataSource": [[43, 2, 1, "", "DEFAULT_PYTZ"], [43, 2, 1, "", "DEFAULT_TIMEZONE"], [43, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [43, 2, 1, "", "MIN_TIMESTEP"], [43, 2, 1, "", "SOURCE"], [43, 2, 1, "", "TIMESTEP_MAPPING"], [43, 3, 1, "", "calculate_greeks"], [43, 3, 1, "", "convert_timestep_str_to_timedelta"], [43, 3, 1, "", "get_bars"], [43, 3, 1, "", "get_chains"], [43, 3, 1, "", "get_datetime"], [43, 3, 1, "", "get_datetime_range"], [43, 3, 1, "", "get_historical_prices"], [43, 3, 1, "", "get_last_day"], [43, 3, 1, "", "get_last_minute"], [43, 3, 1, "", "get_last_price"], [43, 3, 1, "", "get_last_prices"], [43, 3, 1, "", "get_round_day"], [43, 3, 1, "", "get_round_minute"], [43, 3, 1, "", "get_strikes"], [43, 3, 1, "", "get_timestamp"], [43, 3, 1, "", "get_timestep"], [43, 3, 1, "", "get_yesterday_dividend"], [43, 3, 1, "", "get_yesterday_dividends"], [43, 3, 1, "", "localize_datetime"], [43, 3, 1, "", "query_greeks"], [43, 3, 1, "", "to_default_timezone"]], "lumibot.data_sources.data_source_backtesting": [[42, 1, 1, "", "DataSourceBacktesting"]], "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting": [[42, 2, 1, "", "IS_BACKTESTING_DATA_SOURCE"], [42, 3, 1, "", "get_datetime"], [42, 3, 1, "", "get_datetime_range"]], "lumibot.data_sources.pandas_data": [[43, 1, 1, "", "PandasData"]], "lumibot.data_sources.pandas_data.PandasData": [[43, 2, 1, "", "SOURCE"], [43, 2, 1, "", "TIMESTEP_MAPPING"], [43, 3, 1, "", "clean_trading_times"], [43, 3, 1, "", "find_asset_in_data_store"], [43, 3, 1, "", "get_asset_by_name"], [43, 3, 1, "", "get_asset_by_symbol"], [43, 3, 1, "", "get_assets"], [43, 3, 1, "", "get_chains"], [43, 3, 1, "", "get_historical_prices"], [43, 3, 1, "", "get_last_price"], [43, 3, 1, "", "get_last_prices"], [43, 3, 1, "", "get_start_datetime_and_ts_unit"], [43, 3, 1, "", "get_trading_days_pandas"], [43, 3, 1, "", "get_yesterday_dividend"], [43, 3, 1, "", "get_yesterday_dividends"], [43, 3, 1, "", "load_data"], [43, 3, 1, "", "update_date_index"]], "lumibot.data_sources.yahoo_data": [[43, 1, 1, "", "YahooData"]], "lumibot.data_sources.yahoo_data.YahooData": [[43, 2, 1, "", "MIN_TIMESTEP"], [43, 2, 1, "", "SOURCE"], [43, 2, 1, "", "TIMESTEP_MAPPING"], [43, 3, 1, "", "get_chains"], [43, 3, 1, "", "get_historical_prices"], [43, 3, 1, "", "get_last_price"], [43, 3, 1, "", "get_strikes"]], "lumibot.strategies.strategy": [[44, 0, 0, "-", "Strategy"]], "lumibot.strategies.strategy.Strategy": [[65, 6, 1, "", "add_line"], [66, 6, 1, "", "add_marker"], [27, 6, 1, "", "after_market_closes"], [112, 6, 1, "", "await_market_to_close"], [113, 6, 1, "", "await_market_to_open"], [28, 6, 1, "", "before_market_closes"], [29, 6, 1, "", "before_market_opens"], [30, 6, 1, "", "before_starting_trading"], [153, 6, 1, "", "cancel_open_orders"], [154, 6, 1, "", "cancel_order"], [155, 6, 1, "", "cancel_orders"], [70, 6, 1, "", "cancel_realtime_bars"], [181, 5, 1, "", "cash"], [156, 6, 1, "", "create_order"], [182, 5, 1, "", "first_iteration"], [157, 6, 1, "", "get_asset_potential_total"], [54, 6, 1, "", "get_cash"], [132, 6, 1, "", "get_chain"], [133, 6, 1, "", "get_chains"], [91, 6, 1, "", "get_datetime"], [92, 6, 1, "", "get_datetime_range"], [134, 6, 1, "", "get_expiration"], [135, 6, 1, "", "get_greeks"], [71, 6, 1, "", "get_historical_prices"], [72, 6, 1, "", "get_historical_prices_for_assets"], [93, 6, 1, "", "get_last_day"], [94, 6, 1, "", "get_last_minute"], [73, 6, 1, "", "get_last_price"], [74, 6, 1, "", "get_last_prices"], [67, 6, 1, "", "get_lines_df"], [68, 6, 1, "", "get_markers_df"], [136, 6, 1, "", "get_multiplier"], [137, 6, 1, "", "get_next_trading_day"], [138, 6, 1, "", "get_option_expiration_after_date"], [158, 6, 1, "", "get_order"], [159, 6, 1, "", "get_orders"], [114, 6, 1, "", "get_parameters"], [56, 6, 1, "", "get_portfolio_value"], [57, 6, 1, "", "get_position"], [58, 6, 1, "", "get_positions"], [76, 6, 1, "", "get_quote"], [77, 6, 1, "", "get_realtime_bars"], [95, 6, 1, "", "get_round_day"], [96, 6, 1, "", "get_round_minute"], [160, 6, 1, "", "get_selling_order"], [139, 6, 1, "", "get_strikes"], [97, 6, 1, "", "get_timestamp"], [78, 6, 1, "", "get_yesterday_dividend"], [79, 6, 1, "", "get_yesterday_dividends"], [183, 5, 1, "", "initial_budget"], [31, 6, 1, "", "initialize"], [184, 5, 1, "", "is_backtesting"], [185, 5, 1, "", "last_on_trading_iteration_datetime"], [98, 6, 1, "", "localize_datetime"], [115, 6, 1, "", "log_message"], [186, 5, 1, "", "minutes_before_closing"], [187, 5, 1, "", "minutes_before_opening"], [188, 5, 1, "", "name"], [32, 6, 1, "", "on_abrupt_closing"], [33, 6, 1, "", "on_bot_crash"], [34, 6, 1, "", "on_canceled_order"], [35, 6, 1, "", "on_filled_order"], [36, 6, 1, "", "on_new_order"], [37, 6, 1, "", "on_parameters_updated"], [38, 6, 1, "", "on_partially_filled_order"], [39, 6, 1, "", "on_trading_iteration"], [140, 6, 1, "", "options_expiry_to_datetime_date"], [189, 5, 1, "", "portfolio_value"], [190, 5, 1, "", "pytz"], [191, 5, 1, "", "quote_asset"], [1, 6, 1, "", "run_backtest"], [161, 6, 1, "", "sell_all"], [116, 6, 1, "", "set_market"], [59, 6, 1, "", "set_parameters"], [117, 6, 1, "", "sleep"], [192, 5, 1, "", "sleeptime"], [80, 6, 1, "", "start_realtime_bars"], [162, 6, 1, "", "submit_order"], [163, 6, 1, "", "submit_orders"], [193, 5, 1, "", "timezone"], [99, 6, 1, "", "to_default_timezone"], [41, 6, 1, "", "trace_stats"], [194, 5, 1, "", "unspent_money"], [118, 6, 1, "", "update_parameters"], [119, 6, 1, "", "wait_for_order_execution"], [120, 6, 1, "", "wait_for_order_registration"], [121, 6, 1, "", "wait_for_orders_execution"], [122, 6, 1, "", "wait_for_orders_registration"]], "lumibot.traders": [[45, 0, 0, "-", "trader"]], "lumibot.traders.trader": [[45, 1, 1, "", "Trader"]], "lumibot.traders.trader.Trader": [[45, 3, 1, "", "add_strategy"], [45, 5, 1, "", "is_backtest_broker"], [45, 3, 1, "", "run_all"], [45, 3, 1, "", "run_all_async"], [45, 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, 24, 25, 42], "content": [0, 11, 17, 25, 26, 43, 46], "all": 25, "panda": [5, 43], "csv": [4, 5], "other": 5, "data": [2, 5, 20, 42, 43, 69], "exampl": [5, 13, 15, 16], "datafram": 5, "In": 5, "summari": [5, 40], "polygon": [2, 6], "io": [2, 6], "yahoo": [10, 43], "broker": [11, 13, 14, 16, 42], "alpaca": [12, 16, 24], "document": [12, 18, 19, 21, 44], "crypto": 13, "us": 13, "ccxt": 13, "configur": [13, 15, 16, 24], "set": 13, "run": [2, 13, 15, 24], "your": [13, 15, 16, 24, 25], "strategi": [13, 15, 16, 24, 25, 44, 46, 165], "full": [13, 15], "interact": [14, 16], "tradier": [15, 16], "get": [15, 24, 25], "start": [15, 24, 25], "entiti": 17, "asset": 18, "bar": 19, "order": [21, 141], "advanc": 21, "type": 21, "With": [21, 24], "leg": 21, "posit": 22, "trade": [2, 9, 23, 24, 25], "fee": [23, 24], "what": 24, "i": 24, "lumibot": [2, 24, 25], "lumiwealth": 24, "step": [16, 24, 25], "1": [24, 25], "instal": [2, 24, 25], "packag": 24, "2": [24, 25], "import": 24, "follow": 24, "modul": [24, 43], "3": [24, 25], "creat": [24, 25], "an": 24, "paper": 24, "account": [24, 47], "4": 24, "api": 24, "kei": 24, "5": 24, "class": 24, "6": 24, "instanti": 24, "trader": [24, 45], "7": 24, "option": [24, 123], "8": 24, "ad": 24, "profil": 24, "improv": 24, "perform": 24, "algorithm": 25, "librari": 25, "take": 25, "bot": 25, "live": 25, "togeth": 25, "addit": 25, "resourc": 25, "need": 25, "extra": 25, "help": 25, "tabl": 25, "indic": [2, 3, 25], "lifecycl": 26, "method": [26, 46], "def": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41], "after_market_clos": 27, "refer": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41], "before_market_clos": 28, "before_market_open": 29, "before_starting_trad": 30, "initi": 31, "on_abrupt_clos": 32, "on_bot_crash": 33, "on_canceled_ord": 34, "on_filled_ord": 35, "on_new_ord": 36, "on_parameters_upd": 37, "on_partially_filled_ord": 38, "on_trading_iter": 39, "trace_stat": 41, "sourc": [2, 42, 43], "manag": [47, 141], "self": [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 166, 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], "get_cash": [48, 54], "get_paramet": [49, 55, 103, 114], "get_portfolio_valu": [50, 56], "get_posit": [51, 52, 57, 58], "set_paramet": [53, 59], "chart": 60, "function": [1, 60], "add_lin": [61, 65], "add_mark": [62, 66], "get_lines_df": [63, 67], "get_markers_df": [64, 68], "cancel_realtime_bar": 70, "get_historical_pric": 71, "get_historical_prices_for_asset": 72, "get_last_pric": [73, 74], "get_next_trading_dai": [75, 129, 137], "get_quot": 76, "get_realtime_bar": 77, "get_yesterday_dividend": [78, 79], "start_realtime_bar": 80, "datetim": 81, "get_datetim": [82, 91], "get_datetime_rang": [83, 92], "get_last_dai": [84, 93], "get_last_minut": [85, 94], "get_round_dai": [86, 95], "get_round_minut": [87, 96], "get_timestamp": [88, 97], "localize_datetim": [89, 98], "to_default_timezon": [90, 99], "miscellan": 100, "await_market_to_clos": [101, 112], "await_market_to_open": [102, 113], "log_messag": [104, 115], "set_market": [105, 116], "sleep": [106, 117], "update_paramet": [107, 118], "wait_for_order_execut": [108, 119], "wait_for_order_registr": [109, 120], "wait_for_orders_execut": [110, 121], "wait_for_orders_registr": [111, 122], "get_chain": [124, 125, 132, 133], "get_expir": [126, 134], "get_greek": [127, 135], "get_multipli": [128, 136], "get_option_expiration_after_d": 138, "get_strik": [130, 139], "options_expiry_to_datetime_d": [131, 140], "cancel_open_ord": [142, 153], "cancel_ord": [143, 144, 154, 155], "create_ord": [145, 156], "get_asset_potential_tot": [146, 157], "get_ord": [147, 148, 158, 159], "get_selling_ord": [149, 160], "sell_al": [150, 161], "submit_ord": [151, 152, 162, 163], "paramet": 164, "properti": 165, "cash": [166, 181], "first_iter": [167, 182], "initial_budget": [168, 183], "is_backtest": [169, 184], "last_on_trading_iteration_datetim": [170, 185], "minutes_before_clos": [171, 186], "minutes_before_open": [172, 187], "name": [173, 188], "portfolio_valu": [174, 189], "pytz": [175, 180, 190], "quote_asset": [176, 191], "sleeptim": [177, 192], "timezon": [178, 193], "unspent_monei": [179, 194], "file": [0, 2, 3, 9], "gener": [0, 2, 16], "from": [0, 2], "tearsheet": [2, 7], "html": [2, 7], "log": 4, "thetadata": 8, "how": 2, "To": 2, "up": [], "v": [], "code": [], "choos": [2, 16], "conclus": [2, 16], "deploy": 16, "guid": 16, "platform": 16, "deploi": 16, "render": 16, "replit": 16, "secret": 16, "coinbas": 16, "kraken": 16, "environ": 16, "variabl": 16, "final": 16}, "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"], [42, "backtesting"]], "Files Generated from Backtesting": [[0, "files-generated-from-backtesting"], [2, "files-generated-from-backtesting"]], "Contents:": [[0, null], [11, null], [17, null], [26, null], [46, 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"], [16, "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"], [43, "module-lumibot.data_sources.yahoo_data"]], "Brokers": [[11, "brokers"]], "Alpaca": [[12, "alpaca"]], "Documentation": [[12, "module-lumibot.brokers.alpaca"], [18, "module-entities.asset"], [19, "module-entities.bars"], [21, "module-entities.order"], [44, "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"], [15, "running-your-strategy"]], "Full Example Strategy": [[13, "full-example-strategy"], [15, "full-example-strategy"]], "Interactive Brokers": [[14, "interactive-brokers"]], "Tradier": [[15, "tradier"]], "Getting Started": [[15, "getting-started"], [25, "getting-started"]], "Configuration": [[15, "configuration"]], "Deployment Guide": [[16, "deployment-guide"]], "Example Strategy for Deployment": [[16, "example-strategy-for-deployment"]], "Choosing Your Deployment Platform": [[16, "id1"]], "Deploying to Render": [[16, "id2"]], "Deploying to Replit": [[16, "id3"]], "Secrets Configuration": [[16, "secrets-configuration"]], "Broker Configuration": [[16, "broker-configuration"]], "Tradier Configuration": [[16, "tradier-configuration"], [16, "id21"]], "Alpaca Configuration": [[16, "alpaca-configuration"], [16, "id22"]], "Coinbase Configuration": [[16, "coinbase-configuration"], [16, "id23"]], "Kraken Configuration": [[16, "kraken-configuration"], [16, "id24"]], "Interactive Brokers Configuration": [[16, "interactive-brokers-configuration"], [16, "id25"]], "General Environment Variables": [[16, "general-environment-variables"], [16, "id26"]], "Final Steps": [[16, "final-steps"]], "Entities": [[17, "entities"]], "Asset": [[18, "asset"]], "Bars": [[19, "bars"]], "Data": [[20, "module-entities.data"], [69, "data"]], "Order": [[21, "order"]], "Advanced Order Types": [[21, "advanced-order-types"]], "Order With Legs": [[21, "order-with-legs"]], "Position": [[22, "module-entities.position"]], "Trading Fee": [[23, "module-entities.trading_fee"]], "What is Lumibot?": [[24, "what-is-lumibot"]], "Lumiwealth": [[24, "id1"]], "Getting Started With Lumibot": [[24, "getting-started-with-lumibot"]], "Step 1: Install the Package": [[24, "step-1-install-the-package"]], "Step 2: Import the Following Modules": [[24, "step-2-import-the-following-modules"]], "Step 3: Create an Alpaca Paper Trading Account": [[24, "step-3-create-an-alpaca-paper-trading-account"]], "Step 4: Configure Your API Keys": [[24, "step-4-configure-your-api-keys"]], "Step 5: Create a Strategy Class": [[24, "step-5-create-a-strategy-class"]], "Step 6: Instantiate the Trader, Alpaca, and Strategy Classes": [[24, "step-6-instantiate-the-trader-alpaca-and-strategy-classes"]], "Step 7: Backtest the Strategy (Optional)": [[24, "step-7-backtest-the-strategy-optional"]], "Step 8: Run the Strategy": [[24, "step-8-run-the-strategy"]], "Adding Trading Fees": [[24, "adding-trading-fees"]], "Profiling to Improve Performance": [[24, "profiling-to-improve-performance"]], "Lumibot: Backtesting and Algorithmic Trading Library": [[25, "lumibot-backtesting-and-algorithmic-trading-library"]], "Step 1: Install Lumibot": [[25, "step-1-install-lumibot"]], "Step 2: Create a Strategy for Backtesting": [[25, "step-2-create-a-strategy-for-backtesting"]], "Step 3: Take Your Bot Live": [[25, "step-3-take-your-bot-live"]], "All Together": [[25, "all-together"]], "Additional Resources": [[25, "additional-resources"]], "Need Extra Help?": [[25, "need-extra-help"]], "Table of Contents": [[25, "table-of-contents"]], "Indices and tables": [[25, "indices-and-tables"]], "Lifecycle Methods": [[26, "lifecycle-methods"]], "def after_market_closes": [[27, "def-after-market-closes"]], "Reference": [[27, "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"], [41, "reference"]], "def before_market_closes": [[28, "def-before-market-closes"]], "def before_market_opens": [[29, "def-before-market-opens"]], "def before_starting_trading": [[30, "def-before-starting-trading"]], "def initialize": [[31, "def-initialize"]], "def on_abrupt_closing": [[32, "def-on-abrupt-closing"]], "def on_bot_crash": [[33, "def-on-bot-crash"]], "def on_canceled_order": [[34, "def-on-canceled-order"]], "def on_filled_order": [[35, "def-on-filled-order"]], "def on_new_order": [[36, "def-on-new-order"]], "def on_parameters_updated": [[37, "def-on-parameters-updated"]], "def on_partially_filled_order": [[38, "def-on-partially-filled-order"]], "def on_trading_iteration": [[39, "def-on-trading-iteration"]], "Summary": [[40, "summary"]], "def trace_stats": [[41, "def-trace-stats"]], "Backtesting Broker": [[42, "module-lumibot.backtesting.backtesting_broker"]], "Data Source Backtesting": [[42, "module-lumibot.data_sources.data_source_backtesting"]], "Data Sources": [[43, "data-sources"]], "Data Source": [[43, "module-lumibot.data_sources.data_source"]], "Pandas": [[43, "module-lumibot.data_sources.pandas_data"]], "Module contents": [[43, "module-lumibot.data_sources"]], "Strategies": [[44, "strategies"]], "Traders": [[45, "traders"]], "Trader": [[45, "module-lumibot.traders.trader"]], "Strategy Methods": [[46, "strategy-methods"]], "Account Management": [[47, "account-management"]], "self.get_cash": [[48, "self-get-cash"], [54, "self-get-cash"]], "self.get_parameters": [[49, "self-get-parameters"], [55, "self-get-parameters"], [103, "self-get-parameters"], [114, "self-get-parameters"]], "self.get_portfolio_value": [[50, "self-get-portfolio-value"], [56, "self-get-portfolio-value"]], "self.get_position": [[51, "self-get-position"], [57, "self-get-position"]], "self.get_positions": [[52, "self-get-positions"], [58, "self-get-positions"]], "self.set_parameters": [[53, "self-set-parameters"], [59, "self-set-parameters"]], "Chart Functions": [[60, "chart-functions"]], "self.add_line": [[61, "self-add-line"], [65, "self-add-line"]], "self.add_marker": [[62, "self-add-marker"], [66, "self-add-marker"]], "self.get_lines_df": [[63, "self-get-lines-df"], [67, "self-get-lines-df"]], "self.get_markers_df": [[64, "self-get-markers-df"], [68, "self-get-markers-df"]], "self.cancel_realtime_bars": [[70, "self-cancel-realtime-bars"]], "self.get_historical_prices": [[71, "self-get-historical-prices"]], "self.get_historical_prices_for_assets": [[72, "self-get-historical-prices-for-assets"]], "self.get_last_price": [[73, "self-get-last-price"]], "self.get_last_prices": [[74, "self-get-last-prices"]], "self.get_next_trading_day": [[75, "self-get-next-trading-day"], [129, "self-get-next-trading-day"], [137, "self-get-next-trading-day"]], "self.get_quote": [[76, "self-get-quote"]], "self.get_realtime_bars": [[77, "self-get-realtime-bars"]], "self.get_yesterday_dividend": [[78, "self-get-yesterday-dividend"]], "self.get_yesterday_dividends": [[79, "self-get-yesterday-dividends"]], "self.start_realtime_bars": [[80, "self-start-realtime-bars"]], "DateTime": [[81, "datetime"]], "self.get_datetime": [[82, "self-get-datetime"], [91, "self-get-datetime"]], "self.get_datetime_range": [[83, "self-get-datetime-range"], [92, "self-get-datetime-range"]], "self.get_last_day": [[84, "self-get-last-day"], [93, "self-get-last-day"]], "self.get_last_minute": [[85, "self-get-last-minute"], [94, "self-get-last-minute"]], "self.get_round_day": [[86, "self-get-round-day"], [95, "self-get-round-day"]], "self.get_round_minute": [[87, "self-get-round-minute"], [96, "self-get-round-minute"]], "self.get_timestamp": [[88, "self-get-timestamp"], [97, "self-get-timestamp"]], "self.localize_datetime": [[89, "self-localize-datetime"], [98, "self-localize-datetime"]], "self.to_default_timezone": [[90, "self-to-default-timezone"], [99, "self-to-default-timezone"]], "Miscellaneous": [[100, "miscellaneous"]], "self.await_market_to_close": [[101, "self-await-market-to-close"], [112, "self-await-market-to-close"]], "self.await_market_to_open": [[102, "self-await-market-to-open"], [113, "self-await-market-to-open"]], "self.log_message": [[104, "self-log-message"], [115, "self-log-message"]], "self.set_market": [[105, "self-set-market"], [116, "self-set-market"]], "self.sleep": [[106, "self-sleep"], [117, "self-sleep"]], "self.update_parameters": [[107, "self-update-parameters"], [118, "self-update-parameters"]], "self.wait_for_order_execution": [[108, "self-wait-for-order-execution"], [119, "self-wait-for-order-execution"]], "self.wait_for_order_registration": [[109, "self-wait-for-order-registration"], [120, "self-wait-for-order-registration"]], "self.wait_for_orders_execution": [[110, "self-wait-for-orders-execution"], [121, "self-wait-for-orders-execution"]], "self.wait_for_orders_registration": [[111, "self-wait-for-orders-registration"], [122, "self-wait-for-orders-registration"]], "Options": [[123, "options"]], "self.get_chain": [[124, "self-get-chain"], [132, "self-get-chain"]], "self.get_chains": [[125, "self-get-chains"], [133, "self-get-chains"]], "self.get_expiration": [[126, "self-get-expiration"], [134, "self-get-expiration"]], "self.get_greeks": [[127, "self-get-greeks"], [135, "self-get-greeks"]], "self.get_multiplier": [[128, "self-get-multiplier"], [136, "self-get-multiplier"]], "self.get_strikes": [[130, "self-get-strikes"], [139, "self-get-strikes"]], "self.options_expiry_to_datetime_date": [[131, "self-options-expiry-to-datetime-date"], [140, "self-options-expiry-to-datetime-date"]], "self.get_option_expiration_after_date": [[138, "self-get-option-expiration-after-date"]], "Order Management": [[141, "order-management"]], "self.cancel_open_orders": [[142, "self-cancel-open-orders"], [153, "self-cancel-open-orders"]], "self.cancel_order": [[143, "self-cancel-order"], [154, "self-cancel-order"]], "self.cancel_orders": [[144, "self-cancel-orders"], [155, "self-cancel-orders"]], "self.create_order": [[145, "self-create-order"], [156, "self-create-order"]], "self.get_asset_potential_total": [[146, "self-get-asset-potential-total"], [157, "self-get-asset-potential-total"]], "self.get_order": [[147, "self-get-order"], [158, "self-get-order"]], "self.get_orders": [[148, "self-get-orders"], [159, "self-get-orders"]], "self.get_selling_order": [[149, "self-get-selling-order"], [160, "self-get-selling-order"]], "self.sell_all": [[150, "self-sell-all"], [161, "self-sell-all"]], "self.submit_order": [[151, "self-submit-order"], [162, "self-submit-order"]], "self.submit_orders": [[152, "self-submit-orders"], [163, "self-submit-orders"]], "Parameters": [[164, "parameters"]], "Strategy Properties": [[165, "strategy-properties"]], "self.cash": [[166, "self-cash"], [181, "self-cash"]], "self.first_iteration": [[167, "self-first-iteration"], [182, "self-first-iteration"]], "self.initial_budget": [[168, "self-initial-budget"], [183, "self-initial-budget"]], "self.is_backtesting": [[169, "self-is-backtesting"], [184, "self-is-backtesting"]], "self.last_on_trading_iteration_datetime": [[170, "self-last-on-trading-iteration-datetime"], [185, "self-last-on-trading-iteration-datetime"]], "self.minutes_before_closing": [[171, "self-minutes-before-closing"], [186, "self-minutes-before-closing"]], "self.minutes_before_opening": [[172, "self-minutes-before-opening"], [187, "self-minutes-before-opening"]], "self.name": [[173, "self-name"], [188, "self-name"]], "self.portfolio_value": [[174, "self-portfolio-value"], [189, "self-portfolio-value"]], "self.pytz": [[175, "self-pytz"], [180, "self-pytz"], [190, "self-pytz"]], "self.quote_asset": [[176, "self-quote-asset"], [191, "self-quote-asset"]], "self.sleeptime": [[177, "self-sleeptime"], [192, "self-sleeptime"]], "self.timezone": [[178, "self-timezone"], [193, "self-timezone"]], "self.unspent_money": [[179, "self-unspent-money"], [194, "self-unspent-money"]]}, "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"], [18, "module-entities.asset"], [19, "module-entities.bars"], [20, "module-entities.data"], [21, "module-entities.order"], [22, "module-entities.position"], [23, "module-entities.trading_fee"], [42, "module-lumibot.backtesting.backtesting_broker"], [42, "module-lumibot.data_sources.data_source_backtesting"], [43, "module-lumibot.data_sources"], [43, "module-lumibot.data_sources.data_source"], [43, "module-lumibot.data_sources.pandas_data"], [43, "module-lumibot.data_sources.yahoo_data"], [44, "module-lumibot.strategies.strategy.Strategy"], [45, "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)": [[18, "entities.asset.Asset"]], "asset.assettype (class in entities.asset)": [[18, "entities.asset.Asset.AssetType"]], "asset.optionright (class in entities.asset)": [[18, "entities.asset.Asset.OptionRight"]], "assetsmapping (class in entities.asset)": [[18, "entities.asset.AssetsMapping"]], "call (entities.asset.asset.optionright attribute)": [[18, "entities.asset.Asset.OptionRight.CALL"]], "crypto (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.CRYPTO"]], "forex (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.FOREX"]], "future (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.FUTURE"]], "index (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.INDEX"]], "option (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.OPTION"]], "put (entities.asset.asset.optionright attribute)": [[18, "entities.asset.Asset.OptionRight.PUT"]], "stock (entities.asset.asset.assettype attribute)": [[18, "entities.asset.Asset.AssetType.STOCK"]], "_asset_types (entities.asset.asset attribute)": [[18, "entities.asset.Asset._asset_types"]], "_right (entities.asset.asset attribute)": [[18, "entities.asset.Asset._right"]], "asset_type (entities.asset.asset attribute)": [[18, "entities.asset.Asset.asset_type"], [18, "id0"]], "asset_type_must_be_one_of() (entities.asset.asset method)": [[18, "entities.asset.Asset.asset_type_must_be_one_of"], [18, "id1"]], "entities.asset": [[18, "module-entities.asset"]], "expiration (entities.asset.asset attribute)": [[18, "entities.asset.Asset.expiration"], [18, "id2"]], "from_dict() (entities.asset.asset class method)": [[18, "entities.asset.Asset.from_dict"]], "is_valid() (entities.asset.asset method)": [[18, "entities.asset.Asset.is_valid"]], "multiplier (entities.asset.asset attribute)": [[18, "entities.asset.Asset.multiplier"], [18, "id3"]], "precision (entities.asset.asset attribute)": [[18, "entities.asset.Asset.precision"], [18, "id4"]], "right (entities.asset.asset attribute)": [[18, "entities.asset.Asset.right"], [18, "id5"]], "right_must_be_one_of() (entities.asset.asset method)": [[18, "entities.asset.Asset.right_must_be_one_of"], [18, "id6"]], "strike (entities.asset.asset attribute)": [[18, "entities.asset.Asset.strike"], [18, "id7"]], "symbol (entities.asset.asset attribute)": [[18, "entities.asset.Asset.symbol"], [18, "id8"]], "symbol2asset() (entities.asset.asset class method)": [[18, "entities.asset.Asset.symbol2asset"]], "to_dict() (entities.asset.asset method)": [[18, "entities.asset.Asset.to_dict"]], "underlying_asset (entities.asset.asset attribute)": [[18, "entities.asset.Asset.underlying_asset"]], "bars (class in entities.bars)": [[19, "entities.bars.Bars"]], "nobardatafound": [[19, "entities.bars.NoBarDataFound"]], "aggregate_bars() (entities.bars.bars method)": [[19, "entities.bars.Bars.aggregate_bars"], [19, "id0"]], "entities.bars": [[19, "module-entities.bars"]], "filter() (entities.bars.bars method)": [[19, "entities.bars.Bars.filter"]], "get_last_dividend() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_last_dividend"], [19, "id1"]], "get_last_price() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_last_price"], [19, "id2"]], "get_momentum() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_momentum"], [19, "id3"]], "get_total_dividends() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_dividends"]], "get_total_return() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_return"]], "get_total_return_pct() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_return_pct"]], "get_total_return_pct_change() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_return_pct_change"]], "get_total_stock_splits() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_stock_splits"]], "get_total_volume() (entities.bars.bars method)": [[19, "entities.bars.Bars.get_total_volume"], [19, "id4"]], "parse_bar_list() (entities.bars.bars class method)": [[19, "entities.bars.Bars.parse_bar_list"]], "split() (entities.bars.bars method)": [[19, "entities.bars.Bars.split"]], "data (class in entities.data)": [[20, "entities.data.Data"]], "min_timestep (entities.data.data attribute)": [[20, "entities.data.Data.MIN_TIMESTEP"]], "timestep_mapping (entities.data.data attribute)": [[20, "entities.data.Data.TIMESTEP_MAPPING"]], "_get_bars_dict() (entities.data.data method)": [[20, "entities.data.Data._get_bars_dict"]], "asset (entities.data.data attribute)": [[20, "entities.data.Data.asset"]], "check_data() (entities.data.data method)": [[20, "entities.data.Data.check_data"], [20, "id0"]], "columns() (entities.data.data method)": [[20, "entities.data.Data.columns"], [20, "id1"]], "datalines (entities.data.data attribute)": [[20, "entities.data.Data.datalines"]], "date_end (entities.data.data attribute)": [[20, "entities.data.Data.date_end"]], "date_start (entities.data.data attribute)": [[20, "entities.data.Data.date_start"]], "df (entities.data.data attribute)": [[20, "entities.data.Data.df"]], "entities.data": [[20, "module-entities.data"]], "get_bars() (entities.data.data method)": [[20, "entities.data.Data.get_bars"], [20, "id2"]], "get_bars_between_dates() (entities.data.data method)": [[20, "entities.data.Data.get_bars_between_dates"]], "get_iter_count() (entities.data.data method)": [[20, "entities.data.Data.get_iter_count"], [20, "id3"]], "get_last_price() (entities.data.data method)": [[20, "entities.data.Data.get_last_price"], [20, "id4"]], "get_quote() (entities.data.data method)": [[20, "entities.data.Data.get_quote"]], "iter_index (entities.data.data attribute)": [[20, "entities.data.Data.iter_index"]], "repair_times_and_fill() (entities.data.data method)": [[20, "entities.data.Data.repair_times_and_fill"], [20, "id5"]], "set_date_format() (entities.data.data method)": [[20, "entities.data.Data.set_date_format"], [20, "id6"]], "set_dates() (entities.data.data method)": [[20, "entities.data.Data.set_dates"], [20, "id7"]], "set_times() (entities.data.data method)": [[20, "entities.data.Data.set_times"], [20, "id8"]], "sybmol (entities.data.data attribute)": [[20, "entities.data.Data.sybmol"]], "timestep (entities.data.data attribute)": [[20, "entities.data.Data.timestep"]], "to_datalines() (entities.data.data method)": [[20, "entities.data.Data.to_datalines"], [20, "id9"]], "trading_hours_end (entities.data.data attribute)": [[20, "entities.data.Data.trading_hours_end"]], "trading_hours_start (entities.data.data attribute)": [[20, "entities.data.Data.trading_hours_start"]], "trim_data() (entities.data.data method)": [[20, "entities.data.Data.trim_data"], [20, "id10"]], "bracket (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.BRACKET"]], "bracket (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.BRACKET"]], "buy (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY"]], "buy_to_close (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY_TO_CLOSE"]], "buy_to_cover (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY_TO_COVER"]], "buy_to_open (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.BUY_TO_OPEN"]], "canceled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.CANCELED"]], "cancelling (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.CANCELLING"]], "cash_settled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.CASH_SETTLED"]], "error (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.ERROR"]], "expired (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.EXPIRED"]], "filled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.FILLED"]], "limit (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.LIMIT"]], "market (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.MARKET"]], "multileg (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.MULTILEG"]], "new (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.NEW"]], "oco (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.OCO"]], "oco (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.OCO"]], "open (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.OPEN"]], "oto (entities.order.order.orderclass attribute)": [[21, "entities.order.Order.OrderClass.OTO"]], "oto (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.OTO"]], "order (class in entities.order)": [[21, "entities.order.Order"]], "order.orderclass (class in entities.order)": [[21, "entities.order.Order.OrderClass"]], "order.orderside (class in entities.order)": [[21, "entities.order.Order.OrderSide"]], "order.orderstatus (class in entities.order)": [[21, "entities.order.Order.OrderStatus"]], "order.ordertype (class in entities.order)": [[21, "entities.order.Order.OrderType"]], "order.transaction (class in entities.order)": [[21, "entities.order.Order.Transaction"]], "partially_filled (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.PARTIALLY_FILLED"]], "sell (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL"]], "sell_short (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL_SHORT"]], "sell_to_close (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL_TO_CLOSE"]], "sell_to_open (entities.order.order.orderside attribute)": [[21, "entities.order.Order.OrderSide.SELL_TO_OPEN"]], "stop (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.STOP"]], "stop_limit (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.STOP_LIMIT"]], "trail (entities.order.order.ordertype attribute)": [[21, "entities.order.Order.OrderType.TRAIL"]], "unprocessed (entities.order.order.orderstatus attribute)": [[21, "entities.order.Order.OrderStatus.UNPROCESSED"]], "add_child_order() (entities.order.order method)": [[21, "entities.order.Order.add_child_order"]], "add_transaction() (entities.order.order method)": [[21, "entities.order.Order.add_transaction"]], "avg_fill_price (entities.order.order property)": [[21, "entities.order.Order.avg_fill_price"]], "cash_pending() (entities.order.order method)": [[21, "entities.order.Order.cash_pending"]], "entities.order": [[21, "module-entities.order"]], "equivalent_status() (entities.order.order method)": [[21, "entities.order.Order.equivalent_status"]], "from_dict() (entities.order.order class method)": [[21, "entities.order.Order.from_dict"]], "get_fill_price() (entities.order.order method)": [[21, "entities.order.Order.get_fill_price"]], "get_increment() (entities.order.order method)": [[21, "entities.order.Order.get_increment"]], "is_active() (entities.order.order method)": [[21, "entities.order.Order.is_active"]], "is_buy_order() (entities.order.order method)": [[21, "entities.order.Order.is_buy_order"]], "is_canceled() (entities.order.order method)": [[21, "entities.order.Order.is_canceled"]], "is_filled() (entities.order.order method)": [[21, "entities.order.Order.is_filled"]], "is_option() (entities.order.order method)": [[21, "entities.order.Order.is_option"]], "is_sell_order() (entities.order.order method)": [[21, "entities.order.Order.is_sell_order"]], "price (entities.order.order.transaction attribute)": [[21, "entities.order.Order.Transaction.price"]], "quantity (entities.order.order property)": [[21, "entities.order.Order.quantity"]], "quantity (entities.order.order.transaction attribute)": [[21, "entities.order.Order.Transaction.quantity"]], "set_canceled() (entities.order.order method)": [[21, "entities.order.Order.set_canceled"]], "set_error() (entities.order.order method)": [[21, "entities.order.Order.set_error"]], "set_filled() (entities.order.order method)": [[21, "entities.order.Order.set_filled"]], "set_identifier() (entities.order.order method)": [[21, "entities.order.Order.set_identifier"]], "set_new() (entities.order.order method)": [[21, "entities.order.Order.set_new"]], "set_partially_filled() (entities.order.order method)": [[21, "entities.order.Order.set_partially_filled"]], "status (entities.order.order property)": [[21, "entities.order.Order.status"]], "to_dict() (entities.order.order method)": [[21, "entities.order.Order.to_dict"]], "to_position() (entities.order.order method)": [[21, "entities.order.Order.to_position"]], "update_raw() (entities.order.order method)": [[21, "entities.order.Order.update_raw"]], "update_trail_stop_price() (entities.order.order method)": [[21, "entities.order.Order.update_trail_stop_price"]], "wait_to_be_closed() (entities.order.order method)": [[21, "entities.order.Order.wait_to_be_closed"]], "wait_to_be_registered() (entities.order.order method)": [[21, "entities.order.Order.wait_to_be_registered"]], "was_transmitted() (entities.order.order method)": [[21, "entities.order.Order.was_transmitted"]], "position (class in entities.position)": [[22, "entities.position.Position"]], "add_order() (entities.position.position method)": [[22, "entities.position.Position.add_order"]], "asset (entities.position.position attribute)": [[22, "entities.position.Position.asset"]], "available (entities.position.position attribute)": [[22, "entities.position.Position.available"]], "available (entities.position.position property)": [[22, "id0"]], "avg_fill_price (entities.position.position attribute)": [[22, "entities.position.Position.avg_fill_price"]], "entities.position": [[22, "module-entities.position"]], "from_dict() (entities.position.position class method)": [[22, "entities.position.Position.from_dict"]], "get_selling_order() (entities.position.position method)": [[22, "entities.position.Position.get_selling_order"]], "hold (entities.position.position attribute)": [[22, "entities.position.Position.hold"]], "hold (entities.position.position property)": [[22, "id1"]], "orders (entities.position.position attribute)": [[22, "entities.position.Position.orders"]], "quantity (entities.position.position attribute)": [[22, "entities.position.Position.quantity"]], "quantity (entities.position.position property)": [[22, "id2"]], "strategy (entities.position.position attribute)": [[22, "entities.position.Position.strategy"]], "symbol (entities.position.position attribute)": [[22, "entities.position.Position.symbol"]], "to_dict() (entities.position.position method)": [[22, "entities.position.Position.to_dict"]], "value_type() (entities.position.position method)": [[22, "entities.position.Position.value_type"]], "tradingfee (class in entities.trading_fee)": [[23, "entities.trading_fee.TradingFee"]], "entities.trading_fee": [[23, "module-entities.trading_fee"]], "after_market_closes() (in module lumibot.strategies.strategy.strategy)": [[27, "lumibot.strategies.strategy.Strategy.after_market_closes"]], "before_market_closes() (in module lumibot.strategies.strategy.strategy)": [[28, "lumibot.strategies.strategy.Strategy.before_market_closes"]], "before_market_opens() (in module lumibot.strategies.strategy.strategy)": [[29, "lumibot.strategies.strategy.Strategy.before_market_opens"]], "before_starting_trading() (in module lumibot.strategies.strategy.strategy)": [[30, "lumibot.strategies.strategy.Strategy.before_starting_trading"]], "initialize() (in module lumibot.strategies.strategy.strategy)": [[31, "lumibot.strategies.strategy.Strategy.initialize"]], "on_abrupt_closing() (in module lumibot.strategies.strategy.strategy)": [[32, "lumibot.strategies.strategy.Strategy.on_abrupt_closing"]], "on_bot_crash() (in module lumibot.strategies.strategy.strategy)": [[33, "lumibot.strategies.strategy.Strategy.on_bot_crash"]], "on_canceled_order() (in module lumibot.strategies.strategy.strategy)": [[34, "lumibot.strategies.strategy.Strategy.on_canceled_order"]], "on_filled_order() (in module lumibot.strategies.strategy.strategy)": [[35, "lumibot.strategies.strategy.Strategy.on_filled_order"]], "on_new_order() (in module lumibot.strategies.strategy.strategy)": [[36, "lumibot.strategies.strategy.Strategy.on_new_order"]], "on_parameters_updated() (in module lumibot.strategies.strategy.strategy)": [[37, "lumibot.strategies.strategy.Strategy.on_parameters_updated"]], "on_partially_filled_order() (in module lumibot.strategies.strategy.strategy)": [[38, "lumibot.strategies.strategy.Strategy.on_partially_filled_order"]], "on_trading_iteration() (in module lumibot.strategies.strategy.strategy)": [[39, "lumibot.strategies.strategy.Strategy.on_trading_iteration"]], "trace_stats() (in module lumibot.strategies.strategy.strategy)": [[41, "lumibot.strategies.strategy.Strategy.trace_stats"]], "backtestingbroker (class in lumibot.backtesting.backtesting_broker)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker"]], "datasourcebacktesting (class in lumibot.data_sources.data_source_backtesting)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting"]], "is_backtesting_broker (lumibot.backtesting.backtesting_broker.backtestingbroker attribute)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.IS_BACKTESTING_BROKER"]], "is_backtesting_data_source (lumibot.data_sources.data_source_backtesting.datasourcebacktesting attribute)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.IS_BACKTESTING_DATA_SOURCE"]], "calculate_trade_cost() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.calculate_trade_cost"]], "cancel_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cancel_order"]], "cash_settle_options_contract() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.cash_settle_options_contract"]], "datetime (lumibot.backtesting.backtesting_broker.backtestingbroker property)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.datetime"]], "get_datetime() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source_backtesting.datasourcebacktesting method)": [[42, "lumibot.data_sources.data_source_backtesting.DataSourceBacktesting.get_datetime_range"]], "get_historical_account_value() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_historical_account_value"]], "get_last_bar() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_last_bar"]], "get_time_to_close() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_close"]], "get_time_to_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.get_time_to_open"]], "is_market_open() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.is_market_open"]], "limit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.limit_order"]], "lumibot.backtesting.backtesting_broker": [[42, "module-lumibot.backtesting.backtesting_broker"]], "lumibot.data_sources.data_source_backtesting": [[42, "module-lumibot.data_sources.data_source_backtesting"]], "process_expired_option_contracts() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_expired_option_contracts"]], "process_pending_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.process_pending_orders"]], "should_continue() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.should_continue"]], "stop_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.stop_order"]], "submit_order() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_order"]], "submit_orders() (lumibot.backtesting.backtesting_broker.backtestingbroker method)": [[42, "lumibot.backtesting.backtesting_broker.BacktestingBroker.submit_orders"]], "default_pytz (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.DEFAULT_PYTZ"]], "default_timezone (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.DEFAULT_TIMEZONE"]], "datasource (class in lumibot.data_sources.data_source)": [[43, "lumibot.data_sources.data_source.DataSource"]], "is_backtesting_data_source (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.IS_BACKTESTING_DATA_SOURCE"]], "min_timestep (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.MIN_TIMESTEP"]], "min_timestep (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[43, "lumibot.data_sources.yahoo_data.YahooData.MIN_TIMESTEP"]], "pandasdata (class in lumibot.data_sources.pandas_data)": [[43, "lumibot.data_sources.pandas_data.PandasData"]], "source (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.SOURCE"]], "source (lumibot.data_sources.pandas_data.pandasdata attribute)": [[43, "lumibot.data_sources.pandas_data.PandasData.SOURCE"]], "source (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[43, "lumibot.data_sources.yahoo_data.YahooData.SOURCE"]], "timestep_mapping (lumibot.data_sources.data_source.datasource attribute)": [[43, "lumibot.data_sources.data_source.DataSource.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.pandas_data.pandasdata attribute)": [[43, "lumibot.data_sources.pandas_data.PandasData.TIMESTEP_MAPPING"]], "timestep_mapping (lumibot.data_sources.yahoo_data.yahoodata attribute)": [[43, "lumibot.data_sources.yahoo_data.YahooData.TIMESTEP_MAPPING"]], "yahoodata (class in lumibot.data_sources.yahoo_data)": [[43, "lumibot.data_sources.yahoo_data.YahooData"]], "calculate_greeks() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.calculate_greeks"]], "clean_trading_times() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.clean_trading_times"]], "convert_timestep_str_to_timedelta() (lumibot.data_sources.data_source.datasource static method)": [[43, "lumibot.data_sources.data_source.DataSource.convert_timestep_str_to_timedelta"]], "find_asset_in_data_store() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.find_asset_in_data_store"]], "get_asset_by_name() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_name"]], "get_asset_by_symbol() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_asset_by_symbol"]], "get_assets() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_assets"]], "get_bars() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_bars"]], "get_chains() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_chains"]], "get_chains() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_chains"]], "get_chains() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_chains"]], "get_datetime() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_datetime"]], "get_datetime_range() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_datetime_range"]], "get_historical_prices() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_historical_prices"]], "get_historical_prices() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_historical_prices"]], "get_last_day() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_day"]], "get_last_minute() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_minute"]], "get_last_price() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_price"]], "get_last_price() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_last_price"]], "get_last_price() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_last_price"]], "get_last_prices() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_last_prices"]], "get_last_prices() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_last_prices"]], "get_round_day() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_round_day"]], "get_round_minute() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_round_minute"]], "get_start_datetime_and_ts_unit() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_start_datetime_and_ts_unit"]], "get_strikes() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_strikes"]], "get_strikes() (lumibot.data_sources.yahoo_data.yahoodata method)": [[43, "lumibot.data_sources.yahoo_data.YahooData.get_strikes"]], "get_timestamp() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_timestamp"]], "get_timestep() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_timestep"]], "get_trading_days_pandas() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_trading_days_pandas"]], "get_yesterday_dividend() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividend"]], "get_yesterday_dividend() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividend"]], "get_yesterday_dividends() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.get_yesterday_dividends"]], "get_yesterday_dividends() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.get_yesterday_dividends"]], "load_data() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.load_data"]], "localize_datetime() (lumibot.data_sources.data_source.datasource class method)": [[43, "lumibot.data_sources.data_source.DataSource.localize_datetime"]], "lumibot.data_sources": [[43, "module-lumibot.data_sources"]], "lumibot.data_sources.data_source": [[43, "module-lumibot.data_sources.data_source"]], "lumibot.data_sources.pandas_data": [[43, "module-lumibot.data_sources.pandas_data"]], "lumibot.data_sources.yahoo_data": [[43, "module-lumibot.data_sources.yahoo_data"]], "query_greeks() (lumibot.data_sources.data_source.datasource method)": [[43, "lumibot.data_sources.data_source.DataSource.query_greeks"]], "to_default_timezone() (lumibot.data_sources.data_source.datasource class method)": [[43, "lumibot.data_sources.data_source.DataSource.to_default_timezone"]], "update_date_index() (lumibot.data_sources.pandas_data.pandasdata method)": [[43, "lumibot.data_sources.pandas_data.PandasData.update_date_index"]], "lumibot.strategies.strategy.strategy": [[44, "module-lumibot.strategies.strategy.Strategy"]], "trader (class in lumibot.traders.trader)": [[45, "lumibot.traders.trader.Trader"]], "add_strategy() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.add_strategy"]], "is_backtest_broker (lumibot.traders.trader.trader property)": [[45, "lumibot.traders.trader.Trader.is_backtest_broker"]], "lumibot.traders.trader": [[45, "module-lumibot.traders.trader"]], "run_all() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.run_all"]], "run_all_async() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.run_all_async"]], "stop_all() (lumibot.traders.trader.trader method)": [[45, "lumibot.traders.trader.Trader.stop_all"]], "get_cash() (in module lumibot.strategies.strategy.strategy)": [[48, "lumibot.strategies.strategy.Strategy.get_cash"], [54, "lumibot.strategies.strategy.Strategy.get_cash"]], "get_parameters() (in module lumibot.strategies.strategy.strategy)": [[49, "lumibot.strategies.strategy.Strategy.get_parameters"], [55, "lumibot.strategies.strategy.Strategy.get_parameters"], [103, "lumibot.strategies.strategy.Strategy.get_parameters"], [114, "lumibot.strategies.strategy.Strategy.get_parameters"]], "get_portfolio_value() (in module lumibot.strategies.strategy.strategy)": [[50, "lumibot.strategies.strategy.Strategy.get_portfolio_value"], [56, "lumibot.strategies.strategy.Strategy.get_portfolio_value"]], "get_position() (in module lumibot.strategies.strategy.strategy)": [[51, "lumibot.strategies.strategy.Strategy.get_position"], [57, "lumibot.strategies.strategy.Strategy.get_position"]], "get_positions() (in module lumibot.strategies.strategy.strategy)": [[52, "lumibot.strategies.strategy.Strategy.get_positions"], [58, "lumibot.strategies.strategy.Strategy.get_positions"]], "set_parameters() (in module lumibot.strategies.strategy.strategy)": [[53, "lumibot.strategies.strategy.Strategy.set_parameters"], [59, "lumibot.strategies.strategy.Strategy.set_parameters"]], "add_line() (in module lumibot.strategies.strategy.strategy)": [[61, "lumibot.strategies.strategy.Strategy.add_line"], [65, "lumibot.strategies.strategy.Strategy.add_line"]], "add_marker() (in module lumibot.strategies.strategy.strategy)": [[62, "lumibot.strategies.strategy.Strategy.add_marker"], [66, "lumibot.strategies.strategy.Strategy.add_marker"]], "get_lines_df() (in module lumibot.strategies.strategy.strategy)": [[63, "lumibot.strategies.strategy.Strategy.get_lines_df"], [67, "lumibot.strategies.strategy.Strategy.get_lines_df"]], "get_markers_df() (in module lumibot.strategies.strategy.strategy)": [[64, "lumibot.strategies.strategy.Strategy.get_markers_df"], [68, "lumibot.strategies.strategy.Strategy.get_markers_df"]], "cancel_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[70, "lumibot.strategies.strategy.Strategy.cancel_realtime_bars"]], "get_historical_prices() (in module lumibot.strategies.strategy.strategy)": [[71, "lumibot.strategies.strategy.Strategy.get_historical_prices"]], "get_historical_prices_for_assets() (in module lumibot.strategies.strategy.strategy)": [[72, "lumibot.strategies.strategy.Strategy.get_historical_prices_for_assets"]], "get_last_price() (in module lumibot.strategies.strategy.strategy)": [[73, "lumibot.strategies.strategy.Strategy.get_last_price"]], "get_last_prices() (in module lumibot.strategies.strategy.strategy)": [[74, "lumibot.strategies.strategy.Strategy.get_last_prices"]], "get_next_trading_day() (in module lumibot.strategies.strategy.strategy)": [[75, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [129, "lumibot.strategies.strategy.Strategy.get_next_trading_day"], [137, "lumibot.strategies.strategy.Strategy.get_next_trading_day"]], "get_quote() (in module lumibot.strategies.strategy.strategy)": [[76, "lumibot.strategies.strategy.Strategy.get_quote"]], "get_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[77, "lumibot.strategies.strategy.Strategy.get_realtime_bars"]], "get_yesterday_dividend() (in module lumibot.strategies.strategy.strategy)": [[78, "lumibot.strategies.strategy.Strategy.get_yesterday_dividend"]], "get_yesterday_dividends() (in module lumibot.strategies.strategy.strategy)": [[79, "lumibot.strategies.strategy.Strategy.get_yesterday_dividends"]], "start_realtime_bars() (in module lumibot.strategies.strategy.strategy)": [[80, "lumibot.strategies.strategy.Strategy.start_realtime_bars"]], "get_datetime() (in module lumibot.strategies.strategy.strategy)": [[82, "lumibot.strategies.strategy.Strategy.get_datetime"], [91, "lumibot.strategies.strategy.Strategy.get_datetime"]], "get_datetime_range() (in module lumibot.strategies.strategy.strategy)": [[83, "lumibot.strategies.strategy.Strategy.get_datetime_range"], [92, "lumibot.strategies.strategy.Strategy.get_datetime_range"]], "get_last_day() (in module lumibot.strategies.strategy.strategy)": [[84, "lumibot.strategies.strategy.Strategy.get_last_day"], [93, "lumibot.strategies.strategy.Strategy.get_last_day"]], "get_last_minute() (in module lumibot.strategies.strategy.strategy)": [[85, "lumibot.strategies.strategy.Strategy.get_last_minute"], [94, "lumibot.strategies.strategy.Strategy.get_last_minute"]], "get_round_day() (in module lumibot.strategies.strategy.strategy)": [[86, "lumibot.strategies.strategy.Strategy.get_round_day"], [95, "lumibot.strategies.strategy.Strategy.get_round_day"]], "get_round_minute() (in module lumibot.strategies.strategy.strategy)": [[87, "lumibot.strategies.strategy.Strategy.get_round_minute"], [96, "lumibot.strategies.strategy.Strategy.get_round_minute"]], "get_timestamp() (in module lumibot.strategies.strategy.strategy)": [[88, "lumibot.strategies.strategy.Strategy.get_timestamp"], [97, "lumibot.strategies.strategy.Strategy.get_timestamp"]], "localize_datetime() (in module lumibot.strategies.strategy.strategy)": [[89, "lumibot.strategies.strategy.Strategy.localize_datetime"], [98, "lumibot.strategies.strategy.Strategy.localize_datetime"]], "to_default_timezone() (in module lumibot.strategies.strategy.strategy)": [[90, "lumibot.strategies.strategy.Strategy.to_default_timezone"], [99, "lumibot.strategies.strategy.Strategy.to_default_timezone"]], "await_market_to_close() (in module lumibot.strategies.strategy.strategy)": [[101, "lumibot.strategies.strategy.Strategy.await_market_to_close"], [112, "lumibot.strategies.strategy.Strategy.await_market_to_close"]], "await_market_to_open() (in module lumibot.strategies.strategy.strategy)": [[102, "lumibot.strategies.strategy.Strategy.await_market_to_open"], [113, "lumibot.strategies.strategy.Strategy.await_market_to_open"]], "log_message() (in module lumibot.strategies.strategy.strategy)": [[104, "lumibot.strategies.strategy.Strategy.log_message"], [115, "lumibot.strategies.strategy.Strategy.log_message"]], "set_market() (in module lumibot.strategies.strategy.strategy)": [[105, "lumibot.strategies.strategy.Strategy.set_market"], [116, "lumibot.strategies.strategy.Strategy.set_market"]], "sleep() (in module lumibot.strategies.strategy.strategy)": [[106, "lumibot.strategies.strategy.Strategy.sleep"], [117, "lumibot.strategies.strategy.Strategy.sleep"]], "update_parameters() (in module lumibot.strategies.strategy.strategy)": [[107, "lumibot.strategies.strategy.Strategy.update_parameters"], [118, "lumibot.strategies.strategy.Strategy.update_parameters"]], "wait_for_order_execution() (in module lumibot.strategies.strategy.strategy)": [[108, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"], [119, "lumibot.strategies.strategy.Strategy.wait_for_order_execution"]], "wait_for_order_registration() (in module lumibot.strategies.strategy.strategy)": [[109, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"], [120, "lumibot.strategies.strategy.Strategy.wait_for_order_registration"]], "wait_for_orders_execution() (in module lumibot.strategies.strategy.strategy)": [[110, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"], [121, "lumibot.strategies.strategy.Strategy.wait_for_orders_execution"]], "wait_for_orders_registration() (in module lumibot.strategies.strategy.strategy)": [[111, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"], [122, "lumibot.strategies.strategy.Strategy.wait_for_orders_registration"]], "get_chain() (in module lumibot.strategies.strategy.strategy)": [[124, "lumibot.strategies.strategy.Strategy.get_chain"], [132, "lumibot.strategies.strategy.Strategy.get_chain"]], "get_chains() (in module lumibot.strategies.strategy.strategy)": [[125, "lumibot.strategies.strategy.Strategy.get_chains"], [133, "lumibot.strategies.strategy.Strategy.get_chains"]], "get_expiration() (in module lumibot.strategies.strategy.strategy)": [[126, "lumibot.strategies.strategy.Strategy.get_expiration"], [134, "lumibot.strategies.strategy.Strategy.get_expiration"]], "get_greeks() (in module lumibot.strategies.strategy.strategy)": [[127, "lumibot.strategies.strategy.Strategy.get_greeks"], [135, "lumibot.strategies.strategy.Strategy.get_greeks"]], "get_multiplier() (in module lumibot.strategies.strategy.strategy)": [[128, "lumibot.strategies.strategy.Strategy.get_multiplier"], [136, "lumibot.strategies.strategy.Strategy.get_multiplier"]], "get_strikes() (in module lumibot.strategies.strategy.strategy)": [[130, "lumibot.strategies.strategy.Strategy.get_strikes"], [139, "lumibot.strategies.strategy.Strategy.get_strikes"]], "options_expiry_to_datetime_date() (in module lumibot.strategies.strategy.strategy)": [[131, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"], [140, "lumibot.strategies.strategy.Strategy.options_expiry_to_datetime_date"]], "get_option_expiration_after_date() (in module lumibot.strategies.strategy.strategy)": [[138, "lumibot.strategies.strategy.Strategy.get_option_expiration_after_date"]], "cancel_open_orders() (in module lumibot.strategies.strategy.strategy)": [[142, "lumibot.strategies.strategy.Strategy.cancel_open_orders"], [153, "lumibot.strategies.strategy.Strategy.cancel_open_orders"]], "cancel_order() (in module lumibot.strategies.strategy.strategy)": [[143, "lumibot.strategies.strategy.Strategy.cancel_order"], [154, "lumibot.strategies.strategy.Strategy.cancel_order"]], "cancel_orders() (in module lumibot.strategies.strategy.strategy)": [[144, "lumibot.strategies.strategy.Strategy.cancel_orders"], [155, "lumibot.strategies.strategy.Strategy.cancel_orders"]], "create_order() (in module lumibot.strategies.strategy.strategy)": [[145, "lumibot.strategies.strategy.Strategy.create_order"], [156, "lumibot.strategies.strategy.Strategy.create_order"]], "get_asset_potential_total() (in module lumibot.strategies.strategy.strategy)": [[146, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"], [157, "lumibot.strategies.strategy.Strategy.get_asset_potential_total"]], "get_order() (in module lumibot.strategies.strategy.strategy)": [[147, "lumibot.strategies.strategy.Strategy.get_order"], [158, "lumibot.strategies.strategy.Strategy.get_order"]], "get_orders() (in module lumibot.strategies.strategy.strategy)": [[148, "lumibot.strategies.strategy.Strategy.get_orders"], [159, "lumibot.strategies.strategy.Strategy.get_orders"]], "get_selling_order() (in module lumibot.strategies.strategy.strategy)": [[149, "lumibot.strategies.strategy.Strategy.get_selling_order"], [160, "lumibot.strategies.strategy.Strategy.get_selling_order"]], "sell_all() (in module lumibot.strategies.strategy.strategy)": [[150, "lumibot.strategies.strategy.Strategy.sell_all"], [161, "lumibot.strategies.strategy.Strategy.sell_all"]], "submit_order() (in module lumibot.strategies.strategy.strategy)": [[151, "lumibot.strategies.strategy.Strategy.submit_order"], [162, "lumibot.strategies.strategy.Strategy.submit_order"]], "submit_orders() (in module lumibot.strategies.strategy.strategy)": [[152, "lumibot.strategies.strategy.Strategy.submit_orders"], [163, "lumibot.strategies.strategy.Strategy.submit_orders"]], "cash (lumibot.strategies.strategy.strategy property)": [[166, "lumibot.strategies.strategy.Strategy.cash"], [181, "lumibot.strategies.strategy.Strategy.cash"]], "first_iteration (lumibot.strategies.strategy.strategy property)": [[167, "lumibot.strategies.strategy.Strategy.first_iteration"], [182, "lumibot.strategies.strategy.Strategy.first_iteration"]], "initial_budget (lumibot.strategies.strategy.strategy property)": [[168, "lumibot.strategies.strategy.Strategy.initial_budget"], [183, "lumibot.strategies.strategy.Strategy.initial_budget"]], "is_backtesting (lumibot.strategies.strategy.strategy property)": [[169, "lumibot.strategies.strategy.Strategy.is_backtesting"], [184, "lumibot.strategies.strategy.Strategy.is_backtesting"]], "last_on_trading_iteration_datetime (lumibot.strategies.strategy.strategy property)": [[170, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"], [185, "lumibot.strategies.strategy.Strategy.last_on_trading_iteration_datetime"]], "minutes_before_closing (lumibot.strategies.strategy.strategy property)": [[171, "lumibot.strategies.strategy.Strategy.minutes_before_closing"], [186, "lumibot.strategies.strategy.Strategy.minutes_before_closing"]], "minutes_before_opening (lumibot.strategies.strategy.strategy property)": [[172, "lumibot.strategies.strategy.Strategy.minutes_before_opening"], [187, "lumibot.strategies.strategy.Strategy.minutes_before_opening"]], "name (lumibot.strategies.strategy.strategy property)": [[173, "lumibot.strategies.strategy.Strategy.name"], [188, "lumibot.strategies.strategy.Strategy.name"]], "portfolio_value (lumibot.strategies.strategy.strategy property)": [[174, "lumibot.strategies.strategy.Strategy.portfolio_value"], [189, "lumibot.strategies.strategy.Strategy.portfolio_value"]], "pytz (lumibot.strategies.strategy.strategy property)": [[175, "lumibot.strategies.strategy.Strategy.pytz"], [180, "lumibot.strategies.strategy.Strategy.pytz"], [190, "lumibot.strategies.strategy.Strategy.pytz"]], "quote_asset (lumibot.strategies.strategy.strategy property)": [[176, "lumibot.strategies.strategy.Strategy.quote_asset"], [191, "lumibot.strategies.strategy.Strategy.quote_asset"]], "sleeptime (lumibot.strategies.strategy.strategy property)": [[177, "lumibot.strategies.strategy.Strategy.sleeptime"], [192, "lumibot.strategies.strategy.Strategy.sleeptime"]], "timezone (lumibot.strategies.strategy.strategy property)": [[178, "lumibot.strategies.strategy.Strategy.timezone"], [193, "lumibot.strategies.strategy.Strategy.timezone"]], "unspent_money (lumibot.strategies.strategy.strategy property)": [[179, "lumibot.strategies.strategy.Strategy.unspent_money"], [194, "lumibot.strategies.strategy.Strategy.unspent_money"]]}}) \ No newline at end of file diff --git a/docsrc/deployment.rst b/docsrc/deployment.rst index b597c48b..43777d63 100644 --- a/docsrc/deployment.rst +++ b/docsrc/deployment.rst @@ -1,18 +1,47 @@ Deployment Guide ================ -Deploying your application is straightforward with our GitHub deployment buttons for **Render** and **Replit**. Follow the steps below to get your application up and running quickly. 🚀 +This guide will walk you through the deployment process for your trading strategy. We will cover the following topics: + +- **Choosing Your Deployment Platform:** Decide whether to deploy on **Render** or **Replit**. +- **Deploying to Render:** Step-by-step instructions for deploying on Render. +- **Deploying to Replit:** Step-by-step instructions for deploying on Replit. +- **Secrets Configuration:** Detailed information on setting up your environment variables. +- **Broker Configuration:** Required secrets for different brokers. +- **General Environment Variables:** Additional environment variables required for the strategy to function correctly. + +Before deploying your application, ensure that you have the necessary environment variables configured. The environment variables are crucial for the successful deployment of your application. We will cover the required environment variables for different brokers and general environment variables that are essential for the strategy to function correctly. + +Example Strategy for Deployment +------------------------------- .. important:: - **Render** is our recommended platform due to its ease of use and cost-effectiveness. **Replit** is also a great option, especially for developers who prefer editing code directly in the browser. + **Important:** This example strategy is for those without a strategy ready to deploy. If you have your own strategy, skip to `Choosing Your Deployment Platform <#id1>`_. + +Use this example to see the deployment process in action. It’s not intended for real-money use. More details are available in the GitHub repository: `Example Algorithm GitHub `_ + +To run the example strategy, click the Deploy to Render button or the Run on Repl.it button. See `Deploying to Render <#id2>`_ and `Deploying to Replit <#id3>`_ for more details. + +.. raw:: html + + + +Render is recommended for ease of use and affordability. Replit is more expensive but great for in-browser code editing, if you want to see/edit the code directly in your browser. .. tip:: **Tip:** Scroll down to the :ref:`Secrets Configuration ` section for detailed information on setting up your environment variables. Choosing Your Deployment Platform --------------------------------- +--------------------------------- We recommend using **Render** for deployment because it is easier to use and more affordable compared to Replit. However, **Replit** is an excellent choice for developers who want to edit code directly in the browser. @@ -47,7 +76,8 @@ Render offers powerful deployment options with easy scalability. Follow these st **Figure 2:** Deploying Blueprint on Render. 3. **Navigate to the Worker** - - **Navigate to the Background Worker:** Click on the name of the background worker, e.g., **options-butterfly-condor-worker-afas (Starter)** so you can configure theis specific bot worker (we are currently in the blueprint configuration, not the bot itself). + + - **Navigate to the Background Worker:** Click on the name of the background worker, e.g., **options-butterfly-condor-worker-afas (Starter)** so you can configure this specific bot worker (we are currently in the blueprint configuration, not the bot itself). .. figure:: _static/images/render_worker.png :alt: Worker on Render @@ -57,7 +87,6 @@ Render offers powerful deployment options with easy scalability. Follow these st 4. **Configure Environment Variables** - - **Select Environment:** On the worker's page, select **Environment** from the left sidebar. - **Edit Environment Variables:** Click **Edit** and fill in the required keys as detailed in the :ref:`Secrets Configuration ` section. Once you have added your values for the environment variables, click **Save**. - **Delete Unnecessary Variables:** If you have any unnecessary environment variables, you can delete them by clicking the **Delete (trashcan)** button next to the variable. One example of an unnecessary variable is `POLYGON_API_KEY` which is only used if you are backtesting. @@ -66,7 +95,7 @@ Render offers powerful deployment options with easy scalability. Follow these st :alt: Environment Settings on Render :align: center - **Figure 3:** Editing Environment Variables on Render. + **Figure 4:** Editing Environment Variables on Render. .. note:: @@ -80,7 +109,7 @@ Render offers powerful deployment options with easy scalability. Follow these st :alt: Restart Service on Render :align: center - **Figure 4:** Redeploying the Service on Render using the latest commit. + **Figure 5:** Redeploying the Service on Render using the latest commit. 6. **View The Logs** @@ -90,21 +119,21 @@ Render offers powerful deployment options with easy scalability. Follow these st :alt: Logs on Render :align: center - **Figure 5:** Viewing Logs on Render. + **Figure 6:** Viewing Logs on Render. 7. **Monitor Bot Performance** - **Monitor Performance:** Go to your broker account to monitor the bot's performance and ensure that it is executing trades as expected. - .. figure:: _static/images/replit_monitor_bot.png - :alt: Monitor bot performance - :align: center - - **Figure 13:** Monitoring bot performance in Replit. + .. figure:: _static/images/replit_monitor_bot.png + :alt: Monitor bot performance + :align: center + + **Figure 7:** Monitoring bot performance. - .. note:: - - **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. + .. note:: + + **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. Deploying to Replit ------------------- @@ -119,7 +148,7 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Deploy on Replit Button :align: center - **Figure 6:** Deploy on Replit button on GitHub. + **Figure 8:** Deploy on Replit button on GitHub. 2. **Open Secrets Configuration** @@ -132,7 +161,7 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Replit Tools -> Secrets :align: center - **Figure 7:** Accessing Secrets in Replit. + **Figure 9:** Accessing Secrets in Replit. 3. **Add Required Secrets** @@ -142,7 +171,7 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Adding a new secret in Replit :align: center - **Figure 8:** Adding a new secret in Replit. + **Figure 10:** Adding a new secret in Replit. 4. **Test Run the Application** @@ -154,13 +183,13 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Running the application in Replit :align: center - **Figure 9:** Running the application in Replit. + **Figure 11:** Running the application in Replit. .. figure:: _static/images/replit_logs.png :alt: Viewing logs in Replit :align: center - **Figure 10:** Viewing logs in Replit. + **Figure 12:** Viewing logs in Replit. 5. **Deployment Part 1** @@ -171,27 +200,30 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Select Reserved VM and Background Worker :align: center - **Figure 10:** Selecting Reserved VM and Background Worker on Replit. + **Figure 13:** Selecting Reserved VM and Background Worker on Replit. + + .. note:: - **Note:** Ensure that you have downgraded the vCPU before selecting the Background Worker to optimize costs effectively. + **Note:** Ensure that you have downgraded the vCPU before selecting the Background Worker to optimize costs effectively. 6. **Deployment Part 2** + - **Downgrade vCPU:** We recommend downgrading to **0.25 vCPU** to reduce costs. As of today, it costs **$6/month** compared to the default **$12/month** for **0.5 vCPU**. - **Select Background Worker:** Choose **"Background Worker"**. - **Click Deploy:** Click **"Deploy"** to deploy your application. - **Wait for Deployment:** The deployment process may take a few minutes. Once completed, you will see a success message. - .. figure:: _static/images/replit_deploy.png - :alt: Deploying the application in Replit - :align: center - - **Figure 11:** Deploying the application in Replit. + .. figure:: _static/images/replit_deploy.png + :alt: Deploying the application in Replit + :align: center - .. figure:: _static/images/replit_deploy_process.png - :alt: Deployment process - :align: center + **Figure 14:** Deploying the application in Replit. - **Figure 12:** Deployment process in Replit. + .. figure:: _static/images/replit_deploy_process.png + :alt: Deployment process + :align: center + + **Figure 15:** Deployment process in Replit. 7. **Check The Logs** @@ -201,22 +233,21 @@ Replit is a versatile platform that allows you to deploy applications quickly. F :alt: Logs on Replit :align: center - **Figure 12:** Viewing Logs on Replit. + **Figure 16:** Viewing Logs on Replit. 8. **Monitor Bot Performance** - **Monitor Performance:** Go to your broker account to monitor the bot's performance and ensure that it is executing trades as expected. - .. figure:: _static/images/replit_monitor_bot.png - :alt: Monitor bot performance - :align: center - - **Figure 13:** Monitoring bot performance in Replit. + .. figure:: _static/images/replit_monitor_bot.png + :alt: Monitor bot performance + :align: center - .. note:: - - **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. + **Figure 17:** Monitoring bot performance. + + .. note:: + **Note:** Monitor the bot's performance regularly to ensure that it is functioning correctly and making profitable trades. Secrets Configuration ===================== @@ -322,7 +353,7 @@ Kraken is an excellent cryptocurrency broker offering very low fees and a wide r - abcdef1234567890abcdef1234567890abcdef1234 Interactive Brokers Configuration --------------------------------- +--------------------------------- Interactive Brokers is ideal for international users as they offer a wide array of asset classes, including stocks, options, futures, forex, CFDs, and more. Their global presence makes them suitable for users around the world. To create an account, visit the `Interactive Brokers `_ website. @@ -347,7 +378,7 @@ Interactive Brokers is ideal for international users as they offer a wide array - Subaccount1 General Environment Variables -============================ +============================= In addition to broker-specific secrets, the following environment variables are required for the strategy to function correctly: @@ -395,4 +426,4 @@ Conclusion Deploying your application is straightforward with our GitHub deployment buttons for **Render** and **Replit**. By following this guide, you can quickly set up your environment variables and get your application live. Happy deploying! 🎉 -For further assistance, refer to the [Render Documentation](https://render.com/docs) or the [Replit Documentation](https://docs.replit.com/). +For further assistance, refer to the `Render Documentation `_ or the `Replit Documentation `_.

    General Environment Variables#