semvec/pypi-packages huggingface dataset:
pybacktestchain-options 0.1.1
A backtesting package for options
License: MIT
Requires Python: <4.0,>=3.10

# pybacktestchain_options

A backtesting package for equity and commodity.

On the equity side you can test all the strategies defined in pybacktestchain

On the commo side you can try the mean reversion play of the long term price on different commodities (OIL, GAS, WHEAT, CORN).

## Installation

```bash
$ pip install pybacktestchain_options
```

## Usage

You can either use the following code : 

```python

from datetime import datetime
import pandas as pd
from pybacktestchain.data_module import get_stocks_data 
from universal_backtest import UniversalBackTest

if __name__ == "__main__":
    # Parameters
    commo_equity = "COMMO"
    backtest = UniversalBackTest(initial_date=datetime(2023, 4, 1),
                                  final_date=datetime(2023, 12, 5),
                                    commo_equity=commo_equity)

    backtest.run_backtest()

```

Or you can replace commo_equity with "EQUITY" and adjist the parameters as it is done in pybacktestchain.



The other way to use it is through an API call : 

- run the file api.py
- open a new terminal and copy the following command lines : 

```bash 

curl -X POST http://127.0.0.1:5000/run_backtest \
-H "Content-Type: application/json" \
-d '{"commo_equity": "COMMO", "initial_date": "2023-01-01", "final_date": "2023-12-31", "cash": 1000000, "verbose": true}'
```


## 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_options` was created by Guillaume Touly. It is licensed under the terms of the MIT license.

## Credits

`pybacktestchain_options` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
aixtract 1.0.0
Utility to prepare files for AI analysis
License: MIT
Requires Python: <4.0,>=3.13

# aixtract

A simple utility to prepare files for AI analysis by copying them with their directory structure encoded in the filename.

## Description

`aixtract` reads a list of file paths from a `.aixtract` file and copies each file to a new directory, encoding the original path hierarchy into the filename using double underscores (`__`).  
For example, `src/models/user.py` becomes `src__models__user.py`.

This is particularly useful when preparing files to upload to AI assistants that don't support directory structures.

## Installation

```sh
pip install aixtract
```

## Usage

1. Create a `.aixtract` file in your project directory listing the files you want to process:

```plaintext
src/models/user.py
tests/test_user.py
config/settings.json
# Lines starting with # are ignored
```

2. Run the command:

```sh
aixtract
```

The utility will:

1. Create a new directory in your Downloads folder named `project_name_YYYYMMDD_HHMMSS`
2. Copy each listed file to this directory, converting path separators to double underscores
3. Preserve file permissions and metadata
4. Open the target directory automatically (on supported platforms)

## Example

If your project structure looks like this:

```txt
myproject/
├── .aixtract
├── src/
│   └── models/
│       └── user.py
├── tests/
│   └── test_user.py
└── config/
    └── settings.json
```

And your `.aixtract` contains:

```txt
src/models/user.py
tests/test_user.py
config/settings.json
```

Running `aixtract` will create:

```txt
/tmp/myproject_20250101_123456/
├── src__models__user.py
├── tests__test_user.py
└── config__settings.json
```

## Error Handling

The utility will:

- Skip files that don't exist with a warning
- Skip empty lines and comments in `.aixtract`
- Exit with error if `.aixtract` file is not found
- Show clear error messages for any issues during copying

## Requirements

- Python 3.8 or later
- Works on macOS, Linux, and Windows (directory opening feature supported on macOS and Linux)