Cryptocurrency Digger

Report

Introduction

Shiny App Link

Our Shiny application, named ‘Cryptocurrency Digger,’ is designed to provide an interactive platform for analyzing and visualizing the cryptocurrency market influenced by macroeconomic factors. It includes two functions. Firstly, users can generate a plot by filtering the macroeconomic indicators, type of cryptocurrency, and date interval to help them explore the potential relationship between these two factors. Secondly, users can obtain trend predictions from our ‘forecast’ panel.

As the market changes quickly, our application stands as a crucial resource for individuals and professionals who need up-to-date insights into cryptocurrency behavior. Our target users include both students interested in the field of digital currencies and experienced researchers.

We currently include five types of cryptocurrencies and five macroeconomic indicators in our dataset. The key feature of our application is its high level of interactivity. Users can filter data based on their preferences, including the type of cryptocurrency, macroeconomic indicators, and specific periods. This flexibility allows for deep analysis.

Justification of approach

Describe the deliverable(s). What did your team create? Who is the intended audience? How will the deliverable(s) meet their needs?

After a group discussion, we decided to design an interactive web application using Shiny, an R package that simplifies building directly from R. Shiny saved us a lot of time by eliminating the need to learn a new front-end language, allowing us to focus our energy on designing the details. All team members acquired relevant knowledge in economics during our undergraduate studies. It is interesting to adopt a data-driven approach in this field. Additionally, after reviewing sources like S&P Global, we decided to forecast the price trends of cryptocurrencies using macroeconomic indicators.

The application we created named “Cryptocurrency Digger,” which serves as a comprehensive tools for users to analyzing and visualizing the cryptocurrency market in the context of macroeconomic factors. Our intended audience is students who are particularly interested in digital currencies and economic analysis and researchers who are in the field of economics or cryptocurrency, requiring in-depth analysis tools.

This application provides an educational tool for understanding the relationship between cryptocurrencies and macroeconomic factors and allow professionals to discover market insights for their work. The interactive design allows users to engage deeply with the data, customizing their analysis based on different cryptocurrencies, macroeconomic indicators, and time periods. Additionally, this app has the user-friendly interface, with dynamic visualizations of comprehensive datasets, making sure that users could get valuable insights after using it.

Machine Learning Integration does the forecasting on cryptocurrency price trends. By leveraging machine learning, specifically the XGBoost algorithm, the application forecasts price trends of cryptocurrencies using macroeconomic indicators. This advanced feature enriches the user experience by providing predictive analytics, enabling users to anticipate future market movements. To play with it, user would select the trends (Up/Down) of major economic indexes, DJCI GC. (Dow Jones Commodity Gold), DXY (US Dollar Index), S&P 500, IXIC (NASDAQ Composite), U.S. inflation rate, and then click the “Make Forecast” button. The app will generate the prediction of the trend of cryptocurrency prices based on users previous selections.


Data description

What are the observations (rows) and the attributes (columns)?

  • Observations (Rows): Daily market data corresponding to different dates.

  • Attributes (Columns): Include attributes such as cryptocurrency prices, trading volume, volatility information, macroeconomic indicators (e.g., inflation rate, closing price of S&P 500), etc. Each cryptocurrency and each macroeconomic indicator represents a column in the dataset.

Why was this dataset created?

The dataset was created to provide insights into how cryptocurrency behavior is influenced by macroeconomic factors. By recording daily market data, analysis, and predictions can be conducted to help users better understand the dynamics of the cryptocurrency market.

Who funded the creation of the dataset?

The inflation rate monthly data was exported from https://www.usinflationcalculator.com/inflation/historical-inflation-rates/. According to the website, These inflation rates are calculated using the Consumer Price Index, which is published monthly by the Bureau of Labor Statistics (BLS) of the U.S. Department of Labor. So we can say the data is founded by usinflationcalculator.com and the US government.

Other indices like S&P 500, we found the data in https://finance.yahoo.com/ and https://fred.stlouisfed.org/ . The first one is founded by Yahoo.Inc and the second one is founded by the US government. .

The data for crypto currency is in https://www.cryptodatadownload.com. And is founded by cryptodatadownload.com


What processes might have influenced what data was observed and recorded and what was not?

The recording of data may be influenced by the sources from which the data is obtained and the research objectives. Selecting specific macroeconomic indicators and cryptocurrencies may be due to their perceived significant impact on market behavior.

What preprocessing was done, and how did the data come to be in the form that you are using?

Raw data is obtained from various sources, which are listed in explore.qmd. After discussions, our team decided to focus on specific information, such as the closing price of S&P 500, and cleaned and filtered the cryptocurrency data. The final cleaned data is stored in ‘joined_data.csv,’ and normalization using the step_normalize function from the recipe package was applied to all columns except the date column for better focus and analysis of coin prices and indicator trends.

If people are involved, were they aware of the data collection and if so, what purpose did they expect the data to be used for?

