No Framework, No Problem! Structuring your project folder and creating custom Shiny components

Pedro Coutinho Silva is a software engineer at Appsilon Data Science. It is not always possible to create a dashboard that fully meets your expectations or requirements using only existing libraries. Maybe you want a specific function that needs to be custom built, or maybe you want to add your own style or company branding. Whatever the case, a moment might come when you need to expand and organize your code base, and dive into creating a custom solution for your project; but where to start?

Read more

Share Comments · · ·

Daily Volumes, Holidays and BLS Reports

Welcome to another installment of Reproducible Finance with R - the blog series that never seems to stop reproducing itself. Today we will explore the new almanac package for working with dates, which sprang forth courtesy of the mad genius behind riingo and furrr. We will be examining rolling returns and daily trading volumes from several ETFs over the past few years and we will use almanac to flag certain dates of interest.

Read more

Share Comments · · · · · ·

RStudio Blogs 2019

If you are lucky enough to have some extra time for discretionary reading during the holiday season, you may find it interesting (and rewarding) to sample some of the nearly two hundred posts written across the various RStudio blogs. R Views R Views, our blog devoted to the R Community and the R Language, published over sixty posts in 2019. Many of these were contributed by guest authors from the R Community who volunteered to share some outstanding work.

Read more

Share Comments · ·

November 2019: "Top 40" New R Packages

One hundred forty-four new packages made it to CRAN in November. Here are my picks for the “Top 40” in eight categories: Computational Methods, Data, Genomics, Machine Learning, Statistics, Time Series, Utilities, and Visualization. Computational Methods calculus v0.1.1: Provides C++ optimized functions for numerical and symbolic calculus including symbolic arithmetic, tensor calculus, Einstein summation convention, Taylor series expansion, multivariate Hermite polynomials and much more. Jaya v0.1.9: Implements a gradient-free algorithm, without hyperparameters, for solving both constrained and unconstrained optimization problems.

Read more

Share Comments · · ·

tidyposterior's Bayesian Approach to Model Comparison

A task common to many machine learning workflows is to compare the performance of several models with respect to some metric such as accuracy or area under the ROC curve. Standard practice is to try out several different algorithms on a training data set and see which works better. Unfortunately, all to often, after this work has been done, model selection comes down to “eyeballing” several different ROC curves. If you find eyeballing a little too informal, then take a look at the tidyposterior package (part of the universe of ‘tidymodels`).

Read more

Share Comments · · · · · · · ·

IPO Portfolios and a Benchmark

In two previous posts, we explored IPOs and IPO returns by sector and year since 2004 and then examined the returns of portfolios constructed by investing in IPOs each year. In today’s post, we will add a benchmark so that we can compare our IPO portfolios to something besides themselves. Next time, we will delve into return attribution to visualize how individual equities have contributed to portfolios over time.

Read more

Share Comments · ·

In-Database Logistic Regression with R

Roland Stevenson is a data scientist and consultant who may be reached on Linkedin. In a previous article we illustrated how to calculate xgboost model predictions in-database. This was referenced and incorporated into tidypredict. After learning more about what the tidypredict team is up to, I discovered another tidyverse package called modeldb that fits models in-database. It currently supports linear regression and k-means clustering, so I thought I would provide an example of how to do in-database logistic regression.

Read more

Share Comments · · ·

Introducing sortable to add drag-and-drop to your shiny apps

You can use the sortable package to add drag-and-drop behaviour to shiny apps.

Read more

Share Comments · · · · · ·

October 2019: "Top 40" New R Packages

Two Hundred twenty-three new packages made it to CRAN in October. Here are my “Top 40” picks in ten categories: Computational Methods, Data, Genomics, Machine Learning, Mathematics, Medicine, Pharmacology, Statistics, Utilities, and Visualization. Computational Methods admmDensestSubmatrix v0.1.0: Implements a method to identify the densest sub-matrix in a given or sampled binary matrix. See Bombina et al. (2019) for the technical details and the vignette for examples. mbend v1.2.3: Provides functions to “bend”” non-positive-definite (symmetric) matrices to positive-definite matrices using weighted and unweighted methods.

Read more

Share Comments · · ·

IPO Exploration Part Two

In a previous post, we explored IPOs and IPO returns by sector and year since 2004. Today, let’s investigate how portfolios formed with those IPOs have performed. We will need to grab the price histories of the tickers, then form portfolios, then calculate their performance, and then rank those performances in some way. Since there are several hundred IPOs for which we need to pull returns data, today’s post will be a bit data intensive.

Read more

Share Comments · · · ·