atr-adaptive-laguerre


Nameatr-adaptive-laguerre JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryATR-adaptive Laguerre RSI for non-anticipative feature engineering in seq-2-seq forecasting
upload_time2025-10-07 04:29:49
maintainerNone
docs_urlNone
authorEon Labs Ltd.
requires_python>=3.10
licenseMIT
keywords atr features laguerre rsi seq2seq trading volatility
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ATR-Adaptive Laguerre RSI

Non-anticipative volatility-adaptive momentum indicator for sequence-to-sequence forecasting.

## Overview

This library implements the ATR-Adaptive Laguerre RSI indicator, designed for robust feature engineering in financial time series forecasting. The indicator combines:

- **True Range (TR)** - Volatility measurement including gaps
- **ATR with Min/Max Tracking** - Rolling volatility envelope
- **Adaptive Coefficient** - Volatility-normalized adaptation
- **Laguerre 4-Stage Cascade** - Low-lag smoothing filter
- **Laguerre RSI** - Momentum from filter stage differences

## Key Features

- ✅ **Non-anticipative**: Guaranteed no lookahead bias
- ✅ **O(1) Incremental**: Efficient streaming updates with `.update()` method
- ✅ **Multi-interval**: Supports 1s-1d timeframes with 121-feature extraction
- ✅ **Flexible datetime**: Works with DatetimeIndex, 'date' column, or custom column names
- ✅ **Validated**: Information coefficient > 0.03 on k-step-ahead returns

## Installation

```bash
uv add atr-adaptive-laguerre
```

## Quick Start

### Basic Usage (Single RSI Value)

```python
from atr_adaptive_laguerre import ATRAdaptiveLaguerreRSI, ATRAdaptiveLaguerreRSIConfig
import pandas as pd

# Create indicator with flexible datetime support
config = ATRAdaptiveLaguerreRSIConfig(
    atr_period=14,
    smoothing_period=5,
    date_column='date'  # Or use DatetimeIndex
)
indicator = ATRAdaptiveLaguerreRSI(config)

# Batch processing
rsi_series = indicator.fit_transform(df)  # Returns pd.Series

# Incremental updates (O(1) streaming)
new_row = {'open': 100, 'high': 101, 'low': 99, 'close': 100.5, 'volume': 1000}
new_rsi = indicator.update(new_row)  # Returns float
```

### Multi-Interval Feature Extraction (121 Features)

```python
# Extract features across 3 intervals (5m, 15m, 1h example)
config = ATRAdaptiveLaguerreRSIConfig(
    atr_period=14,
    smoothing_period=5,
    multiplier_1=3,   # 15m features (5m × 3)
    multiplier_2=12   # 1h features (5m × 12)
)
feature = ATRAdaptiveLaguerreRSI(config)

# Returns DataFrame with 121 columns:
# - 27 base interval features (*_base)
# - 27 mult1 interval features (*_mult1)
# - 27 mult2 interval features (*_mult2)
# - 40 cross-interval interactions
features_df = feature.fit_transform_features(df)

# Check minimum required data
print(f"Need {feature.min_lookback_base_interval} bars for multi-interval")
```

## Documentation

