Skip to content

lucabol/GuruFollower

Repository files navigation

GuruFollower

It uses the SEC 13F filings to show the current portfolios for your chosen institutional investors, their position changes from the previous quarter and a cumulative portfolio consisting of all their positions. Something akin to DataRoma or GuruFocus, less feature rich, but more customizable as you have the code.

It can be run either from the command line or deployed to Azure as a web application using Azure Functions, DocumentDB and Azure Queue as backend.

Explore the application running on Azure here.

Todo

  1. Make installing the app simpler by automating the complex steps below
  2. Implement some form of identity so that each person connecting to the web site has its own list of gurus
  3. Do a security review (i.e. any SQL injection kind of attack accessing DocumentDB? How to remove the Function Key from javascript?)
  4. Implement the concept of groups so that each user can create sub-lists of gurus according to whatever criteria they choose
  5. Implement history for each position in the web app as presented in the console app so that you can see the history of buying and selling for a guru for a position (already in Console app)
  6. Implement assigning separate weights for each guru to get a weighted-adjusted hyper-portfolio (already in Console app)
  7. How to make the UI look cool:
    • Apply a good CSS to the whole thing
    • Add pie charts of positions inside a portfolio and gurus inside hyper-portfolio
    • Identify with up arrows increases, asterix-like graphic new buy and down arrow sells
    • Specially highlights the most interesting trades (i.e. more than 20% increase of a top 10 position)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to install:

Installing

Installing and running the console application is trivial:

  1. Clone the repository
  2. Open the solution in the root directory in Visual Studio 2015
  3. Set ConsoleFollower as your startup project
  4. Debug/Start Debugging

Installing and running the web application to test it locally is not easy:

  1. Fork the repository so that you have your own Github copy of it
  2. Create a new Azure Function Application
  3. Create a new DocumentDB in Azure and call it guru-portfolios
  4. Create a new Azure Storage Queue in Azure in the storage account created automatically in step 2
  5. Clone the repository
  6. Copy GuruBackend\appsettings.json.template to GuruBackend\appsettings.json and modify it to point to the resources created in step 3. and 4.
  7. Exclude GuruBackend\appsettings.json from git as you don`t want to share your account key with the world
  8. Open the solution in the root directory in Visual Studio 2015
  9. Set GuruBackend as your startup project
  10. Debug/Start Debugging
  11. Open cmd.exe in GuruFrontend\src\ and run npm run dev
  12. Your default browser opens up and you can start running the application

Deploying the whole thing to Azure is difficult:

  1. Set up continous deployment pointing to your github repository as described here
  2. Add the variables in your GuruBackend\appsettings.json file to your Azure Function Application by clicking on Function App Settings and then Configure App Settings
  3. Add a PROJECT variable with value GuruBackend to your Azure Function Application by clicking on Function App Settings and then Configure App Settings
  4. Run all the functions to and look at the logs for success (to call the GetXXX ones you may want to use something like Postman)
  5. Create a new Azure Web Application (i.e. choose simple HTML5 App)
  6. Go to App Deployment/Deployment Options, disconnect it from the existing deployment and connect it to the github repository
  7. Add a PROJECT variable with value GuruFrontEnd to your Azure Web Application by clicking on Application Settings
  8. Go back to the Azure Function App in step 2. and click on App Settings -> CORS and add the website for the application you created in step 19.
  9. Point a browser to your new web App
  10. YOU ARE DONE

How to redeploy your app if you make changes to It

  1. If you modify GuruLoader or GuruBackend, simply do a build in VS and Push to Github
  2. If you modify GuruFrontEnd, open a cmd in GuruFrontEnd/ and run 'npm dev build', the Push to Github

Running the tests

Tests are run as usual from inside the Visual Studio UI.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published