Skip to main content

Backtesting and Trading Library, Made by Lumiwealth

Project description

Lumibot - Algorithmic Trading Library

Backtesting and trading for stocks, options, crypto, futures and more!

Documentation - 👇 Start Here 👇

To get started with Lumibot, you can check out our documentation below.

Check out the documentation for the project here: 👉 http://lumibot.lumiwealth.com/ 👈

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!

Steps to contribute:

  1. Clone the repository to your local machine
  2. Create a new branch for your feature
  3. Run pip install -r requirements_dev.txt to install the developer dependencies
  4. Install all the requriements from setup.py: pip install -e .
  5. Make your changes
  6. Run pytest to make sure all the tests pass
  7. Create a pull request to merge your branch into master

Running Tests

We use pytest for our testing framework. To run the tests, you can run the following command:

pytest

Showing Code Coverage

To show code coverage, you can run the following command:

coverage run; coverage report; coverage html

Adding an Alias on Linux or MacOS

This will show you the code coverage in the terminal and also create a folder called "htmlcov" which will have a file called "index.html". You can open this file in your browser to see the code coverage in a more readable format.

If you don't want to keep typing out the command, you can add it as an alias in bash. To do this, you can run the following command:

alias cover='coverage run; coverage report; coverage html'

This will now allow you to run the command by just typing "cover" in the terminal.

cover

If you want to also add it to your .bashrc file. You can do this by running the following command:

echo "alias cover='coverage run; coverage report; coverage html'" >> ~/.bashrc

Adding an Alias on Windows

If you are on Windows, you can add an alias by running the following command:

Add to your PowerShell Profile: (profile.ps1)

function cover { 
 coverage run
 coverage report
 coverage html
}

Setting Up PyTest in VS Code

To set up in VS Code for debugging, you can add the following to your launch.json file under "configurations". This will allow you to go into "Run and Debug" and run the tests from there, with breakpoints and everything.

NOTE: You may need to change args to the path of your tests folder.

{
    "name": "Python: Pytest",
    "type": "python",
    "request": "launch",
    "module": "pytest",
    "args": [
        "lumibot/tests"
    ],
    "console": "integratedTerminal",
}

Here's an example of an actual launch.json file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Pytest",
            "type": "python",
            "request": "launch",
            "module": "pytest",
            "args": [
                "lumibot/tests"
            ],
            "console": "integratedTerminal",
        }
    ]
}

Community

If you want to learn more about Lumibot or Algorithmic Trading then you will love out communities! You can join us on Discord.

Join us on Discord: https://discord.gg/TmMsJCKY3T

Courses

If you need extra help building your algorithm, we have courses to help you out.

For our Algorithmic Trading course: https://lumiwealth.com/algorithmic-trading-landing-page

For our Machine Learning for Trading course: https://www.lumiwealth.com/product-category/machine-learning-purchase/

For our Options Trading course: https://www.lumiwealth.com/product-category/options-trading-purchase/

License

This library is covered by the MIT license for open sourced software which can be found here: https://github.com/Lumiwealth/lumibot/blob/master/LICENSE

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lumibot-2.8.7.tar.gz (10.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lumibot-2.8.7-py3-none-any.whl (493.7 kB view details)

Uploaded Python 3

File details

Details for the file lumibot-2.8.7.tar.gz.

File metadata

  • Download URL: lumibot-2.8.7.tar.gz
  • Upload date:
  • Size: 10.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for lumibot-2.8.7.tar.gz
Algorithm Hash digest
SHA256 02fdd591e7a6bcc82502ae2d99c3ecc8d6799187a8a8e622d4b0159d3664f421
MD5 36a2cde566c1dbaeed1dbd0e89947841
BLAKE2b-256 880dd7c1e10af5cbcee197b3325e12f1c7470426c9beb73e77f85fd61c6e565c

See more details on using hashes here.

File details

Details for the file lumibot-2.8.7-py3-none-any.whl.

File metadata

  • Download URL: lumibot-2.8.7-py3-none-any.whl
  • Upload date:
  • Size: 493.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for lumibot-2.8.7-py3-none-any.whl
Algorithm Hash digest
SHA256 940a0a37731b1d948aedacc1372c4dffa05c4e14132851aa3b4d2a48bc0e9b6a
MD5 583c1ae32a1836abd1d83e9f30d9f2e2
BLAKE2b-256 c36aa593d9680a4447ea5de23df3656cecff493635035bd20fbe5aa3d883b1ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page