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
pip install seasonality-table
Usage / Kullanim
Basic Usage / Temel Kullanim
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
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
Requirements / Gereksinimler
- Python >= 3.8
- pandas >= 1.0.0
- yfinance >= 0.2.0
License / Lisans
MIT License
Author / Yazar
cagrigungor - www.cagrigungor.com
Contact / Iletisim: iletisim@cagrigungor.com
Release files for seasonality-table 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seasonality_table-0.1.1.tar.gz | 5.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seasonality_table-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / seasonality_table-0.1.1.tar.gz
| Download URL | seasonality_table-0.1.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
403e6b147c8b4f3023c1f7f70b1fb8a78abb26a3927778983f388c5705c5da6f
|
|
BLAKE2b-256 checksum How to use checksums |
b5bd511ce53c8bc4ef826fc3c087dbacbfe83f108359ac218229464a89029dae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / seasonality_table-0.1.1-py3-none-any.whl
| Download URL | seasonality_table-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c9913ccb4889f86c1f72e422be07d29903ed6eb87be5f04cb638a8b0a08de6d
|
|
BLAKE2b-256 checksum How to use checksums |
939d3261defe0c607c569a635ce988e38837fc82100e2c02c032bb38d2426708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|