Git Product home page Git Product logo

p07_algoinvest-trade's Introduction

AlgoInvest-Trade

Table of contents

Foreword

The aim of these programs is write algorithms in order to maximise profit for a list of actions and with a limit of investment

First, I had to a program which tests all the possibilities.

Secondly, I had to find a solution to decrease the time of execution of the the first algorithm. I could choose different approximate solution but I choose to solve the problem using dynamic programmation

The problem I have to solve is knapsack problem. For more information, check here

Installation

Clone the code source (using ssh)

mkdir foo
git clone [email protected]:jjbochard/P07_AlgoInvest-Trade.git foo
cd foo

Create your virtual environnement

First, install Python 3.6+.

Then, create your virtual environnement :

python3 -m venv <your_venv_name>

Activate it :

  • with bash command prompt

      source <your_venv_name>/bin/activate
    
  • or with Windows PowerShell

      .\venv\Scripts\activate
    

Finally, install required modules

pip3 install -r requirements.txt

To deactivate your venv :

deactivate

Optionnal : configure your git repository with pre-commit (if you want to fork this project)

You can install the configured pre commit hook with

pre-commit install

How to use

  • Run the programs

To run bruteforce solution, use :

make bruteforce

To run optimized solution, use :

make optimized

To run sienna1 solution, use :

make sienna1

To run sienna2 solution, use :

make sienna2

To run both sienna solution, use :

make all_sienna

Possible improvements

  • I can save more seconds of execution using a matrice with only 2 rows (or even 1) but I think it's not worth it here

  • I can prove than P = NP in order to add 1 000 000 dollars to my bank account

p07_algoinvest-trade's People

Contributors

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