GithubHelp home page GithubHelp logo

freedomfaighter / efficient-frontiers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pwcauley/efficient-frontiers

0.0 0.0 0.0 115 KB

Module to grab stock information and use it to calculate a resampled efficient frontier of portfolio compositions for the desired assets.

Python 100.00%

efficient-frontiers's Introduction

efficient-frontiers

Module containing functions that grab stock data from Alpha Vantage and use historical returns (or provided expected returns) to create a Resampled Efficient Frontier for the asset portfolio. The idea of resampled frontiers comes from Michaud & Michaud 2008 (https://www.newfrontieradvisors.com/media/1138/estimation-error-and-portfolio-optimization-12-05.pdf) and produces smoother, more conservative portfolio transitions from one risk level to another compared to classical mean-variance efficient frontiers from Markowitz 1956. The portfolio optimization and resampling techniques in this module do not consider portfolio rebalancing or any time-to-trade rules; the portfolios are considered static and trading decisions are left to the user. See the Wikipedia page for more information on portfolio optimization (https://en.wikipedia.org/wiki/Modern_portfolio_theory). The figures below show examples of efficient frontiers (left panel) and resampled portfolio composition as a function of risk (right panel).

Note that the frontier resampler and plot functions can be used without querying Alpha Vantage. This module was written in part to get experience pulling stock data from Alpha Vantage but any array of asset returns, standard deviations, and correlations will work for the efficient frontier calculations.

Functions

get_stock_info

frontier_resampler

ref_plots

Package dependencies

numpy

pandas

alpha_vantage.timeseries

cvxopt

matplotlib

efficient-frontiers's People

Contributors

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