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. Mixture CVaR (Conditional Value at Risk)
  2. Mixture SMCR (Second Moment Coherent Risk)
  3. MV (Mean Variance)
  4. SD (Standard Deviation)
  5. Mixture MAD (Mean Absolute Deviation)
  6. Mixture LSSD (Lower Semi-Standard Deviation)
  7. GINI (as in Corrado Gini - statistician 1884-1965)
  8. MSGINI (Second Moment Gini dispersion measure)
  9. Omega ratio (introduced by Con Keating and William F. Shadwick - 2002)

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

  1. Minimization of dispersion for a give expected rate of return
  2. Maximization of generalized Sharpe ratio
  3. Minimization of the inverse of generalized Sharpe ratio
  4. Minimum dispersion portfolio
  5. Inverse-N risk optimal portfolio (optimal portfolio with the same dispersion measure as equal weighted portfolio)
  6. Maximization of expected rate of returns for a fixed value of risk aversion

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-0.1.0.tar.gz (63.9 kB view details)

Uploaded Source

Built Distribution

azapy-0.1.0-py3-none-any.whl (94.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: azapy-0.1.0.tar.gz
  • Upload date:
  • Size: 63.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for azapy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07690084eb63c6694da9f98bf819bd79120c4298734e405cd4515633cc32259e
MD5 598622e005e0a9bbbf97ac3fae78c0bc
BLAKE2b-256 70fdaa06efb690020250d522d510a1e44c3d8b942afd7b9e3b7de4e82c71a772

See more details on using hashes here.

File details

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

File metadata

  • Download URL: azapy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 94.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for azapy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46d7446a1409cbc2c8f7e8c026e921484934a306644a1e49011d7a0f432becf7
MD5 cce885591266ce8aa56a4987c9ccd98f
BLAKE2b-256 67bcffe0b7d349622b7f40719765fb930400738919ee8e5b5f964bbf78c2b836

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