Skip to content

Home

FinanceLib

Comprehensive Python library for financial analysis, stock tracking, technical analysis, and algorithmic trading — built for BIST and global markets.

Get Started API Reference Contact
pip install financelib

Stock Tracking

Real-time stock data from Yahoo Finance with BIST, NASDAQ, and NYSE support. Search by symbol or company name with colored terminal output.

Technical Analysis

11 built-in indicators: RSI, MACD, SMA, EMA, Bollinger Bands, ADX, ATR, Stochastic, CCI, Aroon, and Williams %R.

News Aggregation

Fetch financial news from NewsAPI and Bloomberg. Filter by source, category, and relevance for market sentiment awareness.

Trading Bots

Automated crypto trading with FinBERT sentiment analysis and Transformer price prediction. BIST stock bot with paper trading mode.

KAP Integration

Download disclosure PDFs from the Turkish Public Disclosure Platform (KAP) by date range or disclosure number.

Quantitative Finance

28 quant functions: Sharpe/Sortino/Calmar ratios, VaR/CVaR, CAPM alpha/beta, portfolio optimization, Hurst exponent, Jarque-Bera test, and more.

Database Storage

SQLite and PostgreSQL support for persisting market data, news articles, trade history, and indicator snapshots.

Quick Example

from financelib import Stock

# Search for a stock
result = Stock.search_stock("THYAO")
print(result)

# Get live price with colored output
Stock.get_live_stock_state("THYAO.IS")

# Use technical indicators
from financelib.trading.algo_trade import rsi, macd, bollinger_bands

stock = Stock("THYAO.IS")
df = stock.get_historical_data(period="3mo")
rsi_values = rsi(df["Close"])
macd_line, signal = macd(df["Close"])