Metadata-Version: 2.4
Name: seasonality-table
Version: 0.1.1
Summary: A library to generate monthly returns (seasonality) tables for financial analysis
Home-page: https://www.cagrigungor.com
Author: cagrigungor
Author-email: cagrigungor <iletisim@cagrigungor.com>
License: MIT
Project-URL: Homepage, https://www.cagrigungor.com
Keywords: finance,seasonality,returns,table,analysis,stocks,crypto,yfinance
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.0.0
Requires-Dist: yfinance>=0.2.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# seasonality-table

A Python library to generate monthly returns (seasonality) tables for financial analysis.

Finansal analiz icin aylik getiri (mevsimsellik) tablolari olusturan bir Python kutuphanesi.

---

## Installation / Kurulum

```bash
pip install seasonality-table
```

## Usage / Kullanim

### Basic Usage / Temel Kullanim

```python
from seasonality_table import get_returns_table

# Get Bitcoin monthly returns table
# Bitcoin aylik getiri tablosu
table = get_returns_table("BTC-USD")
table
```

### Parameters / Parametreler

| Parameter | Type | Default | Description (EN) | Aciklama (TR) |
|-----------|------|---------|------------------|---------------|
| ticker | str | "BTC-USD" | Ticker symbol | Hisse/kripto sembol |
| is_colored | bool | True | Color coded output | Renkli cikti |
| start_date | str | "2010-01-01" | Start date (YYYY-MM-DD) | Baslangic tarihi |
| end_date | str | Today | End date (YYYY-MM-DD) | Bitis tarihi |
| column | str | "Close" | Price column to use | Kullanilacak fiyat sutunu |
| date | str | "index" | Date column name | Tarih sutun adi |
| df | DataFrame | None | Custom DataFrame | Ozel DataFrame |

### Examples / Ornekler

```python
from seasonality_table import get_returns_table

# Example 1: Stock data without colors
# Ornek 1: Renksiz hisse verisi
table = get_returns_table("AAPL", is_colored=False)

# Example 2: Custom date range
# Ornek 2: Ozel tarih araligi
table = get_returns_table("MSFT", start_date="2020-01-01", end_date="2024-12-31")

# Example 3: Using Open price instead of Close
# Ornek 3: Close yerine Open fiyati kullanma
table = get_returns_table("BTC-USD", column="Open")

# Example 4: Using custom DataFrame
# Ornek 4: Ozel DataFrame kullanma
import pandas as pd
my_df = pd.read_csv("my_data.csv")
table = get_returns_table(df=my_df, column="price", date="date_column")
```

### Output / Cikti

The function returns a pivot table showing monthly returns (%) by year and month.

Fonksiyon, yil ve aya gore aylik getirileri (%) gosteren bir pivot tablo dondurur.

- Green cells: Positive returns / Yesil hucreler: Pozitif getiri
- Red cells: Negative returns / Kirmizi hucreler: Negatif getiri

### Example Output / Ornek Cikti

![BTC Monthly Returns Table / BTC Aylik Getiri Tablosu](https://www.cagrigungor.com/wp-content/uploads/2026/03/demo.png)

## Requirements / Gereksinimler

- Python >= 3.8
- pandas >= 1.0.0
- yfinance >= 0.2.0

## License / Lisans

MIT License

## Author / Yazar

cagrigungor - [www.cagrigungor.com](https://www.cagrigungor.com)

Contact / Iletisim: iletisim@cagrigungor.com
