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.4.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.4-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finalysis-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 a339a5a212b98bf0eb042da04c84d7b24cd809926c6bd6805eb62c678163d88b
MD5 d624566c10a9b32b32c6c49dde11ef4f
BLAKE2b-256 ae76d2571d8392151fb1241268fc05f03caec83782037fb797d0e1b47752c2a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finalysis-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 016ab9e0e42a4e724819f62f8159def3e277a2a3f9331c6a41b675d9779029ae
MD5 368005305e0f602842b91f8dc155d04c
BLAKE2b-256 b0ebd46a1eec896c013eb6086c2e34998271ab5f07d27f7bd677d3680aa825f3

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