Skip to main content

Create, analyze, and compare backtesting strategies for financial portfolios. Stores backtest results securely on a blockchain.

Project description

pybacktestchain

Tool for creating, analyzing, and comparing backtesting strategies for financial portfolios. Stores backtest results securely on a blockchain.

Features

  • Backtest Multiple Strategies: Includes Momentum, Mean Reversion, Equal Weight, and First Two Moments.
  • Customizable Settings: Adjust rebalancing frequencies (daily, weekly, monthly) and define custom universes of assets.
  • Performance Metrics: Evaluate portfolios with metrics like Annualized Returns, Volatility, Sharpe Ratio, and Max Drawdown.
  • User-Friendly CLI: Easily execute backtests through the command-line interface.
  • Extensible Framework: Add new strategies, metrics, or features with minimal effort.
  • Secure Blockchain Storage: Store and verify your backtests using blockchain technology.

Installation

$ pip install pybacktestchain

Usage

  • Run backtest via CLI
  • Add your custom strategy; extend the framework by:
    1. Creating a new class inheriting from {Information}.
    2. Implementing the {compute_portfolio} and {compute_information} methods.
    3. Registering your strategy in the CLI's {strategy_map}.

Know Issues

  • While the framework supports multiple strategies (e.g., Momentum, Mean Reversion), not all strategies produced valid backtest results.
  • Data inconsistencies or edge cases in the portfolio allocation logic may be the reason behind.
  • Future improvements could address these by debugging specific strategy implementation.

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

pybacktestchain was created by Juan F. Imbet. It is licensed under the terms of the MIT license.

Credits

pybacktestchain was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

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

Source Distribution

projectm2_hermine_delamaire-0.7.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

projectm2_hermine_delamaire-0.7.3-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file projectm2_hermine_delamaire-0.7.3.tar.gz.

File metadata

  • Download URL: projectm2_hermine_delamaire-0.7.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.10 Darwin/24.2.0

File hashes

Hashes for projectm2_hermine_delamaire-0.7.3.tar.gz
Algorithm Hash digest
SHA256 2d98e00c9253710ed805689e049bb4599bb4845b12dcf43f316822fa954e2903
MD5 f7ccb1a8dae30d0ca6687f6f831e2f07
BLAKE2b-256 49e1e066e9b9643b002a116943461106e969c705dbe1d7d45745dc5721fd2770

See more details on using hashes here.

File details

Details for the file projectm2_hermine_delamaire-0.7.3-py3-none-any.whl.

File metadata

File hashes

Hashes for projectm2_hermine_delamaire-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6cad2e5f12432706c356f15c9b925d21d82399c21e6c5d138469e34524357c8d
MD5 1b9e706ef19cd4a04e2c2ce5b07942d4
BLAKE2b-256 1dbdf816c87686d6d51e045e049f585a5af0a21d9213b4ecc75901624763be96

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