Skip to main content

Store your backtests in a Blockchain

Project description

pybacktestchain

Store your backtests in a Blockchain

Installation

$ pip install pybacktestchain

Usage

from pybacktestchain.data_module import FirstTwoMoments
from pybacktestchain.broker import Backtest, StopLoss
from pybacktestchain.blockchain import load_blockchain
from datetime import datetime

# Set verbosity for logging
verbose = False  # Set to True to enable logging, or False to suppress it

backtest = Backtest(
    initial_date=datetime(2019, 1, 1),
    final_date=datetime(2020, 1, 1),
    information_class=FirstTwoMoments,
    risk_model=StopLoss,
    name_blockchain='backtest',
    verbose=verbose
)

backtest.run_backtest()

block_chain = load_blockchain('backtest')
print(str(block_chain))
# check if the blockchain is valid
print(block_chain.is_valid())

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 as part of a project for the course Python Programming for Finance at Paris Dauphine University - PSL.

. 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

pybacktestchain-0.2.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

pybacktestchain-0.2.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pybacktestchain-0.2.1.tar.gz.

File metadata

  • Download URL: pybacktestchain-0.2.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10

File hashes

Hashes for pybacktestchain-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ee94f349a95926b3f26138a2674cb00c2d61311265c64206324753cac80132ed
MD5 39f12dadb0ba2bd794be312c7e707191
BLAKE2b-256 a4bd8148ae654ae4618d785ad88389129afdbd4ad4179b0c7dddf4b679deea2f

See more details on using hashes here.

File details

Details for the file pybacktestchain-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pybacktestchain-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10

File hashes

Hashes for pybacktestchain-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc0af615dc059c67b87250687648431799de77dc1d4cc6d753b55063c4fc1aa7
MD5 ffa7c0fd97594aa0d714bfa9f1247d95
BLAKE2b-256 77e5fab0204dde02b26c64125ca0452683d2d8dcd038e365c2d2fa471a67a819

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