Git Product home page Git Product logo

optimize-portfolio-'s Introduction

optimize-portfolio-

find how much of a portfolio's funds should be allocated to each stock so as to optimize it's performance define "optimal" as maximum Sharpe ratio. find allocations to the symbols that maximizes Sharpe Ratio. Assume 252 trading days in a year and a risk free rate of 0

Implement a Python function named optimize_portfolio() in the file optimization.py that can find the optimal allocations for a given set of stocks The function accept as input a list of symbols as well as start and end dates and return a list of floats (as a one-dimensional numpy array) that represents the allocations to each of the equities. returned output is:

allocs: A 1-d Numpy array of allocations to the stocks, must sum to 1.0 cr: Cumulative return adr: Average daily return sddr: Standard deviation of daily return The input parameters are:

sd: A datetime object that represents the start date ed: A datetime object that represents the end date syms: A list of symbols that make up the portfolio (note that your code should support any symbol in the data directory) gen_plot: If True, create a plot named plot.png

optimize-portfolio-'s People

Contributors

catzizi avatar

Watchers

 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.