pypi License Homepage Documentation Status Platform Python Version PePy

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 finalytics

Documentation

Example

from finalytics import Tickers

# Instantiate a Multiple Ticker Object
tickers = Tickers(symbols=["NVDA", "GOOG", "AAPL", "MSFT", "BTC-USD"],
                  start_date="2020-01-01",
                  end_date="2024-01-01",
                  interval="1d",
                  confidence_level=0.95,
                  risk_free_rate=0.02)

# Calculate the Performance Statistics of all the Tickers
print(tickers.performance_stats())

# Display the Security Analysis Charts
tickers.returns_chart().show()
tickers.returns_matrix().show()

# Perform Portfolio Optimization
portfolio = tickers.optimize()
print(portfolio.optimization_results())

# Display the Portfolio Optimization Charts
portfolio.optimization_chart().show()
portfolio.performance_chart().show()
portfolio.asset_returns_chart().show()
portfolio.performance_stats_table().show()