Portfolio valuation, cashflow analysis, and risk assessment.
Project description
Kupala Val
Kupala Val is a Python package that serves as an API wrapper around Kupala-Nich.com. It provides easy-to-use interfaces for obtaining valuations, cashflows, and bucketed DV01 (dollar value of a basis point) for portfolios of both listed and derivative financial products.
Features
- Portfolio valuation for listed and derivative products
- Cashflow analysis and projections
- Bucketed DV01 sensitivity analysis
- Support for both CSV files and pandas DataFrames
- Simple API with comprehensive documentation
Installation
pip install kupala_val
Getting Started
Prerequisites
To use this library, you need:
- A free account on Kupala-Nich.com
- An API key (available in the settings menu in the top right corner after login)
Setting up your API key
import kupala_val
# Set your API key
kupala_val.set_api_key("your_api_key_here")
Usage Examples
Working with CSV files
import kupala_val
# Load portfolio from CSV and get valuation
valuation = kupala_val.get_valuation(csv_path="path/to/portfolio.csv")
# Get cashflows
cashflows = kupala_val.get_cashflows(csv_path="path/to/portfolio.csv")
# Get bucketed DV01
dv01 = kupala_val.get_bucketed_dv01(csv_path="path/to/portfolio.csv")
Working with pandas DataFrames
import pandas as pd
import kupala_val
# Load your portfolio data into a DataFrame
df = pd.read_csv("path/to/portfolio.csv")
# Get valuation
valuation = kupala_val.get_valuation(dataframe=df)
# Get cashflows
cashflows = kupala_val.get_cashflows(dataframe=df)
# Get bucketed DV01
dv01 = kupala_val.get_bucketed_dv01(dataframe=df)
Sample Data
The package includes sample portfolio data to help you get started:
# Get sample data as a DataFrame
sample_df = kupala_val.get_sample(format="df")
# Save sample data as a CSV file
sample_csv_path = kupala_val.get_sample(format="csv")
API Documentation
For detailed API documentation, please visit Kupala-Nich.com/docs or refer to the docstrings in the code.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
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 kupala_val-0.1.0.tar.gz.
File metadata
- Download URL: kupala_val-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61e5c030c3f0401a78b996dcdace4963d21bd06aac1844dd130c4e269c4d71f8
|
|
| MD5 |
250722681b9c33447e0d36a8e134ae88
|
|
| BLAKE2b-256 |
3b22f13c7e67cb1394c8a71d248a18e01fd8a6ff25854b338749cee43fdd98e8
|
File details
Details for the file kupala_val-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kupala_val-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee826ef20c73569cb9e2685b2ca184e5caa1a36c731ca9c29246abc4450829c2
|
|
| MD5 |
71d996eadb7c2f3cf4bd344b1c633143
|
|
| BLAKE2b-256 |
bb6864ae2a3e1fa5444cf8415a6b1d461967127d415536ab76da8991e9092939
|