Stock-specific summaries and optimal portfolio weights |> Table Contest

Stock-specific summaries and optimal portfolio weights

Authors: Christoph Scheuch (Tidy Finance, Tidy Intelligence)
tidy-finance.org
tidy-intelligence.com

Full Description:
See README


Table Type: interactive-Shiny
Submission Type: Single Table Example
Table: Stock Analyzer
Code: GitHub - christophscheuch/app-stock-analyzer
Language:
Industries: finance.
Packages: gt, gtExtras, shiny, shinydashboard, shinycssloaders, shinyWidgets, dplyr, tidyr, svglite, ggplot2, scales

2 Likes

After clicking the button, the app gets an error. Before the deadline it would be great if you update the app. I wanted to warn you.

Good luck.

1 Like

Oh no, thank you for pointing this out! It used to work yesterday, so I need to investigate.

EDIT: turns out there was a memory issue with the free plan of shinyapps. I reduced the number of available symbols, now it works.

2 Likes

Very cool!!

turns out there was a memory issue with the free plan of shinyapps. I reduced the number of available symbols, now it works.

That is unfortunate about the memory issue with the free shinyapps.io plan. I'd think an app like this wouldn't get close to the limit?

Screen size

I wanted to note that on mobile, text in tables are quite cropped (and even on a desktop screen, one table crops "Volatility"). See images below.

  • Idea 1: You might want to reduce the font size.
  • Idea 2: You might consider creating a function that detects whether or not your user is on mobile (tips on how to do that here, R Shiny App Detect Mobile), and then setting a table font size contingent to that.
  • Idea 3: You can also put these tables into a container, and so people would horizontal scroll to see the full thing. That's actually what I end up doing in my reports that have large tables. Isn't always pretty, but makes all the info visible.

Default tables.

I also wanted to suggest considering forcing shiny to create your tables and plot the moment the app loads. And making your "create tables" button an "update tables" button. When I first loaded the app I thought it was broken until I read thru and saw the button.

@EconomiCurtis thank you for these great suggestions, I'll work on them asap! The memory limit was binding because I loaded daily returns for 20 years and 500 stocks by default (the optimal weights need to be computed on the fly). I also have on my list to just load the data that the app actually needs and keep the rest in duckdb or arrow.