- [API Reference](https://github.com/Eon-Labs/atr-adaptive-laguerre/blob/main/docs/API_REFERENCE.md) - Complete API documentation
- [Examples](https://github.com/Eon-Labs/atr-adaptive-laguerre/tree/main/examples) - Runnable usage examples
- [Changelog](https://github.com/Eon-Labs/atr-adaptive-laguerre/blob/main/CHANGELOG.md) - Release notes and version history

## License

MIT License - Eon Labs Ltd.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "atr-adaptive-laguerre",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "atr, features, laguerre, rsi, seq2seq, trading, volatility",
    "author": "Eon Labs Ltd.",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/63/22/d4259dd16391e64fc23541e76fcd5324ebdeba4c67252f21765fb3d33604/atr_adaptive_laguerre-0.2.0.tar.gz",
    "platform": null,
    "description": "# ATR-Adaptive Laguerre RSI\n\nNon-anticipative volatility-adaptive momentum indicator for sequence-to-sequence forecasting.\n\n## Overview\n\nThis library implements the ATR-Adaptive Laguerre RSI indicator, designed for robust feature engineering in financial time series forecasting. The indicator combines:\n\n- **True Range (TR)** - Volatility measurement including gaps\n- **ATR with Min/Max Tracking** - Rolling volatility envelope\n- **Adaptive Coefficient** - Volatility-normalized adaptation\n- **Laguerre 4-Stage Cascade** - Low-lag smoothing filter\n- **Laguerre RSI** - Momentum from filter stage differences\n\n## Key Features\n\n- \u2705 **Non-anticipative**: Guaranteed no lookahead bias\n- \u2705 **O(1) Incremental**: Efficient streaming updates with `.update()` method\n- \u2705 **Multi-interval**: Supports 1s-1d timeframes with 121-feature extraction\n- \u2705 **Flexible datetime**: Works with DatetimeIndex, 'date' column, or custom column names\n- \u2705 **Validated**: Information coefficient > 0.03 on k-step-ahead returns\n\n## Installation\n\n```bash\nuv add atr-adaptive-laguerre\n```\n\n## Quick Start\n\n### Basic Usage (Single RSI Value)\n\n```python\nfrom atr_adaptive_laguerre import ATRAdaptiveLaguerreRSI, ATRAdaptiveLaguerreRSIConfig\nimport pandas as pd\n\n# Create indicator with flexible datetime support\nconfig = ATRAdaptiveLaguerreRSIConfig(\n    atr_period=14,\n    smoothing_period=5,\n    date_column='date'  # Or use DatetimeIndex\n)\nindicator = ATRAdaptiveLaguerreRSI(config)\n\n# Batch processing\nrsi_series = indicator.fit_transform(df)  # Returns pd.Series\n\n# Incremental updates (O(1) streaming)\nnew_row = {'open': 100, 'high': 101, 'low': 99, 'close': 100.5, 'volume': 1000}\nnew_rsi = indicator.update(new_row)  # Returns float\n```\n\n### Multi-Interval Feature Extraction (121 Features)\n\n```python\n# Extract features across 3 intervals (5m, 15m, 1h example)\nconfig = ATRAdaptiveLaguerreRSIConfig(\n    atr_period=14,\n    smoothing_period=5,\n    multiplier_1=3,   # 15m features (5m \u00d7 3)\n    multiplier_2=12   # 1h features (5m \u00d7 12)\n)\nfeature = ATRAdaptiveLaguerreRSI(config)\n\n# Returns DataFrame with 121 columns:\n# - 27 base interval features (*_base)\n# - 27 mult1 interval features (*_mult1)\n# - 27 mult2 interval features (*_mult2)\n# - 40 cross-interval interactions\nfeatures_df = feature.fit_transform_features(df)\n\n# Check minimum required data\nprint(f\"Need {feature.min_lookback_base_interval} bars for multi-interval\")\n```\n\n## Documentation\n\n- [API Reference](https://github.com/Eon-Labs/atr-adaptive-laguerre/blob/main/docs/API_REFERENCE.md) - Complete API documentation\n- [Examples](https://github.com/Eon-Labs/atr-adaptive-laguerre/tree/main/examples) - Runnable usage examples\n- [Changelog](https://github.com/Eon-Labs/atr-adaptive-laguerre/blob/main/CHANGELOG.md) - Release notes and version history\n\n## License\n\nMIT License - Eon Labs Ltd.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ATR-adaptive Laguerre RSI for non-anticipative feature engineering in seq-2-seq forecasting",
    "version": "0.2.0",
    "project_urls": {
        "Documentation": "https://github.com/Eon-Labs/atr-adaptive-laguerre/blob/main/docs/README.md",
        "Repository": "https://github.com/Eon-Labs/atr-adaptive-laguerre"
    },
    "split_keywords": [
        "atr",
        " features",
        " laguerre",
        " rsi",
        " seq2seq",
        " trading",
        " volatility"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "33cf7b4960c8caaecf2e59282a026fa4ae7817df6da9b927613f2784d4da75f4",
                "md5": "6c29be213811d3cfd0b61340ef8b2200",
                "sha256": "182ad300daa95734a884db8ec1f856d1fc7cbdb717ae4f0277a11dbe1e63854a"
            },
            "downloads": -1,
            "filename": "atr_adaptive_laguerre-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c29be213811d3cfd0b61340ef8b2200",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 42375,
            "upload_time": "2025-10-07T04:29:48",
            "upload_time_iso_8601": "2025-10-07T04:29:48.314951Z",
            "url": "https://files.pythonhosted.org/packages/33/cf/7b4960c8caaecf2e59282a026fa4ae7817df6da9b927613f2784d4da75f4/atr_adaptive_laguerre-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6322d4259dd16391e64fc23541e76fcd5324ebdeba4c67252f21765fb3d33604",
                "md5": "c2e31978e17323549c2b1647ccecaf72",
                "sha256": "25e102bf854527311c571e7253f68efd720a86644f435fcc029eee18dafb74ff"
            },
            "downloads": -1,
            "filename": "atr_adaptive_laguerre-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c2e31978e17323549c2b1647ccecaf72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 231991,
            "upload_time": "2025-10-07T04:29:49",
            "upload_time_iso_8601": "2025-10-07T04:29:49.567190Z",
            "url": "https://files.pythonhosted.org/packages/63/22/d4259dd16391e64fc23541e76fcd5324ebdeba4c67252f21765fb3d33604/atr_adaptive_laguerre-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 04:29:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Eon-Labs",
    "github_project": "atr-adaptive-laguerre",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "atr-adaptive-laguerre"
}
        
Elapsed time: 1.27668s