Giter VIP home page Giter VIP logo

mf-models's Introduction

mf-models

Models (data structures) required to make a mutual fund investment platform

Context

Real-life application of library

I built and operated a mutual fund investing platform as an AMFI licensed mutual fund distributor for a year. I used this library to store all my data. Since my investing website was built on django, I have used django models. You can build this platform without or with any other framework of your choice.

Open source in fintech?!

The finance industry believes that differentiation in fintech can come from building an execution/transaction platform. I believe that, on the contrary, execution will soon be commoditized and differentiation will come from better products, ease of their use and large-scale distribution. This is why I am open-sourcing my whole mutual fund execution platform, and these models are just its subset.

Models

Data structure

4 key data structures are necessary for a mutual fund transaction platform. Regulations require to carefully archive this data for 5 years.

  • funds.py stores mutual fund schemes' official SID details, ratings, returns, owner, rta, managers, benchmark indices, portfolio and history.
  • graphs.py stores time series data of funds and indices (like BSE Sensex, SBI fixed deposit rate), at daily frequency.
  • users.py stores kyc, bank, fatca and mandate details for each investor.
  • transactions.py stores each purcahse/redeem transaction's key details incl status, datetime stamps, payment details, corresponding API queries made to BSEStarMF and corresponding responses received. The BSE tables are used for the placing transactions through BSEStarMF API.

Choice of database

Relational data

I used a relational database MySQL to store all funds, users and transactions data. PostgreSQL would also be a great choice. This ER diagram should help. ER diagram

Time series data

I chose document database MongoDB to store the graphs models. Every scheme was a document because time series data was mostly requested fund-by-fund for graph visualisations. Note that aggregates of risk and return like average return etc are periodically calculated on top of the time series data and stored in funds models. Time series databases like Druid and InfluxDB would have been good options too.

Related repos

Need help setting this up or want to contribute?

Feel free to raise an issue and I will get back asap

mf-models's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mf-models's Issues

funds master data crawling

Hi Utkarsh,

Thanks for sharing your knowledge on fintech.

I am Developer with .NET technologies.

I am planning to learn Python + NO SQL + Machine Learning.

And I want to do a project using the technologies, My first thought was MFs and Stock Analysis.

After a little googling I found the right place to start.

I Found the NAV historical data which is a good start for me to do some analytics on them.

However, I am also interested in the fund portfolio{stocks} data as well.

As per the mf-models / funds.py has given a good idea on how the fund data schema should be.

It would be great if you can give me the mysql/funds data back up file {i just need the funds- data only}

Or, even better if you could guide me on how to crawl this data from openly available websites like money control.

Basically,

I want to crawl on a daily basis and see how each Mutual fund has invested in stocks.

And Find a Trend between the MF investment and stock price movement and predict Stock Pricing for future.

Awaiting your valuable response.

Thank you.

Regards
Anil. R

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.