Metadata-Version: 2.4
Name: IntrinsicTime
Version: 0.1.2
Summary: Utilities for intrinsic time decomposition and fractal event analysis
Author-email: Tom Houweling <thomas.houweling@gmail.com>
License: MIT License
        
        Copyright (c) 2025 [Your Name]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
        
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scipy
Requires-Dist: plotly
Dynamic: license-file

# IntrinsicTime

Utilities for decomposing **intrinsic time** events and analyzing **fractal scaling** behavior in price or signal data.

This package provides:
- `dcos_core`: A **Directional Change and Overshoot (DcOS)** event detector.
- `dcos_fractal`: Tools for **fractal scaling** and **multi-threshold analysis**.
- `dcos_plot`: **Plotly** visualization for interactive fractal plots.

---

## Installation

### From GitHub
```
pip install git+https://github.com/THouwe/IntrinsicTime.git
```

### Local Install
```
git clone https://github.com/THouwe/IntrinsicTime.git
cd IntrinsicTime
pip install -e .
```

### Dependencies
See `requirements.txt`.

---

## Overview

IntrinsicTime decomposes time series into Directional Changes (DCs) and Overshoots (OSs) based on log-scale thresholds.
It then explores the fractal scaling law between event frequency and detection threshold.

### Example Usage
```
import numpy as np
import pandas as pd
from IntrinsicTime import DcOS_fractal

# Example input DataFrame
df = pd.DataFrame({
    "Timestamp": range(1000),
    "Price": 100 + np.cumsum(np.random.randn(1000))
})

# Initialize and run
analyzer = DcOS_fractal(debugMode=True)
results, ranges = analyzer.run(df)

# Display results
print(results.head())
print(ranges)
```
