Code Monkey home page Code Monkey logo

azapy's Introduction

azapy project

Financial Portfolio Optimization Algorithms

An open-source python library for everybody

TimeSeries

Author: Mircea Marinescu

email: [email protected]

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 value
  2. Maximization of generalized Sharpe ratio
  3. Minimization of inverse of generalized Sharpe ratio
  4. Minimum risk 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 fixed risk-aversion factor
  7. Maximization of diversification factor for targeted expected rate of return value (alpha version)
  8. Maximum diversified portfolio (alpha version)

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.

azapy's People

Contributors

mircea-mmxxi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.