chnsh / crypto-index-fund

A micro-services based system for indexing cryptocurrencies
MIT License
15 stars 2 forks source link
cryptocurrency cryptocurrency-portfolio indexing kotlin python scrapy spring-boot

Crypto Index Fund API

Crypto Indexing is a passive investing strategy, and this is my attempt to hack an investing system together. This very basic system lists the top 5 cryptocurrencies to include in the portfolio according to an equi-weighted strategy.

I have attempted to avoid the market-cap bias by using data provided by the amazing CoinGecko.com. The idea is to achieve a Value Investing-styled strategy by trying to assess the overall quality of a coin.

CoinGecko.com does an outstanding job of ranking a cryptocurrency in a wholistic fashion by taking into account metrics like Development, Community Interactions, and a Publicity Score.

Output

{
  "0": {
    "coinSymbol": "BTC",
    "averageVolatility": -1.6326956521739127
  },
  "1": {
    "coinSymbol": "ETH",
    "averageVolatility": -3.1893043478260865
  },
  "2": {
    "coinSymbol": "EOS",
    "averageVolatility": -2.628086956521738
  },
  "3": {
    "coinSymbol": "XRP",
    "averageVolatility": -1.9188695652173906
  },
  "4": {
    "coinSymbol": "LTC",
    "averageVolatility": -2.220526315789474
  }
}

Why build something like this?

This is a simple experiment that I find interesting, and is by no means the best or the most scientific investing strategy available. I built this since I did not find any sufficiently open, self-service passive investing system.

Disclaimer

I developed this for my personal use, and have been using the API to invest a very minor amount in cryptocurrencies. While I have been using it personally, I am no financial expert! Please use with caution.

Architecture

The system consists of 2 micro-services:

Installation

Docker

Crypto-scrapers:

docker pull chnsh/crypto-scrapers [Hourly cron]
docker run -e "DB_USER=USER" -e "DB_PASS=PASS "DB_HOST=HOST" crypto-scrapers scrapy crawl coin_gecko

Crypto-indexing:

docker pull chnsh/crypto-indexing-api
docker run -e "SPRING_DATASOURCE_URL=JDBC_URL" -e "SPRING_DATASOURCE_USERNAME=USER" -e "SPRING_DATASOURCE_PASSWORD=PASS" -p 8080:8080 -d crypto-indexing-api

Development

Want to contribute? Great! Feel free to send a request

Todos

License

MIT