The inflation rate monthly data was exported fromhttps://www.usinflationcalculator.com/inflation/historical-inflation-rates/ . In order to match the time sequence of cryptocurrency, we assume that the inflation rate remains the same for each month in daily. As for other indicators like S&P 500, we found the data inhttps://finance.yahoo.com/ andhttps://fred.stlouisfed.org/ , the raw data contains open, close, highest and lowest etc. After discussion, we decided to focus on close price. We found the data for crypto currency inhttps://www.cryptodatadownload.com. The data for a particular crypto currency is in daily format, and it contains price, volume, and fluctuation information.

Our final cleaned data is called ‘joined_data.csv’. We used the step_normalize function in the recipe package to normalize all columns expect the date column. This allows us to analyze the trend of coin prices and indicator values, which is what we are actually interested in. 

Design process

  1. UI

The user interface of our Shiny application is designed to provide an engaging and intuitive experience for users interested in cryptocurrency analysis. At the top, the application features a navigation bar, which not only houses our title ‘Cryptocurrency Digger’ but also includes our designed logo, adding a visual appeal and making the application more recognizable, we will add interaction like clicking our logo and returning back to the home page.

The navigation bar is segmented into three main areas, each represented by a tab. The first tab, labeled ‘Home,’ serves as the welcoming section, containing an introduction and a visually appealing call-to-action button that invites users to start exploring the cryptocurrency data. We are going to make it more aesthetic, like we can add a main picture in the center.

The second tab, ‘Cryptocurrency Forecast,’ is the heart of the application. Here, users can interact with the data through various controls. They can select specific cryptocurrencies, economic indicators, and date ranges to tailor the data and display an unique plot. This section is all about user-driven exploration, featuring dynamic plots that update based on the user’s selections, offering a deep dive into the cryptocurrency market trends.

Finally, the ‘About’ tab provides detailed descriptions about the project and team members.We also plan to add our presentation video in this section.

  1. Server

The server-side of our Shiny application is engineered to handle user interactions, process data, and dynamically update the UI components. It functions seamlessly with the user interface to create an immersive experience for cryptocurrency enthusiasts seeking insightful analysis.

(1) Navigation and Tab Switching:

The `observeEvent` function is employed to respond to user interactions. For instance, when the “Start Digging” button in the ‘Home’ tab is clicked, the application smoothly transitions to the ‘Cryptocurrency Forecast’ tab. This enhances the overall user experience by guiding them through the application.

(2) Reactive Values for Selections:

Reactive values are utilized to dynamically respond to user selections for cryptocurrency types, economic indicators, and date ranges. These values are updated using the `observeEvent` function when the “GO!” button is clicked, triggering the regeneration of relevant plots and tables.

(3) Dynamic Plot Generation:

The `renderPlot` function is employed to dynamically generate plots based on user-selected parameters. In the ‘Cryptocurrency Forecast’ tab, the application produces an interactive plot illustrating the relationship between cryptocurrency prices and macroeconomic indicators.

(4) Table Output:

The `renderTable` function is used to display a table summarizing the selected data. This table provides users with a detailed view of the cryptocurrency and macroeconomic data corresponding to their chosen parameters.

As users interact with the controls in the ‘Cryptocurrency Forecast’ tab, the server dynamically adjusts the displayed information, allowing for a personalized and insightful exploration of cryptocurrency market trends.

  1. CSS file

Our CSS code helps to enhance the visual appeal and user experience. We made a team logo and set the title in the navigation bar. We made it in a dark blue background with white text for high contrast and readability. As we put our cursor on the navbar, we make sure it is consistent in color and styling. We also style our team member photos and make the website more professional and set an appealing layout with circular well-framed images.

Limitations

There are three limitations of our works:

1. Scope for Improvement:

Real-Time Data Integration: Our current version relies on the historical data, integrating real-time data feeds could increase the utility. This would allow users to make decisions based on the most current market conditions.

2. Performance and Scalability Issues:

As data volume and the user traffic, this app may face performance challenges. It might need more loading time and potential crashes. This might influence user experience.

3. Limited Customization and Analytical Depth

At this point, our application allows basic filtering and visualization, however, it lacks advanced customization and deeper analytical capabilities. In order to improve user experience and functionality.

The hurdle we failed to overcome was that we could not connect to the real-time macroeconomic indicator database, like auto-importing yesterday’s data continuously, to update our current data timely

If we had the opportunity to do this again, we would add more predictive analytics or trend analysis, delving deeper into time series packages. Additionally, we would also improve the UI design, making it more visible and reactive. For example, in the forecasting panel, users could filter the time interval to decide how long they want to predict.

Acknowledgments

Contributions: Thanks professor Soltoff as a mentor providing assistance and suggestions to our project.

Resources: In order to develop our application, we use specific R packages, and we learned through the Shiny community tutorials.

S&P Global.(2023).  Are Crypto Markets Correlated with Macroeconomic Factors. Available at:https://www.spglobal.com/en/research-insights/featured/special-editorial/are-crypto-markets-correlated-with-macroeconomic-factors (Accessed: 11/05/2023).

World Economic Forum, 2022. The Macroeconomic Impact of Cryptocurrency and Stablecoins. [online] Available at:https://www3.weforum.org/docs/WEF_The_Macroeconomic_Impact_of_Cryptocurrency_and_Stablecoins_2022.pdf [11/05/2023].