pwb-backtest


Namepwb-backtest JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/paperswithbacktest/pwb-backtest
SummaryA toolbox library for quant traders
upload_time2024-09-26 07:01:03
maintainerNone
docs_urlNone
authorYour Name
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img src="static/images/systematic-trading.jpeg" height=200 alt=""/>
  <h1>Papers With Backtest Toolbox</h1>
</div>

The `pwb-toolbox` package is designed to provide tools and resources for systematic trading strategies. It includes datasets and strategy ideas to assist in developing and backtesting trading algorithms. For detailed instructions on how to use this package effectively, please refer to the associated Substack publication by visiting: https://blog.paperswithbacktest.com/.


## Installation

To install the pwb-toolbox package:

```bash
pip install pwb-toolbox
```

To login to Huggingface Hub with Access Token

```bash
huggingface-cli login
```

## Usage

The `pwb-toolbox` package offers a range of functionalities for systematic trading analysis. Here are some examples of how to utilize the package:

- Import `pwb_toolbox.datasets` and sequentially loads datasets for different asset classes, such as bonds, commodities, cryptocurrencies, ETFs, forex, indices, and stocks, using the `load_dataset` function:

```python
import pwb_toolbox.datasets as pwb_ds

df = ds.load_dataset("Bonds-Daily-Price")
df = ds.load_dataset("Commodities-Daily-Price")
df = ds.load_dataset("Cryptocurrencies-Daily-Price")
df = ds.load_dataset("ETFs-Daily-Price")
df = ds.load_dataset("Forex-Daily-Price")
df = ds.load_dataset("Indices-Daily-Price")
df = ds.load_dataset("Stocks-Daily-Price")
```

- Load daily stock price data for specific symbols using the load_dataset function. The first call retrieves data for Apple and Microsoft. The second call retrieves the same stocks but without price adjustments (`adjust=False`). The third call loads daily price data for the S&P 500 index:

```python
import pwb_toolbox.datasets as pwb_ds

df = pwb_ds.load_dataset(
    "Stocks-Daily-Price",
    ["AAPL", "MSFT"],
)

df = pwb_ds.load_dataset(
    "Stocks-Daily-Price",
    ["AAPL", "MSFT"],
    adjust=False,
)

df = pwb_ds.load_dataset(
    "Stocks-Daily-Price",
    ["sp500"],
)
```

- The `extend=True` argument instructs the function to return an extended historical data using indices, commodities, and bonds data.

```python
import pwb_toolbox.datasets as pwb_ds

df = pwb_ds.load_dataset(
    "ETFs-Daily-Price",
    ["SPY", "IEF"],
    extend=True,
)
```

- The argument `rate_to_price=False` specifies that bond yield rates should not be converted to price values in the returned data:

```python
import pwb_toolbox.datasets as pwb_ds

df = pwb_ds.load_dataset(
    "Bonds-Daily-Price",
    ["US10Y"],
    rate_to_price=False,
)
```

- The argument `to_usd=False` indicates that the data should not be converted to U.S. dollars, implying that it might be available in another currency.

```python
import pwb_toolbox.datasets as pwb_ds

df = pwb_ds.load_dataset(
    "Indices-Daily-Price",
    ["US10Y"],
    to_usd=False,
)
```

## Contributing

Contributions to the `pwb-toolbox` package are welcome! If you have any improvements, new datasets, or strategy ideas to share, please follow these guidelines:

1. Fork the repository and create a new branch for your feature.
2. Make your changes and ensure they adhere to the package's coding style.
3. Write tests to validate the functionality or provide sample usage examples.
4. Submit a pull request, clearly explaining the purpose and benefits of your contribution.

Please note that all contributions are subject to review and approval by the maintainers.

## Build the Package

To build your package, run:

```bash
python -m pip install --upgrade build
python -m build
```

## License

The `pwb-toolbox` package is released under the MIT license. See the LICENSE file for more details.

## Contact

For any questions, issues, or suggestions regarding the `pwb-toolbox` package, please contact the maintainers or create an issue on the repository. We appreciate your feedback and involvement in improving the package.

