Skip to main content

A python library for financial instrument payoff analysis

Project description

Finalysis

A python library for financial instrument payoff analysis.

Open in Streamlit

🚀 Quickstart

from finalysis import Spot, Option, plot

current_price = 100
strategy = Spot(price=current_price) + Option(premium=5, strike=100, kind='put')
plot.payoff(strategy, current_price)

Payoff Diagram

📦 Features

  • Core primitives: Spot, Option, Future, and structured products like DualInvestment, SmartLeverage
  • Strategy composition using +, -, * operators
  • Streamlit UI to build strategies interactively (https://finalysis-python.streamlit.app/)
  • Plotting payoff diagrams

📈 Examples

Strategy Code Payoff
Butterfly Option(strike=98, premium=4, kind='call') -2*Option(strike=100, premium=2.5, kind='call') + Option(strike=102, premium=1.5, kind='call') Butterfly
Bull Call Option(strike=95, premium=6, kind='call') - Option(strike=105, premium=2, kind='call') Bull Call
Protective Put Spot(price=100) + Option(strike=95, premium=3, kind='put') Protective Put
Iron Condor Option(strike=96, premium=1) - Option(strike=98, premium=2) - Option(strike=102, premium=104) + Option(strike=110, premium=1) Iron Condor

🔧 Other Instruments

from finalysis.instruments import (
  SellHighDI,
  BuyLowDI,
  SmartLeverage,
  SpotGrid,
  SpotLimit
)

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

finalysis-0.1.5.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finalysis-0.1.5-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file finalysis-0.1.5.tar.gz.

File metadata

  • Download URL: finalysis-0.1.5.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for finalysis-0.1.5.tar.gz
Algorithm Hash digest
SHA256 63a83074420bfc410982b6bc885656c8adaabf111e946e6da876b787c6e95ff9
MD5 785149718c994b07297aec37b5855e86
BLAKE2b-256 8f620110adac5dd55949532bf8457ae4c5e5a05422eef18e1b114fa4b9fe967d

See more details on using hashes here.

File details

Details for the file finalysis-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: finalysis-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for finalysis-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 11a61a6636cc1f50ecb5c55a4197d6bddb15f084a4865645eec61b350fcb8c57
MD5 673755d429ca2e88befcd0898575b575
BLAKE2b-256 39c17966cd78ed43d33298ffbe34f127b41e2963a07805c82507a02615a0993a

See more details on using hashes here.

Supported by

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