My first Web3 project

Web3
Crypto
Portfolio
Optimization
Author

I. Muliterno

Published

March 19, 2024

I am very interested in web3, but I always wondered how to make the best decisions about capital allocations, considering we have hundreds of option and also considering I don’t want to stay in front of a computer stressing out about any minor changes I see in the opening and closing prices.

That thought made me study what R could offer to solve that problem, thanks to that I found two amazing packages crypto2 and PortfolioAnalytics. Crypto2 is a package made by Sebastian Stöckl that, as he says in the official repo, provides tibbles with all data available via the web-api of coinmarketcap.com. It does not require an API key but in turn only provides information that is also available through the website of coinmarketcap.com.

PortfolioAnalytics provide numerical solutions for portfolio problems with complex constraints and objective sets.

Currently, supported optimization methods include:

With that, I studied the packages and defined an investment strategy to run automatically in a shiny application. The result is an app that let’s you choose a level of risk, and suggest how you should distribute your investment capital to optimize return, based on your risk aversion. Also, you can see the opening and closing prices of each cryptocurrency you choose.

Here’s how it looks like:

Click here and feel free to use it yourself.