A tool to analyze interest rate swaps
Project description
Interest Rate Swap Analyzer
A Python package for analyzing interest rate swaps, comparing advantages between parties, and visualizing swap outcomes.
Installation
pip install interest-rate-swap-analyzer
Features
- Calculate comparative advantages in interest rate swaps
- Analyze arbitrage opportunities
- Visualize swap cash flows
- Command-line interface for quick analysis
- Detailed reporting capabilities
Quick Start
from interest_rate_swap_analyzer import Party, InterestRateSwap, InterestRateSwapAnalyzer
from datetime import date
# Create parties
party_a = Party("Company A", fixed_rate=0.05, floating_rate_delta=0.02, preference="fixed")
party_b = Party("Bank B", fixed_rate=0.06, floating_rate_delta=0.01, preference="floating")
# Create swap
swap = InterestRateSwap(
fixed_rate=0.055,
floating_rate_delta=0.015,
notional=1000000,
fixed_rate_payer=party_a,
floating_rate_payer=party_b,
start_date=date(2023, 1, 1),
end_date=date(2024, 1, 1)
)
# Analyze swap
analyzer = InterestRateSwapAnalyzer(party_a, party_b, swap)
results = analyzer.analyze()
# Get formatted report
print(analyzer.format_analysis_report(results))
# Or get results as DataFrame
df = analyzer.to_dataframe(results)
print(df)
Development
Setup development environment:
pip install -e ".[dev]"
pytest
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interest_rate_swap_analyzer-1.0.0.tar.gz.
File metadata
- Download URL: interest_rate_swap_analyzer-1.0.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d05d058808bd7cb67f3217b8ede2f20885062b492d83b6435f0bf205857b1aa
|
|
| MD5 |
0c537c7eb7a740075cf8f870b5b5e5ff
|
|
| BLAKE2b-256 |
561e8076820ed29d6c84101667d67e18ef75e2ad28bbc6944924c172bd9a3abf
|
File details
Details for the file interest_rate_swap_analyzer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: interest_rate_swap_analyzer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f434e36c795f40e177bd692b89bf8a1128caf2db9f07169796339881fb3e39
|
|
| MD5 |
af8c5a3733c31e5f64e5d33c3bd6164c
|
|
| BLAKE2b-256 |
6947b68b0381fde96d285343363092b6e975466011887678688adb32b61b264b
|