Skip to main content

Finalytics

pypi License Homepage Documentation Status PePy

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

from finalytics import get_symbols

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

Security Analysis

from finalytics import Ticker

ticker = Ticker("AAPL")
print(ticker.get_current_price())
print(ticker.get_summary_stats())
print(ticker.get_price_history("2023-01-01", "2023-10-31", "1d"))
print(ticker.get_options_chain())
print(ticker.get_news("2023-11-01", "2023-11-10", False))
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("2023-01-01", "2023-10-31", "1d", "^GSPC", 0.95, 0.02))
ticker.display_performance_chart("2023-01-01", "2023-10-31", "1d", "^GSPC", 0.95, 0.02, "html")
ticker.display_candlestick_chart("2023-01-01", "2023-10-31", "1d", "html")
ticker.display_options_chart(0.02, "png")

Portfolio Optimization

from finalytics import Portfolio

portfolio = Portfolio(["AAPL", "GOOG", "MSFT", "BTC-USD"], "^GSPC", "2020-01-01", "2022-01-01", "1d", 0.95, 0.02, 1000, "max_sharpe")
print(portfolio.get_optimization_results())
portfolio.display_portfolio_charts("html")

DeFi Liquidity Pools

from finalytics import DefiPools

defi_pools = DefiPools()
print(f"Total Value Locked: ${defi_pools.total_value_locked:,.0f}")
print(defi_pools.pools_data)
print(defi_pools.unique_pools)
print(defi_pools.unique_protocols)
print(defi_pools.unique_chains)
print(defi_pools.no_il_pools)
print(defi_pools.stable_coin_pools)
print(defi_pools.search_pools_by_symbol("USDC"))
defi_pools.display_top_protocols_by_tvl("USDC-USDT", 20, "html")
defi_pools.display_top_protocols_by_apy("USDC-USDT", 20, "html")
defi_pools.display_pool_tvl_history("USDC-USDT", "uniswap-v3", "ethereum", "html")
defi_pools.display_pool_apy_history("USDC-USDT", "uniswap-v3", "ethereum", "html")

DeFi User Balances

from finalytics import DefiBalances
from finalytics import get_supported_protocols

supported_protocols = get_supported_protocols()
print(supported_protocols)

# This function requires node.js and pnpm to be installed on the system
# for macos: brew install node && npm install -g pnpm
# for ubuntu: sudo apt install nodejs && npm install -g pnpm
# for windows: https://nodejs.org/en/download/ && npm install -g pnpm

defi_balances = DefiBalances(["wallet", "eigenlayer", "blast", "ether.fi"],
                                        ["ethereum", "arbitrum"],
                                        "0x7ac34681f6aaeb691e150c43ee494177c0e2c183",
                                         "html")
print(defi_balances.balances)

Metadata

Release files for finalytics 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finalytics 0.2.1
File Size Uploaded
finalytics-0.2.1.tar.gz 2.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for finalytics 0.2.1
File
finalytics-0.2.1-cp312-none-win_amd64.whl CPython 3.12 none Windows x86-64 Details
finalytics-0.2.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
finalytics-0.2.1-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
finalytics-0.2.1-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
finalytics-0.2.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
finalytics-0.2.1-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
finalytics-0.2.1-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
finalytics-0.2.1-cp310-cp310-manylinux_2_35_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.35+ x86-64 Details
finalytics-0.2.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
finalytics-0.2.1-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details
finalytics-0.2.1-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
finalytics-0.2.1-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
finalytics-0.2.1-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details

Total release size: 448.7 MB

Release files / finalytics-0.2.1.tar.gz

Download URL finalytics-0.2.1.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
c3aeb30a2db21ac12b9ec1d3a6c795111503d89c36c6f26f1e80fae86c2163a4
BLAKE2b-256 checksum
How to use checksums
a20960c31cb05824635ad4cf4ff21f9266b4f6e93de7b6b63bc1dd556dc0e738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp312-none-win_amd64.whl

Download URL finalytics-0.2.1-cp312-none-win_amd64.whl
Size 31.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
220849ac64fea35710fd92dc3f3b901dea085065d95f903e15e02e87cc18ba94
BLAKE2b-256 checksum
How to use checksums
fc5735f9d6bf4a4964567fbb9533eea83031c9ab2de08355684388b7e1e2035b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL finalytics-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Size 34.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
054cdea31a6e6e458d57bcc16215e785562a2ce8d3392d8a9bb74f0246f3d2ba
BLAKE2b-256 checksum
How to use checksums
69e749616b94d06d64271e3b5f09967dd25f620bc4d3fc512c21d6de021a540b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp312-cp312-macosx_10_12_x86_64.whl

