Skip to content

Lumiwealth-Strategies/stock_example_algo

Repository files navigation

Disclaimer

This strategy and the accompanying code are provided by Lumiwealth for educational purposes only. They are not intended for use with real money nor should they be construed as investment advice. The tools are designed for financial analysis and should not form the sole basis of any investment decisions. Please be aware that Lumiwealth is not a licensed investment advisor.

  1. Hypothetical Performance: Any backtesting results presented are hypothetical and do not represent actual trading. Past performance is not indicative of future results. There is no guarantee that the strategy will perform similarly in the future, nor is there any assurance of profitability.

  2. User Risk: The strategy and code may not be suitable for your specific financial situation and risk tolerance. It is crucial to consult with a qualified financial professional before making any investment decisions.

  3. Code Warranty: The code is provided 'as is' without any warranty. While efforts have been made to ensure its correctness, Lumiwealth does not guarantee that the code is free from bugs or errors.

  4. Information Accuracy: All accompanying information, including strategy descriptions, backtests, etc., is provided without warranty and may be subject to errors or inaccuracies. Lumiwealth reserves the right to make changes to the code and information at any time without notice.

  5. Intellectual Property: The code, along with any documentation or related materials, is the proprietary property of Lumiwealth. Unauthorized copying, distribution, or resale of the code is strictly prohibited. Users must delete all copies of the code upon termination of their subscription or service agreement with Lumiwealth.

  6. License: For detailed licensing information, please refer to the license.

  7. Scope of Agreement: This disclaimer is specific to the strategy and code in question and does not supersede the broader Terms of Service agreed upon during the Lumiwealth signup process. It is an integral part of the larger legal framework governing your use of Lumiwealth's services.

By using this strategy and code, you acknowledge and agree to the terms outlined in this disclaimer, which form part of the agreement between you and Lumiwealth. Your agreement to these terms, as part of your use of the strategy and code, is acknowledged by your continued use of Lumiwealth's services.

Strategy Description

This strategy is an example of a stock trading strategy. It splits the cash available equally between the stocks in the symbols list right at the start of the strategy and holds the stocks indefinitely. This is a simple strategy that is used to demonstrate how to create a stock trading strategy in Lumibot, and not meant to be used for live trading.

Getting Started

To run this strategy on Replit or Render, click on the buttons below. This will open the strategy on the respective platform. You can then follow the instructions in the Deployment Guide to set up the strategy.

TIP: Right click on the button and open it in a new tab so that you can see the instructions while you are setting up the strategy (otherwise you will have to press the back button to see the instructions again).

Deploy to Render

Run on Repl.it

How to Run the Strategy

The full guide on how to run the strategy is available in the Deployment Guide.

Click here for instructions

To get your bot live and trading, follow these quick steps:

  1. Choose Your Platform: We recommend deploying on either Render or Replit for ease and affordability. • Deploy on RenderDeploy on Replit
  2. Configure Your Secrets: Set up your environment variables (e.g., API keys) and broker-specific settings by adding them to the secrets tab. Here's the section on how to set up secrets.
  3. Deploy & Monitor: Follow our detailed instructions for Render or Replit, and once your bot is live, monitor its performance through your broker account. You can also check the logs on the deployment platform for any errors or warnings.

How to Get a Bioguide ID

If you want to create your own configurations you will need the bioguide ids of those members of congress. You can get the bioguide id by searching for the member of congress on the Quiver Quant website. The bioguide id is the last part of the url of the member of congress's page on the Quiver Quant website. For example, the bioguide id for Nancy Pelosi is "P000197" because the url of her page on the Quiver Quant website is "https://www.quiverquant.com/congresstrading/politician/Nancy%20Pelosi-P000197".

Modifying the Parameters

The strategy parameters can be modified by editing the "parameters" section of the main.py file, usually near the top of the file just under the class definition. It is a python dictionary that looks like this:

parameters = {
    "my_parameter_1": 1,
    ...
}

You can change the values of the parameters by editing the numbers in the dictionary. For example, if you wanted to change the value of "my_parameter_1" to 2, you would change the code to look like this:

parameters = {
    "my_parameter_1": 2,
    ...
}

Each parameter controls a different aspect of the strategy, and the description of each parameter is given next to the parameter in the code. Changing the parameters can have a big effect on the performance of the strategy, so it is recommended that you backtest the strategy after changing the parameters to see how it would have performed.

Backtest

This is a backtest of the strategy using the current parameters in the code. Remember that past performance is not indicative of future results and there is no guarantee that the backtest was performed correctly or that the strategy will perform without errors when run live.

Tearsheet generated by QuantStats

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published