Skip to main content

No project description provided

Project description

Finalytics

pypi License Homepage Documentation Status Platform Python Version PePy CodeFactor

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

View Library documentation on readthedocs here

Symbol Search

from finalytics import get_symbols

print(get_symbols(query="Apple", asset_class="Equity"))
print(get_symbols(query="Bitcoin", asset_class="Crypto"))
print(get_symbols(query="S&P 500", asset_class="Index"))
print(get_symbols(query="EURUSD", asset_class="Currency"))
print(get_symbols(query="SPY", asset_class="ETF"))

Security Analysis

from finalytics import Ticker

ticker = Ticker(symbol="AAPL")
print(ticker.get_current_price())
print(ticker.get_summary_stats())
print(ticker.get_price_history(start="2023-01-01", end="2023-10-31", interval="1d"))
print(ticker.get_options_chain())
print(ticker.get_news(compute_sentiment=True))
print(ticker.get_income_statement())
print(ticker.get_balance_sheet())
print(ticker.get_cashflow_statement())
print(ticker.get_financial_ratios())
print(ticker.compute_performance_stats(start="2023-01-01", end="2023-10-31", interval="1d", benchmark="^GSPC", 
                                       confidence_level=0.95, risk_free_rate=0.02))
ticker.display_performance_chart(start="2023-01-01", end="2023-10-31", interval="1d", benchmark="^GSPC", 
                                 confidence_level=0.95, risk_free_rate=0.02, display_format="notebook")
ticker.display_candlestick_chart(start="2023-01-01", end="2023-10-31", interval="1d", display_format="html")
ticker.display_options_chart(risk_free_rate=0.02, chart_type="surface", display_format="png")

Portfolio Optimization

from finalytics import Portfolio

portfolio = Portfolio(ticker_symbols=["AAPL", "GOOG", "MSFT", "BTC-USD"], 
                      benchmark_symbol="^GSPC", start_date="2020-01-01", end_date="2022-01-01", interval="1d", 
                      confidence_level=0.95, risk_free_rate=0.02, max_iterations=1000, 
                      objective_function="max_sharpe")
print(portfolio.get_optimization_results())
portfolio.display_portfolio_charts("performance", "html")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finalytics-0.3.1.tar.gz (8.5 MB view hashes)

Uploaded Source

Built Distributions

finalytics-0.3.1-cp312-none-win_amd64.whl (19.7 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

finalytics-0.3.1-cp312-none-win32.whl (18.4 MB view hashes)

Uploaded CPython 3.12 Windows x86

finalytics-0.3.1-cp312-cp312-macosx_11_0_arm64.whl (19.9 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

finalytics-0.3.1-cp312-cp312-macosx_10_12_x86_64.whl (20.5 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

finalytics-0.3.1-cp311-none-win_amd64.whl (19.7 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

finalytics-0.3.1-cp311-none-win32.whl (18.4 MB view hashes)

Uploaded CPython 3.11 Windows x86

finalytics-0.3.1-cp311-cp311-macosx_11_0_arm64.whl (19.9 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

finalytics-0.3.1-cp311-cp311-macosx_10_12_x86_64.whl (20.5 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

finalytics-0.3.1-cp310-none-win_amd64.whl (19.7 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

finalytics-0.3.1-cp310-none-win32.whl (18.4 MB view hashes)

Uploaded CPython 3.10 Windows x86

finalytics-0.3.1-cp310-cp310-manylinux_2_35_x86_64.whl (24.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

finalytics-0.3.1-cp310-cp310-macosx_11_0_arm64.whl (19.9 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

finalytics-0.3.1-cp310-cp310-macosx_10_12_x86_64.whl (20.5 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

finalytics-0.3.1-cp39-none-win_amd64.whl (19.7 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

finalytics-0.3.1-cp39-none-win32.whl (18.4 MB view hashes)

Uploaded CPython 3.9 Windows x86

finalytics-0.3.1-cp38-none-win_amd64.whl (19.7 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

finalytics-0.3.1-cp38-none-win32.whl (18.4 MB view hashes)

Uploaded CPython 3.8 Windows x86

finalytics-0.3.1-cp37-none-win_amd64.whl (19.7 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

finalytics-0.3.1-cp37-none-win32.whl (18.4 MB view hashes)

Uploaded CPython 3.7 Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page