Download URL finalytics-0.2.1-cp312-cp312-macosx_10_12_x86_64.whl
Size 35.6 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
147c31fb91325ea385f95b39f7d7c02d117a3415ab5513bfd78562170186fc0f
BLAKE2b-256 checksum
How to use checksums
ce90668b478274fe8b2468e4901d3a122c3a9862a33dce01bca1a3bb8f1b7fe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp311-none-win_amd64.whl

Download URL finalytics-0.2.1-cp311-none-win_amd64.whl
Size 31.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
435a88d022998d9b21b20cde9ff3780349802bf641a2118d5222fda5fa10adb9
BLAKE2b-256 checksum
How to use checksums
40f4c2821031ea5df7b5988bff978577e6e5a13e02c9e6dd1ddb3b4811451023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL finalytics-0.2.1-cp311-cp311-macosx_11_0_arm64.whl
Size 34.3 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
548731c472ae52294a2eb534434203c6be3d3312ffe33966abeb72f8931d8d6d
BLAKE2b-256 checksum
How to use checksums
d02076c85bb4fe24bafb90cf89cd33179413b82573d6dcdc6004cbb1085ca0b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp311-cp311-macosx_10_12_x86_64.whl

Download URL finalytics-0.2.1-cp311-cp311-macosx_10_12_x86_64.whl
Size 35.6 MB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2fa45d15bad9a1d9c75f83fa08848983be6b8eaba5d3863371756855fa889e64
BLAKE2b-256 checksum
How to use checksums
f0349101d0321016634093f41a393229c11f534c2276e8e3594004bd0952cc3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp310-none-win_amd64.whl

Download URL finalytics-0.2.1-cp310-none-win_amd64.whl
Size 31.9 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
b6b8055a3272d1fc3796b920a1671a43f95332511aebed40588122e213b50d44
BLAKE2b-256 checksum
How to use checksums
4fdf8d9dc522b53d3b932d29d4e33f3aed87986ceded0889491c7c3247890f74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp310-cp310-manylinux_2_35_x86_64.whl

Download URL finalytics-0.2.1-cp310-cp310-manylinux_2_35_x86_64.whl
Size 45.0 MB
Tags CPython 3.10 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
b0055e5dd50eceea0f85d1e7b349054be3824e644391dd3eca4966115d7391ea
BLAKE2b-256 checksum
How to use checksums
cd6955ac3b0f928f4b423da976c0757a39b5e83e1e565acbd6e350ffa4b293e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL finalytics-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Size 34.3 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0027f0871e17a9f32f7ef3cb2955096f32eca29bb8e7414d6e3bf91d4effcb75
BLAKE2b-256 checksum
How to use checksums
5677be382073c786dde659d40087689f4a0ceca275e092bad97d4f1ba9ab0e9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp310-cp310-macosx_10_12_x86_64.whl

Download URL finalytics-0.2.1-cp310-cp310-macosx_10_12_x86_64.whl
Size 35.6 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f8921177bb9cb9854c6853cd0f31223ea7bebecaccc5714577021a3e21855cf3
BLAKE2b-256 checksum
How to use checksums
81d7f88009f5042942e86fa088b1cfa1aeab492ffd107e4f1e53c56b83a3370f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp39-none-win_amd64.whl

Download URL finalytics-0.2.1-cp39-none-win_amd64.whl
Size 31.9 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
12ffe9474840840e25c95bdf45992d3c3e27ec6f76d786ba805f13dd28083d9e
BLAKE2b-256 checksum
How to use checksums
ef608dde6009f2ffd3372b9f88fe2f17a814cee7d27ab3bdb2c57d00483ddae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp38-none-win_amd64.whl

Download URL finalytics-0.2.1-cp38-none-win_amd64.whl
Size 31.9 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
7f564062a7f365dbbe4f37c8eb41674d8530e931554f651aca32e6f5e919b881
BLAKE2b-256 checksum
How to use checksums
a5f3d20161714a1ec4d836cda8bb1d7d3a1fbf33d0453dc86270fbf743824090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / finalytics-0.2.1-cp37-none-win_amd64.whl

Download URL finalytics-0.2.1-cp37-none-win_amd64.whl
Size 31.9 MB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
e51024b850a07a1496290e3dd8cd4740c1ffa6eb58373a3d6a254f860b44e546
BLAKE2b-256 checksum
How to use checksums
ef87b017e94910e7275ee917630ec44ab21a7f9570592272cbb65c1249cfb753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release history Release notifications | RSS feed

0.8.8

21 release files

0.8.6

21 release files

0.8.5

21 release files

0.8.2

21 release files

0.8.1

21 release files

0.8.0

11 release files

0.6.0

22 release files

0.5.0

22 release files

0.4.0

22 release files

0.3.1

20 release files

0.3.0

20 release files

0.2.5

14 release files

0.2.4

14 release files

0.2.3

14 release files

0.2.2

14 release files

This release

0.2.1 This release

14 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page