Metadata-Version: 2.1
Name: pybacktestchain
Version: 0.2.1
Summary: Store your backtests in a Blockchain
License: MIT
Author: Juan F. Imbet
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: colorama (>=0.4.6,<0.5.0)
Requires-Dist: numpy (>=1.23.5,<2.0)
Requires-Dist: pandas (>=2.2.2,<3.0.0)
Requires-Dist: scipy (<1.14.0)
Requires-Dist: sec-cik-mapper (>=2.1.0,<3.0.0)
Requires-Dist: yfinance (>=0.2.41,<0.3.0)
Description-Content-Type: text/markdown

# pybacktestchain

Store your backtests in a Blockchain

## Installation

```bash
$ pip install pybacktestchain
```

## Usage

```python

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`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).

