Metadata-Version: 2.3
Name: finalytics
Version: 0.5.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Dist: polars ==0.19.12
Requires-Dist: pyarrow ==14.0.0
Requires-Dist: plotly ==5.22.0
Requires-Dist: notebook >=5.3
Requires-Dist: ipywidgets >=7.5
Requires-Dist: numpy <2
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

![Finalytics](https://github.com/Nnamdi-sys/finalytics/raw/main/logo-color.png)

[![pypi](https://img.shields.io/pypi/v/finalytics)](https://pypi.org/project/finalytics/)
![License](https://img.shields.io/crates/l/finalytics)
[![Homepage](https://img.shields.io/badge/homepage-finalytics.rs-blue)](https://finalytics.rs/)
[![Documentation Status](https://readthedocs.org/projects/finalytics/badge/?version=latest)](https://finalytics.readthedocs.io/en/latest/?badge=latest)
![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20MacOS-brightgreen)
![Python Version](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
![PePy](https://static.pepy.tech/personalized-badge/finalytics?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads)



This is a python binding for [Finalytics Rust Library](https://github.com/Nnamdi-sys/finalytics) designed for retrieving financial data and performing security analysis and portfolio optimization.

## Installation

```bash
pip install finalytics
```

## Example

View the [documentation](https://nnamdi.quarto.pub/finalytics/) for more information.

```python
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()

```