Happy trading!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/paperswithbacktest/pwb-backtest",
    "name": "pwb-backtest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "hello@paperswithbacktest.com",
    "download_url": "https://files.pythonhosted.org/packages/00/c0/4085e7e26d23389b35e7f97cc58314dc26a4294343f97c943813f94a68ed/pwb_backtest-0.1.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img src=\"static/images/systematic-trading.jpeg\" height=200 alt=\"\"/>\n  <h1>Papers With Backtest Toolbox</h1>\n</div>\n\nThe `pwb-toolbox` package is designed to provide tools and resources for systematic trading strategies. It includes datasets and strategy ideas to assist in developing and backtesting trading algorithms. For detailed instructions on how to use this package effectively, please refer to the associated Substack publication by visiting: https://blog.paperswithbacktest.com/.\n\n\n## Installation\n\nTo install the pwb-toolbox package:\n\n```bash\npip install pwb-toolbox\n```\n\nTo login to Huggingface Hub with Access Token\n\n```bash\nhuggingface-cli login\n```\n\n## Usage\n\nThe `pwb-toolbox` package offers a range of functionalities for systematic trading analysis. Here are some examples of how to utilize the package:\n\n- Import `pwb_toolbox.datasets` and sequentially loads datasets for different asset classes, such as bonds, commodities, cryptocurrencies, ETFs, forex, indices, and stocks, using the `load_dataset` function:\n\n```python\nimport pwb_toolbox.datasets as pwb_ds\n\ndf = ds.load_dataset(\"Bonds-Daily-Price\")\ndf = ds.load_dataset(\"Commodities-Daily-Price\")\ndf = ds.load_dataset(\"Cryptocurrencies-Daily-Price\")\ndf = ds.load_dataset(\"ETFs-Daily-Price\")\ndf = ds.load_dataset(\"Forex-Daily-Price\")\ndf = ds.load_dataset(\"Indices-Daily-Price\")\ndf = ds.load_dataset(\"Stocks-Daily-Price\")\n```\n\n- Load daily stock price data for specific symbols using the load_dataset function. The first call retrieves data for Apple and Microsoft. The second call retrieves the same stocks but without price adjustments (`adjust=False`). The third call loads daily price data for the S&P 500 index:\n\n```python\nimport pwb_toolbox.datasets as pwb_ds\n\ndf = pwb_ds.load_dataset(\n    \"Stocks-Daily-Price\",\n    [\"AAPL\", \"MSFT\"],\n)\n\ndf = pwb_ds.load_dataset(\n    \"Stocks-Daily-Price\",\n    [\"AAPL\", \"MSFT\"],\n    adjust=False,\n)\n\ndf = pwb_ds.load_dataset(\n    \"Stocks-Daily-Price\",\n    [\"sp500\"],\n)\n```\n\n- The `extend=True` argument instructs the function to return an extended historical data using indices, commodities, and bonds data.\n\n```python\nimport pwb_toolbox.datasets as pwb_ds\n\ndf = pwb_ds.load_dataset(\n    \"ETFs-Daily-Price\",\n    [\"SPY\", \"IEF\"],\n    extend=True,\n)\n```\n\n- The argument `rate_to_price=False` specifies that bond yield rates should not be converted to price values in the returned data:\n\n```python\nimport pwb_toolbox.datasets as pwb_ds\n\ndf = pwb_ds.load_dataset(\n    \"Bonds-Daily-Price\",\n    [\"US10Y\"],\n    rate_to_price=False,\n)\n```\n\n- The argument `to_usd=False` indicates that the data should not be converted to U.S. dollars, implying that it might be available in another currency.\n\n```python\nimport pwb_toolbox.datasets as pwb_ds\n\ndf = pwb_ds.load_dataset(\n    \"Indices-Daily-Price\",\n    [\"US10Y\"],\n    to_usd=False,\n)\n```\n\n## Contributing\n\nContributions to the `pwb-toolbox` package are welcome! If you have any improvements, new datasets, or strategy ideas to share, please follow these guidelines:\n\n1. Fork the repository and create a new branch for your feature.\n2. Make your changes and ensure they adhere to the package's coding style.\n3. Write tests to validate the functionality or provide sample usage examples.\n4. Submit a pull request, clearly explaining the purpose and benefits of your contribution.\n\nPlease note that all contributions are subject to review and approval by the maintainers.\n\n## Build the Package\n\nTo build your package, run:\n\n```bash\npython -m pip install --upgrade build\npython -m build\n```\n\n## License\n\nThe `pwb-toolbox` package is released under the MIT license. See the LICENSE file for more details.\n\n## Contact\n\nFor any questions, issues, or suggestions regarding the `pwb-toolbox` package, please contact the maintainers or create an issue on the repository. We appreciate your feedback and involvement in improving the package.\n\nHappy trading!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A toolbox library for quant traders",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/paperswithbacktest/pwb-backtest"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "374457dc01c271980c1bed7532b0be4c840548fb92809b981686af7d7d18bdbe",
                "md5": "b1461d235aa3d5dd3c2dd14e1900bae1",
                "sha256": "c0762bab38c130949a11ffb9fcd4c7b53ea22acff951d6ed8b3ed5765f460baf"
            },
            "downloads": -1,
            "filename": "pwb_backtest-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b1461d235aa3d5dd3c2dd14e1900bae1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9065,
            "upload_time": "2024-09-26T07:01:01",
            "upload_time_iso_8601": "2024-09-26T07:01:01.477441Z",
            "url": "https://files.pythonhosted.org/packages/37/44/57dc01c271980c1bed7532b0be4c840548fb92809b981686af7d7d18bdbe/pwb_backtest-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00c04085e7e26d23389b35e7f97cc58314dc26a4294343f97c943813f94a68ed",
                "md5": "8fbac433ead8f862eb5c1acf2d59b770",
                "sha256": "0c4c0a5d21430d3334f8ec337feb8afd10048f46e55afea7a1bb40da986e30ec"
            },
            "downloads": -1,
            "filename": "pwb_backtest-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8fbac433ead8f862eb5c1acf2d59b770",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8970,
            "upload_time": "2024-09-26T07:01:03",
            "upload_time_iso_8601": "2024-09-26T07:01:03.404566Z",
            "url": "https://files.pythonhosted.org/packages/00/c0/4085e7e26d23389b35e7f97cc58314dc26a4294343f97c943813f94a68ed/pwb_backtest-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-26 07:01:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "paperswithbacktest",
    "github_project": "pwb-backtest",
    "github_not_found": true,
    "lcname": "pwb-backtest"
}
        
Elapsed time: 0.32335s