
Welcome to the Finalytics Documentation
This is a python binding for Finalytics Rust Library designed for retrieving financial data and performing security analysis and portfolio optimization.
Installation
pip install finalyticsDocumentation
Example
from finalytics import Screener, Tickers
# Screen for the top 10 stocks by market cap on the NASDAQ exchange
screener = Screener(
quote_type="EQUITY",
filters=[
'{"operator": "eq", "operands": ["exchange", "NMS"]}'
],
sort_field="intradaymarketcap",
sort_descending=True,
offset=0,
size=10
)
# Instantiate a Multiple Ticker Object
symbols = screener.symbols()
tickers = Tickers(symbols=symbols,
start_date="2023-01-01",
end_date="2024-12-31",
interval="1d",
confidence_level=0.95,
risk_free_rate=0.02)
# Generate a Single Ticker Report
ticker = tickers.get_ticker(symbols[0])
ticker.report("performance")
ticker.report("financials")
ticker.report("options")
ticker.report("news")
# Generate a Multiple Ticker Report
tickers.report("performance")
# Perform a Portfolio Optimization
portfolio = tickers.optimize(objective_function="max_sharpe")
# Generate a Portfolio Report
portfolio.report("performance")

