Skip to main content

Financial Portfolio Optimization Algorithms

Project description

azapy project

Financial Portfolio Optimization Algorithms

An open-source python library for everybody

TimeSeries

Author: Mircea Marinescu

email: Mircea.Marinescu@outlook.com

Package documentation

Package installation: pip install azapy

ko-fi

Contents

A. Risk based portfolio optimization algorithms:

  1. mCVaR - mixture CVaR (Conditional Value at Risk)
  2. mSMCR - mixture SMCR (Second Moment Coherent Risk)
  3. mMAD - m-level MAD (Mean Absolute Deviation)
  4. mLSD - m-level LSD (Lower Semi-Deviation)
  5. mBTAD - mixture BTAD (Below Threshold Absolute Deviation)
  6. mBTSD - mixture BTSD (Below Threshold Semi-Deviation)
  7. GINI - Gini index (as in Corrado Gini statistician 1884-1965)
  8. SD - standard deviation
  9. MV - variance (as in mean-variance model)

For each class of portfolio the following optimization strategies are available:

  1. Minimization of dispersion for targeted expected rate of return
  2. Maximization of generalized Sharpe ratio
  3. Minimization of inverse of generalized Sharpe ratio
  4. Minimum dispersion portfolio
  5. Maximization of expected rate of return for a risk vale generated by a benchmark portfolio (e.g. same risk as equal weighted portfolio)
  6. Maximization of expected rate of returns for a fixed value of risk-aversion factor

B. "Naïve" portfolio strategies:

  1. Constant weighted portfolio. A particular case is equal weighted portfolio.
  2. Inverse volatility portfolio (i.e. portfolio weights are proportional to the inverse of asset volatilities)
  3. Inverse variance portfolio (i.e. portfolio weights are proportional to the inverse of asset variances)
  4. 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:

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azapy-1.0.0.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

azapy-1.0.0-py3-none-any.whl (98.6 kB view details)

Uploaded Python 3

File details

Details for the file azapy-1.0.0.tar.gz.

File metadata

  • Download URL: azapy-1.0.0.tar.gz
  • Upload date:
  • Size: 65.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for azapy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6b3dd59da5da00e85b066757221e7e6f30ce4bfb9f8e2d039588697a369b3376
MD5 67e7fa652d69e9217a7e6fa67b707028
BLAKE2b-256 4bf3829e14f708bab18c43491abf5ac63bf1f4e7bf92bb91b50c7084b5c8157e

See more details on using hashes here.

File details

Details for the file azapy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: azapy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 98.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for azapy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef14c156e1fe2ab93fd4d8e9de1198008ca7fd768726e69d5ed2eb7f30115231
MD5 9fd14097f7156106a4b5a0da46d4ca42
BLAKE2b-256 36740754309a8a0573971cec66b49034c83be20feb9b8f9d9b8dc4a00dee8622

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page