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.5, kind='put') -Option(strike=98, premium=2, kind='put') -Option(strike=102, premium=2, kind='call') + Option(strike=104, premium=1.5, kind='call') 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.7.tar.gz (5.5 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.7-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finalysis-0.1.7.tar.gz
  • Upload date:
  • Size: 5.5 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.7.tar.gz
Algorithm Hash digest
SHA256 f92009c7f081a0eaa536f01be081452aff752480cbc7def1e3258270c88b4743
MD5 add4e7f02857a9af1e1283c47df8dffa
BLAKE2b-256 5cd8438d5308aa36324f62d0b11fbb9a340d1f7d74d174f6616459e0d7cd00a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finalysis-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 41946183bd293e52c2b72a8e8ca56ac7dce1776192363b92ea8680eb4f19903b
MD5 489bfd5ac7540256daa7147f543dbed6
BLAKE2b-256 63189d68d5ac6c37d3317b8c4abee9e50a8324b718a60dea1b7bbf7d87ce261e

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