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

pip install finalysis
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
  • 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

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.9.tar.gz (4.9 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.9-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: finalysis-0.1.9.tar.gz
  • Upload date:
  • Size: 4.9 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.9.tar.gz
Algorithm Hash digest
SHA256 6afd5c886fa2da5034e5800f9cbc72920259117cb70aa67e28e7038fd2f80e08
MD5 bcde44167e0fbcad9ee31b12057f0c11
BLAKE2b-256 4e1172ea9bf2f75f6747291b0e963cdfa03e69156e42e85183e8f0dcffb5ba7e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: finalysis-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2fa4acb5d5647fe5c429fe66e3f310c92f1f5459b61a20c001a5850c2e470da7
MD5 58a2ce54c175d7da246083b0564e1b8f
BLAKE2b-256 62ce61822c23861358f22fe35b136ded099d06d92db3519a68329af379141327

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