Financial Portfolio Optimization Algorithms
Project description
azapy project
Financial Portfolio Optimization Algorithms
An open-source python library for everybody
Author: Mircea Marinescu
email: Mircea.Marinescu@outlook.com
Package installation: pip install azapy
Contents
A. Risk-based portfolio optimization algorithms:
- mCVaR - mixture CVaR (Conditional Value at Risk)
- mSMCR - mixture SMCR (Second Moment Coherent Risk)
- mMAD - m-level MAD (Mean Absolute Deviation)
- mLSD - m-level LSD (Lower Semi-Deviation)
- mBTAD - mixture BTAD (Below Threshold Absolute Deviation)
- mBTSD - mixture BTSD (Below Threshold Semi-Deviation)
- GINI - Gini index (as in Corrado Gini statistician 1884-1965)
- SD - standard deviation
- MV - variance (as in mean-variance model)
For each class of portfolio the following optimization strategies are available:
- Minimization of dispersion for targeted expected rate of return value
- Maximization of generalized Sharpe ratio
- Minimization of inverse of generalized Sharpe ratio
- Minimum risk portfolio
- Maximization of expected rate of return for a risk vale generated by a benchmark portfolio (e.g. same risk as equal weighted portfolio)
- Maximization of expected rate of returns for fixed risk-aversion factor
- Maximization of diversification factor for targeted expected rate of return value (alpha version)
- Maximum diversified portfolio (alpha version)
B. "Naïve" portfolio strategies:
- Constant weighted portfolio. A particular case is equal weighted portfolio.
- Inverse volatility portfolio (i.e. portfolio weights are proportional to the inverse of asset volatilities)
- Inverse variance portfolio (i.e. portfolio weights are proportional to the inverse of asset variances)
- Inverse drawdown portfolio (i.e. portfolio weights are proportional to the asset absolute value of maximum drawdowns over a predefined historical period)
C. Greedy portfolio optimization strategies:
- Kelly's portfolio (as in John Larry Kelly Jr. scientist 1923-1965) - maximization of portfolio log returns
Utility functions:
-
Collect historical market data from various providers. Supported providers:
- yahoo.com
- eodhistoricaldata.com
- alphavantage.co
- marketstack.com
-
Generate business calendars. At this point only NYSE business calendar is implemented.
-
Generate rebalancing portfolio schedules.
-
Append a cash-like security to an existing market data object.
-
Update market data saved in a directory.
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
File details
Details for the file azapy-1.0.1.tar.gz
.
File metadata
- Download URL: azapy-1.0.1.tar.gz
- Upload date:
- Size: 70.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55ed92d5e87ec895506365ed0204c0208a76d6cbe76d70406e2853268d2c8028 |
|
MD5 | adb58f9df82f3865f64f15dfc087be4c |
|
BLAKE2b-256 | dbef19b1b233109124c7d1686917ced94a89e6d5a2c4e698c24c50beb67de8b6 |
File details
Details for the file azapy-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: azapy-1.0.1-py3-none-any.whl
- Upload date:
- Size: 103.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4771037e44c0bf5a33df3319704d0abd4ccab57e5ab5f31dd178bc2440b5243c |
|
MD5 | 167d653ceb08152a84f8ef15ba078571 |
|
BLAKE2b-256 | 537c5a564786b14bbc5cef5697392343461d4b1cb84b064ec8a963b606279143 |