sessionalty-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 sessionalty-table
Usage / Kullanim
Basic Usage / Temel Kullanim
from sessionalty_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 sessionalty_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
Metadata
Release files for sessionalty-table 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sessionalty_table-0.1.0.tar.gz | 5.1 kB | Without provenance | Details for sessionalty_table-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sessionalty_table-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sessionalty_table-0.1.0-py3-none-any.whl |
Total release size: 10.1 kB
Release files / sessionalty_table-0.1.0.tar.gz
| Download URL | sessionalty_table-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00c99f98219c906e7f9d7d766ca28a1de803fbf6c7d8e4c93fb5e4684514b5fc
|
|
BLAKE2b-256 checksum How to use checksums |
d5dbbeec7fd8be1e579cf71c995e702cff23994677877403795f1f1e8d71800e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / sessionalty_table-0.1.0-py3-none-any.whl
| Download URL | sessionalty_table-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
318a09431284460ab50c919bad9c9e677657b9368291be434595296822c44876
|
|
BLAKE2b-256 checksum How to use checksums |
d718efee8ec75843d424e9c485ab04df2ab9b7e29c0279aaec9f2a9241ca946a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Security for sessionalty-table 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.